Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1210590 > unrolled thread
| Started by | Robert Baldyga <r.baldyga@samsung.com> |
|---|---|
| First post | 2015-08-20 17:30 +0200 |
| Last post | 2015-08-20 22:00 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v3 0/3] nfc: Add driver for Samsung S3FWRN5 NFC Chip Robert Baldyga <r.baldyga@samsung.com> - 2015-08-20 17:30 +0200
[PATCH v3 1/3] NFC: nci: Add post_setup handler Robert Baldyga <r.baldyga@samsung.com> - 2015-08-20 17:30 +0200
Re: [PATCH v3 0/3] nfc: Add driver for Samsung S3FWRN5 NFC Chip Samuel Ortiz <sameo@linux.intel.com> - 2015-08-20 22:00 +0200
| From | Robert Baldyga <r.baldyga@samsung.com> |
|---|---|
| Date | 2015-08-20 17:30 +0200 |
| Subject | [PATCH v3 0/3] nfc: Add driver for Samsung S3FWRN5 NFC Chip |
| Message-ID | <pZzWV-r1-5@gated-at.bofh.it> |
Hello, This patchset adds driver for NFC chip Samsung S3FWRN5. First two patches are touching NCI core due to some non-standard chip behaviour. The first one adds post_setup() handler, which is called after NCI_CORE_INIT request. It's because we need to read current firmware version from ndev->manufact_specific_info. The second one adds nci_core_reset() and nci_core_init() functions which are needed to reinit NCI core after updating firmware in pose_setup() callback. Best regards, Robert Baldyga Changelog: v3: - Addressed comments from Samuel Ortiz: - Used nci_prop_cmd and nci_prop_ops to handle proprietary requests - Refactorized s3fwrn5_i2c_nci_read and s3fwrn5_i2c_fw_read - Miscellaneous minor fixes - Added patch "NFC: nci: Add post_setup handler" - Added patch "NFC: nci: export nci_core_reset and nci_core_init" v2: http://www.spinics.net/lists/linux-wireless/msg139241.html - Addressed comments from Paul Bolle v1: http://www.spinics.net/lists/kernel/msg2044290.html Robert Baldyga (3): NFC: nci: Add post_setup handler NFC: nci: export nci_core_reset and nci_core_init nfc: s3fwrn5: Add driver for Samsung S3FWRN5 NFC Chip .../devicetree/bindings/net/nfc/s3fwrn5.txt | 27 ++ MAINTAINERS | 6 + drivers/nfc/Kconfig | 1 + drivers/nfc/Makefile | 1 + drivers/nfc/s3fwrn5/Kconfig | 19 + drivers/nfc/s3fwrn5/Makefile | 11 + drivers/nfc/s3fwrn5/core.c | 219 +++++++++ drivers/nfc/s3fwrn5/firmware.c | 511 +++++++++++++++++++++ drivers/nfc/s3fwrn5/firmware.h | 111 +++++ drivers/nfc/s3fwrn5/i2c.c | 306 ++++++++++++ drivers/nfc/s3fwrn5/nci.c | 165 +++++++ drivers/nfc/s3fwrn5/nci.h | 89 ++++ drivers/nfc/s3fwrn5/s3fwrn5.h | 99 ++++ include/net/nfc/nci_core.h | 3 + net/nfc/nci/core.c | 18 + 15 files changed, 1586 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt create mode 100644 drivers/nfc/s3fwrn5/Kconfig create mode 100644 drivers/nfc/s3fwrn5/Makefile create mode 100644 drivers/nfc/s3fwrn5/core.c create mode 100644 drivers/nfc/s3fwrn5/firmware.c create mode 100644 drivers/nfc/s3fwrn5/firmware.h create mode 100644 drivers/nfc/s3fwrn5/i2c.c create mode 100644 drivers/nfc/s3fwrn5/nci.c create mode 100644 drivers/nfc/s3fwrn5/nci.h create mode 100644 drivers/nfc/s3fwrn5/s3fwrn5.h -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Robert Baldyga <r.baldyga@samsung.com> |
|---|---|
| Date | 2015-08-20 17:30 +0200 |
| Subject | [PATCH v3 1/3] NFC: nci: Add post_setup handler |
| Message-ID | <pZzWW-r1-15@gated-at.bofh.it> |
| In reply to | #1210590 |
Some drivers require non-standard configuration after NCI_CORE_INIT
request, because they need to know ndev->manufact_specific_info or
ndev->manufact_id. This patch adds post_setup handler allowing to do
such custom configuration.
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
include/net/nfc/nci_core.h | 1 +
net/nfc/nci/core.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h
index 01fc8c5..1bdaa5f 100644
--- a/include/net/nfc/nci_core.h
+++ b/include/net/nfc/nci_core.h
@@ -79,6 +79,7 @@ struct nci_ops {
int (*close)(struct nci_dev *ndev);
int (*send)(struct nci_dev *ndev, struct sk_buff *skb);
int (*setup)(struct nci_dev *ndev);
+ int (*post_setup)(struct nci_dev *ndev);
int (*fw_download)(struct nci_dev *ndev, const char *firmware_name);
__u32 (*get_rfprotocol)(struct nci_dev *ndev, __u8 rf_protocol);
int (*discover_se)(struct nci_dev *ndev);
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 95af2d2..d9045ec 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -388,6 +388,10 @@ static int nci_open_device(struct nci_dev *ndev)
msecs_to_jiffies(NCI_INIT_TIMEOUT));
}
+ if (ndev->ops->post_setup) {
+ rc = ndev->ops->post_setup(ndev);
+ }
+
if (!rc) {
rc = __nci_request(ndev, nci_init_complete_req, 0,
msecs_to_jiffies(NCI_INIT_TIMEOUT));
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Samuel Ortiz <sameo@linux.intel.com> |
|---|---|
| Date | 2015-08-20 22:00 +0200 |
| Message-ID | <pZEae-6lY-11@gated-at.bofh.it> |
| In reply to | #1210590 |
Hi Robert, On Thu, Aug 20, 2015 at 05:25:59PM +0200, Robert Baldyga wrote: > Hello, > > This patchset adds driver for NFC chip Samsung S3FWRN5. First two patches > are touching NCI core due to some non-standard chip behaviour. > > The first one adds post_setup() handler, which is called after NCI_CORE_INIT > request. It's because we need to read current firmware version from > ndev->manufact_specific_info. > > The second one adds nci_core_reset() and nci_core_init() functions which > are needed to reinit NCI core after updating firmware in pose_setup() > callback. > > Best regards, > Robert Baldyga > > Changelog: > > v3: > - Addressed comments from Samuel Ortiz: > - Used nci_prop_cmd and nci_prop_ops to handle proprietary requests > - Refactorized s3fwrn5_i2c_nci_read and s3fwrn5_i2c_fw_read > - Miscellaneous minor fixes > - Added patch "NFC: nci: Add post_setup handler" > - Added patch "NFC: nci: export nci_core_reset and nci_core_init" > > v2: http://www.spinics.net/lists/linux-wireless/msg139241.html > - Addressed comments from Paul Bolle > > v1: http://www.spinics.net/lists/kernel/msg2044290.html > > Robert Baldyga (3): > NFC: nci: Add post_setup handler > NFC: nci: export nci_core_reset and nci_core_init > nfc: s3fwrn5: Add driver for Samsung S3FWRN5 NFC Chip All 3 patches applied, thanks. Cheers, Samuel. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web