Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp114702rdb; Wed, 20 Dec 2023 07:38:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYUggI3cnQ91TMoq/61REEH3M0GPH1ofHD9ch4PQQ0y032s5hfj01QmYHeFjYHsWLSB8H5 X-Received: by 2002:a05:6808:3849:b0:3ba:c52:7245 with SMTP id ej9-20020a056808384900b003ba0c527245mr18358813oib.95.1703086718279; Wed, 20 Dec 2023 07:38:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703086718; cv=none; d=google.com; s=arc-20160816; b=pt7YKO2Irc7t/E76r0BXFF8xO3uC2GwrkyiOcFcuqH4FMRrHrYsltPBQGEFxoqp5o5 xmW0UY2QDt7EyqKw2ONxGdkA4Fxf9GQAcH1QWXgfoE+WyLRMftfPpoCDgWy312oitw3D icfdj1qeuuf9sKg/79s+B6Qnf15sui6FbqVQ+ThlT9aDRjhHFZ1rsJ3S/YJMAKr3IS89 N3OGuzsXBH3VrvyMGHaqZiJPvYaeZQ1id6JdKplEyt4COIUv9Rvd8Yj9lzbGEXgt48zo sTLpsB6T7lB6W6FMXOleSdzFCyXEEKkEpW0mqeKKAUhbLn7M83Pta/76FhtI+YzNMweP iHuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=kh4BwqGQX+3KQNJkHIAuHIku7RX7fc7Y+ZvFl8sSnH8=; fh=EXhQtfmjXdGq8yD/2DUf8rLVNzPs8QouZD5sspA2le0=; b=Htzp/f3fvAhlssVYli4nZRlOd9Ju2J789y0pmRyS9LkK/M+P/0PxjrYQ6qn+ENjxvI sK4UVkUVCC7jbPolUTybcXQcxwHArUwqkdcLXetPuKTtImk8GGo12lz4lCcTc9O9/X8G kX9/U5pDH3K3LP5Ml8TitL7emtOqohZw6EleQwFZIksiNx2i5S361Sl5Spn4Dh9zgfCL AUB54rDQMSINLNeQ53TXMmbgxFOtujnC43+OcUq3fq5R6QKow2otAf9G5err/cy19/vf NYJk5zY9TE2yRoBwkwujmdgDclum5KBn9Hice24yYocZWuvE3kS3M/j/2idO/DX+Hcs2 ylmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxedocomputers.com header.s=default header.b=bJIMUG2S; spf=pass (google.com: domain of linux-kernel+bounces-7178-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7178-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tuxedocomputers.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m20-20020a67bb14000000b004669a84e926si1115458vsn.262.2023.12.20.07.38.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 07:38:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7178-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxedocomputers.com header.s=default header.b=bJIMUG2S; spf=pass (google.com: domain of linux-kernel+bounces-7178-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7178-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tuxedocomputers.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C2AEE1C23F91 for ; Wed, 20 Dec 2023 15:38:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C188B40BE4; Wed, 20 Dec 2023 15:38:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=tuxedocomputers.com header.i=@tuxedocomputers.com header.b="bJIMUG2S" X-Original-To: linux-kernel@vger.kernel.org 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 E7CB63FB0B; Wed, 20 Dec 2023 15:38:28 +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 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 7A0142FC005D; Wed, 20 Dec 2023 16:38:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxedocomputers.com; s=default; t=1703086706; 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=kh4BwqGQX+3KQNJkHIAuHIku7RX7fc7Y+ZvFl8sSnH8=; b=bJIMUG2SIBwrDr+t8Sayz+kIotVPgRQ1OHTU3BIZA/MP2KkkzIeG52wrk75xomqKJ3qj2d T+DRddnE/Pi3hEHVwpi+GuHnS2H7qMLfjzj9Wp0adKWvTT28AoZEEJKt0efB7fhpF5lxgZ 1XaARp6dliLRwVID2wPDWT2dFOZcoEA= Authentication-Results: mail.tuxedocomputers.com; auth=pass smtp.auth=wse@tuxedocomputers.com smtp.mailfrom=wse@tuxedocomputers.com Message-ID: <1d67eff0-c0f4-4b9b-8fea-1b48eecb54e5@tuxedocomputers.com> Date: Wed, 20 Dec 2023 16:38:25 +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 Cc: stable@vger.kernel.org > --- > 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;