lkml.org 
[lkml]   [2012]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] smb347_charger: Cleanup power supply registration code in probe
Date
> >>
> >> On Fri, Apr 13, 2012 at 03:14:52PM +0530, Ramakrishna Pallala wrote:
> >> > This patch checks if the usb or mains charging is enabled by the
> >> > platform before registering with the power supply class.
> >>
> >> Can you describe why this change is needed? The current code always
> >> registers all the power-supplies but if we haven't enabled for
> >> example USB charging, then the online property for USB ps is set to 0.
> >
> > If we haven't enabled USB charging then why to waste kernel resources?
> > What we will gain by registering with power supply class if USB charging is not
> enabled?
>
> For one we have a consistent interface to userspace regardless of how the platform has
> configured the driver. For example if USB charging is not enabled userspace can still
> see the 'smb347-usb' directory but 'online' attribute is always set to zero.

what is gain and why user space need to see for usb online property and get disappointed when
platform has disabled USB charging( where user/user space has no idea about this).

if usb charging is not enabled just don't register. I think it's clean and make more sense to me.

Thanks,
Ram


\
 
 \ /
  Last update: 2012-04-19 13:33    [W:0.619 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site