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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AD56C433EF for ; Sun, 26 Sep 2021 18:41:19 +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 87D0B610A2 for ; Sun, 26 Sep 2021 18:41:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 87D0B610A2 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 CC6A483612; Sun, 26 Sep 2021 20:41:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (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=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="IbLwYCU0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 25727835CE; Sun, 26 Sep 2021 20:40:34 +0200 (CEST) Received: from mail-vs1-xe2f.google.com (mail-vs1-xe2f.google.com [IPv6:2607:f8b0:4864:20::e2f]) (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 C0908835F1 for ; Sun, 26 Sep 2021 20:40:20 +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@google.com Received: by mail-vs1-xe2f.google.com with SMTP id u8so15744657vsp.1 for ; Sun, 26 Sep 2021 11:40:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:from:in-reply-to:references:date:message-id :subject:to:cc; bh=xbao+EIq5/qffr8KLBfHCTrvdKpfzgkea0KzcHYNRr4=; b=IbLwYCU01t4vM3tEUqNOVc9LnBxYSS2ckJ6/5j9I78Iww9JcQVJn/XXxQVqOYxj2rs TbwDUhZjWcy7KrJNSplRvEk9qp6vnofr9s3JV2gh4dZQ79CxhJbYgKP76L0YJc1uRWYt oEPhW6wPoaIxDMWJzncalnthEGUovJ30rvEnk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:sender:from:in-reply-to:references :date:message-id:subject:to:cc; bh=xbao+EIq5/qffr8KLBfHCTrvdKpfzgkea0KzcHYNRr4=; b=LYN7g5AMOoSJcPa5gVBVNIhLSz78GWchy/VX4a0+yzsiEeG3cxQk8V2NmXE5khfh38 +6Jt2nYxD4KfnWrrAnOgJ42SLhPBKamJmdQNXEI5W3yLqB9AvdM4aTIvheM38fsYsu2Y hZYkhYNW0Q1xxOsqRmILresHdwoE3WoTz/srwFu4kVycwa4lYec5XkFoKST/w0VyLX69 952lS1OFgbwCQA51n8NL139+GMy88L2pOe4pJICYW41VHa+xfpNGehxGkQdstKDOuSJG WDllEwX0vU/VvFGjMUzjLSXCaiQ6EGaqIw+/1viwr0bicIfnSmv3DNPkYPnFFCZKasC5 H6YQ== X-Gm-Message-State: AOAM530KNqhxEDYphAgWJjpOxXIeWSwr1k4FEr437+TemAxVIzbepFnh gPG3bKOnEgt5UIrCV1XPNOURxXMA6FVuwdIBI7+hwg== X-Google-Smtp-Source: ABdhPJwd7KV8QyvvKekAaaL145ZFQNlnuSYsw58AAJU6cMGamQbhFeNVedDqqm0mW0r1Bv1lp+cReq+u0tlpDaRq2Mg= X-Received: by 2002:a05:6102:457:: with SMTP id e23mr14853583vsq.8.1632681619159; Sun, 26 Sep 2021 11:40:19 -0700 (PDT) Received: from 480794996271 named unknown by gmailapi.google.com with HTTPREST; Sun, 26 Sep 2021 18:40:18 +0000 MIME-Version: 1.0 From: Simon Glass In-Reply-To: <20210807132413.3513724-13-sjg@chromium.org> References: <20210807132413.3513724-13-sjg@chromium.org> <20210807132413.3513724-1-sjg@chromium.org> Date: Sun, 26 Sep 2021 18:40:18 +0000 X-Google-Sender-Auth: 0ULvRF7NQm6zbMSLe7SGKXv1X6E Message-ID: Subject: Re: [PATCH 12/12] dm: gpio: Add of-platdata support To: Simon Glass Cc: Tom Rini , Marek Vasut , Pavel Herrmann , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" 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 Add support for accessing GPIOs using of-plata. This uses the same mechanism as for clocks, but allows use of the xlate() method so that the driver can interpret the parameters. Update the condition for GPIO_HOG so that it is not built into SPL, since it needs SPL_OF_REAL which is not enabled in sandbox_spl. Signed-off-by: Simon Glass --- arch/sandbox/dts/sandbox.dtsi | 8 +++++++- configs/sandbox_noinst_defconfig | 2 ++ configs/sandbox_spl_defconfig | 2 ++ drivers/gpio/Makefile | 4 ++-- drivers/gpio/gpio-uclass.c | 26 ++++++++++++++++++++++++-- drivers/gpio/sandbox.c | 14 ++++++++++---- drivers/gpio/sandbox_test.c | 21 +++++++++++++++++++++ include/asm-generic/gpio.h | 5 +++++ test/dm/of_platdata.c | 20 ++++++++++++++++++++ 9 files changed, 93 insertions(+), 9 deletions(-) create mode 100644 drivers/gpio/sandbox_test.c Applied to u-boot-dm/next, thanks!