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 1DC1DC636D6 for ; Mon, 20 Feb 2023 17:41:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CAF128591F; Mon, 20 Feb 2023 18:41:10 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="laakmAWA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0A550858E1; Mon, 20 Feb 2023 18:41:00 +0100 (CET) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 C08958590C for ; Mon, 20 Feb 2023 18:40:57 +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=clamor95@gmail.com Received: by mail-ed1-x536.google.com with SMTP id eg37so3832046edb.12 for ; Mon, 20 Feb 2023 09:40:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZNuJFQ3iS4nEvo9Fcl/jGoufJb+fAqjuWZbJG8hv7NM=; b=laakmAWAp+cDDEjFhJckAXcd8QSVY+qAHsWrCxC8xuTyHteQ53zaCpUYnXBAn58jNa D6iF97U/DB1XMeq/yT/oBLHMO7QjeM9z72cq86V6qf8DqTjt3VQ2zVAL63vXCsSU2w/k Y+0Nt7om5HWiHqqUrnHLIRZGRZ9tStM7oRQ8bGYoRcTMDR0mp1xYggA6LeVqq6rj67Mm +vcn6TuYW3IHB0kTV8dSrWOQFyAE1H9fg38g7otWjvIKiBm9SSnXHeDqgobEMBHxStyL RpWSfAKKQO4nI7oPRD7RAQDF900pTi6QEs8v5nq7t9EueEt6d/0/wy50x2qbKo+YmY+L UcrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZNuJFQ3iS4nEvo9Fcl/jGoufJb+fAqjuWZbJG8hv7NM=; b=C5zOK/YyTqKrXeu9hDYLbSzbZ6oLiJmkA9OPyL8x8R2ghIVjzrSji0uGK7HLNLcBoV x9YnJwbne2kFj4JoE9HxyclDG+MBK3j864EZ45Qogfil7R1h9yWPTGRNjXkjxIzsyhj4 Uvo4NJMMaAEkmMkuZhRjP8XZ5ZeuLwCTRntd4c4tyPOsE3k342uQF7fqUnU5ygjbGIhb aWkqa1ytcHka1Q9B++sLp30cyxaAKinYyyAD8G4+LJen28KVEnZ9M42qnPlsDgRg4cGc /3vF9vjYxmMCEErU7sgyHLeicfAJylxnTSv7t74Nvbb3htLXtEL43MB4JODa8FnGR97D dXQg== X-Gm-Message-State: AO0yUKVviM3KYalgT2SU59XLGTA5bUZGfrnvTsm0Ww6b0bQgytYwN3EE OtdXPTWMOt7iE0d6Xvz0Oy4= X-Google-Smtp-Source: AK7set8k3zKDEpsurIrONoCKdXOHslhVZ4q/+yUHVVkDAXJPX4AxuUehJEOCKbvTBD7SNE7gVkxrrg== X-Received: by 2002:a05:6402:755:b0:4ad:6ca7:6134 with SMTP id p21-20020a056402075500b004ad6ca76134mr3090798edy.30.1676914857247; Mon, 20 Feb 2023 09:40:57 -0800 (PST) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id n30-20020a5099de000000b004acd3bccb0asm1748485edb.10.2023.02.20.09.40.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 09:40:56 -0800 (PST) From: Svyatoslav Ryhel To: Svyatoslav Ryhel , Simon Glass , Dzmitry Sankouski , Maxim Schwalm Cc: u-boot@lists.denx.de Subject: [PATCH v1 1/1] input: button_kbd: make driver complementary to gpio buttons Date: Mon, 20 Feb 2023 19:40:40 +0200 Message-Id: <20230220174040.55093-2-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230220174040.55093-1-clamor95@gmail.com> References: <20230220174040.55093-1-clamor95@gmail.com> 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 Remove need of dts binding for button keyboard since it reuses gpio-keys binding. Select gpio-keys driver if button keyboard is selected since button keyboard can not operate on its own. Tested-by: Svyatoslav Ryhel # HTC One X T30 Signed-off-by: Svyatoslav Ryhel --- drivers/input/Kconfig | 2 +- drivers/input/button_kbd.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index 2a373c778a..17c1088545 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig @@ -48,8 +48,8 @@ config APPLE_SPI_KEYB config BUTTON_KEYBOARD bool "Buttons as keyboard" - depends on BUTTON_GPIO depends on DM_KEYBOARD + select BUTTON_GPIO help Enable support for mapping buttons to keycode events. Use linux,code button driver dt node to define button-event mapping. diff --git a/drivers/input/button_kbd.c b/drivers/input/button_kbd.c index 99e65f12f0..74fadfca8b 100644 --- a/drivers/input/button_kbd.c +++ b/drivers/input/button_kbd.c @@ -111,16 +111,14 @@ static int button_kbd_probe(struct udevice *dev) return 0; } -static const struct udevice_id button_kbd_ids[] = { - { .compatible = "button-kbd" }, - { } -}; - U_BOOT_DRIVER(button_kbd) = { .name = "button_kbd", .id = UCLASS_KEYBOARD, - .of_match = button_kbd_ids, .ops = &button_kbd_ops, .priv_auto = sizeof(struct button_kbd_priv), .probe = button_kbd_probe, }; + +U_BOOT_DRVINFO(button_kbd) = { + .name = "button_kbd" +}; -- 2.37.2