From patchwork Wed Sep 11 07:52:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 11142449 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BA7E013BD for ; Thu, 12 Sep 2019 07:08:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A2AB12171F for ; Thu, 12 Sep 2019 07:08:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2AB12171F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F1BF26EBC8; Thu, 12 Sep 2019 07:08:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 651206EA48 for ; Wed, 11 Sep 2019 07:52:20 +0000 (UTC) Received: by mail-pf1-x442.google.com with SMTP id r12so13183484pfh.1 for ; Wed, 11 Sep 2019 00:52:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=q4c1ESOOpjE2P/uFd/KkrtGxclO2zKfVzjnW7aP5b5c=; b=aWjqvQrn5t50SHRInHR4amK1AtMjIxtH9F3lMgpR1IPybzo8D6Wj/cZXUUWtaqYF4l oFzw5CGpCm87I4qZ6LdN3E2IoJXyj3LRYLL/QHmFCYVp4VvhYAPgeSHqCmUNdaAlXp1K i3rQIcbglVfLVRv1G9EMIyQKTohA3ICD0Cxbc8nv8duHhuL7BmWDJHVbnvh8Q3xeZ57Q YBl7RwH6boHCgyy0Er+okRNlQyEsHpWeSmjvBspXgYA0kK6AJtKzLutMcRBDK72z5/Kj m4K2Fr8tam2e6kKwTQiv/V8pOs/LfBOM56zPu+DxFASxvuOg68qqdmfxVYWv+XfKMJ2x lPsg== X-Gm-Message-State: APjAAAXWsrgP0SsRRiVB+gPT1Ivf1XPWblSvgtI7GBgIZqcqQtkNN9CE KYpgg5IHbpAc8hvkPVKqDe8= X-Google-Smtp-Source: APXvYqyrkl1nQUV0tQy2ao6Qp1atdp6sVcb56rA8O+j9Av28pZKjTEmBQuuMIwaP++GyQIODri9+7A== X-Received: by 2002:a62:ee0a:: with SMTP id e10mr41430645pfi.197.1568188339617; Wed, 11 Sep 2019 00:52:19 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id u2sm8582445pgp.66.2019.09.11.00.52.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2019 00:52:19 -0700 (PDT) From: Dmitry Torokhov To: Linus Walleij Subject: [PATCH 00/11] Add support for software nodes to gpiolib Date: Wed, 11 Sep 2019 00:52:04 -0700 Message-Id: <20190911075215.78047-1-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.23.0.162.g0b9fbb3734-goog MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 12 Sep 2019 07:07:54 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=q4c1ESOOpjE2P/uFd/KkrtGxclO2zKfVzjnW7aP5b5c=; b=icWt7W0/ZGxLPm02+gnA/J9j34su+UEYXiIxB1YxkdgQeerLuWIogY5w8f411VOCOq SgN3HpCyUKKt0AHKyEgPID2BBTF3u4+NAuk3B9QNNX/KsAULVe9vssToPV0QF4zjzvr0 KKcBVuk0hI5R1cs9G7wNbXYDTEXe4mDCRGFBMbrNiIb2Z+MPOKB/5nd+zOlxhG7ImCxG bQPZ2M+gW9iF9Aikn4j/ghPrWXFh5X+F6gpMOK/20erVWKwkcBiH7ran3LtCKIHxFUnF 4jUTN0gHJNHvc/00+XZPU9eLUehHBeQae0yLzl5aTDWL/DklS1NCHKX2o3qv5IO278+C /jmQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Jernej Skrabec , Florian Fainelli , linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org, David Airlie , netdev@vger.kernel.org, Jonas Karlman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Russell King , Neil Armstrong , Laurent Pinchart , Bartosz Golaszewski , Andy Shevchenko , Mika Westerberg , "David S. Miller" , Heiner Kallweit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This series attempts to add support for software nodes to gpiolib, using software node references that were introduced recently. This allows us to convert more drivers to the generic device properties and drop support for custom platform data: static const struct software_node gpio_bank_b_node = { |-------.name = "B", }; static const struct property_entry simone_key_enter_props[] = { |-------PROPERTY_ENTRY_U32("linux,code", KEY_ENTER), |-------PROPERTY_ENTRY_STRING("label", "enter"), |-------PROPERTY_ENTRY_REF("gpios", &gpio_bank_b_node, 123, GPIO_ACTIVE_LOW), |-------{ } }; If we agree in principle, I would like to have the very first 3 patches in an immutable branch off maybe -rc8 so that it can be pulled into individual subsystems so that patches switching various drivers to fwnode_gpiod_get_index() could be applied. Thanks, Dmitry Dmitry Torokhov (11): gpiolib: of: add a fallback for wlf,reset GPIO name gpiolib: introduce devm_fwnode_gpiod_get_index() gpiolib: introduce fwnode_gpiod_get_index() net: phylink: switch to using fwnode_gpiod_get_index() net: mdio: switch to using fwnode_gpiod_get_index() drm/bridge: ti-tfp410: switch to using fwnode_gpiod_get_index() gpliolib: make fwnode_get_named_gpiod() static gpiolib: of: tease apart of_find_gpio() gpiolib: of: tease apart acpi_find_gpio() gpiolib: consolidate fwnode GPIO lookups gpiolib: add support for software nodes drivers/gpio/Makefile | 1 + drivers/gpio/gpiolib-acpi.c | 153 ++++++++++++++---------- drivers/gpio/gpiolib-acpi.h | 21 ++-- drivers/gpio/gpiolib-devres.c | 33 ++---- drivers/gpio/gpiolib-of.c | 159 ++++++++++++++----------- drivers/gpio/gpiolib-of.h | 26 ++-- drivers/gpio/gpiolib-swnode.c | 92 +++++++++++++++ drivers/gpio/gpiolib-swnode.h | 13 ++ drivers/gpio/gpiolib.c | 184 ++++++++++++++++------------- drivers/gpu/drm/bridge/ti-tfp410.c | 4 +- drivers/net/phy/mdio_bus.c | 4 +- drivers/net/phy/phylink.c | 4 +- include/linux/gpio/consumer.h | 53 ++++++--- 13 files changed, 471 insertions(+), 276 deletions(-) create mode 100644 drivers/gpio/gpiolib-swnode.c create mode 100644 drivers/gpio/gpiolib-swnode.h