Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1209823

Re: [PATCH v4 3/5] gadget: Support for the usb charger framework

From Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 3/5] gadget: Support for the usb charger framework
Date 2015-08-19 15:00 +0200
Message-ID <pZb8e-6mr-13@gated-at.bofh.it> (permalink)
References <pZ7Hj-1AV-3@gated-at.bofh.it> <pZ7Hk-1AV-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello.

On 8/19/2015 12:13 PM, Baolin Wang wrote:

> For supporting the usb charger, it adds the usb_charger_init() and
> usb_charger_exit() functions for usb charger initialization and exit.
>
> Introduce a callback 'get_charger_type' which will implemented by
> user for usb gadget operations to get the usb charger type.
>
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
[...]

> diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
> index 755e8bc..44d82f5 100644
> --- a/include/linux/usb/gadget.h
> +++ b/include/linux/usb/gadget.h
> @@ -537,6 +537,7 @@ struct usb_gadget_ops {
>   	struct usb_ep *(*match_ep)(struct usb_gadget *,
>   			struct usb_endpoint_descriptor *,
>   			struct usb_ss_ep_comp_descriptor *);
> +	enum usb_charger_type	(*get_charger_type)(struct usb_gadget *);
                              ^^^ please use space, not tab here

>   };
>
>   /**
> @@ -611,6 +612,7 @@ struct usb_gadget {
>   	struct usb_otg_caps		*otg_caps;
>   	struct raw_notifier_head	nh;
>   	struct mutex			lock;
> +	struct usb_charger		*uchger;

    Why not simply call the field 'charger'? :-)

[...]

WBR, Sergei

--
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/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 3/5] gadget: Support for the usb charger framework Baolin Wang <baolin.wang@linaro.org> - 2015-08-19 11:20 +0200
  Re: [PATCH v4 3/5] gadget: Support for the usb charger framework Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-08-19 15:00 +0200
    Re: [PATCH v4 3/5] gadget: Support for the usb charger framework Baolin Wang <baolin.wang@linaro.org> - 2015-08-20 03:50 +0200

csiph-web