public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn-l3A5Bk7waGM@public.gmane.org>
To: Fabien Crespel <fabien-czgx1wgAc3rR7s880joybQ@public.gmane.org>
Cc: Dmitry Torokhov
	<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Greg KH <greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>,
	acpi4asus-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Len Brown <lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH 2/2] asus-laptop add kill switch support
Date: Fri, 22 Feb 2008 11:03:10 +0100	[thread overview]
Message-ID: <1203674590.4995.39.camel@queen.suse.de> (raw)
In-Reply-To: <47BB6863.7050208-czgx1wgAc3rR7s880joybQ@public.gmane.org>

On Wed, 2008-02-20 at 00:38 +0100, Fabien Crespel wrote:
> Thomas Renninger wrote :
> > Hi,
> >
> > On Thu, 2008-02-07 at 19:06 +0100, Fabien Crespel wrote:
> >> Basically:
> >> - there is now a killswitch file in /sys/devices/platform/asus-laptop/ to report 
> >> the KS status (read from HWRS)
> >>     
> > Not sure, but:
> > Shouldn't this one register against a general kill-switch interface?
> > E.g. include/linux/rfkill.h
> > instead of starting an own interface...
> >
> >    Thomas
> >   
> Hello,
Hi,

first, I don't know much about this interface and wlan/bluetooth
toggling..., I hope someone who is deeper involved kicks into this
discussion.

> after looking at the rfkill interface, it doesn't seem to have the same 
> purpose here : rfkill seems to be here to allow toggling radio frequency 
> of devices in response to a key or another *software* generated event, 
> while the "killswitch" sysfs file in my patch simply provides a way to 
> read whether the *hardware* kill switch is ON (and not write or toggle 
> anything, since it's completely out of software control).
The problem I see is that you may introduce a very
specific /sys/.../asus_killswitch userspace interface for which a
generic one already or should exist.
You created this for a very specific Lapsus userspace app..., imagine
there are other userspace progs: HAL, WLAN/Bluetooth performance test
programs, whatever wants to know whether Wlan/Bluetooth is on or off.
They now have to collect all this data from different, possibly existing
sysfs files.
Instead (this is what has been done for backlight control), every
specific implementation should register at the backlight driver, you
even find this in the asus driver.
Like that, userspace can operate machine, even architecture independent.

> My intention when adding this interface was to allow userspace tools 
> like Lapsus to know when WLAN/Bluetooth are completely *disabled* (and 
> not simply "off"). I don't think the rfkill interface provides a way to 
> know that, or I missed it..? if it doesn't, wouldn't it be interesting 
> to add it?
> 
> The rfkill interface seems interesting to support the Fn+F2 key though 
> (WLAN/Bluetooth toggle), since currently it doesn't work on all models.

I don't know the policy to provide read or read+write access to the same
thing for different HW.
It can be done:
  1) through file access rights
  2) Simply return -ENODEV (or another error) when userspace tries
     to write to the file in your case, it must handle this gracefully
  3) Provide a set_wlan_state and a get_wlan_state sysfs file
  4) ?

   Thomas


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

      parent reply	other threads:[~2008-02-22 10:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-16 15:57 [PATCH 2/2] asus-laptop add kill switch support Corentin CHARY
     [not found] ` <200801161657.50967.corentincj-EjuBZuxMvz2sTnJN9+BGXg@public.gmane.org>
2008-01-17 10:52   ` Len Brown
2008-01-17 11:15     ` Corentin CHARY
2008-02-07  5:40   ` Len Brown
2008-02-07 18:06     ` Fabien Crespel
     [not found]       ` <1203349001.6019.85.camel@queen.suse.de>
     [not found]         ` <1203349001.6019.85.camel-X8wR35IVlAxolqkO4TVVkw@public.gmane.org>
2008-02-19 23:38           ` Fabien Crespel
     [not found]             ` <47BB6863.7050208-czgx1wgAc3rR7s880joybQ@public.gmane.org>
2008-02-22 10:03               ` Thomas Renninger [this message]

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=1203674590.4995.39.camel@queen.suse.de \
    --to=trenn-l3a5bk7wagm@public.gmane.org \
    --cc=acpi4asus-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=fabien-czgx1wgAc3rR7s880joybQ@public.gmane.org \
    --cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
    --cc=lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-acpi-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