public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Starikovskiy <astarikovskiy@suse.de>
To: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [RFC] EC registers - Adding sysfs interface?
Date: Tue, 13 Nov 2007 21:46:17 +0300	[thread overview]
Message-ID: <4739F0F9.2030701@suse.de> (raw)
In-Reply-To: <4739EFB0.7080507@suse.de>

Alexey Starikovskiy wrote:
> Carlos Corbacho wrote:
>> Alexey,
>>
>> I'm considering writing a sysfs interface for the EC registers, and 
>> was wondering if you would be ok with such a patch (before I start 
>> work on it)?
> What do you need that for?
>>
>> I'd like to expose the registers to userspace, as it is already 
>> possible to access the EC registers in userspace via /dev/ports (and 
>> quite a few of us 
> Well, this is not an argument. You have access to all memory through 
> /dev/mem, so what?
>> would like to access them) - however, the problem with doing this is 
>> that ACPI throws quite a few warnings/ errors in dmesg whilst doing 
>> this; it would therefore be far preferable to expose the registers 
>> through sysfs, which would in turn be based on the ec_{read,write} 
>> calls, so we don't end up stepping on ACPI's toes.
> I think it is better to do it in file system that allows seek(). So you 
> could do with 1 file instead of 256 of them.
>>
>> So, basically, I'm proposing something like:
>>
>> /sys/firmware/acpi/ec/ecX
>> |
>> |-> 0
>> |-> 1
>> |-> 2
>> |-> etc... (up to 255)
>>
>> Where each file returns the contents of the EC register in question 
>> (via ec_read()), and writing to the file calls ec_write().
> Carlos, I don't like the idea of 256 files. This will consume too many 
> resources and will not bring much value.
> If you want to have something permanent, it should be slim and fast.
How about character /dev/ec0?
> If we talk about some debug/research/RE, do it as you like, but don't 
> ask for submission into kernel :)
> Regards,
> Alex.
> 


  reply	other threads:[~2007-11-13 18:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-13 17:24 [RFC] EC registers - Adding sysfs interface? Carlos Corbacho
2007-11-13 18:40 ` Alexey Starikovskiy
2007-11-13 18:46   ` Alexey Starikovskiy [this message]
2007-11-13 18:49   ` Carlos Corbacho
2007-11-13 18:54     ` Alexey Starikovskiy
2007-11-13 19:03       ` Carlos Corbacho
2007-11-28 16:28         ` Thomas Renninger
2007-11-28 18:25           ` Alexey Starikovskiy
2007-11-28 23:12             ` Henrique de Moraes Holschuh
2007-12-07  2:52           ` Len Brown
2007-12-07  8:53             ` Thomas Renninger
2007-12-10 20:36               ` Henrique de Moraes Holschuh
2007-11-14  2:40 ` Henrique de Moraes Holschuh

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=4739F0F9.2030701@suse.de \
    --to=astarikovskiy@suse.de \
    --cc=carlos@strangeworlds.co.uk \
    --cc=linux-acpi@vger.kernel.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