Message ID | 20200608012651.1525906-7-seanga2@gmail.com |
---|---|
State | Superseded |
Delegated to: | Andes |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=YvQdbLH7; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49gFyM1qgCz9sRK for <incoming@patchwork.ozlabs.org>; Mon, 8 Jun 2020 11:28:43 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ACEFA8168F; Mon, 8 Jun 2020 03:27:45 +0200 (CEST) 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="YvQdbLH7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DC1108168B; Mon, 8 Jun 2020 03:27:27 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) (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 6D993815E9 for <u-boot@lists.denx.de>; Mon, 8 Jun 2020 03:27:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x742.google.com with SMTP id q8so15789064qkm.12 for <u-boot@lists.denx.de>; Sun, 07 Jun 2020 18:27:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vBsmI84aFeDbDdrgqBLK3UPnE6A3OAimSesbgvCg3Xo=; b=YvQdbLH7TD6aXyqwfFVlttjeG4J+w1uSUyfxlJxSfFuHUrz4pds46axcdbXEW4mbu6 +HDomCPFvcVt5G/ggKaDl81ZDfup8lIIjukuOzS4OHqied+EVZWg1okctZQe9r0ZSdLx hAuQey+XH3+QWm++xx6KTCpEjE9jSV9tQVvhhvOZ/KIS6XzcLuXJdADI3ypljuqZpiq/ n5yEhAZtSPCWD+ydizAIxDk/h2PEPWNtrXbqHE+3+Dk9Ei3qlNQC5ecHIl6jaFDmdTw6 B5qyRfapPm+dcbuRIRBGYOUE1mhZmpeAk4oYtfA9IY6JaIRf/cmljhYJBeV0kfkR6yhm 87Bg== 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=vBsmI84aFeDbDdrgqBLK3UPnE6A3OAimSesbgvCg3Xo=; b=eUC4OzDWA5OuswWuGLMcZWjU5sZmGp01JmxMx2DnusTq1GaQvUlpcD9YaJwLiFcmif TCm6gaAb3ooRP6PilD3xyU7qolGKik26m0DZfSEYozVq4rQgUsgjaAlUaREa4dG5sYtZ IopslQrF6wRS204eZ7qf6u21h9rVxrewnh4ASN8+zO5Uke2clScMnbZWlh2+VUzNhDHV NzSWb3/iQ3U18XviHneL7KTXjvEEGnjYKXvOEYQ2+zx0Hu9csz9WfGScME02wxeZHQyj y2qtToezNqx7vHiRSNvlvE5AdPIJEliZ5YDWISjc9CjnLhKnqJHGZ6ZCBw0UxPzyjz0a NcnA== X-Gm-Message-State: AOAM532qGrRE0xIgEI6sSmYtuhAcAGoO9k30fxHP4bfhcMtNQCMCnk0H GcAhcR1syMqBI2PgI1gE59FLzXoN9YdK9w== X-Google-Smtp-Source: ABdhPJzW0eBok70sRfRzPG7OQ2aPTpSVSd35gYPwO2re94UTYPawuhdGhA0utvTu1z1mcUN2sNj9OA== X-Received: by 2002:a37:a847:: with SMTP id r68mr21357468qke.45.1591579637051; Sun, 07 Jun 2020 18:27:17 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id a1sm5765808qkn.87.2020.06.07.18.27.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jun 2020 18:27:16 -0700 (PDT) From: Sean Anderson <seanga2@gmail.com> To: u-boot@lists.denx.de Cc: Tom Rini <trini@konsulko.com>, Bin Meng <bmeng.cn@gmail.com>, Rick Chen <rickchen36@gmail.com>, Simon Glass <sjg@chromium.org>, Sean Anderson <seanga2@gmail.com>, Anatolij Gustschin <agust@denx.de>, Ley Foon Tan <ley.foon.tan@intel.com>, Marek Vasut <marex@denx.de>, Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Subject: [PATCH v2 06/10] gpio: dw: Add a trailing underscore to generated name Date: Sun, 7 Jun 2020 21:26:47 -0400 Message-Id: <20200608012651.1525906-7-seanga2@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200608012651.1525906-1-seanga2@gmail.com> References: <20200608012651.1525906-1-seanga2@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean |
Series |
riscv: Add FPIOA and GPIO support for Kendryte K210
|
expand
|
diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c index bf324f5239..a52c9e18e3 100644 --- a/drivers/gpio/dwapb_gpio.c +++ b/drivers/gpio/dwapb_gpio.c @@ -186,7 +186,15 @@ static int gpio_dwapb_bind(struct udevice *dev) * Fall back to node name. This means accessing pins * via bank name won't work. */ - plat->name = ofnode_get_name(node); + char name[32]; + + snprintf(name, sizeof(name), "%s_", + ofnode_get_name(node)); + plat->name = strdup(name); + if (!plat->name) { + kfree(plat); + return -ENOMEM; + } } ret = device_bind_ofnode(dev, dev->driver, plat->name,
Previously, if there was no bank-name property, it was easy to have confusing gpio names like "gpio1@08", instead of "gpio1@0_8". This patch follows the example of the sifive gpio driver. Signed-off-by: Sean Anderson <seanga2@gmail.com> --- This patch was previously submitted as part of https://patchwork.ozlabs.org/project/uboot/list/?series=161576 (no changes since v1) drivers/gpio/dwapb_gpio.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)