Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 68A54C00A5A for ; Thu, 19 Jan 2023 17:18:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1F3E485682; Thu, 19 Jan 2023 18:18:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="hxbrnNds"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4D6D88567F; Thu, 19 Jan 2023 18:18:45 +0100 (CET) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0BBCD85606 for ; Thu, 19 Jan 2023 18:18:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dsankouski@gmail.com Received: by mail-ed1-x52e.google.com with SMTP id v10so3703297edi.8 for ; Thu, 19 Jan 2023 09:18:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=W0FglEMz4srSHBfQGBWBOSnaXaekKt5t7LZGfhywItM=; b=hxbrnNdsqIdUoWhbYjLooE0PjA/yucnTsdXfo4m0Y8QUDrISfOg140LFArfEl467ST TnIdeZG25twtO/8TrN02n5739DFpEeqF/qLWraEk843XNhBtLRufaRetueJah2WxLSJN 8/ldf8Hz6DWtCDhNJZFe4PigBJcTT3PqFsw1AIBEYe8d9NF38L627Oh8BUCMRidBIXzk K3BxSRyrJ75B+RAuKO0i+ppEWdMagnz0hEdWFN0q6mart286Y7yi+98n/P2jg+woGtfz eh3KhQh+1gwgCIJsxGIvRlc+nwEib3N4CiDfc8t7fOU5ySEjK9F03B1P2bA9Bi7aUmqT /Q4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=W0FglEMz4srSHBfQGBWBOSnaXaekKt5t7LZGfhywItM=; b=IFf7XCbuH60zdS2VZKUutou9DNvCx88mFS4eF1TA5vuh2YfHODujbsGc/yDOJHvJHL QSkVFaRBUbJaYZmtoSx+bn0MNdS5+ZJNHhCyIOova6JtU//Zx6kx8BezRcJzxx//SaC3 7HMTPVDQWZhMe5ANBB07JbmYHvJ4tOtfeXvvILWFevSxlPVUIlGsCl4zSfyYnFjUkD5s zpwOXl/En9UeqhSsYXyogg6m+f1XFq6d4Tcx5crv57LkDuhNkTWEX1B+qmdzwgjMPvW8 eOoia3Ce0XPugQTkiS2piNz0bZht0NQK7aFMgkcWj+z87tb9QpeqvS2zBztmtMglBhzB 6nlQ== X-Gm-Message-State: AFqh2kqyrw9+H7Ui5ePlzvZOObrAb2Gww+b2dgHJWAwQna6rJz1UZCo0 ZwJO4OS6+nSzXEvLi5a1H6+1H9VUAqc= X-Google-Smtp-Source: AMrXdXtBbBm4vl7+fQiacOTvAzFz8HXH+leVjX4vdsY74pixeo2qvFh2ISvJOd41WThGwqKeBpJtNA== X-Received: by 2002:a05:6402:5024:b0:49d:1c3a:b5fb with SMTP id p36-20020a056402502400b0049d1c3ab5fbmr12994931eda.28.1674148722414; Thu, 19 Jan 2023 09:18:42 -0800 (PST) Received: from localhost.localdomain ([46.216.42.4]) by smtp.googlemail.com with ESMTPSA id d22-20020a50fe96000000b0049c6c7670easm8235077edt.70.2023.01.19.09.18.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 09:18:42 -0800 (PST) From: Dzmitry Sankouski To: u-boot@lists.denx.de Cc: Dzmitry Sankouski Subject: [PATCH v2 0/4] dm: input: driver for buttons with linux, code declaration Date: Thu, 19 Jan 2023 20:18:26 +0300 Message-Id: <20230119171830.702266-1-dsankouski@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Bootmenu requires an input device with arrows and enter key. A common smartphone luckily has power, volume up/down buttons, which may be used for controlling bootmenu. Button keyboard driver relies on button driver - iterates over all button with linux,code, checks state and sends events. Add support for linux,code in button driver. Fix qcom pwr-key gpio driver to work with button driver. Dzmitry Sankouski (4): gpio: qcom: add direction functions for pwrkey dts: add missing linux,code in gpio-keys dm: button: add support for linux_code in button-gpio.c driver dm: input: add button_kbd driver arch/arm/dts/am3517-evm-ui.dtsi | 2 +- .../dts/imx6ul-phytec-segin-peb-eval-01.dtsi | 2 +- arch/arm/dts/rk3288-popmetal.dtsi | 1 + arch/arm/dts/rk3288-tinker.dtsi | 1 + arch/sandbox/dts/sandbox.dtsi | 2 + drivers/button/button-gpio.c | 16 ++- drivers/button/button-uclass.c | 10 ++ drivers/gpio/qcom_pmic_gpio.c | 15 +++ drivers/input/Kconfig | 9 ++ drivers/input/Makefile | 1 + drivers/input/button_kbd.c | 126 ++++++++++++++++++ include/button.h | 16 +++ 12 files changed, 198 insertions(+), 3 deletions(-) create mode 100644 drivers/input/button_kbd.c -- 2.30.2