From: Jonathan Cameron <jic23@cam.ac.uk>
To: Greg KH <gregkh@suse.de>
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, 26 Nov 2009 18:40:04 +0000 [thread overview]
Message-ID: <4B0ECB84.9010503@cam.ac.uk> (raw)
In-Reply-To: <20091126180646.GA9059@suse.de>
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.
Jonathan
next prev parent reply other threads:[~2009-11-26 18:40 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 [this message]
2009-12-04 5:20 ` Greg KH
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=4B0ECB84.9010503@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=alan@linux.intel.com \
--cc=amit.kucheria@verdurent.com \
--cc=gregkh@suse.de \
--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