Re: Can you use the USB HID interface within a driver?

From: Kay Sievers
Date: Sat Nov 01 2008 - 10:52:42 EST


On Sat, Nov 1, 2008 at 13:32, Adam Nielsen <a.nielsen@xxxxxxxxxxx> wrote:
>>> Or perhaps someone could point me in the direction of a USB HID driver
>>> that does things "properly" already?
>>
>> Please post "lsusb -v" for your device.
>
> Here's the output. I don't think any of the "class" drivers are suitable,
> except as templates for interfacing with the main HID code...I think...

I think, a real in-kernel driver for HID Power devices, which exports
the device as a "power_supply" device to userspace, would be nice.

That way, USB UPS's which support the HID Power devices:
http://www.usb.org/developers/devclass_docs/pdcv10.pdf

would show up like any other battery and AC connector and userspace
could handle all of them without any specialized code:
ls -1 /sys/class/power_supply/BAT0/
alarm
energy_full
energy_full_design
energy_now
manufacturer
model_name
power
present
serial_number
status
technology
type
voltage_min_design
voltage_now
...

Thanks,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/