lkml.org 
[lkml]   [2015]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] power: bq24261_charger: Add support for TI BQ24261 charger
From
Date
On 09/09/2015 06:47 PM, Krzysztof Kozlowski wrote:
>>>> +- ti,enable-user-write: boolean, if present driver will allow the user space
>>>> + to control the charging current and voltage through sysfs;
>>>
>>> This is not DT property. It does not describe hardware.
>> We needed a mechanism to enable the sysfs writes on certain properties.
>> If DT is not the place where should it go?
>
> DT is not the place. As I discussed later with Andreas, if you really
> need this and if mainline is a place for that then probably this should
> be compile option (a Kconfig symbol).
>

I think this would actually be a good use for module parameters, this way
it could still be set at boot without re-compiling.

I think compile-time disabling sysfs properties because they are "dangerous" is
a little bit too artificially restricting and controlling, you can set permissions
so only root can change them already. The kernel should not be restricting root,
I understand the fear of someone rooting a machine and remotely over charging
a LiPo[1], but these physical limits are hardware descriptions and can and should
be set by DT, beyond this root should have full control over their machine.
Besides root can already just unbind your driver and issue raw I2C commands to do
the same thing. </rant>

[1] http://i.imgur.com/vszJJ.jpg

Regards,
Andrew


\
 
 \ /
  Last update: 2015-09-10 19:01    [W:0.075 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site