Re: [PATCH 24/30] nfc: netlink: Add suspend_target handler and nfc_reactivate_target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Christophe,

On Tue, Oct 20, 2015 at 11:48:15PM +0200, Christophe Ricard wrote:
> In order to manage in a better way the nci poll mode state machine, add
> a suspend_target handler. In this way the netlink nfc_genl_activate_target
> rely on a new function nfc_reactivate_target calling suspend_target handler
> if available (only in nci core).
I'm not sure I understand why this is needed. Why do we need to call
suspend before activating again ?

> Signed-off-by: Christophe Ricard <christophe-h.ricard@xxxxxx>
> ---
>  include/net/nfc/nfc.h |  2 ++
>  net/nfc/core.c        | 46 ++++++++++++++++++++++++++++++++++++++++++++++
>  net/nfc/nci/core.c    | 23 +++++++++++++++++++----
>  net/nfc/netlink.c     |  3 +--
>  net/nfc/nfc.h         |  2 ++
>  5 files changed, 70 insertions(+), 6 deletions(-)
> 
> diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h
> index 30afc9a..380ab8b 100644
> --- a/include/net/nfc/nfc.h
> +++ b/include/net/nfc/nfc.h
> @@ -67,6 +67,8 @@ struct nfc_ops {
>  	int (*dep_link_down)(struct nfc_dev *dev);
>  	int (*activate_target)(struct nfc_dev *dev, struct nfc_target *target,
>  			       u32 protocol);
> +	void (*suspend_target)(struct nfc_dev *dev,
> +			       struct nfc_target *target);
It would be slightly more elegant (And closer to the acticvity spec) to
pass an additional argument to deactivate_target().

Cheers,
Samuel.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux