Message ID | 3519a11b0ef5324a2befbd137cd2aa0cb8fd057d.1677022414.git.soyer@irl.hu |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp296131wrd; Tue, 21 Feb 2023 16:17:35 -0800 (PST) X-Google-Smtp-Source: AK7set/PuJHKlFaHHDVFHD91CWnGcxPGMxQTfQtuIagZyU25o9ebcoturzAkKjQ6ZflzexzaAhHr X-Received: by 2002:a05:6a20:4e2f:b0:c7:68a0:e819 with SMTP id gk47-20020a056a204e2f00b000c768a0e819mr864251pzb.56.1677025055652; Tue, 21 Feb 2023 16:17:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677025055; cv=none; d=google.com; s=arc-20160816; b=kxu2ZFyW3ZK75sB6w4LcvcX9h0dduR/CrEvCRZIZNDKvdZ6yv/NmWJPfl/K1AdjKfT CsLNsucWQyyDuvHR1knIaL6q9tvzaCv8SxuopRSh0+Vizz2M4acGgnSIQ3K6la6RfaI1 bXKNj3Vjvbye3eG4O65OCoptSyN0ngKld/ruIU3l6swCG72LRuq28PeYsTScZR/xfybu 137SszRhUd6Nw0zPEgq+Lw6yoa6EvUXWxPu5kZhPNbNhqt56trpRNQ7RBuQGJE/MeCXh ulNoyWkzrl0/xUPAg1jVx3cxfc3fmnNk6+M27gfWfq94KFgB+kRkAt+I5m6POgad97Dd OCRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=eof3mqlxS19tZ38eLtUbTVN3vIKO2L1JXKK9HDCjNyg=; b=zkssZuxsdfVIgDrJqRAL28xRkG82Dk183/zlCM77HnLfx0L+1MPuiqhrnR8+540DKb SeX09ouWnNU2HJE4DJP1HfMis19Phahf+TuyUUbfsgjUQHehKi5uAhg9kfWiBAzKVQcs nE82eVYJi9SDZWlXp9wwgfZKPP48zMKZzDiXxyF2qtgjLmCnIiY/OJ0wLb8iT18/Yh7b vS9ZTcSf7DmrvFwrfeNd9KLIrqPHkT5I64K0EwjR1QJ9Xm1vZ73GTiKdu/SPRQLCuzug vzojjc8jnt8o2n4qk87AOZnFAWaeDu3YcZhlsVDpJuzIVWFHaM3aaxUjRTRiiEtmGRUK N0Iw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o189-20020a6341c6000000b004fbd06e099asi19976150pga.299.2023.02.21.16.17.23; Tue, 21 Feb 2023 16:17:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230234AbjBVALu (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Tue, 21 Feb 2023 19:11:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229870AbjBVALs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 21 Feb 2023 19:11:48 -0500 Received: from irl.hu (irl.hu [95.85.9.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A3BE301AA; Tue, 21 Feb 2023 16:11:47 -0800 (PST) Received: from fedori.lan (bc065635.dsl.pool.telekom.hu [::ffff:188.6.86.53]) (AUTH: CRAM-MD5 soyer@irl.hu, ) by irl.hu with ESMTPSA id 000000000006FA8A.0000000063F55DC2.002C9F56; Wed, 22 Feb 2023 01:11:39 +0100 From: Gergo Koteles <soyer@irl.hu> To: Dmitry Torokhov <dmitry.torokhov@gmail.com>, Jonathan Corbet <corbet@lwn.net>, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Caleb Connolly <caleb@connolly.tech>, Gergo Koteles <soyer@irl.hu> Subject: [PATCH v4 1/3] Input: gpio-keys - add support for linux,input-value DTS property Date: Wed, 22 Feb 2023 01:10:32 +0100 Message-Id: <3519a11b0ef5324a2befbd137cd2aa0cb8fd057d.1677022414.git.soyer@irl.hu> X-Mailer: git-send-email 2.39.2 In-Reply-To: <cover.1677022414.git.soyer@irl.hu> References: <cover.1677022414.git.soyer@irl.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mime-Autoconverted: from 8bit to 7bit by courier 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758488224633247340?= X-GMAIL-MSGID: =?utf-8?q?1758488224633247340?= |
Series |
Add alert-slider for OnePlus6
|
|
Commit Message
Gergo Koteles
Feb. 22, 2023, 12:10 a.m. UTC
Allows setting the value of EV_ABS events from DTS.
This property is included in the gpio-keys.yaml scheme, but was only
implemented for gpio-keys-polled.
Signed-off-by: Gergo Koteles <soyer@irl.hu>
---
drivers/input/keyboard/gpio_keys.c | 3 +++
1 file changed, 3 insertions(+)
Comments
On 22.02.2023 01:10, Gergo Koteles wrote: > Allows setting the value of EV_ABS events from DTS. > This property is included in the gpio-keys.yaml scheme, but was only > implemented for gpio-keys-polled. > > Signed-off-by: Gergo Koteles <soyer@irl.hu> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Konrad > drivers/input/keyboard/gpio_keys.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c > index 5496482a38c1..c42f86ad0766 100644 > --- a/drivers/input/keyboard/gpio_keys.c > +++ b/drivers/input/keyboard/gpio_keys.c > @@ -770,6 +770,9 @@ gpio_keys_get_devtree_pdata(struct device *dev) > &button->type)) > button->type = EV_KEY; > > + fwnode_property_read_u32(child, "linux,input-value", > + (u32 *)&button->value); > + > button->wakeup = > fwnode_property_read_bool(child, "wakeup-source") || > /* legacy name */
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 5496482a38c1..c42f86ad0766 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -770,6 +770,9 @@ gpio_keys_get_devtree_pdata(struct device *dev) &button->type)) button->type = EV_KEY; + fwnode_property_read_u32(child, "linux,input-value", + (u32 *)&button->value); + button->wakeup = fwnode_property_read_bool(child, "wakeup-source") || /* legacy name */