From: Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Vincent Cuissard <cuissard-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
Cc: linux-nfc-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [linux-nfc] [PATCH v2 5/9] NFC: nfcmrvl: add i2c driver
Date: Wed, 21 Oct 2015 08:00:47 +0200 [thread overview]
Message-ID: <20151021060047.GH11271@zurbaran.home> (raw)
In-Reply-To: <1443443594-14353-6-git-send-email-cuissard-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
Hi Vincent,
On Mon, Sep 28, 2015 at 02:33:10PM +0200, Vincent Cuissard wrote:
> +#ifdef CONFIG_OF
Technically you don't need that as all of_* APIs are safe if CONFIG_OF_*
are not defined.
> +static int nfcmrvl_i2c_parse_dt(struct device_node *node,
> + struct nfcmrvl_platform_data *pdata)
> +{
> + int ret;
> +
> + ret = nfcmrvl_parse_dt(node, pdata);
> + if (ret < 0) {
> + pr_err("Failed to get generic entries\n");
> + return ret;
> + }
> +
> + if (of_find_property(node, "i2c-int-falling", NULL))
> + pdata->irq_polarity = IRQF_TRIGGER_FALLING;
> + else
> + pdata->irq_polarity = IRQF_TRIGGER_RISING;
> +
> + ret = irq_of_parse_and_map(node, 0);
> + if (ret < 0) {
> + pr_err("Unable to get irq, error: %d\n", ret);
> + return ret;
> + }
> + pdata->irq = ret;
> +
> + return 0;
> +}
> +
> +#else
> +
> +static int nfcmrvl_i2c_parse_dt(struct device_node *node,
> + struct nfcmrvl_platform_data *pdata)
> +{
> + return -ENODEV;
> +}
> +
> +#endif
> diff --git a/drivers/nfc/nfcmrvl/main.c b/drivers/nfc/nfcmrvl/main.c
> index bd8db3d..1104fa3 100644
> --- a/drivers/nfc/nfcmrvl/main.c
> +++ b/drivers/nfc/nfcmrvl/main.c
> @@ -33,6 +33,9 @@ static int nfcmrvl_nci_open(struct nci_dev *ndev)
> if (test_and_set_bit(NFCMRVL_NCI_RUNNING, &priv->flags))
> return 0;
>
> + /* Reset possible fault of previous session */
> + clear_bit(NFCMRVL_PHY_ERROR, &priv->flags);
> +
How is that related to this i2c driver ?
> err = priv->if_ops->nci_open(priv);
>
> if (err)
> @@ -221,10 +224,8 @@ EXPORT_SYMBOL_GPL(nfcmrvl_nci_recv_frame);
>
> void nfcmrvl_chip_reset(struct nfcmrvl_private *priv)
> {
> - /*
> - * This function does not take care if someone is using the device.
> - * To be improved.
> - */
> + /* Reset possible fault of previous session */
> + clear_bit(NFCMRVL_PHY_ERROR, &priv->flags);
Ditto.
Cheers,
Samuel.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-10-21 6:00 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-28 12:33 [PATCH v2 0/9] Marvell NFC drivers for i2c and spi Vincent Cuissard
[not found] ` <1443443594-14353-1-git-send-email-cuissard-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2015-09-28 12:33 ` [PATCH v2 1/9] NFC: nfcmrvl: remove unneeded version defines Vincent Cuissard
2015-09-28 12:33 ` [PATCH v2 2/9] NFC: NCI: export nci_send_frame function Vincent Cuissard
[not found] ` <1443443594-14353-3-git-send-email-cuissard-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2015-10-21 5:57 ` [linux-nfc] " Samuel Ortiz
[not found] ` <20151021055750.GE11271-nKCvNrh56OoJmsy6czSMtA@public.gmane.org>
2015-10-21 8:22 ` Vincent Cuissard
[not found] ` <DFA9399D-2B41-4EE2-831F-DB7011AB1127-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2015-10-21 22:12 ` Vincent Cuissard
[not found] ` <1CC98D3D-42C1-43A4-87A3-3802863B956A-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2015-10-22 15:43 ` Samuel Ortiz
2015-09-28 12:33 ` [PATCH v2 3/9] NFC: nfcmrvl: add firmware download support Vincent Cuissard
[not found] ` <1443443594-14353-4-git-send-email-cuissard-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2015-10-21 6:00 ` [linux-nfc] " Samuel Ortiz
[not found] ` <20151021060021.GF11271-nKCvNrh56OoJmsy6czSMtA@public.gmane.org>
2015-10-21 8:48 ` Vincent Cuissard
[not found] ` <5B945DE3-A26C-4E4B-B1B6-DF52BEA0A567-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2015-10-22 15:43 ` Samuel Ortiz
[not found] ` <20151022154323.GB7633-nKCvNrh56OoJmsy6czSMtA@public.gmane.org>
2015-10-22 19:25 ` Vincent Cuissard
2015-09-28 12:33 ` [PATCH v2 4/9] NFC: nfcmrvl: allow low level drivers to configure head/tail room Vincent Cuissard
[not found] ` <1443443594-14353-5-git-send-email-cuissard-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2015-10-21 6:00 ` [linux-nfc] " Samuel Ortiz
[not found] ` <20151021060030.GG11271-nKCvNrh56OoJmsy6czSMtA@public.gmane.org>
2015-10-21 8:49 ` Vincent Cuissard
2015-09-28 12:33 ` [PATCH v2 5/9] NFC: nfcmrvl: add i2c driver Vincent Cuissard
[not found] ` <1443443594-14353-6-git-send-email-cuissard-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2015-10-21 6:00 ` Samuel Ortiz [this message]
[not found] ` <20151021060047.GH11271-nKCvNrh56OoJmsy6czSMtA@public.gmane.org>
2015-10-21 8:54 ` [linux-nfc] " Vincent Cuissard
[not found] ` <EF5A5C37-4C16-49A6-BF4E-1894C22CC111-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2015-10-22 15:43 ` Samuel Ortiz
2015-09-28 12:33 ` [PATCH v2 6/9] NFC: NCI: move generic spi driver to a module Vincent Cuissard
2015-09-28 12:33 ` [PATCH v2 7/9] NFC: NCI: allow spi driver to choose transfer clock Vincent Cuissard
2015-09-28 12:33 ` [PATCH v2 8/9] NFC: nfcmrvl: add spi driver Vincent Cuissard
2015-09-28 12:33 ` [PATCH v2 9/9] NFC: nfcmrvl: update device tree bindings for Marvell NFC Vincent Cuissard
[not found] ` <1443443594-14353-10-git-send-email-cuissard-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2015-10-21 5:57 ` [linux-nfc] " Samuel Ortiz
[not found] ` <20151021055734.GD11271-nKCvNrh56OoJmsy6czSMtA@public.gmane.org>
2015-10-21 8:55 ` Vincent Cuissard
2015-10-23 12:25 ` Vincent Cuissard
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=20151021060047.GH11271@zurbaran.home \
--to=sameo-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=cuissard-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-nfc-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.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).