All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Sebastian Reichel <sre@kernel.org>,
	kernel list <linux-kernel@vger.kernel.org>,
	linux-input@vger.kernel.org, Henrik Rydberg <rydberg@euromail.se>
Subject: Re: Disable input device
Date: Sat, 6 Dec 2014 13:47:08 +0100	[thread overview]
Message-ID: <20141206124708.GA17289@amd> (raw)
In-Reply-To: <201411291824.03996@pali>

On Sat 2014-11-29 18:24:03, Pali Rohár wrote:
> Hello,
> 
> there is request to introduce some option (via sysfs) to disable 
> one input device. Originally it was for tsc2005 touchscreen found 
> on Nokia N900 cellphone. Use case is to completely disable 
> touchscreen when phone is in pocket or when screen is locked via 
> slide switch (to prevent random clicks).
> 
> But it would be better to have disable option for all input 
> devices. Sometimes input device is not use and only consume 
> power. Another case is when input device (e.g. keyboard or 
> touchpad) is integrated into machine (e.g. on laptops) and user 
> does not want to use it (so make sure that kernel does not send 
> events to userspace).
> 
> I would like to ask, how to solve it?
> 
> What do you think about adding new sysfs file "disable" (accept 
> values 1 or 0) for every input device? With "1" it cause that 
> kernel will drop all events from specific input device and if 
> driver provide some function is can be called (e.g. for power 
> management or disabling device at hardware level).

That makes sense to me. Dmitry, would such interface be acceptable?

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Machek <pavel@ucw.cz>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Sebastian Reichel <sre@kernel.org>,
	kernel list <linux-kernel@vger.kernel.org>,
	linux-input@vger.kernel.org, Henrik Rydberg <rydberg@euromail.se>
Subject: Re: Disable input device
Date: Sat, 6 Dec 2014 13:47:08 +0100	[thread overview]
Message-ID: <20141206124708.GA17289@amd> (raw)
In-Reply-To: <201411291824.03996@pali>

On Sat 2014-11-29 18:24:03, Pali Rohár wrote:
> Hello,
> 
> there is request to introduce some option (via sysfs) to disable 
> one input device. Originally it was for tsc2005 touchscreen found 
> on Nokia N900 cellphone. Use case is to completely disable 
> touchscreen when phone is in pocket or when screen is locked via 
> slide switch (to prevent random clicks).
> 
> But it would be better to have disable option for all input 
> devices. Sometimes input device is not use and only consume 
> power. Another case is when input device (e.g. keyboard or 
> touchpad) is integrated into machine (e.g. on laptops) and user 
> does not want to use it (so make sure that kernel does not send 
> events to userspace).
> 
> I would like to ask, how to solve it?
> 
> What do you think about adding new sysfs file "disable" (accept 
> values 1 or 0) for every input device? With "1" it cause that 
> kernel will drop all events from specific input device and if 
> driver provide some function is can be called (e.g. for power 
> management or disabling device at hardware level).

That makes sense to me. Dmitry, would such interface be acceptable?

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2014-12-06 12:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-29 17:24 Disable input device Pali Rohár
2014-12-06 12:47 ` Pavel Machek [this message]
2014-12-06 12:47   ` Pavel Machek
2014-12-06 15:28 ` Chuck Ebbert
2014-12-06 15:28   ` Chuck Ebbert

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=20141206124708.GA17289@amd \
    --to=pavel@ucw.cz \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=rydberg@euromail.se \
    --cc=sre@kernel.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.