From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.tuxedocomputers.com (mail.tuxedocomputers.com [157.90.84.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B3A3540C00; Wed, 20 Dec 2023 15:45:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tuxedocomputers.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxedocomputers.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=tuxedocomputers.com header.i=@tuxedocomputers.com header.b="i0GRllJj" Received: from [192.168.42.20] (p5de453e7.dip0.t-ipconnect.de [93.228.83.231]) (Authenticated sender: wse@tuxedocomputers.com) by mail.tuxedocomputers.com (Postfix) with ESMTPSA id 346C72FC005B; Wed, 20 Dec 2023 16:45:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxedocomputers.com; s=default; t=1703087107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9y6w55BO7PzW02dZyQHJ7ZBdTcla0tuEHAw9eNIuwFQ=; b=i0GRllJjKv+sjjOwMDvNa5AWbKSh2mhl3lK1bbOp0eZIAjmv1jymTu38S+cDeM/wZVX9ZT BsQ43hntlo4U6ksHUNKJzi5lXeFJhGaSfHClAdkAoX7MMnsKkcyxrRk4gPQclFPdZPU3t4 pZbO0kR8F3nN0pi2WJq+E1matfdu7dg= Authentication-Results: mail.tuxedocomputers.com; auth=pass smtp.auth=wse@tuxedocomputers.com smtp.mailfrom=wse@tuxedocomputers.com Message-ID: Date: Wed, 20 Dec 2023 16:45:07 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Input: SoC button array: add mapping for airplane mode button Content-Language: en-US To: Dmitry Torokhov Cc: Christoffer Sandberg , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231215171718.80229-1-wse@tuxedocomputers.com> From: Werner Sembach In-Reply-To: <20231215171718.80229-1-wse@tuxedocomputers.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Am 15.12.23 um 18:17 schrieb Werner Sembach: > From: Christoffer Sandberg > > This add a mapping for the airplane mode button on the TUXEDO Pulse Gen3. > > While it is physically a key it behaves more like a switch, sending a key > down on first press and a key up on 2nd press. Therefor the switch event is > used here. Besides this behaviour it uses the HID usage-id 0xc6 (Wireless > Radio Button) and not 0xc8 (Wireless Radio Slider Switch), but since > neither 0xc6 nor 0xc8 are currently implemented at all in soc_button_array > this not to standard behaviour is not put behind a quirk for the moment. > > Signed-off-by: Christoffer Sandberg > Signed-off-by: Werner Sembach For reference: https://bugzilla.kernel.org/show_bug.cgi?id=214259 > --- > drivers/input/misc/soc_button_array.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c > index 08bcee3d6bcca..f6d060377d189 100644 > --- a/drivers/input/misc/soc_button_array.c > +++ b/drivers/input/misc/soc_button_array.c > @@ -299,6 +299,11 @@ static int soc_button_parse_btn_desc(struct device *dev, > info->name = "power"; > info->event_code = KEY_POWER; > info->wakeup = true; > + } else if (upage == 0x01 && usage == 0xc6) { > + info->name = "airplane mode switch"; > + info->event_type = EV_SW; > + info->event_code = SW_RFKILL_ALL; > + info->active_low = false; > } else if (upage == 0x01 && usage == 0xca) { > info->name = "rotation lock switch"; > info->event_type = EV_SW;