Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1594565

Re: [PATCH] eeepc-laptop: Skip unknown key messages 0x50 0x51

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Dmitry Torokhov <dmitry.torokhov@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] eeepc-laptop: Skip unknown key messages 0x50 0x51
Date Tue, 07 Mar 2017 20:30:02 +0100
Message-ID <tisY2-3CB-5@gated-at.bofh.it> (permalink)
References <t9nNU-6VN-23@gated-at.bofh.it> <tcfTQ-451-9@gated-at.bofh.it> <tdiPE-3ak-25@gated-at.bofh.it> <tdiPE-3ak-23@gated-at.bofh.it> <tdkHN-4r9-49@gated-at.bofh.it> <tdX6q-7c9-9@gated-at.bofh.it> <tenNg-yV-15@gated-at.bofh.it>
X-Original-To Pau Espin Pedrol <pespin.shar@gmail.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1zrQKOKw+B/QBtG+qWPq85H61HhWmfg/GFeMlLqUZAM=; b=S+lP20escTasBJ73nsetSdEZIEah5J75ItojOKG6XMKVOe5ZZruejzQPoNnFSFDkpp 5o8VS5khUWe2GzOnNyJ4dylnj/e0+2ivFnuVkdUY8YVz7VxppXTg8pao5bCuT2X5Qzvw BPonKOAQkxMYtyseWUO167JQQ9Vh5bwvhtntH7y7PFgjAOA55TXRtDRZIgS7l1+tDLrO 8TaPNQAj/7+UQZAdoJlhIpk48n8ymAh3kQ+4DxNknOqomp6Lmo/5A2tK793CvaacebPz lGnfPO0H/w//XjS44FayDTNRAH+V6NwApQ/lgQwifobTmxrc1FDID8VnUWqBngHUZkOb 4tFw==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=1zrQKOKw+B/QBtG+qWPq85H61HhWmfg/GFeMlLqUZAM=; b=NVSsXwgbc/qFIIB7Fl8+L+q3oFMmXyepTZ8NTzG4GkKFHRqmmG3t0rpbXTNBAv6aJ5 x55qrrZ8TT5y0vN1BZ9V3slfghN2GsZXdiyjLWJ/A+vIcU/tmn3TXFAqa+6Yl/YGNTdj TFd4G2h/xfWgapLQ8YMmNkAGf3K1zEoANbPOdQnxifmVXN7aSONHCdYR8nGAWgCevu1P 8oDg9WIlT3W8RaXkFKFza6uKrbLD6j1e4ds0LaNd2Mh4EJAjJTm7t9fWtH7xYyMLiVw3 SVdVLZ+O71zESAPhzQET5YCeH6ISsR8vl3TpphQq1oc1ON/c21nTIJFyySn9p40yFCnr rNFw==
X-Gm-Message-State AMke39l0MslCQwWmL3D2hn9gPEWq3HGr7fmqkrs4MsL0xWDqqnCu0i2kNbYozI2gk4k3Ww==
X-Received by 10.84.199.170 with SMTP id r39mr2710747pld.144.1488914824306; Tue, 07 Mar 2017 11:27:04 -0800 (PST)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.21 (2010-09-15)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 32
Organization linux.* mail to news gateway
X-Original-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>
X-Original-Date Tue, 7 Mar 2017 11:27:01 -0800
X-Original-Message-ID <20170307192701.GG13740@dtor-ws>
X-Original-References <20170210174837.1078-1-pespin.shar@gmail.com> <CAHp75VfnbO_9gCfYJYCvnE-w=hkYORi+7pL5NpQCVf3UxTYZNw@mail.gmail.com> <CAEGpDuaw3uJoxbyOuTWyBodM-JgMd2hSqZUgg_wbyJa+9sJOjw@mail.gmail.com> <CAEGpDuZyFrN0CHy-E+FTwgSLfUKbA65ghenmq_fVK2qw1KDiPg@mail.gmail.com> <CAHp75Vem5Rxa+Ms5zop2zCHqExQfv9WPufQ6jPdCBpQQh0AN=w@mail.gmail.com> <20170223083631.GE18639@dtor-ws> <CAEGpDub7-ou3YJAOxxK-vj9RYNMp5ER752XMFVLdB8zWWisV8Q@mail.gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1594565

Show key headers only | View raw


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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH] eeepc-laptop: Skip unknown key messages 0x50 0x51 Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-03-07 20:30 +0100
  Re: [PATCH] eeepc-laptop: Skip unknown key messages 0x50 0x51 Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-03-13 17:10 +0100

csiph-web