From: Greg KH <gregkh@suse.de>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Jean Delvare <khali@linux-fr.org>,
Amit Kucheria <amit.kucheria@verdurent.com>,
List Linux Kernel <linux-kernel@vger.kernel.org>,
rui.zhang@intel.com, alan@linux.intel.com,
linux-acpi@vger.kernel.org
Subject: Re: [PATCH 2/2] als: add unique device-ids to the als device class
Date: Thu, 3 Dec 2009 21:20:56 -0800 [thread overview]
Message-ID: <20091204052056.GA16660@suse.de> (raw)
In-Reply-To: <4B0ECB84.9010503@cam.ac.uk>
On Thu, Nov 26, 2009 at 06:40:04PM +0000, Jonathan Cameron wrote:
> Greg KH wrote:
> > On Thu, Nov 26, 2009 at 05:19:13PM +0000, Jonathan Cameron wrote:
> >>> That being said... If we want user-space to know what device is there,
> >>> we may want to still let drivers pass a name string to
> >>> als_device_register() and let the ALS core create a "name" sysfs
> >>> attribute returning the string in question. This would be much lighter
> >>> (for individual drivers) than the previous situation, as the string in
> >>> question would be a constant (e.g. "TSL2550".) Opinions?
> >>>
> >> Makes sense given we want all drivers to support some form of identification.
> >> We could do it by stating they will all have that attribute, but given it's constant
> >> will save repetition to put it in the driver. Conversely it might complicate the handling
> >> of subsequent attribute_groups so I'd probably favour adding relevant documentation lines
> >> and leaving it up to the drivers to implement this attribute.
> >>
> >> Thus we'd require (within reason) all drivers to have illuminance0 and name.
> >
> > Why have a name attribute when you can just use the name of the device
> > itself instead? Isn't that what it is there for?
> Could do, though I'm not entirely sure all bus types are implementing a name
> attribute (I may be wrong, but I don't think spi does for example though it might
> have gone in with the recent device table stuff). We could just specify that it
> should be present for the device.
ah, sorry, I was thinking of the name of the actual device, which is the
bus id here.
Nevermind, I'll go back to feeling stupid...
greg k-h
next prev parent reply other threads:[~2009-12-04 5:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-26 12:04 [PATCH 0/2] Introduding the Ambient Light Sensor (ALS) class Amit Kucheria
2009-11-26 12:06 ` [PATCH 1/2] introduce ALS sysfs class Amit Kucheria
2009-11-26 12:25 ` Jonathan Cameron
2009-11-26 12:27 ` Jonathan Cameron
2009-11-26 12:06 ` [PATCH 2/2] als: add unique device-ids to the als device class Amit Kucheria
2009-11-26 15:07 ` Jean Delvare
2009-11-26 17:19 ` Jonathan Cameron
2009-11-26 18:06 ` Greg KH
2009-11-26 18:40 ` Jonathan Cameron
2009-12-04 5:20 ` Greg KH [this message]
2009-11-26 18:54 ` Jean Delvare
-- strict thread matches above, loose matches on Subject: below --
2009-11-30 11:45 [PATCHv2 0/2] Introducing the Ambient Light Sensor (ALS) class Amit Kucheria
2009-11-30 11:46 ` [PATCH 2/2] als: add unique device-ids to the als device class Amit Kucheria
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=20091204052056.GA16660@suse.de \
--to=gregkh@suse.de \
--cc=alan@linux.intel.com \
--cc=amit.kucheria@verdurent.com \
--cc=jic23@cam.ac.uk \
--cc=khali@linux-fr.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rui.zhang@intel.com \
/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