From: Robert Baldyga <r.baldyga@samsung.com>
To: sameo@linux.intel.com, lauro.venancio@openbossa.org,
aloisio.almeida@openbossa.org
Cc: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
linux-wireless@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-nfc@lists.01.org,
m.szyprowski@samsung.com, pebolle@tiscali.nl,
Robert Baldyga <r.baldyga@samsung.com>
Subject: [PATCH v3 2/3] NFC: nci: export nci_core_reset and nci_core_init
Date: Thu, 20 Aug 2015 17:26:01 +0200 [thread overview]
Message-ID: <1440084362-27909-3-git-send-email-r.baldyga@samsung.com> (raw)
In-Reply-To: <1440084362-27909-1-git-send-email-r.baldyga@samsung.com>
Some drivers needs to have ability to reinit NCI core, for example after
updating firmware in setup() of post_setup() callback. This patch makes
nci_core_reset() and nci_core_init() functions public, to make it possible.
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
include/net/nfc/nci_core.h | 2 ++
net/nfc/nci/core.c | 14 ++++++++++++++
2 files changed, 16 insertions(+)
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h
index 1bdaa5f..d0d0f1e 100644
--- a/include/net/nfc/nci_core.h
+++ b/include/net/nfc/nci_core.h
@@ -278,6 +278,8 @@ int nci_request(struct nci_dev *ndev,
unsigned long opt),
unsigned long opt, __u32 timeout);
int nci_prop_cmd(struct nci_dev *ndev, __u8 oid, size_t len, __u8 *payload);
+int nci_core_reset(struct nci_dev *ndev);
+int nci_core_init(struct nci_dev *ndev);
int nci_recv_frame(struct nci_dev *ndev, struct sk_buff *skb);
int nci_set_config(struct nci_dev *ndev, __u8 id, size_t len, __u8 *val);
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index d9045ec..943889b 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -351,6 +351,20 @@ int nci_prop_cmd(struct nci_dev *ndev, __u8 oid, size_t len, __u8 *payload)
}
EXPORT_SYMBOL(nci_prop_cmd);
+int nci_core_reset(struct nci_dev *ndev)
+{
+ return __nci_request(ndev, nci_reset_req, 0,
+ msecs_to_jiffies(NCI_RESET_TIMEOUT));
+}
+EXPORT_SYMBOL(nci_core_reset);
+
+int nci_core_init(struct nci_dev *ndev)
+{
+ return __nci_request(ndev, nci_init_req, 0,
+ msecs_to_jiffies(NCI_INIT_TIMEOUT));
+}
+EXPORT_SYMBOL(nci_core_init);
+
static int nci_open_device(struct nci_dev *ndev)
{
int rc = 0;
--
1.9.1
next prev parent reply other threads:[~2015-08-20 15:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 15:25 [PATCH v3 0/3] nfc: Add driver for Samsung S3FWRN5 NFC Chip Robert Baldyga
2015-08-20 15:26 ` [PATCH v3 1/3] NFC: nci: Add post_setup handler Robert Baldyga
2015-08-20 15:26 ` Robert Baldyga [this message]
2015-08-20 15:26 ` [PATCH v3 3/3] nfc: s3fwrn5: Add driver for Samsung S3FWRN5 NFC Chip Robert Baldyga
2015-08-20 19:54 ` [PATCH v3 0/3] nfc: " Samuel Ortiz
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=1440084362-27909-3-git-send-email-r.baldyga@samsung.com \
--to=r.baldyga@samsung.com \
--cc=aloisio.almeida@openbossa.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=lauro.venancio@openbossa.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfc@lists.01.org \
--cc=linux-wireless@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=pebolle@tiscali.nl \
--cc=robh+dt@kernel.org \
--cc=sameo@linux.intel.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