Re: [Hdaps-devel] [PATCH 2.6.23-rc2] hwmon: HP Mobile Data Protection System 3D ACPI driver (resend)

From: Kay Sievers
Date: Thu Aug 30 2007 - 15:39:30 EST


On 8/30/07, Henrique de Moraes Holschuh <hmh@xxxxxxxxxx> wrote:
> On Thu, 30 Aug 2007, Yan Burman wrote:
> >>> You can generate events on input devices, but I am not sure that's the
> >>> best way to go about it for this. Things that block on read until an
> >>> interrupt happens might work better.
> >>
> >> You can do the latter via another (4th) input device.
> >>
> > What's wrong with the stuff I did in mdps? a misc character device that
> > acts like /dev/rtc. Why does it have to be input device oriented?
>
> I am fine with a char device that acts like /dev/rtc, but if we are doing
> something as heavyweight as a char device, I'd rather we go full generic
> netlink and send the various events over it. We'd have a netlink device
> that sends everything over various "channels" and just one input device that
> does joystick emulation, then.
>
> Can we use a simple sysfs attribute that blocks the caller on write and
> returns immediately on read?

Sysfs files support poll, if they are implemented that way. A driver
can wake up listeners that wait in poll() for changes.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=4508a7a734b111b8b7e39986237d84acb1168dd0

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/