Message ID | 20200614235229.1835920-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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=KDgVoomf; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 49lWWw3Y7mz9sQx for <incoming@patchwork.ozlabs.org>; Mon, 15 Jun 2020 09:54:04 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 02086819F3; Mon, 15 Jun 2020 01:53:20 +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="KDgVoomf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A68B681CA8; Mon, 15 Jun 2020 01:53:07 +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-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (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 EFA968168B for <u-boot@lists.denx.de>; Mon, 15 Jun 2020 01:52:58 +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-x741.google.com with SMTP id n11so14173799qkn.8 for <u-boot@lists.denx.de>; Sun, 14 Jun 2020 16:52:58 -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=KDgVoomfwRR4v6t/VvpXFOw4PDwYf/+3XkKCBQBY3RyNXcEFUkLdNlLhS7mRsiH299 0zSq5yKZcy1ZxNtgDU+arRaF7MB/jkC0cWng3AUsjSyPG1dSTkdJv0L4rxmO7Fw8Od99 Xwv3CmvXcNJQIr/9nLrPNxDMr05hi9IJ9rLqFvpNQxpG+Fb8aLlVBvSIysRgcz9INl8v vzE9seouXPSUqF/B8W1r10irdtPI+exHZzhRxjPsBThY2LhLPDFjj5zosbvSTdqKZyIU FdSBUq0fGattBHtT1kbDpNISsK3Az+dvRMZqc1RI11RNESWfF7ucfuhyv1u8CjFsYQbr WxHw== 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=uA96FJ9Nf5Dg3PP6AGCbCSsYlrpJMrzInPZ5rSD299vQk6Ol9x7fKrt444CrbCjhdS b3wcRAdvPJeWmqvCigmEhxUsC6jnpZLf7O8UxKPXI8V52yVfus77dyQbSpfPp8kqid1t +Xqz8txZf50hckvugfiecZ0ezdSr3G8BDNKALRnhuh0SG6IEIpY05uEd6VbAd7NAlMsT 92LOrUbyKQw+gsD9uuvM8+R0dvQwkRcMc5RXsByHptbyH0DfzqlHSf5ZOV0xaI+L0thd bYksBCWR/oZ3O3B+wQj6jwsZwwqaqN5aeFDDybaWX4sWK42Fv+jVzA0+JGJ/decxvubS F1iQ== X-Gm-Message-State: AOAM531xi7H3QNbO/1cJrp85bYK9dw2Wo+r+WHOotBbuARSaKIKkmb3a iGnB3/+oDLq/+7/X/yUbnDdE4GWp3+gyYg== X-Google-Smtp-Source: ABdhPJwZsZty01FZzvMgFkHwcprCza2j/eI5TMB2Xdiv/S+N0VqOp0Jtdj3/ZFolwoOcuGsKo7TkJw== X-Received: by 2002:a05:620a:20db:: with SMTP id f27mr12671786qka.400.1592178777481; Sun, 14 Jun 2020 16:52:57 -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 d23sm10212084qtn.38.2020.06.14.16.52.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jun 2020 16:52:56 -0700 (PDT) From: Sean Anderson <seanga2@gmail.com> To: u-boot@lists.denx.de Cc: Simon Glass <sjg@chromium.org>, Bin Meng <bmeng.cn@gmail.com>, Tom Rini <trini@konsulko.com>, Rick Chen <rickchen36@gmail.com>, 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 v3 06/10] gpio: dw: Add a trailing underscore to generated name Date: Sun, 14 Jun 2020 19:52:25 -0400 Message-Id: <20200614235229.1835920-7-seanga2@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200614235229.1835920-1-seanga2@gmail.com> References: <20200614235229.1835920-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(-)