From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EC3AC4338F for ; Sun, 8 Aug 2021 18:23:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6B10C600CD for ; Sun, 8 Aug 2021 18:23:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6B10C600CD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 713D582D9A; Sun, 8 Aug 2021 20:21:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="dJcKIm/1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DAFD482DA1; Sun, 8 Aug 2021 20:21:33 +0200 (CEST) Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (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 351E782D5E for ; Sun, 8 Aug 2021 20:20:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32e.google.com with SMTP id c2-20020a0568303482b029048bcf4c6bd9so15332492otu.8 for ; Sun, 08 Aug 2021 11:20:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=F/uhlNoaS7BZzEt63KXjBoCVUQjze1sfTm5jSht5lGo=; b=dJcKIm/1IRJiFF3SFISf+fPmyVs9lHhEPIIcu6ts59ZQPky/j5XpERRE0xX3yOs1Yo guGlGiBRaX/MrEZPxx7kGkZLM7bZK0QiK6HR8h4rW6+O8TxriEF1Nt7/bZ+LQ/i+SP6B IgUahywc6Cpx/Tdo0FHapm5fbgNUuks9hPZQ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=F/uhlNoaS7BZzEt63KXjBoCVUQjze1sfTm5jSht5lGo=; b=K9PPNSS9HujcOUhfvPWhD7rHolRb9ZLTcxzmtKQx6sFv9Xq2R9LDZkbSnOiOGWbhJZ ueZWDLYPhgvwqV0Pi8yZjDvTCyUTG6F5KuMHmKrGLmu+wPAjXTesQyy4ZtPUC1n6oHwr cF1ceU6+z/aD+tgGjP/RklOTj80Cb+d86be1Fvq6TRxUQmsoO3iWtoYJCDUm4CQY/YeL V24yk5h2uBlEjsOcdKLwlaFa1tFdhWxj2/S1K3bRAMRvUgDRneBBEe/tvRgBf9biUClk Ezv5rhC0XZH9NQQP2kP6MG/GzC/u9q7IBX+iJqgRm7pfSzoBIkhB1NXaf71D5H8l6rCy n9Cg== X-Gm-Message-State: AOAM530K7/Wr6tY3XvwCRhwwTU7Z56vOhcjFcxuBy0raenU5KlqoHG6q qfzAklfxuoniiTjGQdPWe7K2KrGbs/0ECUzZ X-Google-Smtp-Source: ABdhPJwrH9HjJKEOzMHmhklmeg95p8ce3c0rvGrybRfIkYBjxZk1+cSHRuLRu2D4XZas6X1dlqv8Lw== X-Received: by 2002:a9d:64d9:: with SMTP id n25mr14118386otl.174.1628446856479; Sun, 08 Aug 2021 11:20:56 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id bc42sm2257147oob.39.2021.08.08.11.20.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Aug 2021 11:20:56 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 16/23] gpio: Add a GPIO config Date: Sun, 8 Aug 2021 12:20:24 -0600 Message-Id: <20210808182031.3747270-17-sjg@chromium.org> X-Mailer: git-send-email 2.32.0.605.g8dce9f2422-goog In-Reply-To: <20210808182031.3747270-1-sjg@chromium.org> References: <20210808182031.3747270-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean At present we have SPL_GPIO and TPL_GPIO but not piain GPIO. This works because there is a special build rule in Makefile that always includes the drivers/gpio directory. It is better to have all driver directories included by drivers/Makefile and there is already a rule in there for this purpose. It just needs a Kconfig for U-Boot proper, so add one. Enable the option always for now, since this mimics current behaviour. This can be updated once DM_GPIO is used everywhere. Signed-off-by: Simon Glass --- Makefile | 1 - drivers/gpio/Kconfig | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f5b6b493a7f..cc51265f1fc 100644 --- a/Makefile +++ b/Makefile @@ -813,7 +813,6 @@ libs-y += fs/ libs-y += net/ libs-y += disk/ libs-y += drivers/ -libs-y += drivers/gpio/ libs-y += drivers/net/ libs-y += drivers/net/phy/ libs-y += drivers/power/ \ diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 09695f6c2b0..d1069e6d00e 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -2,7 +2,19 @@ # GPIO infrastructure and drivers # -menu "GPIO Support" +menuconfig GPIO + bool "GPIO support" + default y + help + Enable support for GPIOs (General-purpose Input/Output) in U-Boot. + GPIOs allow U-Boot to read the state of an input line (high or + low) and set the state of an output line. This can be used to + drive LEDs, control power to various system parts and read user + input. GPIOs can be useful to enable a 'sign-of-life' LED, + for example. Enable this option to build the drivers in + drivers/gpio as part of an U-Boot build. + +if GPIO config DM_GPIO bool "Enable Driver Model for GPIO drivers" @@ -503,4 +515,4 @@ config NOMADIK_GPIO into a number of banks each with 32 GPIOs. The GPIOs for a device are defined in the device tree with one node for each bank. -endmenu +endif -- 2.32.0.605.g8dce9f2422-goog