From patchwork Wed Apr 11 09:16:26 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: 897096 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 40Ldj243D6z9s27 for ; Wed, 11 Apr 2018 19:17:09 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 5183EC21DD3; Wed, 11 Apr 2018 09:16:58 +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=RCVD_IN_DNSWL_BLOCKED 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 22950C21C38; Wed, 11 Apr 2018 09:16:56 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id EFB33C21C3F; Wed, 11 Apr 2018 09:16:54 +0000 (UTC) Received: from Internet2.beckhoff.com (internet2.beckhoff.com [194.25.186.210]) by lists.denx.de (Postfix) with ESMTPS id CBB4EC21C2F for ; Wed, 11 Apr 2018 09:16:53 +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, 11 Apr 2018 11:16:53 +0200 From: To: Date: Wed, 11 Apr 2018 11:16:26 +0200 Message-ID: <20180411091629.3113-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: Martin Fuzzey , Tom Rini , Patrick Bruenn , Ziping Chen Subject: [U-Boot] [PATCH v4 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 v4: - don't break 'make tests' - gpio_a pin 4 is already use by dm_test_gpio_phandles() -> we switch to use pin 5 and 6 - adjust dm_test_led_base() to the fact that we have two more LEDs, now - rebased on 2600df4f8ef12ece9cec13030005919e0ba2b0d5 (master 2018-04-09) 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 | 20 +++++++++++++++++++- 3 files changed, 55 insertions(+), 2 deletions(-)