mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Himanshu Chauhan <hschauhan@nulltrace.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jean Delvare <khali@linux-fr.org>,
	Guenter Roeck <guenter.roeck@ericsson.com>,
	lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] hwmon class driver registration with a device number
Date: Thu, 6 Oct 2011 21:55:40 +0530	[thread overview]
Message-ID: <20111006162540.GA5402@ubuntu.ubuntu-domain> (raw)
In-Reply-To: <20111006164600.071213e1@lxorguk.ukuu.org.uk>

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

  reply	other threads:[~2011-10-06 16:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-05 17:13 Himanshu Chauhan
2011-10-05 18:30 ` Guenter Roeck
2011-10-06  4:06   ` Himanshu Chauhan
2011-10-06  5:19     ` Guenter Roeck
2011-10-06  7:43       ` [lm-sensors] " Jean Delvare
2011-10-06 15:12         ` Himanshu Chauhan
2011-10-06 15:46           ` Alan Cox
2011-10-06 16:25             ` Himanshu Chauhan [this message]
2011-10-06 15:15         ` Guenter Roeck
2011-10-06 16:43           ` Himanshu Chauhan
2011-10-05 19:33 ` Greg KH
2011-10-06  4:10   ` Himanshu Chauhan
2011-10-06 18:25     ` Greg KH
2011-10-06 19:07       ` [lm-sensors] " Guenter Roeck
2011-10-07  6:42         ` Himanshu Chauhan
2011-10-07  6:52           ` Greg KH
2011-10-07  9:56             ` Himanshu Chauhan
2011-10-07 11:11               ` Jonathan Cameron
2011-10-07 15:46               ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111006162540.GA5402@ubuntu.ubuntu-domain \
    --to=hschauhan@nulltrace.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=guenter.roeck@ericsson.com \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome