public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson-VXdhtT5mjnY@public.gmane.org>
To: Paul Ionescu <paul-f7LjuT9/YZU@public.gmane.org>
Cc: acpi <acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: Re: [PATCH] filling in ACPI method access via sysfs
Date: Tue, 13 Apr 2004 16:25:44 -0600	[thread overview]
Message-ID: <1081895144.2775.41.camel@patsy.fc.hp.com> (raw)
In-Reply-To: <1081894500.6859.120.camel-LjAuIDrFwz0@public.gmane.org>

On Tue, 2004-04-13 at 16:15, Paul Ionescu wrote:
> Hi Alex,
> 
> I tried to play with your new patch. I am able now to run arbitrary
> parameterless methods. I have some problems accessing the methods
> requiring parameters, or giving results.
> 
> I did an "echo 1 > /sys/.../DOCK/_DCK " but nothing happened, and I have
> tried also to cat it but I got "cat: Read error: No such device"
> 
> And I did an "cat /sys/.../_STA" and I receive 
> cat: Read error: No such device
> Do I miss something ?
> 

   Yeah, the latest iteration only supports read/write to the files, I
removed support for the show/store ops.  So, you need a program/script
that open()s the file, write()s arguments (if any), read()s the results,
and close()s the file.  Thanks,

	Alex

> 
> 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
-- 
Alex Williamson                             HP Linux & Open Source Lab



-------------------------------------------------------
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

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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-04-13 22:30 Paul Ionescu

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=1081895144.2775.41.camel@patsy.fc.hp.com \
    --to=alex.williamson-vxdhtt5mjny@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=paul-f7LjuT9/YZU@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