From patchwork Mon Apr 1 17:33:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 161564 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp750243jan; Mon, 1 Apr 2019 10:45:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxO2MHPOz9rysn3r2/eZJw3hTne2llO4hbtq2LokyOzNfZl03kbO5nXMX5Hk9n+yEsg1p25 X-Received: by 2002:a17:902:9884:: with SMTP id s4mr16095445plp.179.1554140725453; Mon, 01 Apr 2019 10:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554140725; cv=none; d=google.com; s=arc-20160816; b=YJ+uFPdgGXHpriwLEzAaAn2/tqvFOOwhoEW7gYFB7qjZ6cDxeNU5fU6yiu15QmU+ph V/6wN4W7ltxdVePZ0dqb5lVa6DHobhESPqACiqCf4MZmBKqRyHKBcGHfweRnR/LiuV/S fApHKJyQ6ZW+dkvR6m2A349NuAWYUmXYad821WRnlG6I3n2PeOa4jtatv9zLvDYwPcKy UhANNzt+N+Q31gg8glWPYn7uBNXfRAYeicbnPDeKNFiUVVPaBk02rnu0rZiO7Qojgi4K yrmmE5XDMxlp/R9QH/CDiT0q3Kl/q/Ug3rDsDz+zFPbzix3aoiEnGuUYeI5eiO6FBboH svVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zZ2wiU8ugxRgUiXgVf/FA2eQuEbGUCruAFQYvaxb7Xw=; b=hEdXuz5UXYbB0zG/taNlJGxbIvpozJ1v1hFi0iFw//N+Yxltj0Bb0w8P0LpbGwxT5h 0vDF8vvKMzTx+QC+acrHVQCb47wATUdoIyb+QGzjKOelxgN7Yus7KWa0qa5AVNndxycA c3y9TW5oHgSxin2pfO7N8Z2jCgEdAviWmlzztmDumKZRHKgRxBxqI8sxKpx/gu0RbfRz OjH31CHuXPLKo6v8vRbIvtFu2e9dwJaqMnCZScjdtIa6zDOFl+qh/rzXqxFig7/hITLK AVrnEsw+FBFaXYC5slMZLd0ug0kHLknx6I0GBnXyjXRK/EDYp4AZC7NbD1acETVx39mO 3L7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=C6n7NqrE; 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 l12si9424822pgs.184.2019.04.01.10.45.25; Mon, 01 Apr 2019 10:45:25 -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=C6n7NqrE; 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 S1729519AbfDARpY (ORCPT + 1 other); Mon, 1 Apr 2019 13:45:24 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:34212 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387735AbfDAReR (ORCPT ); Mon, 1 Apr 2019 13:34:17 -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 x31HY4sd129006; Mon, 1 Apr 2019 12:34:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554140044; bh=zZ2wiU8ugxRgUiXgVf/FA2eQuEbGUCruAFQYvaxb7Xw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=C6n7NqrEhEnE78CGmbaEXRFvc4grvEiINAo7SAEFDEdrLw8aRwEDQzJQB1I+H9D7s CLewi1V1MxPlQf8pmXTL8NV4Si5/q7yiDheZvI8WlkIivICxirPhWVy9/l8z/L4mJ6 Od+C/9V7LypeOKRurA0Rf+xmuGeN+evbdVI15D9g= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x31HY4eh119013 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 1 Apr 2019 12:34:04 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 1 Apr 2019 12:34:03 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) 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 via Frontend Transport; Mon, 1 Apr 2019 12:34:03 -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 x31HY3PC116797; Mon, 1 Apr 2019 12:34:03 -0500 From: Dan Murphy To: , , CC: , , , Dan Murphy Subject: [RFC PATCH 1/5] leds: multicolor: Add sysfs interface definition Date: Mon, 1 Apr 2019 12:33:56 -0500 Message-ID: <20190401173400.14238-2-dmurphy@ti.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20190401173400.14238-1-dmurphy@ti.com> References: <20190401173400.14238-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 | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-led-multicolor -- 2.19.0 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.