linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next 0/2] nfc: s3fwrn5: Refactor the s3fwrn5 module
@ 2020-12-15  6:53 Bongsu Jeon
  2020-12-15  6:54 ` [PATCH v2 net-next 1/2] nfc: s3fwrn5: Remove the delay for NFC sleep Bongsu Jeon
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Bongsu Jeon @ 2020-12-15  6:53 UTC (permalink / raw)
  To: krzk; +Cc: linux-nfc, netdev, linux-kernel, Bongsu Jeon

From: Bongsu Jeon <bongsu.jeon@samsung.com>

Refactor the s3fwrn5 module.

1/2 is to remove the unneeded delay for NFC sleep.
2/2 is to remove the unused NCI prop commands.

ChangeLog:
 v2:
  - Update the commit messages.

Bongsu Jeon (2):
  nfc: s3fwrn5: Remove the delay for NFC sleep
  nfc: s3fwrn5: Remove unused NCI prop commands

 drivers/nfc/s3fwrn5/nci.c        | 25 -------------------------
 drivers/nfc/s3fwrn5/nci.h        | 22 ----------------------
 drivers/nfc/s3fwrn5/phy_common.c |  3 ++-
 3 files changed, 2 insertions(+), 48 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 net-next 1/2] nfc: s3fwrn5: Remove the delay for NFC sleep
  2020-12-15  6:53 [PATCH v2 net-next 0/2] nfc: s3fwrn5: Refactor the s3fwrn5 module Bongsu Jeon
@ 2020-12-15  6:54 ` Bongsu Jeon
  2020-12-15  9:12   ` Krzysztof Kozlowski
  2020-12-15  6:54 ` [PATCH v2 net-next 2/2] nfc: s3fwrn5: Remove unused NCI prop commands Bongsu Jeon
  2020-12-16 21:30 ` [PATCH v2 net-next 0/2] nfc: s3fwrn5: Refactor the s3fwrn5 module patchwork-bot+netdevbpf
  2 siblings, 1 reply; 6+ messages in thread
From: Bongsu Jeon @ 2020-12-15  6:54 UTC (permalink / raw)
  To: krzk; +Cc: linux-nfc, netdev, linux-kernel, Bongsu Jeon

From: Bongsu Jeon <bongsu.jeon@samsung.com>

Remove the delay for NFC sleep because the delay is only needed to
guarantee that the NFC is awake.

Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com>
---
 drivers/nfc/s3fwrn5/phy_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nfc/s3fwrn5/phy_common.c b/drivers/nfc/s3fwrn5/phy_common.c
index 497b02b30ae7..81318478d5fd 100644
--- a/drivers/nfc/s3fwrn5/phy_common.c
+++ b/drivers/nfc/s3fwrn5/phy_common.c
@@ -20,7 +20,8 @@ void s3fwrn5_phy_set_wake(void *phy_id, bool wake)
 
 	mutex_lock(&phy->mutex);
 	gpio_set_value(phy->gpio_fw_wake, wake);
-	msleep(S3FWRN5_EN_WAIT_TIME);
+	if (wake)
+		msleep(S3FWRN5_EN_WAIT_TIME);
 	mutex_unlock(&phy->mutex);
 }
 EXPORT_SYMBOL(s3fwrn5_phy_set_wake);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 net-next 2/2] nfc: s3fwrn5: Remove unused NCI prop commands
  2020-12-15  6:53 [PATCH v2 net-next 0/2] nfc: s3fwrn5: Refactor the s3fwrn5 module Bongsu Jeon
  2020-12-15  6:54 ` [PATCH v2 net-next 1/2] nfc: s3fwrn5: Remove the delay for NFC sleep Bongsu Jeon
@ 2020-12-15  6:54 ` Bongsu Jeon
  2020-12-15  9:13   ` Krzysztof Kozlowski
  2020-12-16 21:30 ` [PATCH v2 net-next 0/2] nfc: s3fwrn5: Refactor the s3fwrn5 module patchwork-bot+netdevbpf
  2 siblings, 1 reply; 6+ messages in thread
From: Bongsu Jeon @ 2020-12-15  6:54 UTC (permalink / raw)
  To: krzk; +Cc: linux-nfc, netdev, linux-kernel, Bongsu Jeon

From: Bongsu Jeon <bongsu.jeon@samsung.com>

Remove the unused NCI prop commands that s3fwrn5 driver doesn't use.

Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com>
---
 drivers/nfc/s3fwrn5/nci.c | 25 -------------------------
 drivers/nfc/s3fwrn5/nci.h | 22 ----------------------
 2 files changed, 47 deletions(-)

diff --git a/drivers/nfc/s3fwrn5/nci.c b/drivers/nfc/s3fwrn5/nci.c
index 103bf5c92bdc..f042d3eaf8f6 100644
--- a/drivers/nfc/s3fwrn5/nci.c
+++ b/drivers/nfc/s3fwrn5/nci.c
@@ -21,31 +21,11 @@ static int s3fwrn5_nci_prop_rsp(struct nci_dev *ndev, struct sk_buff *skb)
 }
 
 static struct nci_driver_ops s3fwrn5_nci_prop_ops[] = {
-	{
-		.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
-				NCI_PROP_AGAIN),
-		.rsp = s3fwrn5_nci_prop_rsp,
-	},
-	{
-		.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
-				NCI_PROP_GET_RFREG),
-		.rsp = s3fwrn5_nci_prop_rsp,
-	},
 	{
 		.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
 				NCI_PROP_SET_RFREG),
 		.rsp = s3fwrn5_nci_prop_rsp,
 	},
-	{
-		.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
-				NCI_PROP_GET_RFREG_VER),
-		.rsp = s3fwrn5_nci_prop_rsp,
-	},
-	{
-		.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
-				NCI_PROP_SET_RFREG_VER),
-		.rsp = s3fwrn5_nci_prop_rsp,
-	},
 	{
 		.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
 				NCI_PROP_START_RFREG),
@@ -61,11 +41,6 @@ static struct nci_driver_ops s3fwrn5_nci_prop_ops[] = {
 				NCI_PROP_FW_CFG),
 		.rsp = s3fwrn5_nci_prop_rsp,
 	},
-	{
-		.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
-				NCI_PROP_WR_RESET),
-		.rsp = s3fwrn5_nci_prop_rsp,
-	},
 };
 
 void s3fwrn5_nci_get_prop_ops(struct nci_driver_ops **ops, size_t *n)
diff --git a/drivers/nfc/s3fwrn5/nci.h b/drivers/nfc/s3fwrn5/nci.h
index 23c0b28f247a..a80f0fb082a8 100644
--- a/drivers/nfc/s3fwrn5/nci.h
+++ b/drivers/nfc/s3fwrn5/nci.h
@@ -11,9 +11,6 @@
 
 #include "s3fwrn5.h"
 
-#define NCI_PROP_AGAIN		0x01
-
-#define NCI_PROP_GET_RFREG	0x21
 #define NCI_PROP_SET_RFREG	0x22
 
 struct nci_prop_set_rfreg_cmd {
@@ -25,23 +22,6 @@ struct nci_prop_set_rfreg_rsp {
 	__u8 status;
 };
 
-#define NCI_PROP_GET_RFREG_VER	0x24
-
-struct nci_prop_get_rfreg_ver_rsp {
-	__u8 status;
-	__u8 data[8];
-};
-
-#define NCI_PROP_SET_RFREG_VER	0x25
-
-struct nci_prop_set_rfreg_ver_cmd {
-	__u8 data[8];
-};
-
-struct nci_prop_set_rfreg_ver_rsp {
-	__u8 status;
-};
-
 #define NCI_PROP_START_RFREG	0x26
 
 struct nci_prop_start_rfreg_rsp {
@@ -70,8 +50,6 @@ struct nci_prop_fw_cfg_rsp {
 	__u8 status;
 };
 
-#define NCI_PROP_WR_RESET	0x2f
-
 void s3fwrn5_nci_get_prop_ops(struct nci_driver_ops **ops, size_t *n);
 int s3fwrn5_nci_rf_configure(struct s3fwrn5_info *info, const char *fw_name);
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 net-next 1/2] nfc: s3fwrn5: Remove the delay for NFC sleep
  2020-12-15  6:54 ` [PATCH v2 net-next 1/2] nfc: s3fwrn5: Remove the delay for NFC sleep Bongsu Jeon
@ 2020-12-15  9:12   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2020-12-15  9:12 UTC (permalink / raw)
  To: Bongsu Jeon; +Cc: linux-nfc, netdev, linux-kernel, Bongsu Jeon

On Tue, Dec 15, 2020 at 03:54:00PM +0900, Bongsu Jeon wrote:
> From: Bongsu Jeon <bongsu.jeon@samsung.com>
> 
> Remove the delay for NFC sleep because the delay is only needed to
> guarantee that the NFC is awake.
> 
> Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com>
> ---
>  drivers/nfc/s3fwrn5/phy_common.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 net-next 2/2] nfc: s3fwrn5: Remove unused NCI prop commands
  2020-12-15  6:54 ` [PATCH v2 net-next 2/2] nfc: s3fwrn5: Remove unused NCI prop commands Bongsu Jeon
@ 2020-12-15  9:13   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2020-12-15  9:13 UTC (permalink / raw)
  To: Bongsu Jeon; +Cc: linux-nfc, netdev, linux-kernel, Bongsu Jeon

On Tue, Dec 15, 2020 at 03:54:01PM +0900, Bongsu Jeon wrote:
> From: Bongsu Jeon <bongsu.jeon@samsung.com>
> 
> Remove the unused NCI prop commands that s3fwrn5 driver doesn't use.
> 
> Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com>
> ---
>  drivers/nfc/s3fwrn5/nci.c | 25 -------------------------
>  drivers/nfc/s3fwrn5/nci.h | 22 ----------------------
>  2 files changed, 47 deletions(-)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 net-next 0/2] nfc: s3fwrn5: Refactor the s3fwrn5 module
  2020-12-15  6:53 [PATCH v2 net-next 0/2] nfc: s3fwrn5: Refactor the s3fwrn5 module Bongsu Jeon
  2020-12-15  6:54 ` [PATCH v2 net-next 1/2] nfc: s3fwrn5: Remove the delay for NFC sleep Bongsu Jeon
  2020-12-15  6:54 ` [PATCH v2 net-next 2/2] nfc: s3fwrn5: Remove unused NCI prop commands Bongsu Jeon
@ 2020-12-16 21:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2020-12-16 21:30 UTC (permalink / raw)
  To: Bongsu Jeon; +Cc: krzk, linux-nfc, netdev, linux-kernel, bongsu.jeon

Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Tue, 15 Dec 2020 15:53:59 +0900 you wrote:
> From: Bongsu Jeon <bongsu.jeon@samsung.com>
> 
> Refactor the s3fwrn5 module.
> 
> 1/2 is to remove the unneeded delay for NFC sleep.
> 2/2 is to remove the unused NCI prop commands.
> 
> [...]

Here is the summary with links:
  - [v2,net-next,1/2] nfc: s3fwrn5: Remove the delay for NFC sleep
    https://git.kernel.org/netdev/net/c/7ec27c9e97f2
  - [v2,net-next,2/2] nfc: s3fwrn5: Remove unused NCI prop commands
    https://git.kernel.org/netdev/net/c/e2138e3f3537

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-16 21:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15  6:53 [PATCH v2 net-next 0/2] nfc: s3fwrn5: Refactor the s3fwrn5 module Bongsu Jeon
2020-12-15  6:54 ` [PATCH v2 net-next 1/2] nfc: s3fwrn5: Remove the delay for NFC sleep Bongsu Jeon
2020-12-15  9:12   ` Krzysztof Kozlowski
2020-12-15  6:54 ` [PATCH v2 net-next 2/2] nfc: s3fwrn5: Remove unused NCI prop commands Bongsu Jeon
2020-12-15  9:13   ` Krzysztof Kozlowski
2020-12-16 21:30 ` [PATCH v2 net-next 0/2] nfc: s3fwrn5: Refactor the s3fwrn5 module patchwork-bot+netdevbpf

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).