lkml.org 
[lkml]   [2012]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH 01/06] input/rmi4: Public header and documentation
From
On Thu, Oct 11, 2012 at 5:41 AM, Christopher Heiny <Cheiny@synaptics.com> wrote:
> Linus Walleij wrote:
>> On Sat, Oct 6, 2012 at 6:09 AM, Christopher Heiny <cheiny@synaptics.com> wrote:

>> > + chargerinput ... (rw) User space programs can use this to tell
>> > the + sensor that the system is plugged into an external
>> > power + source (as opposed to running on
>> > batteries). This allows + the sensor firmware to make
>> > necessary adjustments for the + current capacitence
>> > regime. Write 1 to this when the + system is using
>> > external power, write 0 to this when the + system is
>> > running on batteries. See spec for full details.
>> I remember discussing in-kernel notifiers for this. I don't
>> really see the point in tunnelling a notification from the drivers/power
>> subsystem to the drivers/input subsystem through userspace for
>> no good.
>>
>> It's no blocker though, I don't expect you to fix this as part of
>> this driver submission.
>>
>> Maybe Anton can comment?
>
> Hmmm. I agree that it'd be good to avoid looping through userspace. But....
>
> I found ways to notfiy the kernel that the charger is plugged/unplugged,
> but that's only useful if you're a battery charger device driver. I also
> found ways for userspace to get notification of charger events. I
> didn't spot any way for in-kernel drivers to get notification of such
> events. Perhaps I'm not looking the right places, though - can you
> provide a pointer?

So my point was that there is indeed no such in-kernel
notification mechanism.

Maybe something engineered similar to this:
http://www.spinics.net/lists/lm-sensors/msg33834.html

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2012-10-11 18:01    [W:0.111 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site