From patchwork Wed Apr 4 08:01:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: linux-kernel-dev X-Patchwork-Id: 894881 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=beckhoff.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40GJLp40tJz9s1l for ; Wed, 4 Apr 2018 18:01:22 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4832FC21E2B; Wed, 4 Apr 2018 08:01:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 2E4F0C21D72; Wed, 4 Apr 2018 08:01:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id CD308C21C3F; Wed, 4 Apr 2018 08:01:13 +0000 (UTC) Received: from Internet2.beckhoff.com (internet2.beckhoff.com [194.25.186.210]) by lists.denx.de (Postfix) with ESMTPS id F3457C21D72 for ; Wed, 4 Apr 2018 08:01:12 +0000 (UTC) Received: from lbs1.beckhoff.com (172.17.66.92) by NT-Mail02.beckhoff.com (10.1.0.27) with Microsoft SMTP Server (TLS) id 14.3.301.0; Wed, 4 Apr 2018 10:01:12 +0200 From: To: Date: Wed, 4 Apr 2018 10:01:00 +0200 Message-ID: <20180404080103.28033-1-linux-kernel-dev@beckhoff.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-Originating-IP: [172.17.66.92] X-OLX-Disclaimer: Done Cc: Patrick Bruenn , Ziping Chen Subject: [U-Boot] [PATCH v3 0/3] This series adds support for gpio-leds "default-state" property. The X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" From: Patrick Bruenn main usecase in mind are LEDs which indicate a state like "power on". With this patchset applied, all you have to do is: Add a gpio-led node with 'default-state = "on";' property to your device tree. And the LED will automatically light up during U-Boot startup. Changes in v3: - use ofnode_read_bool() instead of ofnode_read_string() to determine if LED node has the default-state property Changes in v2: - rebase to v2018.05-rc1 - add dm_test_led_default_state() to tests/dm/led.c Patrick Bruenn (3): dm: led: Support "default-state" property dm: led: auto probe() LEDs with "default-state" dm: led: add testcase for "default-state" property arch/sandbox/dts/test.dts | 12 ++++++++++++ drivers/led/led_gpio.c | 25 ++++++++++++++++++++++++- test/dm/led.c | 16 ++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-)