linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: postmaster@icnet.pl
Cc: linux-input@vger.kernel.org
Subject: Re: How to choeck for a gpio-keys based switch state?
Date: Fri, 15 May 2009 11:58:06 -0700	[thread overview]
Message-ID: <20090515185806.GA22662@dtor-d630.eng.vmware.com> (raw)
In-Reply-To: <4A0D8EAB.6070900@tis.icnet.pl>

Hi Janusz,

On Fri, May 15, 2009 at 05:47:55PM +0200, Janusz Krzysztofik wrote:
> Hi,
>
> Greetings from new list member.
>
> I am trying to create a gpio-keys based platform device driver for a  
> hook switch. I am wondering if there is a possibility to check for the  
> switch state before the first event comes up. I think this feature could  
> be essential for correct user experience - an application should know  
> the switch state from the start.
> As I am not able to find such functionality in the current gpio-keys  
> driver, I wonder if this could be done over gpiolib sysfs interface by  
> adding optional gpio_export() call to the driver init function. I can  
> try to provide a patch if this sounds reasonable to you.
>

Your application should use EVIOCGSW ioctl to query the initial state of
the switches.

-- 
Dmitry

  reply	other threads:[~2009-05-15 18:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-15 15:47 How to choeck for a gpio-keys based switch state? Janusz Krzysztofik
2009-05-15 18:58 ` Dmitry Torokhov [this message]
2009-05-16  8:30   ` Janusz Krzysztofik

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=20090515185806.GA22662@dtor-d630.eng.vmware.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=postmaster@icnet.pl \
    /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;
as well as URLs for NNTP newsgroup(s).