<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/hid.h, branch v3.3.5</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.3.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.3.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2012-01-09T10:24:59Z</updated>
<entry>
<title>Merge branch 'hid-battery' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen into for-linus</title>
<updated>2012-01-09T10:24:59Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2012-01-09T10:24:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=420174afdc7023c000e5b5b1b6fe9e028470c713'/>
<id>urn:sha1:420174afdc7023c000e5b5b1b6fe9e028470c713</id>
<content type='text'>
</content>
</entry>
<entry>
<title>hid-input/battery: remove battery_val</title>
<updated>2012-01-08T07:31:18Z</updated>
<author>
<name>Jeremy Fitzhardinge</name>
<email>jeremy@goop.org</email>
</author>
<published>2011-12-03T05:57:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ce63920b395f1476e2d28cca16a56919289f0b62'/>
<id>urn:sha1:ce63920b395f1476e2d28cca16a56919289f0b62</id>
<content type='text'>
hidinput_get_battery_property() now directly polls the device for the
current battery strength, so there's no need for battery_val, or the
code to set it on the input event path.

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy@goop.org&gt;
</content>
</entry>
<entry>
<title>hid-input/battery: deal with both FEATURE and INPUT report batteries</title>
<updated>2012-01-08T07:30:37Z</updated>
<author>
<name>Jeremy Fitzhardinge</name>
<email>jeremy@goop.org</email>
</author>
<published>2011-12-02T19:18:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fb8ac91b4dccbdda0ad51d499079d05143783ba4'/>
<id>urn:sha1:fb8ac91b4dccbdda0ad51d499079d05143783ba4</id>
<content type='text'>
Some devices seem to report batteries as FEATUREs, others as INPUTs.

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy@goop.org&gt;
</content>
</entry>
<entry>
<title>hid-input/battery: add quirks for battery</title>
<updated>2012-01-08T07:30:37Z</updated>
<author>
<name>Jeremy Fitzhardinge</name>
<email>jeremy@goop.org</email>
</author>
<published>2011-12-02T19:12:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bbc21cfd55858d7c3e55bfaa91fa934b0b13ad4d'/>
<id>urn:sha1:bbc21cfd55858d7c3e55bfaa91fa934b0b13ad4d</id>
<content type='text'>
Some devices always report percentage, despite having 0/255 as their
min/max, so add a quirk for them.

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy@goop.org&gt;
</content>
</entry>
<entry>
<title>hid-input: add support for HID devices reporting Battery Strength</title>
<updated>2012-01-08T07:30:34Z</updated>
<author>
<name>Daniel Nicoletti</name>
<email>dantti12@gmail.com</email>
</author>
<published>2011-12-02T05:52:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c5a92aa3eb7425da68797a820d208edad36551f7'/>
<id>urn:sha1:c5a92aa3eb7425da68797a820d208edad36551f7</id>
<content type='text'>
I've sent an email earlier asking for help with a GetFeature code, and now I
have a second patch on top of Jeremy's to provide the battery functionality
for devices that support reporting it.

If I understood correctly when talking to Jeremy he said his device
never actually reported the status as an input event (sorry if I didn't
understand it correctly), and after reading HID specs I believe it's
really because it was meant to be probed, I have an Apple Keyboard and
Magic Trackpad both bluetooth batteries operated, so using PacketLogger
I saw that Mac OSX always ask the battery status using the so called
GetFeature.

What my patch does is basically:
- store the report id that matches the battery_strength
- setup the battery if 0x6.0x20 is found, even if that is reported as a feature
  (as it was meant to be but only the MagicTrackpad does)
- when upower or someone access /sys/class/power_supply/hid-*/capacity it
  will probe the device and return it's status.

It works great for both devices, but I have two concerns:
- the report_features function has a duplicated code
- it would be nice if it was possible for specific drivers to provide their own
  probe as there might be some strange devices... (but maybe it's
already possible)

I've talked to the upower dev and he fixed it to be able to show the
right percentage.

Here how the uevent file (in /sys/class/power_supply/hid-*/) looks like:
POWER_SUPPLY_NAME=hid-00:22:41:D9:18:E7-battery
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_CAPACITY=66
POWER_SUPPLY_MODEL_NAME=MacAdmin’s keyboard
POWER_SUPPLY_STATUS=Discharging

POWER_SUPPLY_NAME=hid-70:CD:60:F5:FF:3F-battery
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_CAPACITY=62
POWER_SUPPLY_MODEL_NAME=nexx’s Trackpad
POWER_SUPPLY_STATUS=Discharging

Signed-off-by: Daniel Nicoletti &lt;dantti12@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'hyperv', 'multitouch', 'roccat', 'upstream', 'upstream-fixes', 'wacom' and 'wiimote' into for-linus</title>
<updated>2012-01-05T14:51:02Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2012-01-05T14:51:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e0273728564a395a13cfed70e34da4f2613d2d44'/>
<id>urn:sha1:e0273728564a395a13cfed70e34da4f2613d2d44</id>
<content type='text'>
</content>
</entry>
<entry>
<title>HID: usbhid: defer LED setting to a workqueue</title>
<updated>2011-12-21T10:18:35Z</updated>
<author>
<name>Daniel Kurtz</name>
<email>djkurtz@chromium.org</email>
</author>
<published>2011-11-17T11:23:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4371ea8202e98c8ef77ca887de3b19affbb3498f'/>
<id>urn:sha1:4371ea8202e98c8ef77ca887de3b19affbb3498f</id>
<content type='text'>
Defer LED setting action to a workqueue.
This is more likely to send all LED change events in a single URB.

Signed-off-by: Daniel Kurtz &lt;djkurtz@chromium.org&gt;
Acked-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: hid-input: add support for HID devices reporting Battery Strength</title>
<updated>2011-11-28T10:10:22Z</updated>
<author>
<name>Jeremy Fitzhardinge</name>
<email>jeremy@goop.org</email>
</author>
<published>2011-11-23T08:49:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4f5ca836bef3dd3eb602152d5d712a513998264e'/>
<id>urn:sha1:4f5ca836bef3dd3eb602152d5d712a513998264e</id>
<content type='text'>
Some HID devices, such as my Bluetooth mouse, report their battery
strength as an event.  Rather than passing it through as a strange
absolute input event, this patch registers it with the power_supply
subsystem as a battery, so that the device's Battery Strength can be
reported to usermode.

The battery appears in sysfs names
/sys/class/power_supply/hid-&lt;UNIQ&gt;-battery, and it is a child of the
battery-containing device, so it should be clear what it's the battery of.

Unfortunately on my current Fedora 16 system, while the battery does
appear in the UI, it is listed as a Laptop Battery with 0% charge (since
it ignores the "capacity" property of the battery and instead computes
it from the "energy*" fields, which we can't supply given the limited
information contained within the HID Report).

Still, this patch is the first step.

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy@goop.org&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>include: convert various register fcns to macros to avoid include chaining</title>
<updated>2011-10-31T23:32:32Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-05-27T13:02:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=eb5589a8f0dab7e29021344228856339e6a1249c'/>
<id>urn:sha1:eb5589a8f0dab7e29021344228856339e6a1249c</id>
<content type='text'>
The original implementations reference THIS_MODULE in an inline.
We could include &lt;linux/export.h&gt;, but it is better to avoid chaining.

Fortunately someone else already thought of this, and made a similar
inline into a #define in &lt;linux/device.h&gt; for device_schedule_callback(),
[see commit 523ded71de0] so follow that precedent here.

Also bubble up any __must_check that were used on the prev. wrapper inline
functions up one to the real __register functions, to preserve any prev.
sanity checks that were used in those instances.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'upstream' into for-linus</title>
<updated>2011-10-25T07:59:04Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2011-10-25T07:59:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b3aec7b686329e6bb65aa08c7f9458f7fd512f06'/>
<id>urn:sha1:b3aec7b686329e6bb65aa08c7f9458f7fd512f06</id>
<content type='text'>
Conflicts:
	drivers/hid/hid-core.c
	drivers/hid/hid-ids.h
</content>
</entry>
</feed>
