From patchwork Tue Jun 21 07:29:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Vaussard X-Patchwork-Id: 638528 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rYfWX3jbXz9rvt for ; Tue, 21 Jun 2016 17:30:00 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=FZC7yiKO; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932980AbcFUH3l (ORCPT ); Tue, 21 Jun 2016 03:29:41 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:36393 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754777AbcFUH3i (ORCPT ); Tue, 21 Jun 2016 03:29:38 -0400 Received: by mail-lf0-f67.google.com with SMTP id a2so1497915lfe.3; Tue, 21 Jun 2016 00:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=R4Kw+uBE41EZIzRuVe9Tld7g1qcUGyX0dvDRXyblQfA=; b=FZC7yiKOCDqjKAjLey/xBOtMVlfI+Tj6wxcau6guXIM6DKJ475MLJ3U8i85CxdDBfk rbfkANPxMJBjYdaaDWTHQ77ScAnTwm1beub36erUdSHzfHxLGbO6V9QFYcW68GkkBhbz E0o1vcNrj0r/MdGgTxWZxM88avUxH4pfnoTew7bbPHRHyHPW9x/IJ1hsPfOahiGdJuxQ In4AbH02ioMGJLx56sA0BVgf0/qBIIV7ID0Nj7Jti+Qy6lSsN1/y3+l6Rmqzl1SUAeSw t3C3gXskJCbSY4AkJ+c/DCQyCcoY2jj7EGHeEbSUh6Oj+nP0LZi6iiudWfbwQvma9YK7 aNBw== 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:in-reply-to :references; bh=R4Kw+uBE41EZIzRuVe9Tld7g1qcUGyX0dvDRXyblQfA=; b=LpmwAZQvznXyX5OI7tUWRmNOj6ri8QXv86TqjKMdk66V71dRuxoYK88qKKG72hyLe3 Vq9UIprR7TDLnrqaJ5HkJSjEHq+Ocaiye1rbucNW6pmCDCFxYixHA7Usdp+Kq5LquyAa 5J45UIsVYxniIYC1F5/ke6tYyGAEKZczEwC/zZjfVwq6tL2HDlLLffX3G9nNGOlZ5aij /BX5U4sTkBeXMgVzBn7FSurCIFHUPfmV6RvEzmuZKf35W7ewgF6wwCHaNtjVdQSlK7Sh lbdlT0lSND2uBKZjI2Yr1ezUKpSGTLk2BGhrfab9/Ej+hRCCjksmHU6lL33ywe0Yk/7S Oc3Q== X-Gm-Message-State: ALyK8tLEWALwjhto/tN1hjr4qgnwbzAva47KPwlqM0ytIXsZkNplo90zNQNBh3naimki/A== X-Received: by 10.28.38.194 with SMTP id m185mr1695618wmm.33.1466494175425; Tue, 21 Jun 2016 00:29:35 -0700 (PDT) Received: from a23pc05.heig-vd.ch ([193.134.219.72]) by smtp.googlemail.com with ESMTPSA id el4sm34587844wjd.23.2016.06.21.00.29.34 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Jun 2016 00:29:35 -0700 (PDT) From: Florian Vaussard X-Google-Original-From: Florian Vaussard To: devicetree@vger.kernel.org, Richard Purdie , Jacek Anaszewski Cc: Rob Herring , Mark Rutland , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Florian Vaussard Subject: [PATCH 1/2] leds: ncp5623: Add device tree binding documentation Date: Tue, 21 Jun 2016 09:29:13 +0200 Message-Id: <1466494154-3786-2-git-send-email-florian.vaussard@heig-vd.ch> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1466494154-3786-1-git-send-email-florian.vaussard@heig-vd.ch> References: <1466494154-3786-1-git-send-email-florian.vaussard@heig-vd.ch> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add device tree binding documentation for On Semiconductor NCP5623 I2C LED driver. The driver can independently control the PWM of the 3 channels with 32 levels of intensity. The current delivered by the current source can be controlled using the led-max-microamp property. In order to control this value, it is also necessary to know the current on the Iref pin, hence the onnn,led-iref-microamp property. It is usually set using an external bias resistor, following Iref = Vref/Rbias with Vref=0.6V. Signed-off-by: Florian Vaussard --- .../devicetree/bindings/leds/leds-ncp5623.txt | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-ncp5623.txt diff --git a/Documentation/devicetree/bindings/leds/leds-ncp5623.txt b/Documentation/devicetree/bindings/leds/leds-ncp5623.txt new file mode 100644 index 0000000..0dc8345 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-ncp5623.txt @@ -0,0 +1,44 @@ +* ON Semiconductor - NCP5623 3-Channel LED Driver + +The NCP5623 is a 3-channel I2C LED driver. The brightness of each +channel can be independently set using 32 levels. Each LED is represented +as a sub-node of the device. + +Required properties: + - compatible: Should be "onnn,ncp5623" + - reg: I2C slave address (fixed to 0x38) + - #address-cells: must be 1 + - #size-cells: must be 0 + - onnn,led-iref-microamp: Current on the Iref pin in microampere + - led-max-microamp: Desired maximum current for each LED in microampere + (maximum 30000uA) + +LED sub-node properties: + - reg : LED channel number (0..2) + - For other LED properties see: + Documentation/devicetree/bindings/leds/common.txt + +Example: + +led1: ncp5623@38 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "onnn,ncp5623"; + reg = <0x38>; + + led1_r@0 { + label = "ncp:power:red"; + reg = <0>; + linux,default-trigger = "default-on"; + }; + + led1_b@1 { + label = "ncp:power:blue"; + reg = <1>; + }; + + led1_g@2 { + label = "ncp:power:green"; + reg = <2>; + }; +};