public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
To: Alex Williamson <alex.williamson-VXdhtT5mjnY@public.gmane.org>
Cc: John Belmonte <john-wanGne27zNesTnJN9+BGXg@public.gmane.org>,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	linux-kernel
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Re: [PATCH] filling in ACPI method access via sysfs namespace
Date: Sun, 11 Apr 2004 23:29:40 +0100	[thread overview]
Message-ID: <20040411222940.GJ18329@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <1081653618.2562.52.camel-U2dVeZ/ykGCM0SS3m2neIg@public.gmane.org>

On Sat, Apr 10, 2004 at 09:20:19PM -0600, Alex Williamson wrote:
> On Sat, 2004-04-10 at 14:42, Alex Williamson wrote:
> > 
> >    Ok, I took a look.  The open/write/read/close interface seems to be
> > the best approach.  It shouldn't be too hard, except the read/write
> > interfaces don't pass in the attribute pointer like they do for the
> > show/store interface.
> 
>    I made the assumption that this wasn't that big of a stretch to the
> bin file interface and extended it to add the arribute pointer.  Below
> is what I came up with.  There are luckly only a handful of places using
> the current sysfs bin file interface, so the additional changes are
> pretty small.  I'm guessing I can probably get rid of the spinlocks I
> added for the previous implementation, but they're not hurting anything
> for now.  Am I getting closer?  Thanks,

Yes, definitely closer to my way of thinking ...

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.

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain


-------------------------------------------------------
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-11 22:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-08 19:49 [PATCH] filling in ACPI method access via sysfs namespace Alex Williamson
     [not found] ` <1081453741.3398.77.camel-Wmjt7DDUnIVxnVILBQAtiA@public.gmane.org>
2004-04-09 22:21   ` Alex Williamson
     [not found]     ` <1081549317.2694.25.camel-Wmjt7DDUnIVxnVILBQAtiA@public.gmane.org>
2004-04-10  1:52       ` John Belmonte
2004-04-10  3:12         ` [ACPI] " Alex Williamson
2004-04-10  5:31           ` John Belmonte
     [not found]             ` <407786C6.7030706-wanGne27zNesTnJN9+BGXg@public.gmane.org>
2004-04-10 20:42               ` Alex Williamson
2004-04-11  3:20                 ` [ACPI] " Alex Williamson
     [not found]                   ` <1081653618.2562.52.camel-U2dVeZ/ykGCM0SS3m2neIg@public.gmane.org>
2004-04-11 22:29                     ` Matthew Wilcox [this message]
2004-04-12  3:31                       ` Alex Williamson
     [not found]                         ` <1081740686.1715.20.camel-/d9U08IjUQs=@public.gmane.org>
2004-04-19 15:45                           ` Alex Williamson
     [not found]                         ` <1081740686.1715.20.camel-/d9U08IjUQs@public.gmane.org>
2004-05-06 10:02                           ` Pavel Machek
2004-04-10  5:32           ` [ACPI] " Alex Williamson
     [not found] <fa.n5srcao.1k1orra@ifi.uio.no>
     [not found] ` <fa.e0sva3e.u5k09i@ifi.uio.no>
2004-04-12  4:13   ` Andy Lutomirski
     [not found]     ` <407A1787.5060508-YSGFQ8SKJZVDPfheJLI6IQ@public.gmane.org>
2004-04-12  4:32       ` 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=20040411222940.GJ18329@parcelfarce.linux.theplanet.co.uk \
    --to=willy-8fiuurrzop0dnm+yrofe0a@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=alex.williamson-VXdhtT5mjnY@public.gmane.org \
    --cc=john-wanGne27zNesTnJN9+BGXg@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@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