Re: [PATCH] power: pcf50633: introduces battery charging currentcontrol

From: Paul Fertser
Date: Mon Oct 19 2009 - 19:59:41 EST


Hi,

Pavel, thanks for you review.

On Sat, Oct 17, 2009 at 07:01:24PM +0200, Pavel Machek wrote:
> > From: Balaji Rao <balajirrao@xxxxxxxxxxxx>
>
> Could we get some changelog here? Like 'it adds new file to sysfs
> interface, ...'

Done.

> > +static ssize_t
> > +show_chglim(struct device *dev, struct device_attribute *attr, char *buf)
>
> Could we get meaningful function names?

Well, this function name is derived from the sysfs attribute name and
since we already have "usb_curlim" sysfs attribute and corresponding
functions show_usblim() and set_usblim() it might be beneficial to
keep the driver code consistent. I now documented the attribute
behaviour in the code in the hope that users will look it up if in
doubt.

> > @@ -31,6 +31,8 @@ struct pcf50633_platform_data {
> >
> > int charging_restart_interval;
> >
> > + int chg_ref_current_ma;
> > +
>
> ...and variable names? This is also inconsistent with name above.

I added a comment explaining what this value is supposed to be set
to. The name is borrowed directly from the datasheet where it is
called "charger reference current". I hope this is ok.

Please find the new patch attached.

NB: Anton, if you apply this modified version, a new comment in
include/linux/mfd/pcf50633/core.h will produce a trivial merge
conflict with the later patch ("get rid of charging restart software
auto-triggering"). I can resend the whole series for your convenience
after everything else is sorted out if you prefer.

--
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav@xxxxxxxxx