lkml.org 
[lkml]   [2011]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [lm-sensors] [PATCH] hwmon class driver registration with a device number
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


\
 
 \ /
  Last update: 2011-10-06 18:29    [W:0.035 / U:1.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site