From patchwork Thu May 30 18:16:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 165450 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1309477ili; Thu, 30 May 2019 11:16:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhQu6c1CeTHlAp45FJGY0f6FHuJuPRbk0xydV/jxT06tz51DcYEOzYN5P9NHSvidJcxlma X-Received: by 2002:a63:7508:: with SMTP id q8mr4704834pgc.296.1559240201602; Thu, 30 May 2019 11:16:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559240201; cv=none; d=google.com; s=arc-20160816; b=jMKuS7vx+E4gBG8vCaghOC4a6aAdcXeoHGsa11VikTiFIhaUBEz+KX0/bj4o+sjKWd KuDC6wzPv1RpNL+tB7TqKPVqtMyu02VJNQVgFKAi0b2vRC46KRIcWhwg5HaW9GQQe2Tc QR0CMOK9ST7RnV/HVsHP8qs97lRu6QV/KBsuTwkD5PEy6SFvetUI4aRKcRsDSs7vX/bG mkCU4HbkKkvbEIUNx1yr1aklMxqiYyjnKVv0DKkHW7OLXhUPZjnFkhoP9xZpHP3hilI6 0UxGezB+PqTur2gHAFgLjpPaXJ9ZMcS8UB8O72ArnKauZJ6ByfcHBaVKsNA3FpW5sDce ml9A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=oRaCzpkhU9F+bh07oXIPESTr239zaKBUXyVW0YXCdGs=; b=PNRb5g8c6NBUOHOgGaTBhr8Mz+lupJHWRZtMY8CL3KjZYfqLgsjnAsRbdPfpKt8hbz DwzizS2esgcGSQpYziVhm6AbFPWiH2Z+k1YzWRxNk/B/BhXPNeOBpbqLZmhwr5yFA3Li piJorupeAebyJf/pMHNh5aA9F3XMSwv/OSjkrhF3IXp7ACPMPcte2bx7ehEpxmVlh0TI EYLU/y+KTfz4huZ9W0jCBtRy1L8BPeDCyN6ykR8gdntDTboPZrhy+uAapGLQVsBdE8zm nr72x3ZewRHm+h0oDj7BBzMI6MmGYZAuibnMkep6YtrWYyXXWSYJ8qmf1jL9RYI2B+SO 5jJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=IhxIFiTl; 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 w27si3628254pgl.277.2019.05.30.11.16.41; Thu, 30 May 2019 11:16:41 -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=IhxIFiTl; 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 S1726518AbfE3SQl (ORCPT + 1 other); Thu, 30 May 2019 14:16:41 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:36002 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726461AbfE3SQl (ORCPT ); Thu, 30 May 2019 14:16:41 -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 x4UIGVuL114706; Thu, 30 May 2019 13:16:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1559240191; bh=oRaCzpkhU9F+bh07oXIPESTr239zaKBUXyVW0YXCdGs=; h=From:To:CC:Subject:Date; b=IhxIFiTlpl3MpZ5YNOyritLcMANh010TLRRdSYvQGL9NKu3QbE6yT7XG9SjlyZ5pb ECCgzi/wzUpLXwRFNBSK4v0dYc5fCL+sgjJ24cR7TkWJhENsyM7APz0xbyXeO4TSAE etbD8t0eeHc2HiUl2XMKYsCgQ5lIIl+n3MannB/4= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x4UIGVVS089727 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 30 May 2019 13:16:31 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 30 May 2019 13:16:31 -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; Thu, 30 May 2019 13:16: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 x4UIGUGj035678; Thu, 30 May 2019 13:16:31 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v4 1/2] leds: multicolor: Add sysfs interface definition Date: Thu, 30 May 2019 13:16:28 -0500 Message-ID: <20190530181630.30373-1-dmurphy@ti.com> X-Mailer: git-send-email 2.21.0.5.gaeb582a983 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 --- v4 - Add LED class parent brightness definition to the text - https://lore.kernel.org/patchwork/patch/1078398/ .../ABI/testing/sysfs-class-led-multicolor | 74 +++++++++++++++++++ 1 file changed, 74 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..ec2b6ac63ecc --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-led-multicolor @@ -0,0 +1,74 @@ +What: /sys/class/leds//brightness +Date: April 2019 +KernelVersion: 5.2 +Contact: Dan Murphy +Description: read/write + The multicolor class will redirect the device drivers call back + function for brightness control to the multicolor class + brightness control function. + + Writing to this file will update all LEDs within the group to a + calculated percentage of what each color LED in the group is set + to. Please refer to the leds-class-multicolor.txt in the + Documentation directory for a complete description. + + The value of the color is from 0 to + /sys/class/leds//max_brightness. + +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.