Re: [PATCH] hwmon class driver registration with a device number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 06, 2011 at 04:46:00PM +0100, Alan Cox wrote:

> 
> I guess I don't see why a device that is more than just a monitoring
> interface can't allocate a misc device or similar if it needs one.
>

Hi Alan,

For a device, for example, /sys/class/hwmon/hwmon0/dev, mdev will create
hwmon0 named device in /dev. User space apps will access the device
with the same name, i.e. /dev/hwmon0. If a driver registers with hwmon
class and with miscellaneous as well, two entries with same name will
be created under /sys; causing conflict. hwmon will create hwmon%d, you
don't have control over that. So the driver has to make sure that it
gives the same device a different name. Why? Doesn't make sense.
If you want to have hwmon device and still want to have char interface,
isn't doing it all at one place more sensible?

May be this interface is not a necessity but it does provides a flexible
way of achieving what I am talking about.

-Himanshu

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux