From patchwork Thu Jun 23 11:38:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 70759 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp384179qgy; Thu, 23 Jun 2016 04:38:19 -0700 (PDT) X-Received: by 10.66.85.41 with SMTP id e9mr31379214paz.88.1466681899304; Thu, 23 Jun 2016 04:38:19 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c83si6514378pfd.8.2016.06.23.04.38.19 for ; Thu, 23 Jun 2016 04:38:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752307AbcFWLiJ (ORCPT ); Thu, 23 Jun 2016 07:38:09 -0400 Received: from mail-lf0-f41.google.com ([209.85.215.41]:33288 "EHLO mail-lf0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752277AbcFWLiG (ORCPT ); Thu, 23 Jun 2016 07:38:06 -0400 Received: by mail-lf0-f41.google.com with SMTP id f6so93391619lfg.0 for ; Thu, 23 Jun 2016 04:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=O4/jRM6z7EyAJYR9gGSfLQTvVe0HUPLR8f+h6fiA2a8=; b=JeL9GEDAqlLuGRkIWP2dRA/lOxU4ISX3rfSCbSzUAlrgERksg/eahnFqMjRvKRQtcE 92xLpIf7T3/0apbG8cYMMVz/QaUfdwtCiZoTBwH9uVXtp6TB7qINNeks8VdGxdnOpqiR gPh7VnYECWy6SiE8kY81nCDyTznY22HrRBxf8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=O4/jRM6z7EyAJYR9gGSfLQTvVe0HUPLR8f+h6fiA2a8=; b=NTWRFsvBAaQ39qdfxnswfod3ersZqGfmTFMItzArSX9hCPkRELC5cu8ksNYFjB2CSV 9myutoDmpI83NlZ6GsN98VQCQky7b7Svip5jJ/X+oppEEjtSB4lE9W5DV+eOOwwg75/I hs141N4bSNwNs6KMVaJ2sQYkAaItWNEcx2Ms7/HRwZec6SpQwsBYETdlkKkgizkeiCXo h+3Jd99XPMk7m8kTejrkuLC/ufSPI/1y4sn7gFk5L4UIobFcJswXZjp/7gS0kvaXslfA XO8/YtXT9uHUi5V7LI1D5errwDE2yefeoDWJIKTsUDzTX2enVDVSZctyoDLJNr+GoYVn ylgw== X-Gm-Message-State: ALyK8tLyJZQtR8BhVi/bysK0FyXurvocjKWXcdo7STiqR4zBdhOOrD8Te4ZO/COqoSrfaSWa X-Received: by 10.25.141.15 with SMTP id p15mr3755267lfd.185.1466681884611; Thu, 23 Jun 2016 04:38:04 -0700 (PDT) Received: from localhost.localdomain ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id eu7sm508243lbc.39.2016.06.23.04.38.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jun 2016 04:38:03 -0700 (PDT) From: Linus Walleij To: Jacek Anaszewski , Richard Purdie Cc: linux-leds@vger.kernel.org, Linus Walleij Subject: [PATCH] leds: centralize definition of "default-state" property Date: Thu, 23 Jun 2016 13:38:00 +0200 Message-Id: <1466681880-12317-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.11 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Four different drivers define the "default-state" property. Move this into the common.txt common LEDs properties. Signed-off-by: Linus Walleij --- Documentation/devicetree/bindings/leds/common.txt | 7 +++++++ Documentation/devicetree/bindings/leds/leds-bcm6328.txt | 2 +- Documentation/devicetree/bindings/leds/leds-bcm6358.txt | 2 +- Documentation/devicetree/bindings/leds/leds-gpio.txt | 9 ++------- Documentation/devicetree/bindings/leds/register-bit-led.txt | 9 ++------- 5 files changed, 13 insertions(+), 16 deletions(-) -- 2.4.11 -- To unsubscribe from this list: send the line "unsubscribe linux-leds" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt index af10678ea2f6..7ad54c6bcb10 100644 --- a/Documentation/devicetree/bindings/leds/common.txt +++ b/Documentation/devicetree/bindings/leds/common.txt @@ -19,6 +19,13 @@ Optional properties for child nodes: a device, i.e. no other LED class device can be assigned the same label. +- default-state : The initial state of the LED. Valid values are "on", "off", + and "keep". If the LED is already on or off and the default-state property is + set the to same value, then no glitch should be produced where the LED + momentarily turns off (or on). The "keep" setting will keep the LED at + whatever its current state is, without producing a glitch. The default is + off if this property is not present. + - linux,default-trigger : This parameter, if present, is a string defining the trigger assigned to the LED. Current triggers are: "backlight" - LED will act as a back-light, controlled by the framebuffer diff --git a/Documentation/devicetree/bindings/leds/leds-bcm6328.txt b/Documentation/devicetree/bindings/leds/leds-bcm6328.txt index 3f48c1eaf085..ccebce597f37 100644 --- a/Documentation/devicetree/bindings/leds/leds-bcm6328.txt +++ b/Documentation/devicetree/bindings/leds/leds-bcm6328.txt @@ -49,7 +49,7 @@ LED sub-node optional properties: - active-low : Boolean, makes LED active low. Default : false - default-state : see - Documentation/devicetree/bindings/leds/leds-gpio.txt + Documentation/devicetree/bindings/leds/common.txt - linux,default-trigger : see Documentation/devicetree/bindings/leds/common.txt diff --git a/Documentation/devicetree/bindings/leds/leds-bcm6358.txt b/Documentation/devicetree/bindings/leds/leds-bcm6358.txt index b22a55bcc65d..da5708e7b43b 100644 --- a/Documentation/devicetree/bindings/leds/leds-bcm6358.txt +++ b/Documentation/devicetree/bindings/leds/leds-bcm6358.txt @@ -28,7 +28,7 @@ LED sub-node optional properties: - active-low : Boolean, makes LED active low. Default : false - default-state : see - Documentation/devicetree/bindings/leds/leds-gpio.txt + Documentation/devicetree/bindings/leds/common.txt - linux,default-trigger : see Documentation/devicetree/bindings/leds/common.txt diff --git a/Documentation/devicetree/bindings/leds/leds-gpio.txt b/Documentation/devicetree/bindings/leds/leds-gpio.txt index cbbeb1850910..aad6bcbcab9d 100644 --- a/Documentation/devicetree/bindings/leds/leds-gpio.txt +++ b/Documentation/devicetree/bindings/leds/leds-gpio.txt @@ -14,13 +14,8 @@ LED sub-node properties: see Documentation/devicetree/bindings/leds/common.txt - linux,default-trigger : (optional) see Documentation/devicetree/bindings/leds/common.txt -- default-state: (optional) The initial state of the LED. Valid - values are "on", "off", and "keep". If the LED is already on or off - and the default-state property is set the to same value, then no - glitch should be produced where the LED momentarily turns off (or - on). The "keep" setting will keep the LED at whatever its current - state is, without producing a glitch. The default is off if this - property is not present. +- default-state: (optional) The initial state of the LED. + see Documentation/devicetree/bindings/leds/common.txt - retain-state-suspended: (optional) The suspend state can be retained.Such as charge-led gpio. - panic-indicator : (optional) diff --git a/Documentation/devicetree/bindings/leds/register-bit-led.txt b/Documentation/devicetree/bindings/leds/register-bit-led.txt index 379cefdc0bda..59b56365f648 100644 --- a/Documentation/devicetree/bindings/leds/register-bit-led.txt +++ b/Documentation/devicetree/bindings/leds/register-bit-led.txt @@ -23,13 +23,8 @@ Optional properties: see Documentation/devicetree/bindings/leds/common.txt - linux,default-trigger : (optional) see Documentation/devicetree/bindings/leds/common.txt -- default-state: (optional) The initial state of the LED. Valid - values are "on", "off", and "keep". If the LED is already on or off - and the default-state property is set the to same value, then no - glitch should be produced where the LED momentarily turns off (or - on). The "keep" setting will keep the LED at whatever its current - state is, without producing a glitch. The default is off if this - property is not present. +- default-state: (optional) The initial state of the LED + see Documentation/devicetree/bindings/leds/common.txt Example: