From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2020-09-10 17:53:36
Two functions accept pointer to struct s3fwrn5_fw_info but do not
modify the contents. Make them const so the code is a little bit safer.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/nfc/s3fwrn5/firmware.c | 4 ++--
drivers/nfc/s3fwrn5/firmware.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2020-09-10 17:55:41
Robert Bałdyga's email does not work (bounces) since 2016 so remove it.
Additionally there are no review/ack/tested tags from Krzysztof Opasiak
so it looks like the driver is not supported.
As a maintainer of Samsung ARM/ARM64 SoC, I can take care about this
driver and provide some review. However clearly driver is not in
supported mode as I do not work in Samsung anymore.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
CREDITS | 4 ++++
MAINTAINERS | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
@@ -191,6 +191,10 @@ N: Krishna Balasubramanian E: balasub@cis.ohio-state.edu D: Wrote SYS V IPC (part of standard kernel since 0.99.10)+B: Robert Baldyga+E: r.baldyga@hackerion.com+D: Samsung S3FWRN5 NCI NFC Controller+ N: Chris Ball E: chris@printf.net D: Former maintainer of the MMC/SD/SDIO subsystem.
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2020-09-10 17:55:43
Since "s3fwrn5" is not a valid vendor prefix, use new GPIO properties
instead of the deprecated.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2020-09-10 17:57:36
The driver uses crypto hash functions so it needs to select CRYPTO_HASH.
This fixes build errors:
arc-linux-ld: drivers/nfc/s3fwrn5/firmware.o: in function `s3fwrn5_fw_download':
firmware.c:(.text+0x152): undefined reference to `crypto_alloc_shash'
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/nfc/s3fwrn5/Kconfig | 1 +
1 file changed, 1 insertion(+)
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2020-09-10 18:46:05
The local variable 'ret' can be removed:
drivers/nfc/s3fwrn5/i2c.c:167:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/nfc/s3fwrn5/i2c.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2020-09-10 18:46:58
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 and rename the fw-gpios" to
"wake-gpios" to better describe its purpose.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
.../bindings/net/nfc/samsung,s3fwrn5.yaml | 24 ++++++++++++++-----
1 file changed, 18 insertions(+), 6 deletions(-)
@@ -14,30 +14,42 @@ properties:compatible:const:samsung,s3fwrn5-i2c+en-gpios:+maxItems:1+description:+Output GPIO pin used for enabling/disabling the chip+interrupts:maxItems:1reg:maxItems:1+wake-gpios:+maxItems:1+description:+Output GPIO pin used to enter firmware mode and sleep/wakeup control+s3fwrn5,en-gpios:maxItems:1+deprecated:truedescription:-Output GPIO pin used for enabling/disabling the chip+Use en-gpioss3fwrn5,fw-gpios:maxItems:1+deprecated:truedescription:-Output GPIO pin used to enter firmware mode and sleep/wakeup control+Use wake-gpiosadditionalProperties:falserequired:-compatible+-en-gpios-interrupts-reg--s3fwrn5,en-gpios--s3fwrn5,fw-gpios+-wake-gpiosexamples:-|
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2020-09-10 18:47:17
Convert the Samsung S3FWRN5 NCI NFC controller bindings to dtschema.
This is conversion only so it includes properties with invalid prefixes
(s3fwrn5,en-gpios) which should be addressed later.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
.../devicetree/bindings/net/nfc/s3fwrn5.txt | 25 --------
.../bindings/net/nfc/samsung,s3fwrn5.yaml | 61 +++++++++++++++++++
MAINTAINERS | 1 +
3 files changed, 62 insertions(+), 25 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt
create mode 100644 Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2020-09-10 18:48:41
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>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
drivers/nfc/s3fwrn5/i2c.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
@@ -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;+}return0;}
Changes since v2:
1. Fix dtschema ID after rename (patch 1/8).
2. Apply patch 9/9 (defconfig change).
Changes since v1:
1. Rename dtschema file and add additionalProperties:false, as Rob
suggested,
2. Add Marek's tested-by,
3. New patches: #4, #5, #6, #7 and #9.
Changes since v2:
1. Fix dtschema ID after rename (patch 1/8).
2. Apply patch 9/9 (defconfig change).
Changes since v1:
1. Rename dtschema file and add additionalProperties:false, as Rob
suggested,
2. Add Marek's tested-by,
3. New patches: #4, #5, #6, #7 and #9.
Seires applied to net-next, thanks.
Thanks. The DTS should go separate - via samsung-soc/arm-soc tree.
However if it is too late, then no problem.
Best regards,
Krzysztof