Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp1823015imc; Fri, 22 Feb 2019 11:52:40 -0800 (PST) X-Google-Smtp-Source: AHgI3IYA+bGf+5UvQtd1lVyAITeZ9Imryhxi4KV3TyNznFx8j/o6YOOGr2sHBAt+cwy0XYmwSupI X-Received: by 2002:a62:3681:: with SMTP id d123mr5932243pfa.242.1550865160800; Fri, 22 Feb 2019 11:52:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550865160; cv=none; d=google.com; s=arc-20160816; b=k/LwYkhSUv6A5ApSz47EDtIAf0LFz++vRt71cUv+vXglcvuLqZDuLf7+xAlyAY48l4 8vpg2p3bXG6XCebRjs1kMFpwLtO3Q6zpsNSuD0AySjcg0ixwtk5ALCTUna+YSsNDYi96 XILNz3Va0u2tc+kWK0947JjtPRw9ykh93ooGNbnE7HXAm/ek5Iz/bTQiWuhEA3o8kxrU e04CFo2ZMjMTZUuYHXzd+z8N96WEmEA2o9jshCLm9nQYTy/89muRnBKGQw+jVXdNatR7 13PMB8Cv+Coe6W4VFamRMpJBB0agxIjnX9R3KYggMu96VHKB3PnbWz98kpY9HbqS90Hw x0HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=TSFIG56rRaaFfYgbdNZzBbOmDSAD7TjsHwVZFadjdx4=; b=glaadtrzLGoirIK3FW7Ci9HIYzjRK9w2dKR9WUAZD3UfiWPn0WMFWRghf8IfSfgerA UDun1YprNA8rlRIJEKZi7GHW5S+4PG4sf5/Pcal+VQ7aoJiqEKyL9v441DdKUjKiuD18 WHaF0WnYtdILJ9MGcO/KphnOAdCJRWZDPp8eMCBu297nay4QJjLCW727q+vErvbVkeTQ oMVDAzks0OdTeljBwzsJxVwqA/vHTFY4VmvmJ9MbVHRpFQDOIOiTH6lWw/gxpiXVtFa2 KGFIz2A6AMFHXWRSd4HADZPy1jq/PzHfTs6EyBVF7QtQSKTAm5xpG6HjulUBBAuEHF0U odSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l18si2105104pgh.511.2019.02.22.11.52.24; Fri, 22 Feb 2019 11:52:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726871AbfBVTvM (ORCPT + 99 others); Fri, 22 Feb 2019 14:51:12 -0500 Received: from mail-oi1-f194.google.com ([209.85.167.194]:39038 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725878AbfBVTvM (ORCPT ); Fri, 22 Feb 2019 14:51:12 -0500 Received: by mail-oi1-f194.google.com with SMTP id b4so2655387oif.6; Fri, 22 Feb 2019 11:51:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TSFIG56rRaaFfYgbdNZzBbOmDSAD7TjsHwVZFadjdx4=; b=OvoD7nsXQGmwkPfdUEosayu/0JuSRu3L2UW6f4l9d6eCldGo3hvyJ9xUsKkeWLtnfb nl/c+L60+GOXJNjlWkgWquhfdobV3q3WblrgxCGdQZeBAiKOz3YSfNfUGn8DKGimA/Dy oX/Tsn8V/Snj6xVxqcPYv22aFJ31Usg5Go24adCbsJUqT0k/Qx0j5rnFnx7LH1U5zd2y jMIQdgMz9iiX1AkQMDQRiXtbRVZ4+GyF2IIxrZPkiRKBbLG1dK8SnSG4Z0wWBqOonUAM chKATPQZf4WzDbwX1h4/uItNFcmtR3tmo7byR4dUONKDvXeoFMxr/4JldwIt0NQTQ/2E 9eSg== X-Gm-Message-State: AHQUAub2e8gC3JsDNm1YfPACguAp8g3sHh4LlYb+uYZrKHMNM0TGiGo7 Uozte+1lR6bvk1Vc4pjRB+pA9Jk= X-Received: by 2002:aca:ed81:: with SMTP id l123mr3400240oih.139.1550865070695; Fri, 22 Feb 2019 11:51:10 -0800 (PST) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id h67sm950667otb.36.2019.02.22.11.51.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Feb 2019 11:51:10 -0800 (PST) Date: Fri, 22 Feb 2019 13:51:09 -0600 From: Rob Herring To: Stefan Mavrodiev Cc: Jacek Anaszewski , Pavel Machek , Mark Rutland , Chen-Yu Tsai , Maxime Ripard , Lee Jones , "open list:LED SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:X-POWERS MULTIFUNCTION PMIC DEVICE DRIVERS" , "moderated list:ARM/Allwinner sunXi SoC support" Subject: Re: [PATCH v2 3/8] dt-bindings: leds: Add binding for axp20x-led device driver Message-ID: <20190222195109.GA17753@bogus> References: <20190215115013.11098-1-stefan@olimex.com> <20190215115013.11098-4-stefan@olimex.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190215115013.11098-4-stefan@olimex.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 15, 2019 at 01:50:08PM +0200, Stefan Mavrodiev wrote: > This adds the devicetree bindings for charge led indicator found > on most of X-Powers AXP20X PMICs. > > Signed-off-by: Stefan Mavrodiev > --- > .../devicetree/bindings/leds/leds-axp20x.txt | 74 +++++++++++++++++++ > 1 file changed, 74 insertions(+) > create mode 100644 Documentation/devicetree/bindings/leds/leds-axp20x.txt > > diff --git a/Documentation/devicetree/bindings/leds/leds-axp20x.txt b/Documentation/devicetree/bindings/leds/leds-axp20x.txt > new file mode 100644 > index 000000000000..5a83ad06796d > --- /dev/null > +++ b/Documentation/devicetree/bindings/leds/leds-axp20x.txt > @@ -0,0 +1,74 @@ > +Device Tree Bindings for LED support on X-Powers PMIC > + > +Most of the X-Powers PMICs have integrated battery charger with LED indicator. > +The output is open-drain, so the state is either high-Z or output-low. The > +driver is a subnode of AXP20X MFD driver, since it uses shared bus with all > +other cells. > +The LED can be controlled either manually or automatically. Then in automatic > +(controlled by the charger) there are two indication modes: > + > +Mode-A > +====== > +- output-low: Charging > +- high-Z Not charging > +- 1Hz flashing: Abnormal alarm > +- 4Hz flashing Overvoltage alarm > + > +Mode-B > +====== > +- output-low: Battery full > +- high-Z Not charging > +- 1Hz flashing: Charging > +- 4Hz flashing Overvoltage or abnormal alarm > + > +The control and the mode can be changed from sysfs. > + > +For AXP20X MFD bindings see: > +Documentation/devicetree/bindings/mfd/axp20x.txt > + > +Required properties: > +- compatible : Must be "x-powers,axp20x-led" > + > +Supported common LED properties, see ./common.txt for more informationn > +- label : See Documentation/devicetree/bindings/leds/common.txt > +- linux,default-trigger : See Documentation/devicetree/bindings/leds/common.txt > +- default-state: See Documentation/devicetree/bindings/leds/common.txt > + > +Optional properties: > +- x-powers,charger-mode: 0 for Mode-A, 1 for Mode-B > + If omitted, then the control is set to manual mode. > + On invalid value, Mode-A is used. > + > + > +Example: > + > + axp803: pmic@3a3 { > + compatible = "x-powers,axp803"; > + > + ... > + > + led@0 { What's the 0 for? A unit address without a reg property is not valid. > + compatible = "x-powers,axp20x-led"; > + status = "okay"; > + > + label = "axp20x:yellow:chgled"; > + linux,default-trigger = "timer"; > + default-state = "on"; > + }; > + }; > + > +or > + > + axp803: pmic@3a3 { > + compatible = "x-powers,axp803"; > + > + ... > + > + led@0 { > + compatible = "x-powers,axp20x-led"; > + status = "okay"; > + > + label = "axp20x:yellow:chgled"; > + x-powers,charger-mode = <1>; > + }; > + }; > -- > 2.17.1 >