From patchwork Wed Oct 16 15:59:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 176496 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7571598ill; Wed, 16 Oct 2019 09:00:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCM71dv7hW+a46KL9mxzYuFBFLSYdldEMOghBFdKRrSssdcycjE/arqebNwtGnNAWbaUCv X-Received: by 2002:a17:906:29db:: with SMTP id y27mr41087763eje.185.1571241634018; Wed, 16 Oct 2019 09:00:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571241634; cv=none; d=google.com; s=arc-20160816; b=l22pcdxXE4Uf4pDoiRB3xh+I39AbR9oINNDQxoNQ7B4PC8ns/upZPpF5LTHK1Kl2PS RnGjV0g6tZxKx+KIJ/qfMgjVlnAQ+M3CPPLgwNANiIgt4D84jrY7KEQuEPcC3Ea0C2bS RJST7+f9ystdycUUY5MlkeFM7C3i98ITm3uEYQ+DnEeHvJyKD41is824RlXY9gmrF1yJ BEaVdvqi8YJfO3Tzo5n7MyCgCvreiCnNQ9gZjmDGvHZy6FT7bDMEgntQfFEaubcUbIuM 7K+RLuIsNBkD+o1j/wnpWH0FaSCRPa4n1aAFmDz3PxdkbiTlaoPVn6kt/+OjMfkY678g tB+Q== 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=vNLixCA7rV3r89geVpDyZT2afzJln66pkNhtKdigswM=; b=PTi6h2JxUFdCR/xXhs0/6MdI+FXXOYTH46iIir3soi1UE6IVFjpMZ2abhZX6GL1J48 vbVSJmkLH1Ybz/XOzZEB0PUbnHzi2Ii/P6hK3awWE7x3vwVRWdJC2Qi1Nn1eIK1oS/qV xFGGK0eXHkNRj3KNIiuzhcSgD4BtLqi1duQylHCD5zWKejSuxmUawN9uRTr0V8qCw7wU P8Rq3n4zxjSdAfHH57kA/LQUT1MgDNXf1D1CTozb0W5+cT0iy1ps7skBppCwFL8f+3xd Xok+0eZplvJhxvwPQjdHWOhVKGu1YEaIllvv+nMOwCeN0dFy0syLJhppWb3ew1qNygZY 0ssg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=PSpRd0tq; 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 q5si14847049ejb.174.2019.10.16.09.00.33; Wed, 16 Oct 2019 09:00:33 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=PSpRd0tq; 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 S2393110AbfJPQAd (ORCPT + 1 other); Wed, 16 Oct 2019 12:00:33 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:55590 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393088AbfJPQAd (ORCPT ); Wed, 16 Oct 2019 12:00:33 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9GG0TPm039190; Wed, 16 Oct 2019 11:00:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571241629; bh=vNLixCA7rV3r89geVpDyZT2afzJln66pkNhtKdigswM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=PSpRd0tqdhf9/cOr/g2ZS4LVtbetYfZpURTN3ddnmEKPmnrsSsFoczQmXXxx0yxLy jBXngjMMxL2B710l0ygoBsh4wAF6RvW8aI0vuHScFq3cJgYkp7ihcAKnLGmGc4YWCi YfAbwHEBeqaF7w0xv91t+AEeNuLeKwGOViaNnMEc= 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 x9GG0TfJ094765 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 16 Oct 2019 11:00:29 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) 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.1713.5; Wed, 16 Oct 2019 11:00:22 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 16 Oct 2019 11:00:22 -0500 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 x9GG0Tnj061705; Wed, 16 Oct 2019 11:00:29 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v13 03/18] leds: Add multicolor ID to the color ID list Date: Wed, 16 Oct 2019 10:59:39 -0500 Message-ID: <20191016155954.29044-4-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191016155954.29044-1-dmurphy@ti.com> References: <20191016155954.29044-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 --- drivers/leds/led-core.c | 1 + 1 file changed, 1 insertion(+) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c index f1f718dbe0f8..846248a0693d 100644 --- a/drivers/leds/led-core.c +++ b/drivers/leds/led-core.c @@ -34,6 +34,7 @@ const char * const led_colors[LED_COLOR_ID_MAX] = { [LED_COLOR_ID_VIOLET] = "violet", [LED_COLOR_ID_YELLOW] = "yellow", [LED_COLOR_ID_IR] = "ir", + [LED_COLOR_ID_MULTI] = "multicolor", }; EXPORT_SYMBOL_GPL(led_colors); From patchwork Wed Oct 16 15:59:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 176497 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7571633ill; Wed, 16 Oct 2019 09:00:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZ7AYtdwoqb2baOi5QQFkH7IkgZbBc8XOS4exFH99h746mkHwztD28rNW2phl9LAk7PwAa X-Received: by 2002:a17:907:4090:: with SMTP id nt24mr4019648ejb.122.1571241635203; Wed, 16 Oct 2019 09:00:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571241635; cv=none; d=google.com; s=arc-20160816; b=qp2d8CNqfiuiOv79yZLqR4xLJl5l72w15opJZPfwj6NBm/Y4OS7cEB/wiwH+v7HuGk b5SVOfTPYpZUTLaZMPJkOyfWcT0WvT2bY8AQpkxruqKuttaHh8LbNLui18CMr7OvnkMj +x4f10DH8d/nEXtuGB21+ux/2pfWd3BaeAJHMp4QB1ZU+ZgZ3JL9UP5G1Xd7zmGnaIX+ 3qGfeXj0zh7MN2zEDsI3ippcOACcAOnCjs3QoQMIDrXUShToY8vURc8lWIwJ7TXXjTPL mpBZll/n/XIb/dWFJXFIOX95Xh9IGKwUt/p3FItExAO0kRjxqKC0Kv5BK3GcPP9X40uf Cwqg== 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=Z3+DeuUufWSXxrYn+p3pdikwZRDvfcfdNVr2Qn+E6S0=; b=Bi84GMOsplwFHzz1RNz1v0vtgPI66n27iAuvQeEPf7q2ia8isk/5HPXWIwbK+k2SxV GrGiw6TM8r3fAuI8JXKYSVKo08aQ37HDsa3V+gwzcovf5OTnzKl/jT3Ymz+NihcFKEyJ I3+h+8yQG3cr7AeFWCOp5S4Ckx6iMH0hRzK0NEQSX/rRn6cYqzumogLx6Yd5ezUc2cvC ikJ9rdjhRuvRViHa+b2/+gK4f7Rv8kkHWzF74b7nZo1qACS7iRGIatBlPutmu93DjtU0 eWBMd8H9K/ngfCxom1DsXrHUafWibAp5/R8UHcfHO4n+n7W1KAqxDGNduSC2yiF07h2P IVNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="ehEm/nIg"; 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 q5si14847049ejb.174.2019.10.16.09.00.34; Wed, 16 Oct 2019 09:00:35 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="ehEm/nIg"; 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 S2393149AbfJPQAe (ORCPT + 1 other); Wed, 16 Oct 2019 12:00:34 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:55608 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393130AbfJPQAe (ORCPT ); Wed, 16 Oct 2019 12:00:34 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9GG0UwQ039205; Wed, 16 Oct 2019 11:00:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571241630; bh=Z3+DeuUufWSXxrYn+p3pdikwZRDvfcfdNVr2Qn+E6S0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ehEm/nIgts31HX6T4ZaWUs/N+VfYgSq4nBluAxiA7lNELieRyvSwIv2R7gBxW7i2m +PwTHhSDZmqs97fvOIbqiRcYj2IMYXiaSW9k1imGuHj4tLXRK5DsBj8vJ0B1EDZFqB 4bwqxW/lQW/a1PKlbOcz06ptKViamp1vmZQrviZE= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9GG0Uj8126257 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 16 Oct 2019 11:00:30 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 16 Oct 2019 11:00:23 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 16 Oct 2019 11:00:30 -0500 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 x9GG0TWS061730; Wed, 16 Oct 2019 11:00:30 -0500 From: Dan Murphy To: , CC: , , Dan Murphy , Rob Herring Subject: [PATCH v13 07/18] dt: bindings: lp55xx: Be consistent in the document with LED acronym Date: Wed, 16 Oct 2019 10:59:43 -0500 Message-ID: <20191016155954.29044-8-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191016155954.29044-1-dmurphy@ti.com> References: <20191016155954.29044-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 document to be consistent in case when using "LED". This acronym should be capital throughout the document. Signed-off-by: Dan Murphy CC: Rob Herring --- Documentation/devicetree/bindings/leds/leds-lp55xx.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 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 1b66a413fb9d..bfe2805c5534 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt @@ -1,4 +1,4 @@ -Binding for TI/National Semiconductor LP55xx Led Drivers +Binding for TI/National Semiconductor LP55xx LED Drivers Required properties: - compatible: one of @@ -12,8 +12,8 @@ Required properties: - clock-mode: Input clock mode, (0: automode, 1: internal, 2: external) 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. +- led-cur: Current setting at each LED channel (mA x10, 0 if LED is not connected) +- max-cur: Maximun current at each LED channel. Optional properties: - enable-gpio: GPIO attached to the chip's enable pin From patchwork Wed Oct 16 15:59:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 176505 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7572194ill; Wed, 16 Oct 2019 09:00:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKyYO2dbBmeWAfNjAbt7yT2gj4Xizv4s6/sqZc+R/J8sZC+u0dgQQPVxmOgni9LRg3dBGY X-Received: by 2002:a17:906:af46:: with SMTP id ly6mr41711275ejb.330.1571241654506; Wed, 16 Oct 2019 09:00:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571241654; cv=none; d=google.com; s=arc-20160816; b=NcaoqmRmlkfOoSJfaj6PXj/4lXLAFLhbzqLwRSCUG2YyH3yC9xAIrhYFjhlNlyJD+j aN30irHe80YWXUf9MvEIsPvHemW67TSruygGKirXcuCbjFGVDoLsaW/IPvcDgax9x8bG Do9ebcTgtCbBnNG88YxdYbBFtpS2gVbYW75x0fO21NK0fzDNV0CbgHtyKduqEmTBOI/R sufWSperCuxF4+9jiJ9RstlNPCS7Q+J9QSm+GVO/LV7eXy/q1rjryaDU7ybDYvp0M1TT gzH/QD5vnorYQbE6ICVS0khDjHF8YH2xDkeLHUHPK6CphVuYu/VDKPfry3sz0GdRl4Jy Iy/g== 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=NUfH3N12uEezJmujhnWIhn+Olm91ldYuNmtZUl5JRSM=; b=AQCSC7s8dW+ykkQop3mztbZEVmIYTWAGnkuZHz3b8A4yya2W786OtRl17lFtYSmmba 35TNhsNiE+Xcq9RWQKBSim4YAmbRGe5GeJyU4YpNaGU65TMxqdcqe8W9SWLGas4V7eQL RY+cCBUT5ttCaXF9y1aU35ktw776ML1H856DKsPeMX0bAuuyokyqk5RHnKWQQcv8cRNB S+R6zsP68UIZBtu/HCyyDhNF7ty6WjPiXXNeUQFQPZFLOu+SzMWPq57NzgI+scJFMhbW NOdcIWFhp3oifqz8LyNqXp6KjqJEonvBBA5Oaqij6FcIj2527vrcoxO1CHOfKePbD8R9 7AXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=wZRFrlfg; 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 f45si16890422eda.345.2019.10.16.09.00.54; Wed, 16 Oct 2019 09:00:54 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=wZRFrlfg; 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 S2406026AbfJPQAx (ORCPT + 1 other); Wed, 16 Oct 2019 12:00:53 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:48486 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405997AbfJPQAp (ORCPT ); Wed, 16 Oct 2019 12:00:45 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9GG0U5S045887; Wed, 16 Oct 2019 11:00:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571241630; bh=NUfH3N12uEezJmujhnWIhn+Olm91ldYuNmtZUl5JRSM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=wZRFrlfgYy4ma1HsZZuzze1qI0U8+BQkfaTJlluyS3D6JpB3wm8Krb9iSsOADMEQj 7+NUpgv9XfhP8sBizdPCF03MbXeALHuH2jGfJXGBuSu6Lxp0suXYO/p6Ld4OH3Wzre 9xNeIXLATeyPZot2iCU9//w6TDSo/heVqfVsBMPs= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9GG0Uwt083002; Wed, 16 Oct 2019 11:00:30 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 16 Oct 2019 11:00:30 -0500 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.1713.5 via Frontend Transport; Wed, 16 Oct 2019 11:00:23 -0500 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 x9GG0UuP096975; Wed, 16 Oct 2019 11:00:30 -0500 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 , Rob Herring Subject: [PATCH v13 08/18] dt: bindings: lp55xx: Update binding for Multicolor Framework Date: Wed, 16 Oct 2019 10:59:44 -0500 Message-ID: <20191016155954.29044-9-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191016155954.29044-1-dmurphy@ti.com> References: <20191016155954.29044-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 CC: Rob Herring --- .../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 Wed Oct 16 15:59:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 176503 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7572178ill; Wed, 16 Oct 2019 09:00:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNuppuE1aww8xvcLyfD7ynFL+eA+Dzuqh0gJE5COV/O3HRdOL6pLnYpD15/o9zUpKZO9ID X-Received: by 2002:a17:906:1505:: with SMTP id b5mr41338929ejd.195.1571241654186; Wed, 16 Oct 2019 09:00:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571241654; cv=none; d=google.com; s=arc-20160816; b=wLolkrrjg0z6/fyCEsq5mloLjKD5JiXg+khKmv65h8GDNJFUlwv2GxIBciybwF3xzK vmIIvFQXYXZr44o/n4wJx2eSD4+KIGXgrCMxOEiLDnH14CcOrxTujkZvYIW2QVkDaZO0 pFX5Ihf7rHpuJAXXCg8RWx4Mna0D0O0dB4/M/CdVPgx+C0gwm9GcW8bAt+bwFd6wqTQn +gnKg4Q7gDGue+ng39kclHX2dh9zX1tlkV4hLiavvTlQrheXxhquYdVdjgzDBZv5FvRy +xMF9XysiBpQjl87W5gMgJQTNHvsEVlPT783aK4zJ4zowqp+TBHl1UJNZZQA+tOWOldB m60Q== 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=Q6v3ZsELVVFaq45xRxLW4voHJAlhEXxHc1kVNsr3mZg=; b=VrUa4uTEwDm1VPhL6V2i0e+dn5+I7aqJjf9VEwO8JwSVoffJ9tAgFxQrsJTSVCNJp5 iyQBS8bSQY84GOfOWWFeyy/AnnBhuT86/QkSU3hadlOuiy8FwiPGQjIM0+AEp1GMBBL5 vJcVjupoh7WxS/aVuqVj5G2DJZOaX6ZjWvsO17PtB5Jqfo+DOMD6dOe/PTtqwqPNJj/y GK4pZWOMpGXjV8RGPI8oQCxcLFmcZGM9u3Ms0p6MHZdbvqKh7U7hHDVoet4ISRchbUiM joJPe1fc4NeQK7m3Zf39H2nSpe0Xj3SfZjVgE5G+IDQUowqUzhqQp7OajcQWPTa03ExV DX3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dPGvinhg; 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 f45si16890422eda.345.2019.10.16.09.00.54; Wed, 16 Oct 2019 09:00:54 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dPGvinhg; 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 S2406023AbfJPQAx (ORCPT + 1 other); Wed, 16 Oct 2019 12:00:53 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:48490 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405999AbfJPQAp (ORCPT ); Wed, 16 Oct 2019 12:00:45 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9GG0Vng045891; Wed, 16 Oct 2019 11:00:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571241631; bh=Q6v3ZsELVVFaq45xRxLW4voHJAlhEXxHc1kVNsr3mZg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=dPGvinhg/Wz1zQKDCZqrteNjhujJAePGrtwfnJ3LHbBexPLAUKlCJf5BT4l9gupXC LY5J0STXtUqpfa3LkL3SUdSE3g62cOSwZuUksahgpLFfN/QTgptX7SzmGwEX1AkO1s Q725O7Lg3UmxiNhBjH48Ba7E5CtpyV5eE+r4eeX8= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9GG0Vl6094822 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 16 Oct 2019 11:00:31 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 16 Oct 2019 11:00:30 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) 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.1713.5 via Frontend Transport; Wed, 16 Oct 2019 11:00:23 -0500 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 x9GG0U8U061752; Wed, 16 Oct 2019 11:00:30 -0500 From: Dan Murphy To: , CC: , , Dan Murphy , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Subject: [PATCH v13 10/18] ARM: dts: imx6dl-yapp4: Add reg property to the lp5562 channel node Date: Wed, 16 Oct 2019 10:59:46 -0500 Message-ID: <20191016155954.29044-11-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191016155954.29044-1-dmurphy@ti.com> References: <20191016155954.29044-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 CC: Shawn Guo CC: Sascha Hauer CC: Pengutronix Kernel Team CC: Fabio Estevam CC: NXP Linux Team --- arch/arm/boot/dts/imx6dl-yapp4-common.dtsi | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/arch/arm/boot/dts/imx6dl-yapp4-common.dtsi b/arch/arm/boot/dts/imx6dl-yapp4-common.dtsi index e8d800fec637..efc466ed1fea 100644 --- a/arch/arm/boot/dts/imx6dl-yapp4-common.dtsi +++ b/arch/arm/boot/dts/imx6dl-yapp4-common.dtsi @@ -257,29 +257,35 @@ reg = <0x30>; clock-mode = /bits/ 8 <1>; status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; - chan0 { + chan@0 { chan-name = "R"; led-cur = /bits/ 8 <0x20>; max-cur = /bits/ 8 <0x60>; + reg = <0>; }; - chan1 { + chan@1 { chan-name = "G"; led-cur = /bits/ 8 <0x20>; max-cur = /bits/ 8 <0x60>; + reg = <1>; }; - chan2 { + chan@2 { chan-name = "B"; led-cur = /bits/ 8 <0x20>; max-cur = /bits/ 8 <0x60>; + reg = <2>; }; - chan3 { + chan@3 { chan-name = "W"; led-cur = /bits/ 8 <0x0>; max-cur = /bits/ 8 <0x0>; + reg = <3>; }; }; From patchwork Wed Oct 16 15:59:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 176512 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7573132ill; Wed, 16 Oct 2019 09:01:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwj7+2wO716Jut5W14eHCidKLeEhTWxKIpkjCUVTJKRJUhxPPh1TGeL0PQts6OQDtSHzsNg X-Received: by 2002:a05:6402:657:: with SMTP id u23mr40077992edx.159.1571241691680; Wed, 16 Oct 2019 09:01:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571241691; cv=none; d=google.com; s=arc-20160816; b=KF1CnfWSh47Rn2TdyqaWRZHa5XR5gsa/hy/URe+tWIye5GwBYBbtHwRX6M32PkgpcH 8shUkTbrmw5is6n/u00RDq9UA/0u9T7mYK61jlVklFDkwjKUg2MQvC4vQ7l5qeprYd1y bPGfcf83BtaJQK4FVY6/d6Pk6Z/mK7bSAyjBuN60+mEsLf3udbKyG6TFhXmOIn2ts4Ht kFVLc760vqdmmQU4WgBhh9IuEvPIYun0gRDgk2QIfEb8szcu7Pdz5vlRNnbJsZmCADqG L0Oi81xjaTguAS2xZeTgzlUY5B2Xd3nqhxj0lfvRjFmcsQAAbTsbeLFShYDvOLdNzpOE suMw== 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=95PMofJsyIEn3NAsJyz9IppOg+cVPNREQZwHO7yf3yY=; b=05F8heyWgmy+a3Elp2cdRBRRnsmqq6L74sy4Lkrvp43i8Zfx9k6+1oCabFJFjOrl/O nCnSMMN+y/QiGl0E58PzEN0oRKGYCPWjw1YQqP76G0aDS+OJIb6vAXPr0v3A2jY9dYGR pGJEFCXnfeXifWULmJbtyUyzIH+x6ySDN3s4P51h4kxl76euwVqBJQocdgQG0bwrsN4H ItarWPoLV7d+xggrLzP88tZBSbT81Nn75pMnnUkUYl4/vJsSU9mBzsPRrqJGWBGmBIpf BEhqtc+ftfvvaKtHIBDG31cFhqKWQCgmtw5LgR5JvuoGllO39rUuMLDHfsAKqy0pKwQ+ R8Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=k7rpbd5C; 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 f19si16643421edb.385.2019.10.16.09.01.31; Wed, 16 Oct 2019 09:01:31 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=k7rpbd5C; 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 S2405267AbfJPQBa (ORCPT + 1 other); Wed, 16 Oct 2019 12:01:30 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:48438 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405887AbfJPQAe (ORCPT ); Wed, 16 Oct 2019 12:00:34 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9GG0Vuj045895; Wed, 16 Oct 2019 11:00:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571241631; bh=95PMofJsyIEn3NAsJyz9IppOg+cVPNREQZwHO7yf3yY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=k7rpbd5Cz5Uhe91DFPdxTxN5t9DZuEajfjc4QSheanWPwBnrYjbzRXfDyiaudT0ii muVIL778wrr2BmQh+fNJVQEdbUHL4WaDV32ukT1OOhCwbQPX+2he3zUYzJ2zray1Tb 8o4xfVj1be1EheQpnX44W02pKVUauojFAvIAv74E= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9GG0V04094826 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 16 Oct 2019 11:00:31 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 16 Oct 2019 11:00:24 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 16 Oct 2019 11:00:24 -0500 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 x9GG0U1a113265; Wed, 16 Oct 2019 11:00:30 -0500 From: Dan Murphy To: , CC: , , Dan Murphy , Linus Walleij Subject: [PATCH v13 11/18] ARM: dts: ste-href: Add reg property to the LP5521 channel nodes Date: Wed, 16 Oct 2019 10:59:47 -0500 Message-ID: <20191016155954.29044-12-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191016155954.29044-1-dmurphy@ti.com> References: <20191016155954.29044-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 CC: Linus Walleij --- arch/arm/boot/dts/ste-href.dtsi | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/arch/arm/boot/dts/ste-href.dtsi b/arch/arm/boot/dts/ste-href.dtsi index 4f6acbd8c040..8a873da102d3 100644 --- a/arch/arm/boot/dts/ste-href.dtsi +++ b/arch/arm/boot/dts/ste-href.dtsi @@ -56,16 +56,21 @@ reg = <0x33>; label = "lp5521_pri"; clock-mode = /bits/ 8 <2>; - chan0 { + #address-cells = <1>; + #size-cells = <0>; + 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>; }; @@ -75,15 +80,20 @@ reg = <0x34>; label = "lp5521_sec"; clock-mode = /bits/ 8 <2>; - chan0 { + #address-cells = <1>; + #size-cells = <0>; + chan@0 { + reg = <0>; led-cur = /bits/ 8 <0x2f>; max-cur = /bits/ 8 <0x5f>; }; - 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>; }; From patchwork Wed Oct 16 15:59:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 176509 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7572863ill; Wed, 16 Oct 2019 09:01:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrBQBpb/CIgFhtamBV0Yqfgp0P0gf7NTC6YEJnc/1md1E4vLtSh18eK9xisbc5/OmMrTSm X-Received: by 2002:a50:f701:: with SMTP id g1mr39812809edn.62.1571241680489; Wed, 16 Oct 2019 09:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571241680; cv=none; d=google.com; s=arc-20160816; b=nqZy9ZLqUENmTvOdAlZcPbwRvT+9wowF+X94WMnlW409zFXyoTRNCT8ZH+8qZztP/E H8A14Ei2u4IKOOax8dQ/zyrRA6hWYpv/+5vISgvM2iLDmIn6rxOYwpa5FwjKqCZ68jDJ yK7hwo/S2i+TxLJUyiOJCxZE9vYgMuDnDaBa/NJhv/4kRba3BYXYrf1qXzf1J4L90USq 2fUq3jq8BZXc8AKUTgFFi2OnDNUt+q4fiBvtxm1pgIIe5TLBBzFiDix+HmYH6vKWUqIQ C0ZsdjgV88J7SpsTja3vmNWF17tKpyyQ8mlGTD7KMMOUnP22o+iOekEi6+m2/cPBMWDl +GDg== 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=8BbI2lkHOPecjsmGV6ngoeBWZeqjeU+7lv9OXGTJiGs=; b=FzXbfEfAQEG6ZoxWDCL1FVoEuIh+puFAJsbxKMB+WUFgCxoDEQ2xAa7cSKJlJpBliN dQOS4iIbU6l5SESYXjN0YiphfbIPzSPnFi3X8NT2N8CaccTbAScizKIsu9B/9sWym3fQ ffC6o8eA558FH6heM23LnzA6S77o7EwAv0pRHXyfMuGUoPotZiMBeFm6ZwcvSwMDtIg+ 56kXuetkOwHYzTnQhRqc7EABBtFg62DLAN1vni3J7L01i9xHx3mpEKx08ZHTwOGv+sVQ JGX8GWdr4E7HQkmdrDZAPghyAgqya//vKg0tbOjzg67K3axQVS2zWaTrYl5oAPUgdEWw C0DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=P2ohqSxU; 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 d48si17259693eda.383.2019.10.16.09.01.20; Wed, 16 Oct 2019 09:01:20 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=P2ohqSxU; 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 S1727903AbfJPQBS (ORCPT + 1 other); Wed, 16 Oct 2019 12:01:18 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:41864 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393152AbfJPQAe (ORCPT ); Wed, 16 Oct 2019 12:00:34 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9GG0Wsq121876; Wed, 16 Oct 2019 11:00:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571241632; bh=8BbI2lkHOPecjsmGV6ngoeBWZeqjeU+7lv9OXGTJiGs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=P2ohqSxUrxSA1t+H1rtqI6gbnoA6BuJN4SpuyxutMPUHiaF1CabCEcSvQ9+ApOHTH suiKc+RNVoLqZFwkT5tx3QOLqTkAvXT/reaGfMES9g2YsTtchXGIK3H40ro0tKikdm s0tjhP7CNNzIXB6LjZrT5sF77etROyDhpa6FDoNc= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9GG0WoI094847 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 16 Oct 2019 11:00:32 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 16 Oct 2019 11:00:24 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 16 Oct 2019 11:00:31 -0500 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 x9GG0Vwh043141; Wed, 16 Oct 2019 11:00:31 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v13 13/18] leds: lp55xx: Add multicolor framework support to lp55xx Date: Wed, 16 Oct 2019 10:59:49 -0500 Message-ID: <20191016155954.29044-14-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191016155954.29044-1-dmurphy@ti.com> References: <20191016155954.29044-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 multicolor framework support for the lp55xx family. Signed-off-by: Dan Murphy --- drivers/leds/Kconfig | 2 + drivers/leds/leds-lp55xx-common.c | 175 +++++++++++++++++++--- drivers/leds/leds-lp55xx-common.h | 9 ++ include/linux/platform_data/leds-lp55xx.h | 7 + 4 files changed, 170 insertions(+), 23 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index fb614a6b9afa..a121a2855c06 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -377,8 +377,10 @@ config LEDS_LP50XX config LEDS_LP55XX_COMMON tristate "Common Driver for TI/National LP5521/5523/55231/5562/8501" depends on LEDS_LP5521 || LEDS_LP5523 || LEDS_LP5562 || LEDS_LP8501 + depends on OF select FW_LOADER select FW_LOADER_USER_HELPER + select LEDS_CLASS_MULTI_COLOR help This option supports common operations for LP5521/5523/55231/5562/8501 devices. diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c index 824d1d73dde1..026ebc2f8e18 100644 --- a/drivers/leds/leds-lp55xx-common.c +++ b/drivers/leds/leds-lp55xx-common.c @@ -131,14 +131,54 @@ static struct attribute *lp55xx_led_attrs[] = { }; ATTRIBUTE_GROUPS(lp55xx_led); +static int lp55xx_map_channel(struct lp55xx_led *led, int color_id, + enum led_brightness brightness) +{ + int i; + + for (i = 0; i < led->mc_cdev.num_leds; i++) { + if (led->color_component[i].color_id == color_id) { + led->color_component[i].brightness = brightness; + return 0; + } + } + + return -EINVAL; +} + static int lp55xx_set_brightness(struct led_classdev *cdev, enum led_brightness brightness) { + struct led_mc_color_conversion color_component[LP55XX_MAX_GROUPED_CHAN]; struct lp55xx_led *led = cdev_to_lp55xx_led(cdev); struct lp55xx_device_config *cfg = led->chip->cfg; + int ret; + int i; - led->brightness = (u8)brightness; - return cfg->brightness_fn(led); + if (led->mc_cdev.num_leds > 1) { + if (!cfg->multicolor_brightness_fn) + return -EINVAL; + + led_mc_calc_color_components(&led->mc_cdev, brightness, + color_component); + + for (i = 0; i < led->mc_cdev.num_leds; i++) { + ret = lp55xx_map_channel(led, + color_component[i].color_id, + color_component[i].brightness); + if (ret) + return ret; + } + + ret = cfg->multicolor_brightness_fn(led); + if (ret) + return ret; + } else { + led->brightness = (u8)brightness; + ret = cfg->brightness_fn(led); + } + + return ret; } static int lp55xx_init_led(struct lp55xx_led *led, @@ -147,9 +187,9 @@ static int lp55xx_init_led(struct lp55xx_led *led, struct lp55xx_platform_data *pdata = chip->pdata; struct lp55xx_device_config *cfg = chip->cfg; struct device *dev = &chip->cl->dev; + int max_channel = cfg->max_channel; char name[32]; int ret; - int max_channel = cfg->max_channel; if (chan >= max_channel) { dev_err(dev, "invalid channel: %d / %d\n", chan, max_channel); @@ -159,10 +199,34 @@ static int lp55xx_init_led(struct lp55xx_led *led, if (pdata->led_config[chan].led_current == 0) return 0; + if (pdata->led_config[chan].name) { + led->cdev.name = pdata->led_config[chan].name; + } else { + snprintf(name, sizeof(name), "%s:channel%d", + pdata->label ? : chip->cl->name, chan); + led->cdev.name = name; + } + + if (pdata->led_config[chan].num_colors > 1) { + led->mc_cdev.led_cdev = &led->cdev; + led->cdev.brightness_set_blocking = lp55xx_set_brightness; + led->cdev.groups = lp55xx_led_groups; + led->mc_cdev.num_leds = pdata->led_config[chan].num_colors; + led->mc_cdev.available_colors = + pdata->led_config[chan].available_colors; + memcpy(led->color_component, + pdata->led_config[chan].color_component, + sizeof(led->color_component)); + } else { + + led->cdev.default_trigger = + pdata->led_config[chan].default_trigger; + led->cdev.brightness_set_blocking = lp55xx_set_brightness; + } led->cdev.groups = lp55xx_led_groups; + led->led_current = pdata->led_config[chan].led_current; led->max_current = pdata->led_config[chan].max_current; led->chan_nr = pdata->led_config[chan].chan_nr; - led->cdev.default_trigger = pdata->led_config[chan].default_trigger; if (led->chan_nr >= max_channel) { dev_err(dev, "Use channel numbers between 0 and %d\n", @@ -170,18 +234,11 @@ static int lp55xx_init_led(struct lp55xx_led *led, return -EINVAL; } - led->cdev.brightness_set_blocking = lp55xx_set_brightness; - led->cdev.groups = lp55xx_led_groups; + if (pdata->led_config[chan].num_colors > 1) + ret = devm_led_classdev_multicolor_register(dev, &led->mc_cdev); + else + ret = devm_led_classdev_register(dev, &led->cdev); - if (pdata->led_config[chan].name) { - led->cdev.name = pdata->led_config[chan].name; - } else { - snprintf(name, sizeof(name), "%s:channel%d", - pdata->label ? : chip->cl->name, chan); - led->cdev.name = name; - } - - ret = devm_led_classdev_register(dev, &led->cdev); if (ret) { dev_err(dev, "led register err: %d\n", ret); return ret; @@ -538,6 +595,82 @@ void lp55xx_unregister_sysfs(struct lp55xx_chip *chip) } EXPORT_SYMBOL_GPL(lp55xx_unregister_sysfs); +static int lp5xx_parse_common_child(struct device_node *np, + struct lp55xx_led_config *cfg, + int chan_num, bool is_multicolor, + int color_num) +{ + u32 led_number; + int ret; + + of_property_read_string(np, "chan-name", + &cfg[chan_num].name); + of_property_read_u8(np, "led-cur", + &cfg[chan_num].led_current); + of_property_read_u8(np, "max-cur", + &cfg[chan_num].max_current); + + ret = of_property_read_u32(np, "reg", &led_number); + if (ret) + return ret; + + if (led_number < 0 || led_number > 6) + return -EINVAL; + + if (is_multicolor) + cfg[chan_num].color_component[color_num].output_num = + led_number; + else + cfg[chan_num].chan_nr = led_number; + + return 0; +} + +static int lp5xx_parse_channel_child(struct device_node *np, + struct lp55xx_led_config *cfg, + int child_number) +{ + struct device_node *child; + int channel_color; + int num_colors = 0; + u32 color_id; + int ret; + + cfg[child_number].default_trigger = + of_get_property(np, "linux,default-trigger", NULL); + + ret = of_property_read_u32(np, "color", &channel_color); + if (ret) + channel_color = ret; + + + if (channel_color == LED_COLOR_ID_MULTI) { + for_each_child_of_node(np, child) { + ret = lp5xx_parse_common_child(child, cfg, + child_number, true, + num_colors); + if (ret) + return ret; + + ret = of_property_read_u32(child, "color", &color_id); + if (ret) + return ret; + + cfg[child_number].color_component[num_colors].color_id = + color_id; + set_bit(color_id, &cfg[child_number].available_colors); + num_colors++; + } + + cfg[child_number].num_colors = num_colors; + } else { + return lp5xx_parse_common_child(np, cfg, child_number, false, + num_colors); + } + + return 0; +} + struct lp55xx_platform_data *lp55xx_of_populate_pdata(struct device *dev, struct device_node *np) { @@ -546,6 +679,7 @@ struct lp55xx_platform_data *lp55xx_of_populate_pdata(struct device *dev, struct lp55xx_led_config *cfg; int num_channels; int i = 0; + int ret; pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) @@ -565,14 +699,9 @@ struct lp55xx_platform_data *lp55xx_of_populate_pdata(struct device *dev, pdata->num_channels = num_channels; for_each_child_of_node(np, child) { - cfg[i].chan_nr = i; - - of_property_read_string(child, "chan-name", &cfg[i].name); - of_property_read_u8(child, "led-cur", &cfg[i].led_current); - of_property_read_u8(child, "max-cur", &cfg[i].max_current); - cfg[i].default_trigger = - of_get_property(child, "linux,default-trigger", NULL); - + ret = lp5xx_parse_channel_child(child, cfg, i); + if (ret) + return ERR_PTR(-EINVAL); i++; } diff --git a/drivers/leds/leds-lp55xx-common.h b/drivers/leds/leds-lp55xx-common.h index 783ed5103ce5..bf68b8a78930 100644 --- a/drivers/leds/leds-lp55xx-common.h +++ b/drivers/leds/leds-lp55xx-common.h @@ -12,6 +12,8 @@ #ifndef _LEDS_LP55XX_COMMON_H #define _LEDS_LP55XX_COMMON_H +#include + enum lp55xx_engine_index { LP55XX_ENGINE_INVALID, LP55XX_ENGINE_1, @@ -109,6 +111,9 @@ struct lp55xx_device_config { /* access brightness register */ int (*brightness_fn)(struct lp55xx_led *led); + /* perform brightness value to multiple LEDs */ + int (*multicolor_brightness_fn)(struct lp55xx_led *led); + /* current setting function */ void (*set_led_current) (struct lp55xx_led *led, u8 led_current); @@ -159,6 +164,8 @@ struct lp55xx_chip { * struct lp55xx_led * @chan_nr : Channel number * @cdev : LED class device + * @mc_cdev : Multi color class device + * @color_component : Multi color LED map information * @led_current : Current setting at each led channel * @max_current : Maximun current at each led channel * @brightness : Brightness value @@ -167,6 +174,8 @@ struct lp55xx_chip { struct lp55xx_led { int chan_nr; struct led_classdev cdev; + struct led_classdev_mc mc_cdev; + struct led_mc_color_conversion color_component[LP55XX_MAX_GROUPED_CHAN]; u8 led_current; u8 max_current; u8 brightness; diff --git a/include/linux/platform_data/leds-lp55xx.h b/include/linux/platform_data/leds-lp55xx.h index 96a787100fda..0f9b88019c18 100644 --- a/include/linux/platform_data/leds-lp55xx.h +++ b/include/linux/platform_data/leds-lp55xx.h @@ -12,17 +12,24 @@ #ifndef _LEDS_LP55XX_H #define _LEDS_LP55XX_H +#include + /* Clock configuration */ #define LP55XX_CLOCK_AUTO 0 #define LP55XX_CLOCK_INT 1 #define LP55XX_CLOCK_EXT 2 +#define LP55XX_MAX_GROUPED_CHAN 4 + struct lp55xx_led_config { const char *name; const char *default_trigger; u8 chan_nr; u8 led_current; /* mA x10, 0 if led is not connected */ u8 max_current; + int num_colors; + unsigned long available_colors; + struct led_mc_color_conversion color_component[LP55XX_MAX_GROUPED_CHAN]; }; struct lp55xx_predef_pattern { From patchwork Wed Oct 16 15:59:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 176510 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7572873ill; Wed, 16 Oct 2019 09:01:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHDFyqa+bKW9tT04v19adNxquj41L1sED9/fb6JlWk+8HHgvp63xMqwNyCIx01l53+kP/V X-Received: by 2002:a05:6402:327:: with SMTP id q7mr33747566edw.30.1571241680830; Wed, 16 Oct 2019 09:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571241680; cv=none; d=google.com; s=arc-20160816; b=kDLI4ku7J/MZPxgg4UCu+AM4bmyt6drVczmK3HR+Hz0tm0UYlofm72eIBSmGa14Y8d p5dhvFTgDNajOs4/qFs5hXsbYJiwptVEvsDDn/xaSV5A0tZpit7N618fIVHY2qWOT8ZE caCwJDt5t6wNcHoIwV0YVMdwFM9+etrY3w+hwboCBrkn/lCjLToueIFWJEXpW33hZwfd jL2TZywBwRAsjdpXIIkzymY3u1gZShzjiWGSRCGeztHox3Bon1hYvULie+2rHtxDK2Hv 4bD1TMZQGbhYE07AQzPUSS2l+rJTv4NBcMQQImgo9sIMIvoTGWrl3kG0SvK+FWc1DAcM S4Uw== 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=rjrKmRCxtLcAljHlXeRYkYtQjW+gz+DNteKwJQGVkFw=; b=RchDQnBT2b6fZo2Y8CRu3pemwXyLQB8bV3u0ni/cxIQrmubnYsTs1jrmcLKkBO5bvZ wCwn5g+Yw4TgEnumxjxOs5mYnKDLyww+K1NDBTEzQ5iBKV69Rj+FTdT4gRENwCe3ppyt WolOeuzLZ7xyIk2/KMPC+u0XxmdKY4bRXtbC/TIdU5hYoijbX3PWDzDd4WPPzbiJp+h7 h7O+2vNrLPOBQdlunAg5NWuA6s/Va3/CPwcLrWxHjpUQc3fbIUazBWDFS4nJHr8FoEZk lqkVdpUUdk8rCceYkoyuU8JtQCR8id0vGD4M5fNNSca4vNNmCnXppWyuRqBH6KJgX6C1 OQzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=byTgUkKG; 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 d48si17259693eda.383.2019.10.16.09.01.20; Wed, 16 Oct 2019 09:01:20 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=byTgUkKG; 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 S2393130AbfJPQBS (ORCPT + 1 other); Wed, 16 Oct 2019 12:01:18 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:55614 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393088AbfJPQAe (ORCPT ); Wed, 16 Oct 2019 12:00:34 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9GG0VBR039218; Wed, 16 Oct 2019 11:00:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571241632; bh=rjrKmRCxtLcAljHlXeRYkYtQjW+gz+DNteKwJQGVkFw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=byTgUkKG+8ZgBzVvzfMDI8wyiB+MLhRMfWglkoZMQM9LOSY4y7UdCi4CT5SCMB/JL N3kakNOd6FK5VULIrQHG+9/EqGu2b2rPUIEEXWdHgUeZUCEXFnWlWddwVXSTr2vPAl kxvPBi5BafAqTf+GPzRxB+M4mhC9QIePyc2T7YZM= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9GG0VZJ083027; Wed, 16 Oct 2019 11:00:31 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 16 Oct 2019 11:00:24 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) 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.1713.5 via Frontend Transport; Wed, 16 Oct 2019 11:00:25 -0500 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 x9GG0VxL113275; Wed, 16 Oct 2019 11:00:31 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v13 14/18] leds: lp5523: Update the lp5523 code to add multicolor brightness function Date: Wed, 16 Oct 2019 10:59:50 -0500 Message-ID: <20191016155954.29044-15-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191016155954.29044-1-dmurphy@ti.com> References: <20191016155954.29044-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 d0b931a136b9..b5beed5bbd85 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_component[i].output_num, + led->color_component[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 Wed Oct 16 15:59:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 176507 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7572719ill; Wed, 16 Oct 2019 09:01:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwiAXIqV5xo1oUKVswN1Nqzqk+Xl/+BQ5LDWarOvVqr0HJ5njJ41PjSEWOkMlogzeJTvcj1 X-Received: by 2002:a17:906:b24c:: with SMTP id ce12mr40443294ejb.327.1571241674739; Wed, 16 Oct 2019 09:01:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571241674; cv=none; d=google.com; s=arc-20160816; b=r7fEcDvbT/Ha5WYzLLUa2QJ+YoDC4XVP+H4NEMyWfxAu3hy/+TvQuN3jWbAvKSA/bp NoTg4kCsQFarvjORmnDJFazzSSPkIL7KLuybIRVme8Vpb98b3dEPs3Se663qFYDJgBh/ lPUyXA6m83cQ/fGln7dcFYoNgV6w1yOvq/7wi20Lj9SO4pvHGgPhverAMC7p/utbxjza zBrzmJ8TReNiHMNs3Fnm7w0TYoAJDCfDZiYH3H050G0z6apRzM4/oZGdfGBTSb8ckHQJ f2fxVciC9ziFMlJoc0Scn3qhBK8Wrjt8pDa/A9wPRLhrzT23f1N2j4uoFIvlKb9crEGI I1hQ== 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=DaxoDAt9j1qqv6dP7ny+9Mz7K8+GmtFtHMAHTyu2vvU=; b=VrMp8f+q7sV3oFQ2YjzZFUUa2FuOWTas+Gj+R5dsoc+PpegFc0Lww0AlCPbhdcGNml XjTc+VAuWHkA1VwvFk9sNKHdG5mdfgcHthuTw6uj/RzkCAb8B2LThHwjs3foleE5Abch yhAqG10Z0SiXIWICWVmTTmy1K8gycVrRxZCurKAygsn0fLeWSp6Hv+ojA0sJHoCQxa/j TvMR4XJP8kiYnxrz5JHSkY09zZiYXLRViTt8leAow83AQ6nSh9+hhgw400qK8gc/bHtq EVVXpo6Q4BcO71bfitd+80dmkq8DSvwMCnHhnRxnYJV7luVfkfFjoLP78KgQ4cchFuY9 sVHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=rm1eiIb8; 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 gh12si14912967ejb.191.2019.10.16.09.01.14; Wed, 16 Oct 2019 09:01:14 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=rm1eiIb8; 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 S2405922AbfJPQBM (ORCPT + 1 other); Wed, 16 Oct 2019 12:01:12 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:41866 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405930AbfJPQAf (ORCPT ); Wed, 16 Oct 2019 12:00:35 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9GG0Wh3121881; Wed, 16 Oct 2019 11:00:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571241632; bh=DaxoDAt9j1qqv6dP7ny+9Mz7K8+GmtFtHMAHTyu2vvU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=rm1eiIb8YGZyCIf8UzE4GPwqw97ahMrPJQh24DqwIDjgYvVrsW1/ub8swRx8YBk8G J9gNiL1kG6VFGnXS0tpfcIxQPVfSoWBoywGS23t5URaNvle5K02ASs1JaWQuKFkp4+ oyW+QBmgIN4FBdYA11b4RyliXju/XQVXwRHTAIBc= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9GG0WH3094859 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 16 Oct 2019 11:00:32 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 16 Oct 2019 11:00:25 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 16 Oct 2019 11:00:25 -0500 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 x9GG0WqN113291; Wed, 16 Oct 2019 11:00:32 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v13 17/18] leds: lp5523: Fix checkpatch issues in the code Date: Wed, 16 Oct 2019 10:59:53 -0500 Message-ID: <20191016155954.29044-18-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191016155954.29044-1-dmurphy@ti.com> References: <20191016155954.29044-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 diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index b5beed5bbd85..ffa2b5e6e38e 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 Wed Oct 16 15:59:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 176504 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7572162ill; Wed, 16 Oct 2019 09:00:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0RHppiuWOtVSfU7VZ3plOlpzmjIqORYVljWjWg8BBCG7aaDGna0As10+jOI4mZ2Ndc0Iu X-Received: by 2002:a17:906:5907:: with SMTP id h7mr20057596ejq.328.1571241653819; Wed, 16 Oct 2019 09:00:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571241653; cv=none; d=google.com; s=arc-20160816; b=TyuI1axm9h3OHv8txMDFud7CuV/RCEZKLFoFKrlC5aKRyY5Uclkqd28TrRSELFVcEF R5OLhfgyIJjORfbOxASX9zxVqjmybzhaigeNDSrdUyANxXMt3w98dX3NibB9JGxVEasq JaUjN6UJw/xH/6PJLy0KbUqcw/Cka4mYjFWJ/RcBkdDbyjIwojYNW8Yuc+M9eO3+DSpj NNhxfGNRiTaIM6Pi6XScAYgMAUrDN9V4XFqfmnHHN//6XU4VNE9Ok+PyshnFNyp6xm7b q30HOgK0AmpB7S6tHT862PHh3WGwU0DhXc6EaGesHXy8skRLG0k8VE9cKzidBmSr2loj 4YdA== 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=GnFryYrCCyEQ/hSxYa5EHPvxTPYbETO7NAXlRio+05DHCMSEz/deVGzjHk18K+8Wrm VvNnh9zvx30m13Cy/xkKW1zS22ZMSiK8nc4HydrkIRRpthmuWZIs/jj7w8GjD8VJBBVw lAbfojW3PhuxwU1TeTE/JXec5Zi92i7LqUumWkNP+BFa4aO7DBaH0+waSDR3lLypqyCS k9zRSj7fRHW1OOVOkTWeJ87D8LqHwFJynWNw8lCxKb6d1ItVyqKvtmSpi8gfPRBypDUP MzXHj5RHjy83tW7u46drh86lDFkdWkxb58LqFP56Mk1/ja2bwlCPE/520OSAn0v0+01I HkeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=OSTCyjFA; 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 f45si16890422eda.345.2019.10.16.09.00.53; Wed, 16 Oct 2019 09:00:53 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=OSTCyjFA; 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 S2406010AbfJPQAq (ORCPT + 1 other); Wed, 16 Oct 2019 12:00:46 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:48488 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405996AbfJPQAq (ORCPT ); Wed, 16 Oct 2019 12:00:46 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9GG0WGs045904; Wed, 16 Oct 2019 11:00:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571241632; bh=EJK//JMShkFomcxIL7CoEODYJVjSFbKnvbLo+tDSL6s=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=OSTCyjFAVfALAh0iC6Ya7BpiiXn9qsZe0z2kxu8EEeamZxX/aYjyahVYPcRLa1JKb rscB76Ixwh+gN5X+CSM3DnUcNEI5O/Leh7S3nVHP7Y8uojVazbusrCOye/qEHoc00F 6P1iZDbY0JUh6sfqnPV9qrT4jlwKcBMIHyKdvEws= 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 x9GG0Wcp083043; Wed, 16 Oct 2019 11:00:32 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) 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.1713.5; Wed, 16 Oct 2019 11:00:25 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) 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.1713.5 via Frontend Transport; Wed, 16 Oct 2019 11:00:32 -0500 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 x9GG0W4N061798; Wed, 16 Oct 2019 11:00:32 -0500 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 v13 18/18] dt: bindings: Update lp55xx binding to recommended LED naming Date: Wed, 16 Oct 2019 10:59:54 -0500 Message-ID: <20191016155954.29044-19-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191016155954.29044-1-dmurphy@ti.com> References: <20191016155954.29044-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 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>;