From patchwork Thu Apr 11 19:38:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 162075 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp7820504jan; Thu, 11 Apr 2019 12:39:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMx0gETScBIYhBtjYdn/nPIbsqj4zLyC/RXQKUM/6I/58mUFo3jzszW/86Pi3Z1nLxCyyi X-Received: by 2002:a17:902:8b8c:: with SMTP id ay12mr4000224plb.192.1555011562233; Thu, 11 Apr 2019 12:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555011562; cv=none; d=google.com; s=arc-20160816; b=UDMb3beKIw6ufyW3+hbaB9LgkRxETKbPi4AoqwZEQbNfhsW0YZ6TGjPXua5MRxRGOv mMuNiNka9x9qIaEjrg/xnw7v0T/x5b0tZsQIeYcIayFV96j8w5ikglbIn7IRMNwOzF4d GiSVbFJyo5nhT+ybOpwBz3rXBvSnWoPgeWt4V6svvwM2RuiI74/xoz8VO6SUAv+oRXtk y3BuPeGx0ZTz8FkDs7bIQ4n+vqYhrncQg+twu331sWbq9zVP/SFzfFKKNkT93RtoE8KQ 0RCPE+J/iWl9SR3bNH+ixmO/e0rF3Je48c2chjmEAT5xZ3G2AqXZtaXUNMAebpdQvkfs 9VNw== 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=QoTwq2TsQYQs9cX+gn9lCOTA2QWZqg19+qvdESPHsWs=; b=UJ3/F77+LcnsuBZDAsA5jn6x3rwkRdjoGrrMHtgTBBSxENz1si+Nw65lTy1NgnKDaA +Vr/4H8q7JzSMsUyPS32xKFCytJkww2xtHBuyGvTGoCzVpMsYT3iHpQ5UhG04LCKPUhA iVzkj1sCiFKhifd8s3iZQp3sa+4If2RLN2qQFLiqz6ueyL7dJv9IJtEIph7hm5O2qFn8 1I+M8msSGfM4Q1CcibErjfOEVGbdqLwsmsghJgKbWFqHX6z9DyK20mXzjcRdHy5adh9g NJjIfHP4ZumaA8pOYj2ryQGwtCOFZLXjSNn+0XiIQOClSVtGZeTVM4HHHl08Q7yAIDys wX7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=nwZd6++K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=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 k3si25367532pfi.229.2019.04.11.12.39.21; Thu, 11 Apr 2019 12:39:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=nwZd6++K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726890AbfDKTjP (ORCPT + 31 others); Thu, 11 Apr 2019 15:39:15 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:50458 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726615AbfDKTjL (ORCPT ); Thu, 11 Apr 2019 15:39:11 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x3BJcojE097029; Thu, 11 Apr 2019 14:38:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1555011530; bh=QoTwq2TsQYQs9cX+gn9lCOTA2QWZqg19+qvdESPHsWs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=nwZd6++KXRKaon+uOjEU8v9HdCIx5DNy1g2vOSm64g81CEbIqNDwqtQXzdgJbP0Ex HXK8jFpriE3POwvYyrjdKyqZeNS49eAxmGyOfpPE4PM1QxMjYKIbHdCCk8cJuMoRsP ulIWrBk3/ce8gEK0u7Yg/WljI3aQlReNIs6xVBE8= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x3BJcoXd025672 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 11 Apr 2019 14:38:50 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) 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; Thu, 11 Apr 2019 14:38:50 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE104.ent.ti.com (10.64.6.25) 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; Thu, 11 Apr 2019 14:38:50 -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 x3BJcnPi021025; Thu, 11 Apr 2019 14:38:50 -0500 From: Dan Murphy To: , , , , CC: , , , Dan Murphy Subject: [PATCH v2 1/7] leds: multicolor: Add sysfs interface definition Date: Thu, 11 Apr 2019 14:38:42 -0500 Message-ID: <20190411193848.23140-2-dmurphy@ti.com> X-Mailer: git-send-email 2.21.0.5.gaeb582a983 In-Reply-To: <20190411193848.23140-1-dmurphy@ti.com> References: <20190411193848.23140-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-led-multicolor -- 2.21.0.5.gaeb582a983 diff --git a/Documentation/ABI/testing/sysfs-class-led-multicolor b/Documentation/ABI/testing/sysfs-class-led-multicolor new file mode 100644 index 000000000000..5583ecaa3170 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-led-multicolor @@ -0,0 +1,91 @@ +What: /sys/class/leds//colors/sync_enable +Date: April 2019 +KernelVersion: 5.2 +Contact: Dan Murphy +Description: read/write + Writing a 1 to this file will enable the synchronization of all + the defined color LEDs within the LED node. Brightness values + for each LED will be stored and written when sync is set to 1. + Writing a 0 to this file will disable syncing and allow + individual control of the LEDs brightness settings. + +What: /sys/class/leds//colors/sync +Date: April 2019 +KernelVersion: 5.2 +Contact: Dan Murphy +Description: write only + Writing a 1 to this file while sync_enable is set to 1 will + write the current brightness values to all defined LEDs within + the LED node. All LEDs defined will be configured based + on the brightness that has been requested. + + If sync_enable is set to 0 then writing a 1 to sync has no + affect on the LEDs. + +What: /sys/class/leds//colors//brightness +Date: April 2019 +KernelVersion: 5.2 +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 led_color can be but not limited to red, green, blue, + white, amber, yellow and violet. Drivers can also declare a + LED color for presentation. There is one directory per color + presented. The brightness file is created under each + led_color directory and controls the individual LED color + setting. + + If sync is enabled then writing the brightness value of the LED + is deferred until a 1 is written to + /sys/class/leds//color/sync. If syncing is + disabled then the LED brightness value will be written + immediately to the LED driver. + + The value of the color is from 0 to + /sys/class/leds//colors//max_brightness. + +What: /sys/class/leds//colors//max_brightness +Date: April 2019 +KernelVersion: 5.2 +Contact: Dan Murphy +Description: read only + Maximum brightness level for the LED color, default is + 255 (LED_FULL). + + If the LED does not support different brightness levels, this + should be 1. + +What: /sys/class/leds//brightness_model/ +Date: April 2019 +KernelVersion: 5.2 +Contact: Jacek Anaszewski +Description: read/write + This directory contains the defined color models that are read + from the firmware node. The model color will be the read from + the firmware node. The model names should be a color that the + LED cluster can produce. + +What: /sys/class/leds//brightness_model//brightness +Date: April 2019 +KernelVersion: 5.2 +Contact: Jacek Anaszewski +Description: read/write + Writing this file will initiate a synchronized write to the LED + cluster to produce the color output defined in the firmware node. + + This value cannot exceed /max_brightness. + Writing a 0 to this file will cause the LED cluster to turn off. + + The sync and sync_enable files do not have an affect on this as + this is a real time update of the LED cluster. + +What: /sys/class/leds//brightness_model//max_brightness +Date: April 2019 +KernelVersion: 5.2 +Contact: Jacek Anaszewski +Description: read + Reading this file will return the maximum number of brightness + levels that are defined in the firmware node for the model color. + It should be assumed that the levels are from 1 -> max_brightness + and the LED cluster brightness is increasing.