public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Ionescu <paul-f7LjuT9/YZU@public.gmane.org>
To: Alex Williamson <alex.williamson-VXdhtT5mjnY@public.gmane.org>,
	acpi
	<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: Re: [PATCH] filling in ACPI method access via sysfs
Date: Wed, 14 Apr 2004 01:30:56 +0300	[thread overview]
Message-ID: <1081895455.6859.153.camel@t40> (raw)

Hi Alex,

Your new patch for acpi sysfs is looking good, we have access now to all methods of DSDT and can do some userspace utilities (drivers).
Now, what we need at kernel level, IMHO, is to be able to attach a generic notify handler to the devices exported.
For instance we can have another file in sysfs like NOTIFY or something, and when activated (perhaps an echo 1 > NOTIFY should do), 
that device will be able to handle a notify. 
The basic handling can be just sending an message in /proc/acpi/event containing full device name and notify value.
Then acpid should do the rest if necessary.


Thanks,
Paul


On Sun, 2004-04-11 at 16:29, Alex Williamson wrote: 
>> 
>> It seems unintuitive that you have to read the file for the method to
>> take effect.  How about having the write function invoke the method and
>> (if there is a result) store it for later read-back via the read function?
>> It should be discarded on close, of course.  A read() on a file with
>> no stored result should invoke the ACPI method (on the assumption this
>> is a parameter-less method) and return the result directly.  Closing a
>> file should discard any result from the method.
>
>  How's this?  It behaves the way you described, but might be doing
> some questionable things with the buffer to get there.  Is there a
> better place to store the return data than back into the buf passed to
> write() (aka file->private_data)?  Without adding callbacks to
> open/close, I'm not sure how else we can dispose of the results on
> close.  Thanks,
>
>	Alex



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

             reply	other threads:[~2004-04-13 22:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-13 22:30 Paul Ionescu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-04-13 22:15 Re: [PATCH] filling in ACPI method access via sysfs Paul Ionescu
     [not found] ` <1081894500.6859.120.camel-LjAuIDrFwz0@public.gmane.org>
2004-04-13 22:25   ` Alex Williamson

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=1081895455.6859.153.camel@t40 \
    --to=paul-f7ljut9/yzu@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=alex.williamson-VXdhtT5mjnY@public.gmane.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