From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-gpio@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>
Subject: [PATCH v1 4/5] gpio: stmpe: Make use of device properties
Date: Mon, 2 Sep 2024 16:30:43 +0300 [thread overview]
Message-ID: <20240902133148.2569486-5-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20240902133148.2569486-1-andriy.shevchenko@linux.intel.com>
Convert the module to be property provider agnostic and allow
it to be used on non-OF platforms.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/gpio/gpio-stmpe.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c
index 7f2911c478ea..c1fb06925e09 100644
--- a/drivers/gpio/gpio-stmpe.c
+++ b/drivers/gpio/gpio-stmpe.c
@@ -11,8 +11,8 @@
#include <linux/slab.h>
#include <linux/gpio/driver.h>
#include <linux/interrupt.h>
-#include <linux/of.h>
#include <linux/mfd/stmpe.h>
+#include <linux/property.h>
#include <linux/seq_file.h>
#include <linux/bitops.h>
@@ -465,7 +465,6 @@ static int stmpe_gpio_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct stmpe *stmpe = dev_get_drvdata(dev->parent);
- struct device_node *np = dev->of_node;
struct stmpe_gpio *stmpe_gpio;
int ret, irq;
@@ -489,8 +488,7 @@ static int stmpe_gpio_probe(struct platform_device *pdev)
if (IS_ENABLED(CONFIG_DEBUG_FS))
stmpe_gpio->chip.dbg_show = stmpe_dbg_show;
- of_property_read_u32(np, "st,norequest-mask",
- &stmpe_gpio->norequest_mask);
+ device_property_read_u32(dev, "st,norequest-mask", &stmpe_gpio->norequest_mask);
ret = stmpe_enable(stmpe, STMPE_BLOCK_GPIO);
if (ret)
--
2.43.0.rc1.1336.g36b5255a03ac
next prev parent reply other threads:[~2024-09-02 13:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 13:30 [PATCH v1 0/5] gpio: stmpe: A few cleanups Andy Shevchenko
2024-09-02 13:30 ` [PATCH v1 1/5] gpio: stmpe: Fix IRQ related error messages Andy Shevchenko
2024-09-05 11:33 ` Linus Walleij
2024-09-02 13:30 ` [PATCH v1 2/5] gpio: stmpe: Remove unused 'dev' member of struct stmpe_gpio Andy Shevchenko
2024-09-05 11:34 ` Linus Walleij
2024-09-02 13:30 ` [PATCH v1 3/5] gpio: stmpe: Utilise temporary variable for struct device Andy Shevchenko
2024-09-05 11:35 ` Linus Walleij
2024-09-02 13:30 ` Andy Shevchenko [this message]
2024-09-05 11:35 ` [PATCH v1 4/5] gpio: stmpe: Make use of device properties Linus Walleij
2024-09-02 13:30 ` [PATCH v1 5/5] gpio: stmpe: Sort headers Andy Shevchenko
2024-09-05 11:35 ` Linus Walleij
2024-09-04 7:03 ` [PATCH v1 0/5] gpio: stmpe: A few cleanups 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=20240902133148.2569486-5-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=alexandre.torgue@foss.st.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.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;
as well as URLs for NNTP newsgroup(s).