From: Krzysztof Kozlowski <krzk@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Opasiak <k.opasiak@samsung.com>,
Kukjin Kim <kgene@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-nfc@lists.01.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org
Cc: Sylwester Nawrocki <snawrocki@kernel.org>,
Chanwoo Choi <cw00.choi@samsung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Inki Dae <inki.dae@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: [RFT 3/4] nfc: s3fwrn5: Remove wrong vendor prefix from GPIOs
Date: Sat, 29 Aug 2020 16:29:47 +0200 [thread overview]
Message-ID: <20200829142948.32365-3-krzk@kernel.org> (raw)
In-Reply-To: <20200829142948.32365-1-krzk@kernel.org>
The device tree property prefix describes the vendor, which in case of
S3FWRN5 chip is Samsung. Therefore the "s3fwrn5" prefix for "en-gpios"
and "fw-gpios" is not correct and should be deprecated. Introduce
properly named properties for these GPIOs but still support deprecated
ones.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/nfc/s3fwrn5/i2c.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c
index b4eb926d220a..557279492503 100644
--- a/drivers/nfc/s3fwrn5/i2c.c
+++ b/drivers/nfc/s3fwrn5/i2c.c
@@ -200,13 +200,21 @@ static int s3fwrn5_i2c_parse_dt(struct i2c_client *client)
if (!np)
return -ENODEV;
- phy->gpio_en = of_get_named_gpio(np, "s3fwrn5,en-gpios", 0);
- if (!gpio_is_valid(phy->gpio_en))
- return -ENODEV;
+ phy->gpio_en = of_get_named_gpio(np, "en-gpios", 0);
+ if (!gpio_is_valid(phy->gpio_en)) {
+ /* Support also deprecated property */
+ phy->gpio_en = of_get_named_gpio(np, "s3fwrn5,en-gpios", 0);
+ if (!gpio_is_valid(phy->gpio_en))
+ return -ENODEV;
+ }
- phy->gpio_fw_wake = of_get_named_gpio(np, "s3fwrn5,fw-gpios", 0);
- if (!gpio_is_valid(phy->gpio_fw_wake))
- return -ENODEV;
+ phy->gpio_fw_wake = of_get_named_gpio(np, "wake-gpios", 0);
+ if (!gpio_is_valid(phy->gpio_fw_wake)) {
+ /* Support also deprecated property */
+ phy->gpio_fw_wake = of_get_named_gpio(np, "s3fwrn5,fw-gpios", 0);
+ if (!gpio_is_valid(phy->gpio_fw_wake))
+ return -ENODEV;
+ }
return 0;
}
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-08-29 14:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-29 14:29 [PATCH 1/4] dt-bindings: net: nfc: s3fwrn5: Convert to dtschema Krzysztof Kozlowski
2020-08-29 14:29 ` [PATCH 2/4] dt-bindings: net: nfc: s3fwrn5: Remove wrong vendor prefix from GPIOs Krzysztof Kozlowski
2020-08-29 14:29 ` Krzysztof Kozlowski [this message]
2020-08-31 13:16 ` [RFT 3/4] " Marek Szyprowski
2020-08-29 14:29 ` [PATCH 4/4] arm64: dts: exynos: Use newer S3FWRN5 GPIO properties in Exynos5433 TM2 Krzysztof Kozlowski
2020-08-31 13:16 ` Marek Szyprowski
2020-08-31 13:51 ` Krzysztof Kozlowski
2020-09-03 16:32 ` [PATCH 1/4] dt-bindings: net: nfc: s3fwrn5: Convert to dtschema Rob Herring
2020-09-06 14:38 ` Krzysztof Kozlowski
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=20200829142948.32365-3-krzk@kernel.org \
--to=krzk@kernel.org \
--cc=b.zolnierkie@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=inki.dae@samsung.com \
--cc=k.opasiak@samsung.com \
--cc=kgene@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfc@lists.01.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=snawrocki@kernel.org \
/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).