From: Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Christophe Ricard
<christophe.ricard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-nfc-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org,
christophe-h.ricard-qxv4g6HH51o@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC v1 02/14] nfc: nci: Add handle to manage nci response from nci proprietary command
Date: Sat, 30 May 2015 03:29:40 +0200 [thread overview]
Message-ID: <20150530012940.GA4037@ribalta.ccr.corp.intel.com> (raw)
In-Reply-To: <1430511577-19678-3-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
Hi Christophe,
On Fri, May 01, 2015 at 10:19:25PM +0200, Christophe Ricard wrote:
> @@ -342,7 +343,13 @@ void nci_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb)
> break;
>
> default:
> - pr_err("unknown rsp opcode 0x%x\n", rsp_opcode);
> + if (ndev->ops->prop_rsp_packet)
> + ret = ndev->ops->prop_rsp_packet(ndev, rsp_opcode, skb);
I'm not a big fan of this, as it's basically a pass through for
proprietary ops and it's left to each driver to implement their generic
handler. I'd prefer to have them explicitely define their handler for
each response and notification. Please look at that patch:
https://git.kernel.org/cgit/linux/kernel/git/sameo/nfc-next.git/commit/?h=topic/prop_rsp_ntf&id=96655968d4ae2bb3b18db4807331dceb5fe55e53
It would slightly change your code, you'd only have to define your 2
handlers and add that to your nci_ops structure. But it would be the NCI
core responsibility to call them when needed.
If you're fine with it, I'll push it to nfc-next and you can rebase your
code on top of it.
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-05-30 1:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-01 20:19 [RFC v1 00/14] Few fixes, add hibernate and ST21NFCC support Christophe Ricard
2015-05-01 20:19 ` [RFC v1 01/14] NFC: st21nfcb: Remove inappropriate kfree on a devm_kzalloc pointer Christophe Ricard
2015-05-01 20:19 ` [RFC v1 04/14] nfc: st21nfcb: Do not remove header once the payload is sent Christophe Ricard
[not found] ` <1430511577-19678-1-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2015-05-01 20:19 ` [RFC v1 02/14] nfc: nci: Add handle to manage nci response from nci proprietary command Christophe Ricard
[not found] ` <1430511577-19678-3-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2015-05-30 1:29 ` Samuel Ortiz [this message]
2015-05-01 20:19 ` [RFC v1 03/14] nfc: nci: Add handle to manage nci notification " Christophe Ricard
2015-05-01 20:19 ` [RFC v1 05/14] nfc: nci: Move close ops call in nci_close_device Christophe Ricard
2015-05-01 20:19 ` [RFC v1 06/14] nfc: nci: Remove code style warning Christophe Ricard
2015-05-01 20:19 ` [RFC v1 07/14] nfc: st21nfcb: Move st21nfcb_nci_remove in ndlc_remove Christophe Ricard
2015-05-01 20:19 ` [RFC v1 08/14] nfc: st21nfcb: remove st21nfcb_nci_i2c_disable in st21nfcb_nci_i2c_remove Christophe Ricard
2015-05-01 20:19 ` [RFC v1 09/14] nfc: st21nfcb: Move powered flag from phy to ndlc layer Christophe Ricard
2015-05-01 20:19 ` [RFC v1 10/14] nfc: st21nfcb: Add ndlc_close in st21nfcb_nci_remove Christophe Ricard
2015-05-01 20:19 ` [RFC v1 11/14] nfc: st21nfcb: Add support for nci set mode proprietary command Christophe Ricard
[not found] ` <1430511577-19678-12-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2015-05-30 1:30 ` Samuel Ortiz
2015-05-01 20:19 ` [RFC v1 12/14] nfc: st21nfcb: disable irq when st21nfcb is disabled Christophe Ricard
2015-05-01 20:19 ` [RFC v1 13/14] nfc: st21nfcb: Use hibernate nci command in ndlc_open and ndlc_close Christophe Ricard
2015-05-01 20:19 ` [RFC v1 14/14] nfc: st-nci: Rename st21nfcb to st-nci to support ST NCI NFC controllers Christophe Ricard
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=20150530012940.GA4037@ribalta.ccr.corp.intel.com \
--to=sameo-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=christophe-h.ricard-qxv4g6HH51o@public.gmane.org \
--cc=christophe.ricard-Re5JQEeQqe8AvxtiuMwx3w@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).