public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: Zhang Rui <rui.zhang@intel.com>
Cc: Greg KH <greg@kroah.com>, Pavel Machek <pavel@ucw.cz>,
	linux-acpi <linux-acpi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Len Brown <lenb@kernel.org>, Richard Purdie <rpurdie@rpsys.net>,
	Matthew Garrett <mjg59@srcf.ucam.org>
Subject: Re: [PATCH 0/3] Generic sysfs support for ACPI ALS and other ALS devices
Date: Wed, 05 Aug 2009 12:10:31 -0400	[thread overview]
Message-ID: <19291.1249488631@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Wed, 05 Aug 2009 09:04:52 +0800." <1249434292.2670.388.camel@rzhang-dt>

[-- Attachment #1: Type: text/plain, Size: 1797 bytes --]

On Wed, 05 Aug 2009 09:04:52 +0800, Zhang Rui said:
> On Wed, 2009-08-05 at 01:36 +0800, Greg KH wrote:
> > On Tue, Aug 04, 2009 at 01:24:24PM -0400, Valdis.Kletnieks@vt.edu wrote:
> > > On Tue, 04 Aug 2009 08:10:42 PDT, Greg KH said:
> > > > On Tue, Aug 04, 2009 at 03:21:29PM +0200, Pavel Machek wrote:
> > > > > On Mon 2009-08-03 17:10:57, Zhang Rui wrote:
> > > 
> > > > > > 	cat /sys/class/als/als0/mappings
> > > > > > 	???Illuminance	Adjustment
> > > > > > 	          0	       70
> > > > > > 	         10	       73
> > > > > > 	         80	       85
> > > > > > 	        300	      100
> > > > > > 	       1000	      150
> > > > > 
> > > > > There's one value per file for sysfs... You should definitely have th
e
> > > > > header. 
> > > > 
> > > > No, no "header", just don't do this, it's not allowed. Again,
> > > > one-value-per-sysfs-file is the rule, please do not violate it.
> > > 
> > > What's the intended sysfs solution here, then? Make 'mappings' a directory,
> > > and populate it with files called 0, 10, 80, 300, 1000, each with one number
> > > in them?
> > 
> > That's one acceptable solution.  Or how about files in this directory
> > called "mapping_0", "mapping_10", and so on, containing the adjustment
> > value?
> > 
> great. that's what I'm going to do.
> refreshed patch will be sent out later. :)

Hmm. whether to call the files mapping_0, mapping_10 etc or mapping/0, mapping/10
etc probably depends on how nailed-down the 0,10,80,300,100 is - are those
numbers carved in stone, or are we better off defining the API as "directory
mapping, and files for whatever values the hardware happens to cough up?"

Not a biggie either way, it's going to be a readdir()/filter/open()/close()
loop either way, just different details for the readdir() and entry filtering...

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

  reply	other threads:[~2009-08-05 16:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-03  9:10 [PATCH 0/3] Generic sysfs support for ACPI ALS and other ALS devices Zhang Rui
2009-08-04  1:12 ` ykzhao
2009-08-04  7:30   ` Zhang Rui
2009-08-04 13:21 ` Pavel Machek
2009-08-04 15:10   ` Greg KH
2009-08-04 17:24     ` Valdis.Kletnieks
2009-08-04 17:36       ` Greg KH
2009-08-05  1:04         ` Zhang Rui
2009-08-05 16:10           ` Valdis.Kletnieks [this message]
2009-08-06  1:51             ` Zhang Rui
2009-08-05  0:55     ` Zhang Rui
2009-08-05  1:02   ` Zhang Rui
2009-08-05 16:19     ` Pavel Machek
2009-08-06  1:41       ` Zhang Rui
2009-08-06  7:13         ` Pavel Machek
2009-08-06  8:47           ` Zhang Rui
2009-08-06  9:52             ` Pavel Machek
2009-08-17  8:32               ` Zhang Rui
2009-08-21 11:51                 ` Pavel Machek
2009-08-25  1:13                   ` Zhang Rui

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=19291.1249488631@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=greg@kroah.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=pavel@ucw.cz \
    --cc=rpurdie@rpsys.net \
    --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