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

2016-04-23 Thread Baolin Wang
Hi Pavel, On 24 April 2016 at 03:53, Pavel Machek wrote: > Hi! > >> +/* >> + * Sysfs attributes: >> + * >> + * These sysfs attributes are used for showing and setting different type >> + * (SDP/DCP/CDP/ACA) chargers' current limitation. >> + */ >> +static ssize_t sdp_limit_show(struct device *dev

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

2016-04-23 Thread Pavel Machek
Hi! > +/* > + * Sysfs attributes: > + * > + * These sysfs attributes are used for showing and setting different type > + * (SDP/DCP/CDP/ACA) chargers' current limitation. > + */ > +static ssize_t sdp_limit_show(struct device *dev, > + struct device_attribute *attr, > +

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

2016-03-24 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 the