From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758143AbcG0TED (ORCPT ); Wed, 27 Jul 2016 15:04:03 -0400 Received: from esa3.dell-outbound.iphmx.com ([68.232.153.94]:18008 "EHLO esa3.dell-outbound.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757190AbcG0TEA (ORCPT ); Wed, 27 Jul 2016 15:04:00 -0400 DomainKey-Signature: s=smtpout; d=dell.com; c=simple; q=dns; h=Received:X-LoopCount0:X-IronPort-AV:From:To:CC:Subject: Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language: X-MS-Has-Attach:X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader:x-originating-ip: Content-Type:Content-Transfer-Encoding:MIME-Version: Return-Path; b=qDI/qQE8Cff+9Mrs4qu7uzypOaiJCYELAptV53sVQYzOQDcEo2Thn4HR vlzPdc2Pdq/k7ebv9nTeY1qx7BISJ+vsPPuUenHmxw8yGHsbrPMN6Wprt xyXXoSXhj08KutFG8e+EV+3L+3+cdeOPEzMI3FIaYqKAXkbKc57lxaQl6 c=; X-LoopCount0: from 10.175.216.250 X-IronPort-AV: E=Sophos;i="5.28,430,1464670800"; d="scan'208";a="838069762" From: To: CC: , , Subject: RE: [PATCH] dell-wmi: Add events created by Dell Rugged 2-in-1s Thread-Topic: [PATCH] dell-wmi: Add events created by Dell Rugged 2-in-1s Thread-Index: AQHR5FPfN9AkRB1xfUWyNEdZMBDLaaAsF/iAgAAi1gCAADfXN4AAWgmA///bNmA= Date: Wed, 27 Jul 2016 19:03:57 +0000 Message-ID: <13ec06e37e284263b6bf4fe4a6a04a78@ausx13mpc120.AMER.DELL.COM> References: <1469217684-6643-1-git-send-email-mario_limonciello@dell.com> <20160727072350.GF29844@pali> <1469634909478.10239@Dell.com> <201607271805.57123@pali> In-Reply-To: <201607271805.57123@pali> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.133.117.218] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u6RJ48wf029666 > -----Original Message----- > From: Pali Rohár [mailto:pali.rohar@gmail.com] > Sent: Wednesday, July 27, 2016 11:06 AM > To: Limonciello, Mario > Cc: dvhart@infradead.org; linux-kernel@vger.kernel.org; platform-driver- > x86@vger.kernel.org > Subject: Re: [PATCH] dell-wmi: Add events created by Dell Rugged 2-in-1s > > On Wednesday 27 July 2016 17:55:09 Mario_Limonciello@dell.com wrote: > > > Hi! I'm not sure if KEY_PROG1/2/3 are good names here as we already > > > use > > > > > >those for other actions (see bios_to_linux_keycode). Also there is: > > I had missed this, do you have some recommendations on what would be > > better codes to map this to? > > Problem is that I do not know when those KEY_PROG keys from > bios_to_linux_keycode table are emitted. There are missing comments or > description. > > Are you able to find out description for all those keys in that table? > Maybe now (when linux key constants are extended), there could be better > candidates... I'll ask around. It's not immediately obvious to me though, maybe from old specs? > > > I'll double check what the things that "were" mapping to KEY_PROG1 etc > > actually were. This might be a case of an expected clash if the > > functions aren't in current generations. > > > > >/* Wifi Catcher */ > > > > > > { KE_KEY, 0xe011, { KEY_PROG2 } }, > > > > It's worth mentioning that Wifi Catcher hasn't been used for any Dell > > laptops for a handful generations. The rugged 2in1's are current > > generation that have these programmable buttons and don't have wifi > > catcher. > > Anyway, what is "Wifi Catcher"? HW switch buttton which enable/disable wifi? > Or something else? > Wifi catcher was a special hardware switch slider switch. When the machine was turned in S3 the sliding the switch beyond the on position would scan for available wifi networks and light up an LED if some from your predefined list were found. When the machine was on, it would open up the applet that let you configure the behavior for the switch in S3. > > So there should be no "real" clash here. > > Problem can be in future. This driver is unified for all Dell products with wmi > interface and so future product could do some nasty things... I agree with Darren here. At least on Dell side we're creating new codes for "new" buttons and the limitation is really on the kernel side for how many KEY_PROG# or similar functions they can be re-assigned to. Maybe it's time to think of another way to get this information to userspace rather that always translating them into key codes? There's a lot that are marked as KE_IGNORE because the kernel can't do anything interesting with them as no 1-1 mapping exists to a keycode. Those could still be passed on somehow to have things like gnome-settings-daemon or other userspace tools to react however and show a notification. > > > > But probably we do not have better names... > > > > In this particular case, I was thinking PROG1/2/3 were really the best > > option and would be most intuitive because the keys really are labels > > "P1" "P2" and "P3". > > Probably yes, as I wrote I do not have in my mind better names for now. > OK, I'll resend with the cosmetic tabbing change and a clearer description, but keep the same mapping.