Re: [PATCH v14 1/4] usb: gadget: Introduce the usb charger framework

2016-06-30 Thread Baolin Wang
Hi Felipe, On 30 June 2016 at 18:30, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> +static ssize_t charger_state_show(struct device *dev, >> + struct device_attribute *attr, >> + char

Re: [PATCH v14 1/4] usb: gadget: Introduce the usb charger framework

2016-06-30 Thread Baolin Wang
Hi Felipe, On 30 June 2016 at 18:30, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> +static ssize_t charger_state_show(struct device *dev, >> + struct device_attribute *attr, >> + char *buf) >> +{ >> + struct usb_charger

Re: [PATCH v14 1/4] usb: gadget: Introduce the usb charger framework

2016-06-30 Thread Felipe Balbi
Hi, Baolin Wang writes: > +static ssize_t charger_state_show(struct device *dev, > + struct device_attribute *attr, > + char *buf) > +{ > + struct usb_charger *uchger = dev_to_uchger(dev); > + int cnt; >

Re: [PATCH v14 1/4] usb: gadget: Introduce the usb charger framework

2016-06-30 Thread Felipe Balbi
Hi, Baolin Wang writes: > +static ssize_t charger_state_show(struct device *dev, > + struct device_attribute *attr, > + char *buf) > +{ > + struct usb_charger *uchger = dev_to_uchger(dev); > + int cnt; > + > + switch

[PATCH v14 1/4] usb: gadget: Introduce the usb charger framework

2016-06-29 Thread Baolin Wang
This patch introduces the usb charger driver based on usb gadget that makes an enhancement to a power driver. It works well in practice but that requires a system with suitable hardware. The basic conception of the usb charger is that, when one usb charger is added or removed by reporting from

[PATCH v14 1/4] usb: gadget: Introduce the usb charger framework

2016-06-29 Thread Baolin Wang
This patch introduces the usb charger driver based on usb gadget that makes an enhancement to a power driver. It works well in practice but that requires a system with suitable hardware. The basic conception of the usb charger is that, when one usb charger is added or removed by reporting from