From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Pau Espin Pedrol <pespin.shar@gmail.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
Andy Shevchenko <andy@infradead.org>,
Platform Driver <platform-driver-x86@vger.kernel.org>,
Corentin Chary <corentin.chary@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
acpi4asus-user <acpi4asus-user@lists.sourceforge.net>,
"dvhart@infradead.org" <dvhart@infradead.org>
Subject: Re: [PATCH] eeepc-laptop: Skip unknown key messages 0x50 0x51
Date: Tue, 7 Mar 2017 11:27:01 -0800 [thread overview]
Message-ID: <20170307192701.GG13740@dtor-ws> (raw)
In-Reply-To: <CAEGpDub7-ou3YJAOxxK-vj9RYNMp5ER752XMFVLdB8zWWisV8Q@mail.gmail.com>
On Fri, Feb 24, 2017 at 02:01:30PM +0100, Pau Espin Pedrol wrote:
> >> Dmitry, do we have special events for AC (un)plug? What is the best
> >> approach in your opinion?
> >
> > Not route them through input as they not input events would be the best.
> >
> Is my patch good enough for this or would you recommend doing it another way?
>From input POV your patch makes sense.
>
> > I'd look into hooking up power_supply class.
> >
> Whys is this necessay? All the related information required is already
> present in my system.
> I already have two power_supply instances:
> * /sys/class/power_supply/AC0/ (provided by module "ac"), contains
> property "online" which is correctly updated to 1 when AC is plugged
> and 0 when AC is unplugged.
> * /sys/class/power_supply/BAT0/ (provided by module "battery"),
> contains property "status" which is correctly updated to "Charging"
> when AC is plugged and "Discharging" when AC is unplugged.
If everything is already working then it is not necessary. I was
trying to say that if it does not quite work, then you shoudl look into
integrating it better with power supply subsystem, instead of trying to
shoehorn it into input.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2017-03-07 19:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-10 17:48 [PATCH] eeepc-laptop: Skip unknown key messages 0x50 0x51 Pau Espin Pedrol
2017-02-18 16:16 ` Andy Shevchenko
[not found] ` <CAEGpDuaw3uJoxbyOuTWyBodM-JgMd2hSqZUgg_wbyJa+9sJOjw@mail.gmail.com>
2017-02-21 13:39 ` Pau Espin Pedrol
2017-02-21 15:38 ` Andy Shevchenko
2017-02-23 8:36 ` Dmitry Torokhov
2017-02-24 13:01 ` Pau Espin Pedrol
2017-03-01 23:18 ` Andy Shevchenko
2017-03-07 19:27 ` Dmitry Torokhov [this message]
2017-03-13 16:04 ` Andy Shevchenko
2017-03-15 22:15 ` Darren Hart
2017-03-16 23:54 ` Dmitry Torokhov
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=20170307192701.GG13740@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=acpi4asus-user@lists.sourceforge.net \
--cc=andy.shevchenko@gmail.com \
--cc=andy@infradead.org \
--cc=corentin.chary@gmail.com \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pespin.shar@gmail.com \
--cc=platform-driver-x86@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox