Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4190897ybi; Mon, 27 May 2019 13:02:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwV21ArdSTGAMcK/Ci8OKMm/gi+PW8N6yJNBu/YywALttNgzXv8j29mXa1A4KigsPDLcY/1 X-Received: by 2002:a17:902:9a07:: with SMTP id v7mr130244917plp.180.1558987331191; Mon, 27 May 2019 13:02:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558987331; cv=none; d=google.com; s=arc-20160816; b=Ejbxl0a++KWx1QYwP5ABsFo1t/mVUi45klKOZ3hWS0LKjYqqVjy1xlhBZ4usdvdRBZ etDtMl7iTTS7y0d9bZf3O4x6bmY8cq0aULJ5RoRCp/arDo1JuUZuUDuQgaRKlhVkhIq2 5J/fYXWq4RfJOdo9Ez0GcJWUyJQ1hxugViW0cFNkCNY/gsCjD3rahq+bf6tZLdzOpjyo jW7fuFyCH+cvTGafcGgVFcnT2n4HRnL0+YQEkYW85Ye4LsahC+C+4ndQiDrE9hO6Q72b qisSbfiYlWJiP3qE4jyOt5/9p0CcMZA/f4iec+nGEKtsbCvYJ/H1yqyVGt/OCLgzTaPr G23w== 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=qs0hduG7r9ZuCuorXfKiLxTX7AgEzf0fkdnIQ/+Us5w=; b=aRJKGEp/LZZU0yXfFi+dhEZyd6oxYHC/vVLJ6GPh3fJdjQHKSmRNgOmd1AXRM0gQPs yvtOBn2JdI4wcRXW6vqWxHfbvFG5P21O5fRrZAEVgV3mvnJt7qTEFA3NfVy+S2dwajRj KLqWDn/7f+kzvCeLSHqxdLfjAWmN+ZGXou2JGan5yY+/oJ+/e8stTZrCjGRYjqhVV1Kz JD/8jpDULQra6Q+pXdiIWoe3MhYXf32kO5ZsUr36p36Cusm5EDD71I64eEj+MtUdBkf+ Yt3pMmpaXoY1qNZRjWEp4gdmTdDaQpOitrG2AZ7PcYlkTPMvN/nsyAk7qeAyP9IbMWlH E/2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jKp6Tj6G; 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 e9si15613969pgb.142.2019.05.27.13.01.54; Mon, 27 May 2019 13:02:11 -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=@gmail.com header.s=20161025 header.b=jKp6Tj6G; 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 S1727018AbfE0UAt (ORCPT + 99 others); Mon, 27 May 2019 16:00:49 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:52556 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726801AbfE0UAs (ORCPT ); Mon, 27 May 2019 16:00:48 -0400 Received: by mail-wm1-f67.google.com with SMTP id y3so511343wmm.2; Mon, 27 May 2019 13:00:46 -0700 (PDT) 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=qs0hduG7r9ZuCuorXfKiLxTX7AgEzf0fkdnIQ/+Us5w=; b=jKp6Tj6GYHwtJkdSEmERhGmELlQG2xE1zCTdm+gWm+2McCGc1YmqNpVm2267/kbzuW aWASqvy/KZMFsUCuBfchpe1yePkV4rp523HBnDvumPq+iojYq9eEteeTkjCA+AV96l8D M//QMSC2goAgc9eI2Dd9ckCuzyIUe9pVvsKjioyp9tWmogB4Pjb6Ea1ifo0e6sflOvJm AbyLOwRV1wcngpJfSXYKu0NpHTWJZ6cx+Odz4iDqCYzKob5JlaMmDBfYUJ0Iui3Cp2/D 54iJbnjZP3nRdJRvbPLUKvuitGKwQaoOUv5dwiKmTtvo1uJnR7PaLXjOn7HeDZnxR7mS 9M1g== 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=qs0hduG7r9ZuCuorXfKiLxTX7AgEzf0fkdnIQ/+Us5w=; b=VRvEwuA4094KnoIyJIWXp/b5T92+aSiNScBIb8Mz+yFYOK2f5Zk/fYnT0NiYS0Lr5U A9Hp8ezDZwYCYsUvygW+vR8hEH9SWamcFeLUENyLMz0RJPFFN/4zM3BEXjuTFOb5cwwR 4ycShLp4a8e7V6KzOlgNZxE8gLr64Lb0UxBRw2JpthO9DXXTkD54/8dvgayW5REImtQf hchev6t/pI9mD1e2QobvJjW2SuG+5xVVi5rjlEJSCrz2nE1tAYHiCUyMWDi3p0ffLqWc VxxaHERBE+cKVqIUO2ZngGOkiusiVqaBrNIvi+zxVaZk+cBL/YHMEAYfcp+DSw4nTZ2k 7YUg== X-Gm-Message-State: APjAAAUGdn8Zr8Jp4FQgiyDPon1FRgq9KitDWmSXSob/UGziaFD0Mtny t5FiZmdmrN5wQfwq1Mp9CTohdBeM X-Received: by 2002:a1c:c00b:: with SMTP id q11mr456498wmf.4.1558987245546; Mon, 27 May 2019 13:00:45 -0700 (PDT) Received: from [192.168.1.17] (bkn17.neoplus.adsl.tpnet.pl. [83.28.181.17]) by smtp.gmail.com with ESMTPSA id l190sm636252wml.25.2019.05.27.13.00.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 May 2019 13:00:44 -0700 (PDT) Subject: Re: [PATCH v3 1/9] leds: multicolor: Add sysfs interface definition To: Dan Murphy , pavel@ucw.cz, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190523190820.29375-1-dmurphy@ti.com> <20190523190820.29375-2-dmurphy@ti.com> From: Jacek Anaszewski Message-ID: Date: Mon, 27 May 2019 22:00:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190523190820.29375-2-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 update. One thing is missing here - we need to document how legacy brightness levels map to the sub-LED color levels, i.e. what you do in multicolor_set_brightness(). Best regards, Jacek Anaszewski On 5/23/19 9:08 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 | 57 +++++++++++++++++++ > 1 file changed, 57 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..2f102ede258b > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-class-led-multicolor > @@ -0,0 +1,57 @@ > +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. >