From patchwork Fri Sep 20 17:41:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174150 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp2785062ill; Fri, 20 Sep 2019 10:38:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwU5IxQuLiSf5kFMW5XZ6YvqifO+KpWlOl4/tHbwzgw46A7TC4wDGR3g4T6zRnhOyytYbKp X-Received: by 2002:a17:906:6848:: with SMTP id a8mr20736705ejs.104.1569001124987; Fri, 20 Sep 2019 10:38:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569001124; cv=none; d=google.com; s=arc-20160816; b=A1M6g5gxJwyn/m3jUvK0fG6/MhAifOGNdvQEvxW5znbF5jvgVPtViwvlbJfyIiTXxI PtCM6VnBgRy+0xwrNBXL2CtaQ72pKews0WcHEcltz95ngfo/QY6+FGl4bGn2WjFfchFp Hmm8GzsyZyptnyACIKHFdJhYDKBRYn/Fl4rvFLVgOp0aNcl57dbQBqX9Xh7/5Nlaphob DhqCZiq3P5y3oapXONtAuB4B1LtQgHm9r+8FJ0/g+J9WL5w5GHxGFxZEo9rUrnnWoIJm H6FTa83KbWnXtV7LQB6mlC8W8PElxWVIEcg/QqCoQryfIwBIU6B2YFPqo6tx+1/NwN9C p+jA== 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=3r8NrvCOTUy6K4oFLHF2BYQC94/INWkCD7dFECGXy+E=; b=vTj67IFxKCD/szFw/SpfksBFimI0AXpI8Nbr1u8Fgfa6zSS4rGB6ONcNxrNz4qV1AY hZVWU73ychLLazekpdf1HGg5oaaOgXG/GTPxmS0x2Od0Vmy88vWD4UWsxH/6rZNy9G+s yYIfkCH8l7v10U50MvQZixKeWdbS7ol9TitM/3o2kUayuzVrc6WwEITR+z7mBAQdvvJk yeRcBGOJu6vXEUzxSTbrDqEdNKXabd6F4TZsKK2ZeWwAL/QNVvcmmC4F4ngOZmlLW4Cz D6kQci5HL5qpenjpfpL/++tWnHS1VB8kdce9z6zSK5hWEMfAU7bVQTOG76rkux9KpDfM jWgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=JUH7y9le; 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 f14si1710061edt.92.2019.09.20.10.38.44; Fri, 20 Sep 2019 10:38:44 -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=JUH7y9le; 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 S2392823AbfITRio (ORCPT + 1 other); Fri, 20 Sep 2019 13:38:44 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:42674 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392230AbfITRib (ORCPT ); Fri, 20 Sep 2019 13:38:31 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8KHcQA5109365; Fri, 20 Sep 2019 12:38:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569001106; bh=3r8NrvCOTUy6K4oFLHF2BYQC94/INWkCD7dFECGXy+E=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=JUH7y9le3lkmSBUOJz00goGAu1mMXQ3XAzP+O/jANk9S6k2qhNOjK4VCDFg0AvAnh Xwj4yR5y7F4JUuBZIYD9kzXYqu03oj0qizQl5VDwOHcYcW5DOAjtw35m+9OCKlNuos ZFNGRBOkUD/1l0Chmoz932Cpbxun/5k5aNhOSClE= 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 x8KHcQDH013167 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 20 Sep 2019 12:38:26 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) 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.1713.5; Fri, 20 Sep 2019 12:38:22 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) 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.1713.5 via Frontend Transport; Fri, 20 Sep 2019 12:38: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 x8KHcQbd060504; Fri, 20 Sep 2019 12:38:26 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v8 1/9] leds: multicolor: Add sysfs interface definition Date: Fri, 20 Sep 2019 12:41:31 -0500 Message-ID: <20190920174139.30079-2-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20190920174139.30079-1-dmurphy@ti.com> References: <20190920174139.30079-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 documentation of LED Multicolor LED class specific sysfs attributes. Signed-off-by: Dan Murphy --- .../ABI/testing/sysfs-class-led-multicolor | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-led-multicolor -- 2.22.0.214.g8dca754b1e diff --git a/Documentation/ABI/testing/sysfs-class-led-multicolor b/Documentation/ABI/testing/sysfs-class-led-multicolor new file mode 100644 index 000000000000..39fc73becfec --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-led-multicolor @@ -0,0 +1,43 @@ +What: /sys/class/leds//brightness +Date: Sept 2019 +KernelVersion: 5.5 +Contact: Dan Murphy +Description: read/write + Writing to this file will update all LEDs within the group to a + calculated percentage of what each color LED intensity is set + to. The percentage is calculated via the equation below: + + led_brightness = requested_value * led_color_intensity/led_color_max_intensity + + For additional details please refer to + Documentation/leds/leds-class-multicolor.rst. + + The value of the color is from 0 to + /sys/class/leds//max_brightness. + +What: /sys/class/leds//colors/_intensity +Date: Sept 2019 +KernelVersion: 5.5 +Contact: Dan Murphy +Description: read/write + The led_color directory is dynamically created based on the + colors defined by the registrar of the class. + The value for the led_color is defined in the + include/dt-bindings/leds/common.h. There is one directory per + color presented. The intensity file is created under each + led_color directory and controls the individual LED color + setting. + + The value of the color is from 0 to + /sys/class/leds//colors/_max_intensity. + +What: /sys/class/leds//colors/_max_intensity +Date: Sept 2019 +KernelVersion: 5.5 +Contact: Dan Murphy +Description: read only + Maximum intensity level for the LED color, default is + 255 (LED_FULL). + + If the LED does not support different intensity levels, this + should be 1. From patchwork Fri Sep 20 17:41:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174149 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp2785048ill; Fri, 20 Sep 2019 10:38:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwN6M50uwydTcCbhc6qbXs5xr5H73lt/vS03qdmG6rSIoZlUwzPB1jPmEEiqgpRs4evPO9C X-Received: by 2002:aa7:dd8e:: with SMTP id g14mr20458049edv.233.1569001124073; Fri, 20 Sep 2019 10:38:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569001124; cv=none; d=google.com; s=arc-20160816; b=aVeaT2/fy/VsmSLKqLPSGbpqsMzI9qM9FnsJ6cAOvvR1mG+Bil+hxTBB/HI/ut1+Q4 yzGaHAHoRmtwZ+/Jxm59zcfRFoqo5nV/BZEwU2W2tsbEi7tufNU4ZFa1JZej9HQN48wd bj2y63A8qgIpBk6qRWzzw9UE3gEJgdRORT3+ZF2kZhWudOcFhi5iyU+13npCpzu7tl9z y+YlaFk1U8yYo/0dQ80ec1rvTQoz81XkDcqjGg0lPAAtlbT5SH0KdypeXXULz0EMDlKT gy3qbf7rBulaQdLNbFWsglkf+MRDBhDY1BI/grsUrOpvg7Z3+CsCcjO7xuVPAaJ5OEKF sksg== 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=akFQwtB+8wepT0KN3wLxQAM5VrWw2YHk7/wv8nkby20=; b=MtXuJ92FL4DOwTwDiZA5d9Wg3Znuf/BWxvCovFJAC3riYP2IuXOG9CrSvaf5C8TZLB IjrkpWmjHLv7py26W/qMiRJJhM+XGNtHHxKa7jGYqp7ntlGEgjFoI9vOF1HZoXXVkBBs vz6jPTkyG37QFVZV7G0oHHaLxVxp22/f4cfNRsoKW4GjuPu4Ar+lZCkThi/muFUj6yHw jsmWKEF05MQcbxstOZaK3QQ2LPdUL+fd9AMosafn4jrMVqi2QARuPIsU4QKVIhcpYkdr zwqp+h2yZStrAJpMkY6rfD5XpE9aJZ2foSSNk8oQlY6S/wC6Xkj06SbbocDd/PTtMngi qqbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=V2pnsJrm; 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 f14si1710061edt.92.2019.09.20.10.38.43; Fri, 20 Sep 2019 10:38:44 -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=V2pnsJrm; 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 S2392314AbfITRin (ORCPT + 1 other); Fri, 20 Sep 2019 13:38:43 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:60788 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392247AbfITRib (ORCPT ); Fri, 20 Sep 2019 13:38:31 -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 x8KHcQZQ019948; Fri, 20 Sep 2019 12:38:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569001106; bh=akFQwtB+8wepT0KN3wLxQAM5VrWw2YHk7/wv8nkby20=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=V2pnsJrmS5a0T7YWxcYaYkrDU8T+lXKi3gxgFOLvYoDtSAW9ExsriYiC83lHsZqeR C59XMYyfCeVOWOcgrW7M4Tgq83PC+1Gs/pFi0RrsTvMmRAujCviYG7P2y82zresAbb vTif9zOOKwGjPO/zleUKIAZXW86uE/sgR0L4W0vk= 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 x8KHcQV9021608 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 20 Sep 2019 12:38:26 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) 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; Fri, 20 Sep 2019 12:38:22 -0500 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.1713.5 via Frontend Transport; Fri, 20 Sep 2019 12:38:22 -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 x8KHcQwP075336; Fri, 20 Sep 2019 12:38:26 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v8 2/9] documention: leds: Add multicolor class documentation Date: Fri, 20 Sep 2019 12:41:32 -0500 Message-ID: <20190920174139.30079-3-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20190920174139.30079-1-dmurphy@ti.com> References: <20190920174139.30079-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 support documentation on the multicolor LED framework. This document defines the directores and file generated by the multicolor framework. It also documents usage. Signed-off-by: Dan Murphy --- Documentation/leds/index.rst | 1 + Documentation/leds/leds-class-multicolor.rst | 91 ++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 Documentation/leds/leds-class-multicolor.rst -- 2.22.0.214.g8dca754b1e diff --git a/Documentation/leds/index.rst b/Documentation/leds/index.rst index 060f4e485897..bc70c6aa7138 100644 --- a/Documentation/leds/index.rst +++ b/Documentation/leds/index.rst @@ -9,6 +9,7 @@ LEDs leds-class leds-class-flash + leds-class-multicolor ledtrig-oneshot ledtrig-transient ledtrig-usbport diff --git a/Documentation/leds/leds-class-multicolor.rst b/Documentation/leds/leds-class-multicolor.rst new file mode 100644 index 000000000000..063c9a411a1d --- /dev/null +++ b/Documentation/leds/leds-class-multicolor.rst @@ -0,0 +1,91 @@ +==================================== +Multi Color LED handling under Linux +==================================== + +Description +=========== +There are varying monochrome LED colors available for application. These +LEDs can be used as a single use case LED or can be mixed with other color +LEDs to produce the full spectrum of color. Color LEDs that are grouped +can be presented under a single LED node with individual color control. +The multicolor class groups these LEDs and allows dynamically setting the value +of a single LED or setting the intensity values of the LEDs in the group and +updating the LEDs virtually simultaneously. + +Multicolor Class Control +======================== +The multicolor class presents the LED groups under a directory called "colors". +This directory is a child under the LED parent node created by the led_class +framework. The led_class framework is documented in led-class.rst within this +documentation directory. + +Each colored LED will have two files created under the colors directory +_intensity and _max_intensity. These files will contain +one of LED_COLOR_ID_* definitions from the header +include/dt-bindings/leds/common.h. + +Directory Layout Example +======================== +root:/sys/class/leds/rgb:grouped_leds# ls -lR colors/ +-rw-rwxr-- 1 root root 4096 Jul 7 03:10 red_max_intensity +--w--wx-w- 1 root root 4096 Jul 7 03:10 red_intensity +-rw-rwxr-- 1 root root 4096 Jul 7 03:10 green_max_intensity +--w--wx-w- 1 root root 4096 Jul 7 03:10 green_intensity +-rw-rwxr-- 1 root root 4096 Jul 7 03:10 blue_max_intensity +--w--wx-w- 1 root root 4096 Jul 7 03:10 blue_intensity + +Multicolor Class Brightness Control +=================================== +The multiclor class framework will calculate each monochrome LEDs intensity. + +The brightness level for each LED is calculated based on the color LED +intensity setting divided by the color LED max intensity setting multiplied by +the requested value. + +led_brightness = requested_value * led_color_intensity/led_color_max_intensity + +Example: +Three LEDs are present in the group as defined in "Directory Layout Example" +within this document. + +A user first writes the color LED brightness file with the brightness level that +is necessary to achieve a blueish violet output from the RGB LED group. + +echo 138 > /sys/class/leds/rgb:grouped_leds/red_intensity +echo 43 > /sys/class/leds/rgb:grouped_leds/green_intensity +echo 226 > /sys/class/leds/rgb:grouped_leds/blue_intensity + +red - + intensity = 138 + max_intensity = 255 +green - + intensity = 43 + max_intensity = 255 +blue - + intensity = 226 + max_intensity = 255 + +The user can control the brightness of that RGB group by writing the parent +'brightness' control. Assuming a parent max_brightness of 255 the user may want +to dim the LED color group to half. The user would write a value of 128 to the +parent brightness file then the values written to each LED will be adjusted +base on this value + +cat /sys/class/leds/rgb:grouped_leds/max_brightness +255 +echo 128 > /sys/class/leds/rgb:grouped_leds/brightness + +adjusted_red_value = 128 * 138/255 = 69 +adjusted_green_value = 128 * 43/255 = 21 +adjusted_blue_value = 128 * 226/255 = 113 + +Reading the parent brightness file will return the current brightness value of +the color LED group. + +cat /sys/class/leds/rgb:grouped_leds/max_brightness +255 + +echo 128 > /sys/class/leds/rgb:grouped_leds/brightness + +cat /sys/class/leds/rgb:grouped_leds/max_brightness +128 From patchwork Fri Sep 20 17:41:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174144 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp2784816ill; Fri, 20 Sep 2019 10:38:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDaOO+W5q9ijaRXjNOV8jDaemdNLLHSG5gWgEC4Hu9vLicgoL7RNTLhX8DIURcbKsHdIEj X-Received: by 2002:a17:906:e290:: with SMTP id gg16mr10034197ejb.176.1569001111764; Fri, 20 Sep 2019 10:38:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569001111; cv=none; d=google.com; s=arc-20160816; b=b/KIG1zC6TeRqqS9+FihIN/MzydJRaab9wE/dexjcvmKh4Lwo6DkHqKj0u3P7QixFF MIw/YQrqtdIYB3Xh3A9eKHsXnSBihclHwzFdO/+m8DmO7XimJ8Ceu1rYWa3OFGk8NQqz c6zWrVjh/hkrT5duWu6PSdFua51oBoy+1ghwIzc7D9msXt7R782MdV3j/ItTbX3lt6Xp Z21RGKVQgkKkEwED7atWltgb4oXGCFj4wIkLKpgBlKjtlOJQEQfRSSYUzbZy15GxbOFz AFgmf77Qs36Mdf/UEfLiCyadWRP+ub0Ap9mm3aq5BFgOmfD+feIXI6mCPt2J3ScQlC7Q ZuMw== 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=mxpIfSMdfhBefQrH4/0unjcRpv88zibrnv9L+Lb/6Rp+4eDSEYyodyGhDHi332mg62 8HLh7qZ2ZoHzdXx4MSCrutGtd/gBQNw+JTnxbBPhGYNg1H/8D6fP+1qDtfZQ606E1z8E IWXB+He7LTzPP9mLUSzFO7XZEcZHAWTeYUq75RElGFfWgfcc1JN0VNTmwKte9/2UgPYy 57zgME9/eiKwnqqvnxQn22WhjajjHJezZckssPrDR+9Gu0eX/wXXxDGEZdd9u6aCO6kX 4CkEtIDW2p/pOGoZ4UAk+pwGVc3ISDWkBCJnNd3+gjriNNurIEbki30fky+I38mjxzrG Pi4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=DC24iype; 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 f16si1366092ejc.73.2019.09.20.10.38.31; Fri, 20 Sep 2019 10:38: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=DC24iype; 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 S2392303AbfITRia (ORCPT + 1 other); Fri, 20 Sep 2019 13:38:30 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:54464 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387829AbfITRia (ORCPT ); Fri, 20 Sep 2019 13:38:30 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8KHcRd3016885; Fri, 20 Sep 2019 12:38:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569001107; bh=zV3cVdmjhCBXzQdA/5xCOaiT1n6XKbwdMaP1jdy4goo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=DC24iypeTdrYq01VcVzWaBavszakGs2WH23VaFTYaQU7Yefjl9YWP7BSrZ2XeOM1O xHbTiUqWjlpYSxPfdx9AHI3pynsWW+tbA44GHapfQjqVYiaNs9j6SFbWmGHHegPc0G BT6mWq+hmQEik+tFr4JvVCcayqGnEv+JDScSzZUo= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8KHcRUn021380 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 20 Sep 2019 12:38:27 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) 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; Fri, 20 Sep 2019 12:38:22 -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; Fri, 20 Sep 2019 12:38:22 -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 x8KHcQSV075344; Fri, 20 Sep 2019 12:38:27 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v8 4/9] dt-bindings: leds: Add multicolor ID to the color ID list Date: Fri, 20 Sep 2019 12:41:34 -0500 Message-ID: <20190920174139.30079-5-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20190920174139.30079-1-dmurphy@ti.com> References: <20190920174139.30079-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 Fri Sep 20 17:41:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174153 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp2785403ill; Fri, 20 Sep 2019 10:39:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlJPTO5IuPxZjWm7xngPRh5N230llZyeCgGAttL4kgWsxZqoszsTVqZroXWQQYGX7uTKdP X-Received: by 2002:aa7:c495:: with SMTP id m21mr4974898edq.287.1569001142963; Fri, 20 Sep 2019 10:39:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569001142; cv=none; d=google.com; s=arc-20160816; b=i5zllYrdruMH1BHmToVANk5db8hd7oyTQZ8gS+2I8L9o8jOUR9dQi5oX0UE8McTMH9 /LRY4uWJklT9fGfnqks0HqXE/JwuRzwuGS24tWo9f91XMjVxqqbL1rxOB1MiTNS7kbxF kWLEFcQ9keMQNJatyXMK7EmL56BhPf/ynCEldNaYDOClvajrX52lDG/UENxyQO69VjPr NqHjTFRUmfkh/0obtvw+SvIdyHZaT/WWJ8pb5b0sOxzYQgvv4ye4ZOYcjXKyfm67FRXb Gnhi0SqdIuv9SKJsx58axh7X7EyAH33Vuwi7bu8EAL0bTQfMU2TnrDiUNmhpjEMnX83E nOPQ== 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=IunIYd5Kid+UggtvNFbxJ7/TSvltwjJPw76Q4/8X5m5iEoz4M+9IXvZIm2V4M2fQzg Phlp+qmYVuE6qv0zdMyrZ9+VxKuRYivbHj8Eu5nEIIr/K+M5BCKdnWbbZ7dG6cgXH7Gt AxjLCqCBjCqb9On6ATWyeKss183Z9p1Kn6sah7dRWyd+DjvAtvokyS+D0X/be6aWtvPw 0gRs94qKda8KW0fo84+FB/ktW3/Mnt3CM7r8sX1mkWpag52VnDvq4vQZ0jpxihkhfto0 pHzZTR6YwMDldZAYfSFzm9GSyNDBl/LfD+yDFEzA1OPUxewXpMbZwSKTYuWFlqI0R9is zY2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=CM+D4oh9; 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 p15si1819397eda.294.2019.09.20.10.39.02; Fri, 20 Sep 2019 10:39:02 -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=CM+D4oh9; 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 S2393641AbfITRjB (ORCPT + 1 other); Fri, 20 Sep 2019 13:39:01 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:47666 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392294AbfITRia (ORCPT ); Fri, 20 Sep 2019 13:38:30 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8KHcRkn042379; Fri, 20 Sep 2019 12:38:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569001107; bh=vNLixCA7rV3r89geVpDyZT2afzJln66pkNhtKdigswM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=CM+D4oh9e8YeV9WET3XKoe4RO8kXVnG0/FFu+mYcHbjQ/6Ew+1U2aT6WBIeye42W7 L65RiwRwiEMAwgtcKFH4nO1JKb5zBRVY5xK40EzgYcJGYkqBFL4XfdbNwTW56rpCoG 339vd4VsgUWi1fNKIR3l7fUbnfLnXddMFUUhV6rc= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8KHcRwJ021389 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 20 Sep 2019 12:38:27 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 20 Sep 2019 12:38:22 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE106.ent.ti.com (157.170.170.36) 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; Fri, 20 Sep 2019 12:38:27 -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 x8KHcRs4060524; Fri, 20 Sep 2019 12:38:27 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v8 5/9] leds: Add multicolor ID to the color ID list Date: Fri, 20 Sep 2019 12:41:35 -0500 Message-ID: <20190920174139.30079-6-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20190920174139.30079-1-dmurphy@ti.com> References: <20190920174139.30079-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);