lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALp=xyOJpP=cioeNN4YqOYeDEt3Lz-fviVffmR_7AD5jf2Zc+g@mail.gmail.com>
Date:	Thu, 19 Apr 2012 14:18:24 +0300
From:	Mika Westerberg <mika.westerberg@....fi>
To:	"Pallala, Ramakrishna" <ramakrishna.pallala@...el.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Anton Vorontsov <cbouatmailru@...il.com>,
	Anton Vorontsov <anton.vorontsov@...aro.org>
Subject: Re: [PATCH] smb347_charger: Cleanup power supply registration code in probe

On Thu, Apr 19, 2012 at 2:10 PM, Pallala, Ramakrishna
<ramakrishna.pallala@...el.com> wrote:
>> Sent: Thursday, April 19, 2012 12:41 PM
>> To: Pallala, Ramakrishna
>> Cc: linux-kernel@...r.kernel.org; Anton Vorontsov; Anton Vorontsov
>> Subject: Re: [PATCH] smb347_charger: Cleanup power supply registration code in probe
>>
>> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ