From patchwork Thu Nov 14 13:30:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 179410 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp11063401ilf; Thu, 14 Nov 2019 05:31:38 -0800 (PST) X-Google-Smtp-Source: APXvYqyOvMzMQZI65PCnTiQhce8gcUpkd8g23PzbX46WwZ/8j2nvHlPA181PvvDmoVxpS3Nf8Amf X-Received: by 2002:a17:906:a411:: with SMTP id l17mr8473806ejz.274.1573738298399; Thu, 14 Nov 2019 05:31:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573738298; cv=none; d=google.com; s=arc-20160816; b=MceUCVv+6QrdqgKCR6JJTD4wUxop3cqTvxy9MzRf8PxrzI3ARXiifJDFcZKskSyNzi 415CQgMhZOtzM7tfQCxzXqltkdzIyT6tv5p8/6Jy/FydrAgly9vql0UQkl9/tiLyqnG7 W+9WWF3PHTH+wb+H80RlNN8LvkcBLYFLH0RRwXFAmySGODf8w3YZKRW8ApknNAQc+O2G lNzchClsSeX0V70GEKPkDbkBD9m2x84t2Z0YsQzFA8lGF8dcuHYj8zpQTxlGQGDuh9su waLqqgtgfMcahwRRa42w1fTJxg4kI5XU3ClEI9x1hxjTMmJm1mKo0EfhqAUcXQPa82OW H8hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Qullg3/iDdm3fXb2oDGatHkWR3NFfKVfLUoihQpmjOI=; b=A4TZ0HLHkEcLxBM5bKC6/AIr+d9xK42IrANI1Dakdu2TloL+10y191uh2cx84/Z5XV ulZ8/++LpcQZYix6ZO01lG6krEy9rNCj0y9D9n3fDTMLjaIY1la0xd8qr0eDI7Jtf4yM oURAmB1gnh0UcdQm/Tamg08OC/pwsJ7KndxZQA+14AjDWsFkPZV405lFVdpHHx4uQJ40 flJOITo9mf86Ei019TXsCfWHsrGZs63XpQFMwudjMzvam9VFVbFuMvCG4Ba+me9UXLNd X4vfWGofAFzjJbiv9MAc0Yxe5DD3khxtQwtR/rSKdshkyeNnV49/LaasHrO6CagEqVvw DOZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Ho2wsQun; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si1522309edj.310.2019.11.14.05.31.38; Thu, 14 Nov 2019 05:31:38 -0800 (PST) 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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Ho2wsQun; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726428AbfKNNbh (ORCPT + 1 other); Thu, 14 Nov 2019 08:31:37 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:40538 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726953AbfKNNbg (ORCPT ); Thu, 14 Nov 2019 08:31:36 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAEDVVo4103618; Thu, 14 Nov 2019 07:31:31 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573738291; bh=Qullg3/iDdm3fXb2oDGatHkWR3NFfKVfLUoihQpmjOI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Ho2wsQunov0+qoyQ58KsLBW/a3GXSojh+RYcZ6o6GLrwKjrevPT1kwWuGo53lUgk+ IA7nRpNDZUdx540x7ZuOJEEhgkpX+w/Eg9K1ORofAf67w8hCJSttdBEubZM/5Pna/I RVv6OFSuwSLPKgkyXf3Kpm2u0lp0Ljsa4ybjw9yg= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAEDVVZs062472 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Nov 2019 07:31:31 -0600 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 14 Nov 2019 07:31:30 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 14 Nov 2019 07:31:30 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAEDVUsL030426; Thu, 14 Nov 2019 07:31:30 -0600 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v17 01/19] dt: bindings: Add multicolor class dt bindings documention Date: Thu, 14 Nov 2019 07:30:05 -0600 Message-ID: <20191114133023.32185-2-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191114133023.32185-1-dmurphy@ti.com> References: <20191114133023.32185-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add DT bindings for the LEDs multicolor class framework. Signed-off-by: Dan Murphy --- .../bindings/leds/leds-class-multicolor.txt | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-class-multicolor.txt -- 2.22.0.214.g8dca754b1e diff --git a/Documentation/devicetree/bindings/leds/leds-class-multicolor.txt b/Documentation/devicetree/bindings/leds/leds-class-multicolor.txt new file mode 100644 index 000000000000..4b1bd82f2a42 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-class-multicolor.txt @@ -0,0 +1,98 @@ +* Multicolor LED properties + +Bindings for multi color LEDs show how to describe current outputs of +either integrated multi-color LED elements (like RGB, RGBW, RGBWA-UV +etc.) or standalone LEDs, to achieve logically grouped multi-color LED +modules. This is achieved by adding multi-led nodes layer to the +monochrome LED bindings. + +The nodes and properties defined in this document are unique to the multicolor +LED class. Common LED nodes and properties are inherited from the common.txt +within this documentation directory. + +Required LED child properties: + - color : For multicolor LED support this property should be defined as + LED_COLOR_ID_MULTI and further definition can be found in + include/linux/leds/common.h. + +led-controller@30 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "ti,lp5024"; + reg = <0x29>; + + multi-led@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + color = ; + function = LED_FUNCTION_CHARGING; + + + led@3 { + reg = <3>; + color = ; + }; + + led@4 { + reg = <4>; + color = ; + }; + + led@5 { + reg = <5>; + color = ; + }; + }; + + multi-led@2 { + #address-cells = <1>; + #size-cells = <0>; + color = ; + function = LED_FUNCTION_ACTIVITY; + reg = <2>; + ti,led-bank = <2 3 5>; + + led@6 { + reg = <0x6>; + color = ; + led-sources = <6 9 15>; + }; + + led@7 { + reg = <0x7>; + color = ; + led-sources = <7 10 16>; + }; + + led@8 { + reg = <0x8>; + color = ; + led-sources = <8 11 17>; + }; + }; + + multi-led@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + color = ; + function = LED_FUNCTION_ACTIVITY; + + led@12 { + reg = <12>; + color = ; + }; + + led@13 { + reg = <13>; + color = ; + }; + + led@14 { + reg = <14>; + color = ; + }; + }; + +}; From patchwork Thu Nov 14 13:30:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 179411 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp11063511ilf; Thu, 14 Nov 2019 05:31:43 -0800 (PST) X-Google-Smtp-Source: APXvYqxgB7aGxH8S45+1NhsY8tMaqO9flyjkQjbBw+1FzaOINEED2pg5OHjb0NffXGeuvcefSlDb X-Received: by 2002:aa7:c0d4:: with SMTP id j20mr1261582edp.187.1573738302980; Thu, 14 Nov 2019 05:31:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573738302; cv=none; d=google.com; s=arc-20160816; b=leEmwx4x1vskgk8n7Dib0tRIMME7eBi4CExix3tl9odXCT6bBMbkDLl9EkZNagPVY4 p3SCwqx9fEdvx4eo57AjQw7qGu/fT2EVvqNFWqb85Gda+sUOfw398brafQ67UxSY3Pnz QDdWjso+iJQYNypaVz+uDS/2YHfMqe1SNBtzaPueoUObY/irZmkGN7LyOdmozMHSgWUE ihgXegRFNsDPT3PUOf0pfrfNK3gHpGpO+481ETl+4IE/5ECejy+vPVKn/pf+DIdl1qhz ZOppDxuPo4L+hP2kS3pX3pOz1TRQfz17Aarhllt4jojEhrgekjvCe68rM6uBhYnhSlM5 J5zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zV3cVdmjhCBXzQdA/5xCOaiT1n6XKbwdMaP1jdy4goo=; b=H5KykuxsFJVCuTlToHO5U7Mp4sJkDuzolpfI+ZfCwiZDaPelzZalHLqWbhcw2XzyrJ mknSNSej2oqv4WuMr4AkLNv6nAJktTqk77yZZv3MzbJmkQgFGaMlB7EbaPGGkAh2avnT 4x4sLliLfCh5C9rup1U+EBrnjSp9zEr70rUhZOAHPYpMsqBxKdcqt9UcdISIlAXUuUL5 OWcPCQvgXnJdRqoFntNsEai4pD8LNYo+6ZgxPPjBCy4ls6cv7mPxg5Px3nhrXhZAdRO8 S2537Q95t+MQd3j8KYhvrCgr02krZXTieZhvsIyCkN9SLYIOeNAucmAwPejow1Q4ftXK ZRHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=JsWTAlHz; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z37si3918696edz.281.2019.11.14.05.31.42; Thu, 14 Nov 2019 05:31:42 -0800 (PST) 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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=JsWTAlHz; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727078AbfKNNbk (ORCPT + 1 other); Thu, 14 Nov 2019 08:31:40 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:48048 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727054AbfKNNbj (ORCPT ); Thu, 14 Nov 2019 08:31:39 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAEDVaKZ007384; Thu, 14 Nov 2019 07:31:36 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573738296; bh=zV3cVdmjhCBXzQdA/5xCOaiT1n6XKbwdMaP1jdy4goo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=JsWTAlHz0+oaxsaIz4PoDF/99FfxM9K9ArlbPl3DMBPVLEI6EwlMil4FpuzZGeifm K6vhGjn3f5RhEZ09ko8K6G0RfJTpNc2zeQrO/FAu5sce4S/BHwppUhcTQcVbrXENVX 7I9p6N2IQ7tbfebsG8XWM5haVDT7NMkd2mznw9zY= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAEDVat2019354 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Nov 2019 07:31:36 -0600 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 14 Nov 2019 07:31:36 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 14 Nov 2019 07:31:36 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAEDVa2B030509; Thu, 14 Nov 2019 07:31:36 -0600 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v17 02/19] dt-bindings: leds: Add multicolor ID to the color ID list Date: Thu, 14 Nov 2019 07:30:06 -0600 Message-ID: <20191114133023.32185-3-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191114133023.32185-1-dmurphy@ti.com> References: <20191114133023.32185-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add a new color ID that is declared as MULTICOLOR as with the multicolor framework declaring a definitive color is not accurate as the node can contain multiple colors. Signed-off-by: Dan Murphy --- include/dt-bindings/leds/common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.22.0.214.g8dca754b1e diff --git a/include/dt-bindings/leds/common.h b/include/dt-bindings/leds/common.h index 9e1256a7c1bf..7006d15f71e8 100644 --- a/include/dt-bindings/leds/common.h +++ b/include/dt-bindings/leds/common.h @@ -29,7 +29,8 @@ #define LED_COLOR_ID_VIOLET 5 #define LED_COLOR_ID_YELLOW 6 #define LED_COLOR_ID_IR 7 -#define LED_COLOR_ID_MAX 8 +#define LED_COLOR_ID_MULTI 8 +#define LED_COLOR_ID_MAX 9 /* Standard LED functions */ #define LED_FUNCTION_ACTIVITY "activity" From patchwork Thu Nov 14 13:30:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 179414 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp11063826ilf; Thu, 14 Nov 2019 05:31:57 -0800 (PST) X-Google-Smtp-Source: APXvYqyLlIIzzZH6YPTvqQXWJLXZBU9ooQNCPqDNJe1NE9SEq9Gp7xHamzoti51oCD5s22Gjbpgv X-Received: by 2002:aa7:d5ce:: with SMTP id d14mr1269759eds.64.1573738317255; Thu, 14 Nov 2019 05:31:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573738317; cv=none; d=google.com; s=arc-20160816; b=biSl4hggbYNRu7nX0YOQZKa9E4X73wuG8sYPkzgLjrOGbfIHyidgtglN73vZgOB1a/ 7rZXg6HmCpKVUBnCJdPCO+BQwHnpHBVcJIDfaunkKRdEgouFEaIHdF7ZZgwQsX/aDOMK CX2hB+bPVim5heImtiV7LuEs9kYOrWxOwXzZ74cMDA4Ysa4qAvCrGOQq0QbglgoYiL1X qNDcOD+WL4kd5iJ6a7E50Lc971gFt9hL9ZfvMzLbd392qhvnU2WCJzKQWQ1iAKpEoWDD hJX1XHJPhJwyJuWBrDJUH+flPVN3OnMHt/hOBe09KokMFNoVF1GJQD5eq6WdO/ShxQjG dTdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rypLEJLbiDfP2WcD4ls+CXhyO//n5TYBDjfB1YBfbjc=; b=dqtonivKkVz9AFmMlsstG74aWxnYTe6lI70rLIvK6kdicgAHEoeL6/28fW9A3eO6E9 rddBwlpUroTr5hi1MdI5qb/s/4+krHjBM/hzEbWBI8nQC8DYqG5HUqy3Fr+p8DjldUVQ 25jNJzM3wynnZs/451i2XML3UdTuepRIu7aFYOTr1OAqN5A8ohHXCxnSOgKR02Nv/C7u GRuF6dfy/wBdfou2SVwORiODigIe5l+xd+2SRP/hCuA0974Rw1B3FjCngnr5TPpy7Mpl 6RWkjBN3HcabfPQ5ucFhxR6x+FmekckgWV1bDS4/kopa3Ner1KPpiqpWmVfWKgBYza3U +BLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=akrNc2iT; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1si3579763eds.434.2019.11.14.05.31.57; Thu, 14 Nov 2019 05:31:57 -0800 (PST) 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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=akrNc2iT; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727217AbfKNNb4 (ORCPT + 1 other); Thu, 14 Nov 2019 08:31:56 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:58024 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726973AbfKNNbz (ORCPT ); Thu, 14 Nov 2019 08:31:55 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAEDVqpx096614; Thu, 14 Nov 2019 07:31:52 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573738312; bh=rypLEJLbiDfP2WcD4ls+CXhyO//n5TYBDjfB1YBfbjc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=akrNc2iT86JOITkx6Cq83rqH7VM13dk76Om9dh8e+pAXt12Ua9E4xJehG5lwoY3BF qDuQgqWKtdllxZKjWuydj2TbOzwU/LaKylURk2m1jsdcYsoIbF1fe6O9BJg3X5mxTL in1YiUUgDqyDkryD/ja6k1j+CS7igNbpnLhnK7r4= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAEDVq6Y062903 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Nov 2019 07:31:52 -0600 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 14 Nov 2019 07:31:52 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 14 Nov 2019 07:31:51 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAEDVqLI035647; Thu, 14 Nov 2019 07:31:52 -0600 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v17 05/19] dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers Date: Thu, 14 Nov 2019 07:30:09 -0600 Message-ID: <20191114133023.32185-6-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191114133023.32185-1-dmurphy@ti.com> References: <20191114133023.32185-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Introduce the bindings for the Texas Instruments LP5036, LP5030, LP5024, LP5018, LP5012 and LP5009 RGB LED device driver. The LP5036/30/24/18/12/9 can control RGB LEDs individually or as part of a control bank group. These devices have the ability to adjust the mixing control for the RGB LEDs to obtain different colors independent of the overall brightness of the LED grouping. Datasheet: http://www.ti.com/lit/ds/symlink/lp5012.pdf http://www.ti.com/lit/ds/symlink/lp5024.pdf http://www.ti.com/lit/ds/symlink/lp5036.pdf Signed-off-by: Dan Murphy --- .../devicetree/bindings/leds/leds-lp50xx.txt | 148 ++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-lp50xx.txt -- 2.22.0.214.g8dca754b1e diff --git a/Documentation/devicetree/bindings/leds/leds-lp50xx.txt b/Documentation/devicetree/bindings/leds/leds-lp50xx.txt new file mode 100644 index 000000000000..291d418642e0 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-lp50xx.txt @@ -0,0 +1,148 @@ +* Texas Instruments - LP5009/12/18/24/30/36 RGB LED driver + +The LP50XX is multi-channel, I2C RGB LED Drivers that can group RGB LEDs into +a LED group or control them individually. + +The difference in these RGB LED drivers is the number of supported RGB modules. + +Required parent properties: + - compatible: + "ti,lp5009" + "ti,lp5012" + "ti,lp5018" + "ti,lp5024" + "ti,lp5030" + "ti,lp5036" + - reg : I2C slave address + lp5009/12 - 0x14, 0x15, 0x16, 0x17 + lp5018/24 - 0x28, 0x29, 0x2a, 0x2b + lp5030/36 - 0x30, 0x31, 0x32, 0x33 + - #address-cells : 1 + - #size-cells : 0 + +Optional parent properties: + - enable-gpios : gpio pin to enable/disable the device. + - vled-supply : LED supply + +Required child properties: + - #address-cells : 1 + - #size-cells : 0 + - reg : This is the LED module number. + - color : Must be LED_COLOR_ID_MULTI + - function : see Documentation/devicetree/bindings/leds/common.txt + +Required child properties only if LED modules will be banked: + - ti,led-bank : This property denotes the LED module numbers that will + be controlled as a single RGB cluster. Each LED module + number will be controlled by a single LED class instance. + There can only be one instance of the ti,led-bank + property for each device node. + +Required grandchildren properties: + - reg : A single entry denoting the LED output that controls + the monochrome LED. + - color : see Documentation/devicetree/bindings/leds/common.txt + - led-sources : see Documentation/devicetree/bindings/leds/common.txt + +The LED outputs associated with the LED modules are defined in Table 1 of the +corresponding data sheets. + +LP5009 - 3 Total RGB cluster LED outputs 0-2 +LP5012 - 4 Total RGB cluster LED outputs 0-3 +LP5018 - 6 Total RGB cluster LED outputs 0-5 +LP5024 - 8 Total RGB cluster LED outputs 0-7 +LP5030 - 10 Total RGB cluster LED outputs 0-9 +LP5036 - 12 Total RGB cluster LED outputs 0-11 + +Optional child properties: + - label : see Documentation/devicetree/bindings/leds/common.txt + - linux,default-trigger : + see Documentation/devicetree/bindings/leds/common.txt + +Examples: +led-controller@29 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "ti,lp5024"; + reg = <0x29>; + enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; + vled-supply = <&vmmcsd_fixed>; + + multi-led@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + color = ; + function = LED_FUNCTION_STATUS; + + led@3 { + reg = <3>; + color = ; + }; + + led@4 { + reg = <4>; + color = ; + }; + + led@5 { + reg = <5>; + color = ; + }; + }; + + multi-led@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + color = ; + function = LED_FUNCTION_STANDBY; + ti,led-bank = <2 3 5>; + + led@6 { + reg = <0x6>; + color = ; + led-sources = <6 9 15>; + }; + + led@7 { + reg = <0x7>; + color = ; + led-sources = <7 10 16>; + }; + + led@8 { + reg = <0x8>; + color = ; + led-sources = <8 11 17>; + }; + }; + + multi-led@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + color = ; + function = LED_FUNCTION_ACTIVITY; + + led@12 { + reg = <12>; + color = ; + }; + + led@13 { + reg = <13>; + color = ; + }; + + led@14 { + reg = <14>; + color = ; + }; + }; +}; + +For more product information please see the link below: +http://www.ti.com/lit/ds/symlink/lp5012.pdf +http://www.ti.com/lit/ds/symlink/lp5024.pdf +http://www.ti.com/lit/ds/symlink/lp5036.pdf From patchwork Thu Nov 14 13:30:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 179418 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp11064415ilf; Thu, 14 Nov 2019 05:32:24 -0800 (PST) X-Google-Smtp-Source: APXvYqxqU5G7dPYbXKkY34K/Rm83g/g3up4fHR2qRHDLmk3JD/L33njvZ4hHeDUs9hJ8XfiCJkPf X-Received: by 2002:a17:906:6c95:: with SMTP id s21mr8624166ejr.205.1573738344423; Thu, 14 Nov 2019 05:32:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573738344; cv=none; d=google.com; s=arc-20160816; b=R7SJq2+wjtalOklSvuTtGU1uPGXYVi1SXRkYTiMu6+bRdWZwk50Gq9pjuUsry06IUq xFNxgBzrBTn6REqjMBWKUaps0AbKD1+J7zrjkx4YlQwpVl+ormFajzY0/Sqi5MbxpG3/ +Vip4KtbrV8cochk5MbL+PB0SM8MDoe7ZqjtYyDMueHqYndGow1HZZnPNg58s6Rm8E66 bBU9vvk6htbQq7T5akPhGCdHFcHPZYdzN1+rKFYtO7A9q3T/FWVaF58RyYngaXFKK2EB FML/L/WeFsC1uNDS3iiTVJtHXJW797sxeMDAwEEvZUbeMcIf5REpwzBQNlPLuzHJLzYj 7dlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ynnE2bcE7/pjTvuXLjgDaxUYtz5RYI+D7gB1BXxX9Io=; b=P81EC5XF4qGCHoCFM/qFRX25huyx9bzWFxLtL6koOnJu3K3WiX0Xa+GxqhVXPkhJLg Adytj08oU+TU2M5uNTz+fn+pkWCMkajS7XNB+2HLlfcNWY2PiY2VGlNfqaj7ZSjLqr2u ujHiOcrYzVnQuLnGUoaJvvGWUx54+iCHEvV2vWbDdCHLKH3DJhShrObgKC6/3kdv6NwR IyrRRyn2btRZT/Gbl+fPKmDLt4tNlxJf1T+JGv2k2z6hieAHPLIzN7++PrvD6v1SgEi0 nlNqwSQqGJK83K1O/ZgBv4tyE/hv97ry9EgFtsD4kOpHe/MO9KGfS1YuIc9pxklx5CNT LbJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=saqypMsN; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rp9si3516469ejb.40.2019.11.14.05.32.24; Thu, 14 Nov 2019 05:32:24 -0800 (PST) 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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=saqypMsN; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727301AbfKNNcW (ORCPT + 1 other); Thu, 14 Nov 2019 08:32:22 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:48172 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726214AbfKNNcW (ORCPT ); Thu, 14 Nov 2019 08:32:22 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAEDW8Xp007527; Thu, 14 Nov 2019 07:32:08 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573738328; bh=ynnE2bcE7/pjTvuXLjgDaxUYtz5RYI+D7gB1BXxX9Io=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=saqypMsNYKb3vYJqqo9E6tQeg338m6I6LhkMPblna/JhEYaIBhkdZj7/ExTQ13aCN 7XFWpbYfIjXgK6lPGQWo2awRYHdrL1vFxjYiUKPn3GQGj7ygY9VUHCmKEKTbVB1Ino 94cIBeL2nlxNnK7DiByu6srUSW8AbvztkgZx6hUI= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAEDW8CE069003; Thu, 14 Nov 2019 07:32:08 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 14 Nov 2019 07:32:08 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 14 Nov 2019 07:32:08 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAEDW7Tm091490; Thu, 14 Nov 2019 07:32:07 -0600 From: Dan Murphy To: , CC: , , Dan Murphy , Linus Walleij , Tony Lindgren , =?utf-8?q?Beno=C3=AEt_Cousson?= , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Subject: [PATCH v17 08/19] dt: bindings: lp55xx: Update binding for Multicolor Framework Date: Thu, 14 Nov 2019 07:30:12 -0600 Message-ID: <20191114133023.32185-9-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191114133023.32185-1-dmurphy@ti.com> References: <20191114133023.32185-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Update the DT binding to include the properties to use the multicolor framework for the devices that use the LP55xx framework. Reviewed-by: Linus Walleij Signed-off-by: Dan Murphy CC: Tony Lindgren CC: "Benoît Cousson" CC: Linus Walleij CC: Shawn Guo CC: Sascha Hauer CC: Pengutronix Kernel Team CC: Fabio Estevam CC: NXP Linux Team --- .../devicetree/bindings/leds/leds-lp55xx.txt | 149 +++++++++++++++--- 1 file changed, 124 insertions(+), 25 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt index bfe2805c5534..0ccc1efc2499 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt @@ -1,6 +1,8 @@ Binding for TI/National Semiconductor LP55xx LED Drivers Required properties: +- #address-cells: 1 +- #size-cells: 0 - compatible: one of national,lp5521 national,lp5523 @@ -14,6 +16,18 @@ Required properties: Each child has own specific current settings - led-cur: Current setting at each LED channel (mA x10, 0 if LED is not connected) - max-cur: Maximun current at each LED channel. +- reg: Output channel for the LED. This is zero based channel identifier and + the data sheet is a one based channel identifier. + reg value to output to LED output number + D1 = reg value is 0 + D2 = reg value is 1 + D3 = reg value is 2 + D4 = reg value is 3 + D5 = reg value is 4 + D6 = reg value is 5 + D7 = reg value is 6 + D8 = reg value is 7 + D9 = reg value is 8 Optional properties: - enable-gpio: GPIO attached to the chip's enable pin @@ -35,23 +49,28 @@ example 1) LP5521 on channel 0. lp5521@32 { + #address-cells = <1>; + #size-cells = <0>; compatible = "national,lp5521"; reg = <0x32>; label = "lp5521_pri"; clock-mode = /bits/ 8 <2>; - chan0 { + chan@0 { + reg = <0>; led-cur = /bits/ 8 <0x2f>; max-cur = /bits/ 8 <0x5f>; linux,default-trigger = "heartbeat"; }; - chan1 { + chan@1 { + reg = <1>; led-cur = /bits/ 8 <0x2f>; max-cur = /bits/ 8 <0x5f>; }; - chan2 { + chan@2 { + reg = <2>; led-cur = /bits/ 8 <0x2f>; max-cur = /bits/ 8 <0x5f>; }; @@ -70,59 +89,70 @@ ASEL1 ASEL0 Address VEN VEN 35h lp5523@32 { + #address-cells = <1>; + #size-cells = <0>; compatible = "national,lp5523"; reg = <0x32>; clock-mode = /bits/ 8 <1>; - chan0 { + chan@0 { + reg = <0>; chan-name = "d1"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan1 { + chan@1 { + reg = <1>; chan-name = "d2"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan2 { + chan@2 { + reg = <2>; chan-name = "d3"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan3 { + chan@3 { + reg = <3>; chan-name = "d4"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan4 { + chan@4 { + reg = <4>; chan-name = "d5"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan5 { + chan@5 { + reg = <5>; chan-name = "d6"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan6 { + chan@6 { + reg = <6>; chan-name = "d7"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan7 { + chan@7 { + reg = <7>; chan-name = "d8"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan8 { + chan@8 { + reg = <8>; chan-name = "d9"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; @@ -133,29 +163,35 @@ example 3) LP5562 4 channels are defined. lp5562@30 { + #address-cells = <1>; + #size-cells = <0>; compatible = "ti,lp5562"; reg = <0x30>; clock-mode = /bits/8 <2>; - chan0 { + chan@0 { + reg = <0>; chan-name = "R"; led-cur = /bits/ 8 <0x20>; max-cur = /bits/ 8 <0x60>; }; - chan1 { + chan@1 { + reg = <1>; chan-name = "G"; led-cur = /bits/ 8 <0x20>; max-cur = /bits/ 8 <0x60>; }; - chan2 { + chan@2 { + reg = <2>; chan-name = "B"; led-cur = /bits/ 8 <0x20>; max-cur = /bits/ 8 <0x60>; }; - chan3 { + chan@3 { + reg = <3>; chan-name = "W"; led-cur = /bits/ 8 <0x20>; max-cur = /bits/ 8 <0x60>; @@ -167,62 +203,125 @@ example 4) LP8501 Others are same as LP5523. lp8501@32 { + #address-cells = <1>; + #size-cells = <0>; compatible = "ti,lp8501"; reg = <0x32>; clock-mode = /bits/ 8 <2>; pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */ - chan0 { + chan@0 { + reg = <0>; chan-name = "d1"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan1 { + chan@1 { + reg = <1>; chan-name = "d2"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan2 { + chan@2 { + reg = <2>; chan-name = "d3"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan3 { + chan@3 { + reg = <3>; chan-name = "d4"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan4 { + chan@4 { + reg = <4>; chan-name = "d5"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan5 { + chan@5 { + reg = <5>; chan-name = "d6"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan6 { + chan@6 { + reg = <6>; chan-name = "d7"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan7 { + chan@7 { + reg = <7>; chan-name = "d8"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan8 { + chan@8 { + reg = <8>; chan-name = "d9"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; }; + +Multicolor Framework Support +In addition to the nodes and properties defined above for device support the +properties below are needed for multicolor framework support as defined in +Documentation/devicetree/bindings/leds/leds-class-multicolor.txt + +Required child properties for multicolor framework + - color : Must be LED_COLOR_ID_MULTI + - function : see Documentation/devicetree/bindings/leds/common.txt + +Required grandchildren properties + - reg : This is the LED output of the device + - color : see Documentation/devicetree/bindings/leds/common.txt + +Multicolor LED example: +led-controller@32 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "national,lp5523"; + reg = <0x32>; + clock-mode = /bits/ 8 <0>; /* LP55XX_CLOCK_AUTO */ + + multi-led@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + color = ; + function = LED_FUNCTION_STANDBY; + linux,default-trigger = "heartbeat"; + + led@0 { + led-cur = /bits/ 8 <50>; + max-cur = /bits/ 8 <100>; + reg = <0x0>; + color = ; + }; + + led@1 { + led-cur = /bits/ 8 <50>; + max-cur = /bits/ 8 <100>; + reg = <0x1>; + color = ; + }; + + led@6 { + led-cur = /bits/ 8 <50>; + max-cur = /bits/ 8 <100>; + reg = <0x6>; + color = ; + }; + }; +}; From patchwork Thu Nov 14 13:30:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 179417 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp11064319ilf; Thu, 14 Nov 2019 05:32:19 -0800 (PST) X-Google-Smtp-Source: APXvYqyT/YdoT0ypr9V4pBVrJEAbesP+M24A+CHie+9Hk4F5+/oiFGAPmh4gJfOyZoqNDjfNu7Tw X-Received: by 2002:a17:906:b6cb:: with SMTP id ec11mr8507877ejb.145.1573738339516; Thu, 14 Nov 2019 05:32:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573738339; cv=none; d=google.com; s=arc-20160816; b=KR+g+NJp6H1tzPWG+dGmaQZAGSn6nfSaZNIZ2tAlsV6m+HhyJ8Y7OdxHTc5eAz1kJo pu2yX36yrYcVH4t0a3wDQWt6139FhHVxZfacWKBtc83ix/KRoQzGML+7j94NVb4SYkpb 3yOFQsLamPncU8HJZndVk4Hr5GzCavkaoDqmenpZ2yTgG2gyxSNfIXrIHJDH39bNIei8 lZ4r5ZxMo/e+2W4T0RVBq3+gCBPwqAr0TwwUv6ufT8pMzhN5tN9UYxFfzXgMKOSVaY5a EJn7sUN/V1I2kzWIlBDD15rp219l3j1ouxD1ZFhn2D14eDwkLQnKRsGjM52MnmVx1Cce 77xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IhBf76ZkV825gD29NdnMc9uoR76ENOTa4bPn385iiJ0=; b=tf8PWHIuBq0iO+Kflmh0arrNkYj1J/fZT2VnOLXiyYjrMPu0GIZ5sKtun9EjzWJFxb jfLVXyR5mrPGRQrZrrLoP/ybctalsD4Dk/SYFLWLbyfsANuVrPPBs7AUPvbYmD/rEdmv GCoGMYmUT3y8KNY3RDvC6NjI/y+nhtuCLYtSebsg9s8sSIlOOMlfASzk62bhueM25nKd MeF8oKbceQnG5hdyQQQ4ubAdY3gIm5BVNNC5Q2TThcHk82vf+FbfpidUevr5yqoOrnpa R/kuUmc1wKp1rIrFpntEdXJlAQqN9HSHrMpci9qAyT2EF08y7WA9aKzPpdNCT8SQ7XuN dZZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=yecRGpHq; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g13si3270467ejf.99.2019.11.14.05.32.19; Thu, 14 Nov 2019 05:32:19 -0800 (PST) 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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=yecRGpHq; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726678AbfKNNcT (ORCPT + 1 other); Thu, 14 Nov 2019 08:32:19 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:48144 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726214AbfKNNcS (ORCPT ); Thu, 14 Nov 2019 08:32:18 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAEDWDhk007554; Thu, 14 Nov 2019 07:32:13 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573738333; bh=IhBf76ZkV825gD29NdnMc9uoR76ENOTa4bPn385iiJ0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=yecRGpHq9lvVYPHvxKsq0NOd80gI0K/9hBCe+vjYNzwWJ/Cd5rK7nX0MMjYcFSkY9 7LwFCngHs7wiU7qmZPu8+pUChZVnx5GdwWX5AKXIV4Ys3C2Dkeq6Pe5tZxiz3I6k6s 74y6V2TtKrN92bva5Ci+fiGoCjSkRWr2gc7cwV2A= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAEDWDaf005283 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Nov 2019 07:32:13 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 14 Nov 2019 07:32:13 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 14 Nov 2019 07:32:13 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAEDWD1m031637; Thu, 14 Nov 2019 07:32:13 -0600 From: Dan Murphy To: , CC: , , Dan Murphy , Tony Lindgren , =?utf-8?q?Beno?= =?utf-8?q?=C3=AEt_Cousson?= Subject: [PATCH v17 09/19] ARM: dts: n900: Add reg property to the LP5523 channel node Date: Thu, 14 Nov 2019 07:30:13 -0600 Message-ID: <20191114133023.32185-10-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191114133023.32185-1-dmurphy@ti.com> References: <20191114133023.32185-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add the reg property to each channel node. This update is to accomodate the multicolor framework. In addition to the accomodation this allows the LEDs to be placed on any channel and allow designs to skip channels as opposed to requiring sequential order. Signed-off-by: Dan Murphy Acked-by: Tony Lindgren CC: Tony Lindgren CC: "Benoît Cousson" --- arch/arm/boot/dts/omap3-n900.dts | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) -- 2.22.0.214.g8dca754b1e Acked-by: Pavel Machek diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index 84a5ade1e865..643f35619246 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts @@ -607,63 +607,74 @@ }; lp5523: lp5523@32 { + #address-cells = <1>; + #size-cells = <0>; compatible = "national,lp5523"; reg = <0x32>; clock-mode = /bits/ 8 <0>; /* LP55XX_CLOCK_AUTO */ enable-gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>; /* 41 */ - chan0 { + chan@0 { chan-name = "lp5523:kb1"; led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <100>; + reg = <0>; }; - chan1 { + chan@1 { chan-name = "lp5523:kb2"; led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <100>; + reg = <1>; }; - chan2 { + chan@2 { chan-name = "lp5523:kb3"; led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <100>; + reg = <2>; }; - chan3 { + chan@3 { chan-name = "lp5523:kb4"; led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <100>; + reg = <3>; }; - chan4 { + chan@4 { chan-name = "lp5523:b"; led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <100>; + reg = <4>; }; - chan5 { + chan@5 { chan-name = "lp5523:g"; led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <100>; + reg = <5>; }; - chan6 { + chan@6 { chan-name = "lp5523:r"; led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <100>; + reg = <6>; }; - chan7 { + chan@7 { chan-name = "lp5523:kb5"; led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <100>; + reg = <7>; }; - chan8 { + chan@8 { chan-name = "lp5523:kb6"; led-cur = /bits/ 8 <50>; max-cur = /bits/ 8 <100>; + reg = <8>; }; }; From patchwork Thu Nov 14 13:30:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 179422 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp11064745ilf; Thu, 14 Nov 2019 05:32:39 -0800 (PST) X-Google-Smtp-Source: APXvYqyB9m55gpUeWRnuzWziyeOxte8FT5+zbetWQBTNsv+ykQ7nathOt0Tg0MJQ8MVVwRm6ul8/ X-Received: by 2002:aa7:c1d4:: with SMTP id d20mr1213471edp.273.1573738359397; Thu, 14 Nov 2019 05:32:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573738359; cv=none; d=google.com; s=arc-20160816; b=gsfZTHw0Gn+Afm8VugdeSS7qUNnwSbuW0YaN+DTWHaplPFhi7bLFcpeCcbDUK+uz7Q sgMGhBGCtglGHKygEBBs5PcDEBst8P2VrhDsU3/5dLsfBxc0k8pwOqdqgSv8yYINtGs7 UvkoHCHVEtiAEjl+oUGZQvBMIb3CaSHYfL5gBSLGp+QQAfa4hOdhHq1tz9V2sk4LK6MH LLz8G20moKyEGxDsxHjfv81yJ8Ihyz0uuz6EnGnO7zsYmlGNw1vKHug6s06T/RtA9q5i ouyt6OWEGbaIodISNuVYWVEAfwo4UraiVOQCGlsI15dEWD1P7kVuTcqGuMLNtAzCG7YW VZSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=g7UL6cJtcQdVkWq2mI0FrMGiupDZ0AbMcCYXx+3Cao4=; b=xRhTq6LGZw1H61m47+GNuemjuHPEjwQrZ2uWszYvtSVPdXGAyQWWuWm2wf72rmmPUt VV1XCiE7a1caJ+Ujp6PHLKd2462eVF7rC8OMq91s7klg3bVx5K2k+XKmH1ZzdkOAXoVt gzJ3yB3T5I+2uFDuIBVfCTF5oGMN3iIEGbq0baCsl2KTalm3k0s/cokk3EqyML4S7eYT 5KHdTsSwGxqeN9b/vVoORodPWN5Q/Bb29fukkBlWDwiI7CX59oqKlRttzpUmDw++pfH3 wyBv+pJcX0sZBlo9riQWchMbkQgrVQ3CvfJFjsahTiaQqiKMKs9DBqmLnoc+nWvQyKeH D+yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=HefRmZLN; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u25si4427054edr.22.2019.11.14.05.32.39; Thu, 14 Nov 2019 05:32:39 -0800 (PST) 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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=HefRmZLN; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727104AbfKNNci (ORCPT + 1 other); Thu, 14 Nov 2019 08:32:38 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:48218 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726980AbfKNNch (ORCPT ); Thu, 14 Nov 2019 08:32:37 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAEDWZ2a007656; Thu, 14 Nov 2019 07:32:35 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573738355; bh=g7UL6cJtcQdVkWq2mI0FrMGiupDZ0AbMcCYXx+3Cao4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=HefRmZLNVIqDmekQktQbIpzAp2FvU9idqywEWYPTgFlgv4IXYBdqKoB9FaRXJfI4Y urL67jFg4O4TF9vRYa44aQBCZZp3Rw9N815+Fxn3QdpAxKL27XlDerBniXugcLk/z2 jHlJLjviSdyBkJZNzdyNUY2IkYvPbjCpWkEIXgwo= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAEDWZAL020697 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Nov 2019 07:32:35 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 14 Nov 2019 07:32:34 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 14 Nov 2019 07:32:34 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAEDWYxZ036892; Thu, 14 Nov 2019 07:32:34 -0600 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v17 14/19] leds: lp5523: Update the lp5523 code to add multicolor brightness function Date: Thu, 14 Nov 2019 07:30:18 -0600 Message-ID: <20191114133023.32185-15-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191114133023.32185-1-dmurphy@ti.com> References: <20191114133023.32185-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add the multicolor brightness call back to support the multicolor framework. This call back allows setting brightness on grouped channels in a single function. Signed-off-by: Dan Murphy --- drivers/leds/leds-lp5523.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index b076c16df9ab..609288077917 100644 --- a/drivers/leds/leds-lp5523.c +++ b/drivers/leds/leds-lp5523.c @@ -791,6 +791,25 @@ static ssize_t store_master_fader_leds(struct device *dev, return ret; } +static int lp5523_multicolor_brightness(struct lp55xx_led *led) +{ + struct lp55xx_chip *chip = led->chip; + int ret; + int i; + + mutex_lock(&chip->lock); + for (i = 0; i < led->mc_cdev.num_leds; i++) { + ret = lp55xx_write(chip, + LP5523_REG_LED_PWM_BASE + + led->color_components[i].output_num, + led->color_components[i].brightness); + if (ret) + break; + } + mutex_unlock(&chip->lock); + return ret; +} + static int lp5523_led_brightness(struct lp55xx_led *led) { struct lp55xx_chip *chip = led->chip; @@ -857,6 +876,7 @@ static struct lp55xx_device_config lp5523_cfg = { .max_channel = LP5523_MAX_LEDS, .post_init_device = lp5523_post_init_device, .brightness_fn = lp5523_led_brightness, + .multicolor_brightness_fn = lp5523_multicolor_brightness, .set_led_current = lp5523_set_led_current, .firmware_cb = lp5523_firmware_loaded, .run_engine = lp5523_run_engine, From patchwork Thu Nov 14 13:30:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 179424 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp11064890ilf; Thu, 14 Nov 2019 05:32:46 -0800 (PST) X-Google-Smtp-Source: APXvYqzG0pmwbMuPGEAvduHk+6veDCr4uMLLi61qENFF2jObUE91EbE/g8TITR3LI9AAtIHdwoDy X-Received: by 2002:a50:ef17:: with SMTP id m23mr1244695eds.81.1573738366174; Thu, 14 Nov 2019 05:32:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573738366; cv=none; d=google.com; s=arc-20160816; b=z7F9nk4a6cq9p3yCAcxMNOIJJ8lpxs9yKotOWikY4Jb5EkWEhz8/8uXEEL2DZ3SVJN wwh7ywIK350Hv0xrEHE9Wd9OnGMhug3T3zo9m5ecmmhqfcecLlCA2ykBiOB+Dz5amzEr jaTPDTkswAUQFIS5xPnFZmKK7ajxudRxL+QEn0SJvj3JuBObTJBJE6wEcC6p1Dc61Q1e cS+4msLGaE1H9dwRgbvL3QfigNWrUXqbjxuUf9L3zk0HMdgptKdKKjWCLuizU4e/jY2O 32I40weTzwkEzkWzrqIjHFWgv0HYmup4XZxBxP8JzcECmcN6kUldGn03U+wC/zKC3/ez +rsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5oPRgd9y4fLZAUSx3Us0YBQ1cAUc/cf63XhWxENhBFk=; b=A2cOK/7DyujYZxnqiGX7rpUrZQT5EPBc+UT5GNvf7iHWHjg810yqhHbS2CjphfBJjH Hd4iH8tllYIDV4nkrZc2L5Q003MmV72OaVWKrYGf/O0hr8Tq8xfL4HPrMK9X+F8/Q9my Ci07tMaP8gc8oPPbdFhfWUSMEkEoOVQf4QIVguJwqzgnD0CRkh1MvW3qsRt/OxdOKBRX LtQju5/v0gsP9VCmz1YVYyzG5AFOI4AY5QcIw5ofmk0U84NaK9rbTrqRs7toPc01zHWx l9bjnazH+of0j5ewOVMK0zXGpatYhNezVdZrLqlgLTiQ74Gws46dwk0QqMxPFWF2GI2I 2xmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZaMJK7yj; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id la4si3457370ejb.297.2019.11.14.05.32.46; Thu, 14 Nov 2019 05:32:46 -0800 (PST) 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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZaMJK7yj; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727217AbfKNNcn (ORCPT + 1 other); Thu, 14 Nov 2019 08:32:43 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:48226 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726980AbfKNNcn (ORCPT ); Thu, 14 Nov 2019 08:32:43 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAEDWeYA007676; Thu, 14 Nov 2019 07:32:40 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573738360; bh=5oPRgd9y4fLZAUSx3Us0YBQ1cAUc/cf63XhWxENhBFk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ZaMJK7yjSnY+/X3mdQThJ1etWwZ4VdMxwEt0ZRE8JeW3TWs4nBsv+dW4JKDx37wD0 LlHpBfGk9Ta0OYRPqFtXx1X9pYsjJjTp4mc0M9wfSAz3CBttBsVacvcnsdMXdgNrGZ axxkGCyv/1b63YnXAbun2BoNJufiBpjpkAUipA9Q= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAEDWe1E064188 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Nov 2019 07:32:40 -0600 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 14 Nov 2019 07:32:40 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 14 Nov 2019 07:32:40 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAEDWdi7081228; Thu, 14 Nov 2019 07:32:39 -0600 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v17 15/19] leds: lp5521: Add multicolor framework multicolor brightness support Date: Thu, 14 Nov 2019 07:30:19 -0600 Message-ID: <20191114133023.32185-16-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191114133023.32185-1-dmurphy@ti.com> References: <20191114133023.32185-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add the multicolor brightness call back to support the multicolor framework. This function allows setting the brightness across grouped LED channels in a single call. Signed-off-by: Dan Murphy --- drivers/leds/leds-lp5521.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index 6ff81d6be789..f8bdd55e8349 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c @@ -349,6 +349,25 @@ static int lp5521_run_selftest(struct lp55xx_chip *chip, char *buf) return 0; } +static int lp5521_multicolor_brightness(struct lp55xx_led *led) +{ + struct lp55xx_chip *chip = led->chip; + int ret; + int i; + + mutex_lock(&chip->lock); + for (i = 0; i < led->mc_cdev.num_leds; i++) { + ret = lp55xx_write(chip, + LP5521_REG_LED_PWM_BASE + + led->color_components[i].output_num, + led->color_components[i].brightness); + if (ret) + break; + } + mutex_unlock(&chip->lock); + return ret; +} + static int lp5521_led_brightness(struct lp55xx_led *led) { struct lp55xx_chip *chip = led->chip; @@ -490,6 +509,7 @@ static struct lp55xx_device_config lp5521_cfg = { .max_channel = LP5521_MAX_LEDS, .post_init_device = lp5521_post_init_device, .brightness_fn = lp5521_led_brightness, + .multicolor_brightness_fn = lp5521_multicolor_brightness, .set_led_current = lp5521_set_led_current, .firmware_cb = lp5521_firmware_loaded, .run_engine = lp5521_run_engine, From patchwork Thu Nov 14 13:30:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 179426 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp11065069ilf; Thu, 14 Nov 2019 05:32:54 -0800 (PST) X-Google-Smtp-Source: APXvYqxAOVKeZIsqQWdm2/vhQC5CxWrFsnN/t2NtXjGJOMXdCQkBJuehS1OMQmp7womDpeQA0kF6 X-Received: by 2002:aa7:cf8b:: with SMTP id z11mr1262932edx.294.1573738374777; Thu, 14 Nov 2019 05:32:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573738374; cv=none; d=google.com; s=arc-20160816; b=UsdoQ8DehFnexp/4DSnFfK3CeLv8jcEYUi4hYYSuDpfTfYM771G1emXFgaW7Fzarpi ZEppnPXmZCCGS7bOqudQ5VMT0x+r17qJQUJ236PsPBiJX9AKYZ48sbq/SKxUxoKgvwvP o+oNI4hxlCzqvUmHapa2Zut466aWInP63qlZ/IRkCcwT+QvzmsQaPLRhLYKy/E6CndTD jocbdbtBqK/CDAMnh7TR0S463bfWX5NEEnp0wn4lLe03HIAxCIENkUJ/ySXmhCjBBds+ 6PJ26oPDtk6k7ztroq8gBf5dp3ELs6F3ikpUH7ie3MC1ZP0f5aB6ltsEe4Vo4LJnKgGC h1/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NQIDcyaqyTtBOLVrg500yyWcRWTyZF2LrgrP3Wcd470=; b=jgMnZl43pa5xtBZM4uL6cPESx85VumQhTUuagVEmEvseOgettL1GJxElkN6min5of1 0NVxn1i9YQglVOE6yvCDWqe1o3UWqiyHffM171+99xRwRDjOf8Ilx5N9u/u1rpEjpHB4 NLALwFUtgxwRej2Pz4rjPutOMuYN1OVgyWUfgpfRHW7OIytWWqx0lo/LOUKJjlpgH9SK 5e5c6Wcrchl4LFQ36TFgLmxRev9B5LlpZGCbI87nop9KljrekCepE0PbXSZ0DcaRHw53 0zfKlsES1tZsivEFgB//8IA8vjKkgEpmAHW6FOAO85putIfXjTEkHzISyoG8P2oTs4AY hivw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ood9URs0; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m4si3212156eja.96.2019.11.14.05.32.54; Thu, 14 Nov 2019 05:32:54 -0800 (PST) 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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ood9URs0; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726818AbfKNNcy (ORCPT + 1 other); Thu, 14 Nov 2019 08:32:54 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:40660 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726980AbfKNNcx (ORCPT ); Thu, 14 Nov 2019 08:32:53 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAEDWomW103943; Thu, 14 Nov 2019 07:32:50 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573738370; bh=NQIDcyaqyTtBOLVrg500yyWcRWTyZF2LrgrP3Wcd470=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ood9URs003ONQbpL3uGluUpWlZ1s7lJtaVT0jDY7I8+kf1hKR7iFqz7raPWUKmtv2 BCgTVRW29rr8Vl5eaXUAveNOxyC8slWIyE7dDn8u9z0ZTcKCBGJPk9hA3WlY71mmnq GQ95I144liru4TB44N+ogCmjlYiMmRh1kVhdeV+I= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAEDWo3U020956 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Nov 2019 07:32:50 -0600 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 14 Nov 2019 07:32:50 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 14 Nov 2019 07:32:50 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAEDWoj4092464; Thu, 14 Nov 2019 07:32:50 -0600 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v17 17/19] leds: lp5523: Fix checkpatch issues in the code Date: Thu, 14 Nov 2019 07:30:21 -0600 Message-ID: <20191114133023.32185-18-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191114133023.32185-1-dmurphy@ti.com> References: <20191114133023.32185-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Fix checkpatch errors and warnings for the LP5523.c device driver. Signed-off-by: Dan Murphy --- drivers/leds/leds-lp5523.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) -- 2.22.0.214.g8dca754b1e Acked-by: Pavel Machek diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index 609288077917..cb402b5b4495 100644 --- a/drivers/leds/leds-lp5523.c +++ b/drivers/leds/leds-lp5523.c @@ -23,13 +23,13 @@ #define LP5523_PROGRAM_LENGTH 32 /* bytes */ /* Memory is used like this: - 0x00 engine 1 program - 0x10 engine 2 program - 0x20 engine 3 program - 0x30 engine 1 muxing info - 0x40 engine 2 muxing info - 0x50 engine 3 muxing info -*/ + * 0x00 engine 1 program + * 0x10 engine 2 program + * 0x20 engine 3 program + * 0x30 engine 1 muxing info + * 0x40 engine 2 muxing info + * 0x50 engine 3 muxing info + */ #define LP5523_MAX_LEDS 9 /* Registers */ @@ -326,7 +326,7 @@ static int lp5523_update_program_memory(struct lp55xx_chip *chip, const u8 *data, size_t size) { u8 pattern[LP5523_PROGRAM_LENGTH] = {0}; - unsigned cmd; + unsigned int cmd; char c[3]; int nrchars; int ret; @@ -468,6 +468,7 @@ static int lp5523_mux_parse(const char *buf, u16 *mux, size_t len) static void lp5523_mux_to_array(u16 led_mux, char *array) { int i, pos = 0; + for (i = 0; i < LP5523_MAX_LEDS; i++) pos += sprintf(array + pos, "%x", LED_ACTIVE(led_mux, i)); @@ -506,7 +507,7 @@ static int lp5523_load_mux(struct lp55xx_chip *chip, u16 mux, int nr) if (ret) return ret; - ret = lp55xx_write(chip, LP5523_REG_PROG_MEM , (u8)(mux >> 8)); + ret = lp55xx_write(chip, LP5523_REG_PROG_MEM, (u8)(mux >> 8)); if (ret) return ret; From patchwork Thu Nov 14 13:30:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 179428 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp11065350ilf; Thu, 14 Nov 2019 05:33:09 -0800 (PST) X-Google-Smtp-Source: APXvYqwut6ZGilzRcmTDcqgaxTphjAG3430DUG9rkrgkaKDMbRaommvF09gir5gv+8HPXRkfkcZV X-Received: by 2002:a17:906:6d59:: with SMTP id a25mr8557272ejt.57.1573738389499; Thu, 14 Nov 2019 05:33:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573738389; cv=none; d=google.com; s=arc-20160816; b=W163/eTnZS6hzRdr2HhVU6ZhVOUQ0ps7VYhWfUYrQKUJ5+wdLU3DTYGH/4GpxR+BD8 DCJeLY+JVYl7COzHxaGHTxQRCbQ1FTxhuKj9OvhPncKxwltr7fsIgXdwoTJYx9J/Sh9X u0S2YZCELA0CFpw6Ej2Spf3OXeYcriL2qg8URjfTjYitxwMu0PiNg8KYT7b+7p7QKPTG b4DXn58SrOpNrYYAkAToaFL9YFToLodyfGOcJm4Dcm+UzbyQ9fePAuMbAvBBnquhbCH7 YFLY153RfdjIe1DgkJgmfJyYPgNYZOgZmjPABmVJJSaS1oCiG5udH8Glf8RcY0Tqh5V+ ZzSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EJK//JMShkFomcxIL7CoEODYJVjSFbKnvbLo+tDSL6s=; b=rO+6aAJjViLAkJs13fDgyWM4X//TmDLLbV/xUR1eIEAQgSgIfO3DmptSlodGJ45JE+ +A2dfasXBct5E2Piiyh5xxoui9MWw5Jx0vbAhL4a4VBaUYggR+HcW4xwXUyTSr5mRGwt b6BtQDJ1qWZTm/zT3y1RSQAHHW1hwwtHwo4wFzgZqWedZ5FZIqBo5BWGCJaX8872vrS2 vPdJi/JkrUvv8nX7DH16Rozp8lygRDpdck1NtWaXon9PUX9URHTjc9XIfCUQmYeff2He IL4j3Cy03264XrD8YDtbmAYaPLPRi5yxufYA21M9RGO/KfxVqvjdxaledcbLqIeDO6IO i9oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=DVeJPP44; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k24si3928643edk.367.2019.11.14.05.33.09; Thu, 14 Nov 2019 05:33:09 -0800 (PST) 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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=DVeJPP44; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726567AbfKNNdJ (ORCPT + 1 other); Thu, 14 Nov 2019 08:33:09 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:58204 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726597AbfKNNdI (ORCPT ); Thu, 14 Nov 2019 08:33:08 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAEDWuSo096871; Thu, 14 Nov 2019 07:32:56 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573738376; bh=EJK//JMShkFomcxIL7CoEODYJVjSFbKnvbLo+tDSL6s=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=DVeJPP44Yishyv1UK8GOxt4ZdDU0NOfZJoyarCpgptvH6TNGzZ4Spta7T/YWJtFLA 2KCznQnZU4KgaccNrqPuY15Mi7VEIW/cYvhprGoOfWhPK/Ig51Pfmd6B/WvtZIwa0F bCjY/rOd76BxGgF1CtGCgDk9SXBj9cP6KXuDAgJk= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAEDWurY069919; Thu, 14 Nov 2019 07:32:56 -0600 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 14 Nov 2019 07:32:55 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 14 Nov 2019 07:32:55 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAEDWtGp037296; Thu, 14 Nov 2019 07:32:55 -0600 From: Dan Murphy To: , CC: , , Dan Murphy , Rob Herring , Tony Lindgren , =?utf-8?q?Beno=C3=AEt_Cousson?= , Linus Walleij , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Subject: [PATCH v17 18/19] dt: bindings: Update lp55xx binding to recommended LED naming Date: Thu, 14 Nov 2019 07:30:22 -0600 Message-ID: <20191114133023.32185-19-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191114133023.32185-1-dmurphy@ti.com> References: <20191114133023.32185-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Update the LP55xx DT binding examples to the recommended node naming convention. There are no changes to the DT properties. Signed-off-by: Dan Murphy CC: Rob Herring CC: Tony Lindgren CC: "Benoît Cousson" CC: Linus Walleij CC: Shawn Guo CC: Sascha Hauer CC: Pengutronix Kernel Team CC: Fabio Estevam CC: NXP Linux Team --- .../devicetree/bindings/leds/leds-lp55xx.txt | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) -- 2.22.0.214.g8dca754b1e Acked-by: Pavel Machek diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt index 0ccc1efc2499..5475f45ef51f 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt @@ -48,7 +48,7 @@ example 1) LP5521 'lp5521_pri:channel1' and 'lp5521_pri:channel2', with a heartbeat trigger on channel 0. -lp5521@32 { +led-controller@32 { #address-cells = <1>; #size-cells = <0>; compatible = "national,lp5521"; @@ -56,20 +56,20 @@ lp5521@32 { label = "lp5521_pri"; clock-mode = /bits/ 8 <2>; - chan@0 { + led@0 { reg = <0>; led-cur = /bits/ 8 <0x2f>; max-cur = /bits/ 8 <0x5f>; linux,default-trigger = "heartbeat"; }; - chan@1 { + led@1 { reg = <1>; led-cur = /bits/ 8 <0x2f>; max-cur = /bits/ 8 <0x5f>; }; - chan@2 { + led@2 { reg = <2>; led-cur = /bits/ 8 <0x2f>; max-cur = /bits/ 8 <0x5f>; @@ -88,70 +88,70 @@ ASEL1 ASEL0 Address VEN GND 34h VEN VEN 35h -lp5523@32 { +led-controller@32 { #address-cells = <1>; #size-cells = <0>; compatible = "national,lp5523"; reg = <0x32>; clock-mode = /bits/ 8 <1>; - chan@0 { + led@0 { reg = <0>; chan-name = "d1"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@1 { + led@1 { reg = <1>; chan-name = "d2"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@2 { + led@2 { reg = <2>; chan-name = "d3"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@3 { + led@3 { reg = <3>; chan-name = "d4"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@4 { + led@4 { reg = <4>; chan-name = "d5"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@5 { + led@5 { reg = <5>; chan-name = "d6"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@6 { + led@6 { reg = <6>; chan-name = "d7"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@7 { + led@7 { reg = <7>; chan-name = "d8"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@8 { + led@8 { reg = <8>; chan-name = "d9"; led-cur = /bits/ 8 <0x14>; @@ -162,35 +162,35 @@ lp5523@32 { example 3) LP5562 4 channels are defined. -lp5562@30 { +led-controller@30 { #address-cells = <1>; #size-cells = <0>; compatible = "ti,lp5562"; reg = <0x30>; clock-mode = /bits/8 <2>; - chan@0 { + led@0 { reg = <0>; chan-name = "R"; led-cur = /bits/ 8 <0x20>; max-cur = /bits/ 8 <0x60>; }; - chan@1 { + led@1 { reg = <1>; chan-name = "G"; led-cur = /bits/ 8 <0x20>; max-cur = /bits/ 8 <0x60>; }; - chan@2 { + led@2 { reg = <2>; chan-name = "B"; led-cur = /bits/ 8 <0x20>; max-cur = /bits/ 8 <0x60>; }; - chan@3 { + led@3 { reg = <3>; chan-name = "W"; led-cur = /bits/ 8 <0x20>; @@ -202,7 +202,7 @@ example 4) LP8501 9 channels are defined. The 'pwr-sel' is LP8501 specific property. Others are same as LP5523. -lp8501@32 { +led-controller@32 { #address-cells = <1>; #size-cells = <0>; compatible = "ti,lp8501"; @@ -210,63 +210,63 @@ lp8501@32 { clock-mode = /bits/ 8 <2>; pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */ - chan@0 { + led@0 { reg = <0>; chan-name = "d1"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@1 { + led@1 { reg = <1>; chan-name = "d2"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@2 { + led@2 { reg = <2>; chan-name = "d3"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@3 { + led@3 { reg = <3>; chan-name = "d4"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@4 { + led@4 { reg = <4>; chan-name = "d5"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@5 { + led@5 { reg = <5>; chan-name = "d6"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@6 { + led@6 { reg = <6>; chan-name = "d7"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@7 { + led@7 { reg = <7>; chan-name = "d8"; led-cur = /bits/ 8 <0x14>; max-cur = /bits/ 8 <0x20>; }; - chan@8 { + led@8 { reg = <8>; chan-name = "d9"; led-cur = /bits/ 8 <0x14>; From patchwork Thu Nov 14 13:30:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 179427 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp11065264ilf; Thu, 14 Nov 2019 05:33:05 -0800 (PST) X-Google-Smtp-Source: APXvYqw6PmyZRO/u1lI3HZ7MSyzz2AJqdR9VX2AUxf2V9rpRpylq9jHwvFw6xkqSNA1Kd5i8Nk/L X-Received: by 2002:a50:8a88:: with SMTP id j8mr1299879edj.35.1573738385236; Thu, 14 Nov 2019 05:33:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573738385; cv=none; d=google.com; s=arc-20160816; b=oLHAjnP6X9LVA2XUgvtYZuiDx5MLr3EKb2tkH47u3oMUd0S3lns4sK2TB8s89jBOXM YHPGBPNy9s8Mdxh9DbJZD2bucFT3ibQb2tcI7uODS3wgc6usttpefUjOwjOh+mmX8byg U0wC+4+SKbKC9hSlakmp5AGf6qvzW0Xxo1bwgWNyJ0+afz6eClGI32y7Qry5Qi62L4Sv TK28xRYZRJ0k4QlS9zPvFRzi7KyykIpEfL8dIsfEzEVHewX6RwQMpkZe0mVot3HHMx2/ usFc3OJBVS4mfh2iPoMWhvfauxtyJ3HEi+KG+Zcm1RWhrheD/v0JVvhl6zgbzDQMw2qC q1wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CiO3hXAyFsuZm3cE8SXZzPxL1D+KaY4p9kZlHGgSu6M=; b=pVYIhNFkH/3qaW8X8BGXC8vP4oEuwvZw0mWRJ+gZDdmMtmYpK6QUxqp9VYgRa6AlZ2 XPyI7TdJxDr2F2u3T1A01oOLiWi9Tq9nuvLSXyRDAnCIDt5C+cH/1paZ16/GggxZWhy4 N/iC3warmrtScLMPDfRwvppKAS05hz0XY3D+B+Cpv9CcMluhgch40rqwA2TXJ8AF15KR Uj4oeY7glcRH0jCtgkuWlQV6AOL1SuEUrdNSC6NBolldIqQVXXA5sj7zR50JXgEjbV3q NBM1Z7fn/Iw80wj1QYAfk3IlFSbWaDuu3F7bw5H8ixAI0qXc7/Wt8ICyIbEt+2qeZ7c5 Kyog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XAsKkLwm; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z5si3274721ejm.51.2019.11.14.05.33.05; Thu, 14 Nov 2019 05:33:05 -0800 (PST) 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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XAsKkLwm; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726678AbfKNNdE (ORCPT + 1 other); Thu, 14 Nov 2019 08:33:04 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:40686 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726597AbfKNNdE (ORCPT ); Thu, 14 Nov 2019 08:33:04 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAEDX1D2103984; Thu, 14 Nov 2019 07:33:01 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573738381; bh=CiO3hXAyFsuZm3cE8SXZzPxL1D+KaY4p9kZlHGgSu6M=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=XAsKkLwmCbmrSZz0qqZ0uybtWehg+lTyb1r46JXCpf9lgI5tVmRgRRzRHFz1slhoM yvRufn4r7cDpQv1CXaWfSVWmEUF03HAlXf3JFJyAa+uZb1pxvaYJjtV0UnjxVudAZX TtonYgoPxdE0w4rwls5NrHYq5it/vqrmgDqm0DYk= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAEDX1Un064593 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Nov 2019 07:33:01 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 14 Nov 2019 07:33:01 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 14 Nov 2019 07:33:01 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAEDX1uP081637; Thu, 14 Nov 2019 07:33:01 -0600 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v17 19/19] leds: lp55xx-common: Remove extern from lp55xx-common header Date: Thu, 14 Nov 2019 07:30:23 -0600 Message-ID: <20191114133023.32185-20-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191114133023.32185-1-dmurphy@ti.com> References: <20191114133023.32185-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org extern is implied and is not needed in the common header file. Remove the extern keyword and re-align the code. Signed-off-by: Dan Murphy --- drivers/leds/leds-lp55xx-common.h | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/leds-lp55xx-common.h b/drivers/leds/leds-lp55xx-common.h index 18476051d3d2..051f8b33c601 100644 --- a/drivers/leds/leds-lp55xx-common.h +++ b/drivers/leds/leds-lp55xx-common.h @@ -183,29 +183,27 @@ struct lp55xx_led { }; /* register access */ -extern int lp55xx_write(struct lp55xx_chip *chip, u8 reg, u8 val); -extern int lp55xx_read(struct lp55xx_chip *chip, u8 reg, u8 *val); -extern int lp55xx_update_bits(struct lp55xx_chip *chip, u8 reg, - u8 mask, u8 val); +int lp55xx_write(struct lp55xx_chip *chip, u8 reg, u8 val); +int lp55xx_read(struct lp55xx_chip *chip, u8 reg, u8 *val); +int lp55xx_update_bits(struct lp55xx_chip *chip, u8 reg, u8 mask, u8 val); /* external clock detection */ -extern bool lp55xx_is_extclk_used(struct lp55xx_chip *chip); +bool lp55xx_is_extclk_used(struct lp55xx_chip *chip); /* common device init/deinit functions */ -extern int lp55xx_init_device(struct lp55xx_chip *chip); -extern void lp55xx_deinit_device(struct lp55xx_chip *chip); +int lp55xx_init_device(struct lp55xx_chip *chip); +void lp55xx_deinit_device(struct lp55xx_chip *chip); /* common LED class device functions */ -extern int lp55xx_register_leds(struct lp55xx_led *led, - struct lp55xx_chip *chip); +int lp55xx_register_leds(struct lp55xx_led *led, struct lp55xx_chip *chip); /* common device attributes functions */ -extern int lp55xx_register_sysfs(struct lp55xx_chip *chip); -extern void lp55xx_unregister_sysfs(struct lp55xx_chip *chip); +int lp55xx_register_sysfs(struct lp55xx_chip *chip); +void lp55xx_unregister_sysfs(struct lp55xx_chip *chip); /* common device tree population function */ -extern struct lp55xx_platform_data -*lp55xx_of_populate_pdata(struct device *dev, struct device_node *np, - struct lp55xx_chip *chip); +struct lp55xx_platform_data *lp55xx_of_populate_pdata(struct device *dev, + struct device_node *np, + struct lp55xx_chip *chip); #endif /* _LEDS_LP55XX_COMMON_H */