Message ID | 20200614235229.1835920-9-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=u28yve0A; 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 49lWXB6vVKz9sQx for <incoming@patchwork.ozlabs.org>; Mon, 15 Jun 2020 09:54:18 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 19DC681CF2; Mon, 15 Jun 2020 01:53:23 +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="u28yve0A"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F0C6A8168B; Mon, 15 Jun 2020 01:53:08 +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-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) (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 E31598067C for <u-boot@lists.denx.de>; Mon, 15 Jun 2020 01:53:00 +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-qt1-x842.google.com with SMTP id j32so11277203qte.10 for <u-boot@lists.denx.de>; Sun, 14 Jun 2020 16:53:00 -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=38gYZMUipsBn0ogNEh7LutjyFEhuul/H7IbyKBihEuY=; b=u28yve0ABQgNNIGbf23f30l9qvqa4+D1vpkAVSfb3xuDH19LSJkLZS+cZqzQWBZmQB 57OLp1j0TBojyJjhZB0kPJ2DHo1GhTUfDHGPus5dA8P+UzS542lgxozP+IBUH7u9VmmZ QgGiCDjO2KsjqA5hC1YIlHodKe1+2SfWs2Z7rPod7Mw3CD6UcZBr7QF3ihuL1WYnDA7g YVcY1PUXnjy1FFpyjHsDImnIurTawa1iG4MZTC4MNMPykSqvxJVJu08d8DcWqshq9rJn KzG7dl54JSUPTO8m0OxTcIvan9aoF8NbUf3hk9y33uz949vSclyz/rPY6NnD/Rr6Hify i3fw== 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=38gYZMUipsBn0ogNEh7LutjyFEhuul/H7IbyKBihEuY=; b=d1tgqmSDcMUPz75244yAPljFkliUATIm4kDQtbsIjspZtTUNYRUl5ew3lyDEwk39gt tf2WQsIGY9YFk8jv4ugCXr9z/pPatr2IPGqZBSqKZ4ZeV34cF3231KK5yG65xETtbnvt wjPH0Me4eWsLQxoXupBczxolz/7Tqpjde2DTv1YAzFmgV9H5Gn/dKofViSRKXhTiZDNg /aYeH5q2JaSIKOdRy7sceoi087ikFtHoUPd3VBBw0sADd7L7P2xXz177UytJ6EIRJ6A0 1cu1q+ZkhgLHmsi8rHOeRmzQTVfjWCDUOr9AePEcZ9div8bHMmzcaxTltRS4CDAf0QJ+ ylRQ== X-Gm-Message-State: AOAM531oOo3U0g0BCjVwClRYK730yN8pv+dZT4VfhJfsh1hofJHEgzk9 7ulCsv2LrwIEG1nAwbJbxNZdiM3vwZXMDQ== X-Google-Smtp-Source: ABdhPJzgStn3LhMKBzLFelovLhj17eEIZdXVZ/cmxcj9hDpNGsbStLqDWOvMF87hkdSMcj/EUT0Q1Q== X-Received: by 2002:ac8:38d8:: with SMTP id g24mr13585436qtc.360.1592178779498; Sun, 14 Jun 2020 16:52:59 -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.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jun 2020 16:52:58 -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>, Patrick Delaunay <patrick.delaunay@st.com> Subject: [PATCH v3 08/10] led: gpio: Default to using node name if label is absent Date: Sun, 14 Jun 2020 19:52:27 -0400 Message-Id: <20200614235229.1835920-9-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/led/led_gpio.c b/drivers/led/led_gpio.c index ef9b61ee62..2cdb0269f4 100644 --- a/drivers/led/led_gpio.c +++ b/drivers/led/led_gpio.c @@ -99,11 +99,8 @@ static int led_gpio_bind(struct udevice *parent) const char *label; label = ofnode_read_string(node, "label"); - if (!label) { - debug("%s: node %s has no label\n", __func__, - ofnode_get_name(node)); - return -EINVAL; - } + if (!label) + label = ofnode_get_name(node); ret = device_bind_driver_to_node(parent, "gpio_led", ofnode_get_name(node), node, &dev);
This more closely mirrors Linux's behaviour, and will make it easier to transition to using function+color in the future. 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/led/led_gpio.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)