All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Ionescu <paul-f7LjuT9/YZU@public.gmane.org>
To: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>
Cc: Bruno Ducrot <ducrot-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>,
	Matthew Wilcox <willy-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>,
	acpi
	<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [rfc] generic testing ACPI module
Date: Sat, 13 Mar 2004 15:31:07 +0200	[thread overview]
Message-ID: <1079184667.5429.158.camel@t40> (raw)
In-Reply-To: <20040312195912.GA2153-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org>

Hi Pavel,

That should be ok.
For the long term, it sounds reasonable to do it this way if kernel
developers agree this usage of sysfs filesystem.
I just remembered one discution from last weeks, that files in sysfs
have to accept only one value, and output only one value (or something
like this).
I don't know if I got it right, but if this is the case, we should
either move this tree in /proc/acpi/somewhere, or create some other
files under each method like {parm1,parm2,parmN,result1,result2,resultN}
depending of what that particular method takes as arguments and values
it return.
Some locking mecanism should be used to be sure that only one program is
unsing it a a time.
Anyway, this will take time to implement it, but it may have a future.
What I am looking for right now, is to have a VERY SMALL module template
of an acpi driver for accessing a method with some parameters, and for
installing a notify handler on an object in order to receive some events
in acpid when that object receives a notify. And it should operate with
full path ACPI objects.

I don't even want it to be included in main kernel, it can live at acpi
site, like the patch for putting your own DSDT table in kernel.

I am willing to develop one, but I need a small template because I don't
know much about acpi in kernel, and I don't really have a lot of free
time to learn it.
But if a template would exist, it would be much easyer for me to just
modify it to suit my needs.




On Fri, 2004-03-12 at 21:59, Pavel Machek wrote:
> Hi!
> 
> > > But ioctls are even worse. Why not simply
> > > 	open METHOD
> > > 	write PARAMETERS
> > > 	read RESULTS
> > > 	close
> > > 
> > 
> > Because I'm too stupid to thing of your solution, I guess.
> 
> Well, instead of doing ioctls on special file, you can simply do
> write syscall (telling driver parameters for the method) then read
> syscall on same filedescriptor. That is not racy, and it is
> less hacky then ioctl()
> 				Pavel



-------------------------------------------------------
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-03-13 13:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-11 20:53 [rfc] generic testing ACPI module Paul Ionescu
     [not found] ` <1079038411.18351.25.camel-LjAuIDrFwz0@public.gmane.org>
2004-03-11 21:10   ` Matthew Wilcox
     [not found]     ` <20040311211005.GM2148-+pPCBgu9SkPzIGdyhVEDUDl5KyyQGfY2kSSpQ9I8OhVaa/9Udqfwiw@public.gmane.org>
2004-03-11 21:48       ` Paul Ionescu
     [not found]         ` <1079041694.5429.58.camel-LjAuIDrFwz0@public.gmane.org>
2004-03-11 22:50           ` Bruno Ducrot
     [not found]             ` <20040311225032.GN28592-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
2004-03-12  5:30               ` Paul Ionescu
     [not found]                 ` <1079069435.5429.92.camel-LjAuIDrFwz0@public.gmane.org>
2004-03-12 10:29                   ` Bruno Ducrot
     [not found]                     ` <20040312102921.GO28592-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
2004-03-12 12:12                       ` Matthew Wilcox
2004-03-12 14:42               ` Pavel Machek
     [not found]                 ` <20040312144241.GA1236-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org>
2004-03-12 17:57                   ` Bruno Ducrot
     [not found]                     ` <20040312175724.GP28592-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
2004-03-12 19:59                       ` Pavel Machek
     [not found]                         ` <20040312195912.GA2153-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org>
2004-03-13 13:31                           ` Paul Ionescu [this message]
2004-03-12 21:22                       ` geekcelibataire-GANU6spQydw
     [not found]                         ` <20040312222244.5f523037.geekcelibataire-GANU6spQydw@public.gmane.org>
2004-03-12 22:08                           ` Pavel Machek
2004-03-13 13:41                   ` Paul Ionescu
     [not found]                     ` <1079185271.5429.169.camel-LjAuIDrFwz0@public.gmane.org>
2004-03-13 14:00                       ` Pavel Machek
     [not found]                         ` <20040313140059.GA3764-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org>
2004-03-13 21:31                           ` Paul Ionescu
2004-03-15  1:13                   ` Stefan Seyfried
  -- strict thread matches above, loose matches on Subject: below --
2004-03-08 21:31 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=1079184667.5429.158.camel@t40 \
    --to=paul-f7ljut9/yzu@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=ducrot-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org \
    --cc=pavel-+ZI9xUNit7I@public.gmane.org \
    --cc=willy-8fiUuRrzOP0dnm+yROfE0A@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.