Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6265995imu; Wed, 30 Jan 2019 11:38:17 -0800 (PST) X-Google-Smtp-Source: ALg8bN6Bk9IakNaZY46TzlsJVfsZWJN5yterQYrvBW9edIYPkz7Zb2FjAkCWUOlKDYkibnLD4WpP X-Received: by 2002:a17:902:a60f:: with SMTP id u15mr30139054plq.275.1548877097460; Wed, 30 Jan 2019 11:38:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548877097; cv=none; d=google.com; s=arc-20160816; b=u9DeanWlMRYyXLzhW32GkyCftzrkSMyhx66q/HArqOWLRFGPRO5mbmsnUL+Q84yFF6 6qlZdLTZjQWXvZjOU2LMj8bG3a3j1Qa6m4Laon6K2PyrCBRtwJDnYsSIyqvioG5bQTwa VmmVZFLbvvXHb0uTP45yprM2NW9tm/hxfgSFsPqDt8EPkcGZw4R8E3gpvAlF9D7L88+d cypvo+RtRErvaRGDmbxbDVpK27Hgsf5KiQY6EoH7rj96sesggOBgDBc2AGyRFv/YbaL9 LZV9U955Y0otclOtATORQVCqK0B1ZYVtnAfq76aXa6u5RTk5B2d5V1PsjJehTi8cEi7x FSMg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Elo3/JXipF3FwxvD0Zr6N6lx3RzkXmsEwagJJ0bd9aI=; b=WdbXBRHPz0LTla/bPhemfetUmKhOb/Rx//AWIdwOKOjmowF984E4QtNSAk1h6/xaWo CisJOHDe74XjVl60Thfrez3pyWoEgXECWn32Qb7nYJ1KrCKARyEQOZpQMtjBPWk3cOhT Spr7uj406CVhE972CfimjJEYJxfonZYpzoJhF+iCL3e7VZrU1oBuXXfN6DEejpyOQ03y TfE7Xhd4hGub/hhfkKOJO45QnQExI+Liss8001uI7wtGWjOdGnsXT9mvfM6XYvt+bSOQ xwdiKxtQXdnLa6tJS8T+W4h3f+IXzeQEJNsc+iLbSjNxh1/LmblOLYqBFt3CvCUs741g S7QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CIi2HoN2; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a185si2016621pge.404.2019.01.30.11.38.01; Wed, 30 Jan 2019 11:38:17 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=CIi2HoN2; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387678AbfA3Thu (ORCPT + 99 others); Wed, 30 Jan 2019 14:37:50 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:36455 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727114AbfA3Tht (ORCPT ); Wed, 30 Jan 2019 14:37:49 -0500 Received: by mail-lj1-f195.google.com with SMTP id g11-v6so639591ljk.3; Wed, 30 Jan 2019 11:37:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Elo3/JXipF3FwxvD0Zr6N6lx3RzkXmsEwagJJ0bd9aI=; b=CIi2HoN2fz23srqKLqbQ1Ik0qlI45hajHB+o+AOmMU7XtX+D+Qv7XVEMYvza6v7LDV wy5ydoJNwZ4pofGnSkcW45vaFkFNGY6CPPjs3Inz11M6q0godmLHi6VC66LRXIEaLOBd OXmIzvUisCzHzqWgWTswzerUVzM06MOmDrNCAFFwE5cfTSinjpmoGnaOUftZrX9AL/PD PKWJRTX8RW9oXvoWfuGLYm/oVWs8ONM5lOt6muGON3C0Cq2I/8N612TxJWJ3xVLY3WV8 r9ib/2eYSzSC1wSTlasbIGlNlb0DkDgDW0PkujdvTjoQuRCoJeHtUGp9rytUhzVygCym 3V4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Elo3/JXipF3FwxvD0Zr6N6lx3RzkXmsEwagJJ0bd9aI=; b=U7LOoh6nlUXjzZ6jRi5WbhaXR3NOMPzwMxDe2ll5f6V9wDi69h9HBljBi+XbXfPGxv yx05U4xu2aY52WzsLdu7prP3TAqGVP3URJz7y8FaFF0B+ggF0NBIP6yQjEVL3n55mV7u 18V/fuXC8jxEX3Imm4EUa8OxCBQ7Xyowrlxev7R1tmIazr99IMrU9tVzx/KiaYtO30o7 /oEjjzJtGQ7yMNAWmXt+XyMMgwUSqYnEr1NJdNkybIYs7MIwmpuy/Jyos6yE23tVLVPg 3hx0IR2Y54iSSOWQcew76nh4lcFQ8/lWpk+DfZHpIn27Rk1nb+C2C5PsBEp7zOS8E9j2 ur4Q== X-Gm-Message-State: AJcUukemOr5iZOE9cqerfp38mVDOODG/SHnMyUmg4h4JwtGs2vT8FYdt h7Ns7vdnIJW5gU6IvicRACDN2HDs X-Received: by 2002:a2e:9715:: with SMTP id r21-v6mr26170949lji.30.1548877067218; Wed, 30 Jan 2019 11:37:47 -0800 (PST) Received: from [192.168.1.18] (dks71.neoplus.adsl.tpnet.pl. [83.24.22.71]) by smtp.gmail.com with ESMTPSA id l3-v6sm425753ljg.21.2019.01.30.11.37.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Jan 2019 11:37:46 -0800 (PST) Subject: Re: [RFC PATCH] leds: multicolor: Add sysfs interface definition To: Dan Murphy , robh+dt@kernel.org, pavel@ucw.cz Cc: linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org References: <20190130183005.833-1-dmurphy@ti.com> From: Jacek Anaszewski Message-ID: Date: Wed, 30 Jan 2019 20:37:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190130183005.833-1-dmurphy@ti.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dan, Thank you for the RFC. One vital thing is missing - documentation of brightness file must be updated to define its semantics for LED multi color class. Either we need brightness-model file returning only "onoff" option available, or, for time being, fix the max_brightness for LED multi color class to 1 (which will map to max intensity level for each color). Best regards, Jacek Anaszewski On 1/30/19 7:30 PM, Dan Murphy wrote: > Add a documentation of LED Multicolor LED class specific > sysfs attributes. > > Signed-off-by: Dan Murphy > --- > .../ABI/testing/sysfs-class-led-multicolor | 38 +++++++++++++++++++ > 1 file changed, 38 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-class-led-multicolor > > diff --git a/Documentation/ABI/testing/sysfs-class-led-multicolor b/Documentation/ABI/testing/sysfs-class-led-multicolor > new file mode 100644 > index 000000000000..19f8da9b150e > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-class-led-multicolor > @@ -0,0 +1,38 @@ > +What: /sys/class/leds//color/sync_enable > +Date: January 2019 > +KernelVersion: 5.0 > +Contact: Dan Murphy > +Description: read/write > + Writing a 1 to this file will enable the sychronization of all > + the defined color LEDs within the LED node. Writing a 0 to > + this file will disable syncing. > + > +What: /sys/class/leds//color/sync > +Date: January 2019 > +KernelVersion: 5.0 > +Contact: Dan Murphy > +Description: write only > + Writing a 1 to this file while sync_enable is set to 1 will > + synchronize 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//color/ > +Date: January 2019 > +KernelVersion: 5.0 > +Contact: Dan Murphy > +Description: read/write > + These files are dynamically created based on the colors defined > + by the registrar of the class. > + The led color(s) can be but not limited to red, green, blue, > + white, amber and violet. 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//max_brightness. >