Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753916AbbHSM4t (ORCPT ); Wed, 19 Aug 2015 08:56:49 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:32833 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753717AbbHSM4r (ORCPT ); Wed, 19 Aug 2015 08:56:47 -0400 Subject: Re: [PATCH v4 3/5] gadget: Support for the usb charger framework To: Baolin Wang , balbi@ti.com References: <59a5ba963dc2aaf9b1f59b0e79387b4d9ce3f30a.1439974219.git.baolin.wang@linaro.org> Cc: broonie@kernel.org, linus.walleij@linaro.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, peter.chen@freescale.com, sojka@merica.cz, stern@rowland.harvard.edu, r.baldyga@samsung.com, yoshihiro.shimoda.uh@renesas.com, linux-usb@vger.kernel.org, device-mainlining@lists.linuxfoundation.org, sre@kernel.org, dbaryshkov@gmail.com, dwmw2@infradead.org, sameo@linux.intel.com, lee.jones@linaro.org, patches@opensource.wolfsonmicro.com, linux-pm@vger.kernel.org From: Sergei Shtylyov Message-ID: <55D47D04.7060104@cogentembedded.com> Date: Wed, 19 Aug 2015 15:56:36 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <59a5ba963dc2aaf9b1f59b0e79387b4d9ce3f30a.1439974219.git.baolin.wang@linaro.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1383 Lines: 44 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 [...] > 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/