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

From: Henrique de Moraes Holschuh
Date: Mon Sep 10 2007 - 18:55:27 EST


On Mon, 10 Sep 2007, Yan Burman wrote:
> But, how are you going to make the sysfs attribute look generic so that
> application will not have to know whether to go
> to /sys/.../mdps /sys/.../hdaps/ or /sys/.../whatever?

You use a (new, to be designed and implemented) accelerometer class, and
userspace hunts down every device that is a member of that class. Look at
how hwmon is doing it in 2.6.22+ and lm-sensors CVS.

> I'd probably prefer netlink, since this way it's something more generic and
> if some more functionality is added, you don't need to start
> adding more sysfs attributes.

But you will need to add extra netlink messages, anyway. I don't know for
sure what would be the best way.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
-
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/