Thread (47 messages) 47 messages, 7 authors, 2012-10-25

Re: [RFC PATCH 01/06] input/rmi4: Public header and documentation

From: Linus Walleij <hidden>
Date: 2012-10-11 15:22:50
Also in: linux-input

On Thu, Oct 11, 2012 at 5:41 AM, Christopher Heiny [off-list ref] wrote:
Linus Walleij wrote:
quoted
On Sat, Oct 6, 2012 at 6:09 AM, Christopher Heiny [off-list ref] wrote:
quoted
quoted
+          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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help