From: hschauhan@nulltrace.org (Himanshu Chauhan) Date: Thu, 6 Oct 2011 09:36:59 +0530 Subject: [PATCH] hwmon class driver registration with a device number In-Reply-To: <1317839407.3983.46.camel@groeck-laptop> References: <1317834791-2803-1-git-send-email-hschauhan@nulltrace.org> <1317839407.3983.46.camel@groeck-laptop> Message-ID: <20111006040656.GA2125@ubuntu.ubuntu-domain> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi, > I can not comment on the merits of your patch. Unless I am missing > something, which may well be since I only spent a couple of minutes on > it, other device classes don't seem to provide a similar API, so I don't > know if or why it would make sense for hwmon. Maybe a driver which wants > to register a character device interface should do so independently of > hwmon. > The idea here is to sit in the same class directory as of hwmon. Devices registered with this interface will have "dev" under, for example, /sys/class/hwmon/hwmon0/dev. To do the same inside the driver will be a bit more involved than a call. In my opinion other classes should also have similar interfaces. > On the technical side, EXPORT_SYMBOL is missing. > I will take care of that. Regards Himanshu