Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751677AbbHTBmJ (ORCPT ); Wed, 19 Aug 2015 21:42:09 -0400 Received: from mail-yk0-f171.google.com ([209.85.160.171]:33793 "EHLO mail-yk0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751042AbbHTBmH (ORCPT ); Wed, 19 Aug 2015 21:42:07 -0400 MIME-Version: 1.0 In-Reply-To: <55D47D04.7060104@cogentembedded.com> References: <59a5ba963dc2aaf9b1f59b0e79387b4d9ce3f30a.1439974219.git.baolin.wang@linaro.org> <55D47D04.7060104@cogentembedded.com> Date: Thu, 20 Aug 2015 09:42:05 +0800 Message-ID: Subject: Re: [PATCH v4 3/5] gadget: Support for the usb charger framework From: Baolin Wang To: Sergei Shtylyov Cc: Felipe Balbi , Mark Brown , Linus Walleij , LKML , Greg KH , Peter Chen , sojka@merica.cz, Alan Stern , r.baldyga@samsung.com, yoshihiro.shimoda.uh@renesas.com, linux-usb@vger.kernel.org, device-mainlining@lists.linuxfoundation.org, sre@kernel.org, Dmitry Eremin-Solenikov , David Woodhouse , sameo@linux.intel.com, Lee Jones , patches@opensource.wolfsonmicro.com, linux-pm@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1809 Lines: 62 On 19 August 2015 at 20:56, Sergei Shtylyov wrote: > 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 OK. > >> }; >> >> /** >> @@ -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'? :-) I think 'uchger' is the abbreviation of 'usb charger' which is maybe a little verbous, I'll change it. Thanks for your comments. > > [...] > > WBR, Sergei > -- Baolin.wang Best Regards -- 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/