From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org
Cc: Hoan Tran <hoan@os.amperecomputing.com>,
Serge Semin <fancer.lancer@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: [PATCH v1 1/2] gpiolib: acpi: make fwnode take precedence in struct gpio_chip
Date: Thu, 23 Dec 2021 12:38:08 +0200 [thread overview]
Message-ID: <20211223103809.12343-1-andriy.shevchenko@linux.intel.com> (raw)
If the driver sets the fwnode in struct gpio_chip, let it take
precedence over the parent's fwnode.
This is a follow up to the commit 9126a738edc1 ("gpiolib: of: make
fwnode take precedence in struct gpio_chip").
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/gpio/gpiolib-acpi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index c7a0e56593e7..c0f6a25c3279 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -1339,6 +1339,9 @@ void acpi_gpio_dev_init(struct gpio_chip *gc, struct gpio_device *gdev)
/* Set default fwnode to parent's one if present */
if (gc->parent)
ACPI_COMPANION_SET(&gdev->dev, ACPI_COMPANION(gc->parent));
+
+ if (gc->fwnode)
+ device_set_node(&gdev->dev, gc->fwnode);
}
static int acpi_gpio_package_count(const union acpi_object *obj)
--
2.34.1
next reply other threads:[~2021-12-23 10:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-23 10:38 Andy Shevchenko [this message]
2021-12-23 10:38 ` [PATCH v1 2/2] gpio: dwapb: Switch to use fwnode instead of of_node Andy Shevchenko
2021-12-24 13:47 ` Serge Semin
2022-01-03 10:05 ` Bartosz Golaszewski
2021-12-23 12:04 ` [PATCH v1 1/2] gpiolib: acpi: make fwnode take precedence in struct gpio_chip Mika Westerberg
2022-01-03 10:06 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211223103809.12343-1-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=brgl@bgdev.pl \
--cc=fancer.lancer@gmail.com \
--cc=hoan@os.amperecomputing.com \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox