Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp257355ybe; Thu, 12 Sep 2019 19:39:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyD6W85rpUJU+VtiD8bhukYaqxCHdzKXBXaVKRkAd2zLRGdL85syzZRLeEsuxAibUl8nivD X-Received: by 2002:a17:906:8406:: with SMTP id n6mr7155812ejx.138.1568342351696; Thu, 12 Sep 2019 19:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568342351; cv=none; d=google.com; s=arc-20160816; b=FQZEkHuTMz/P6PLzUhkOffy/enqwSME1mqdcb7ZCkln8h5GIZ+3ioZENMr62PZCUZA 8LtgJrm0gfkPGlchqMOaMqyCiofapR7zxUVc8HDskwbjXI9Xcssh3k0XkjsIntUF9vRf MpmBSv/rAoY10MCEu0zlPsKnoCVW0PSgD2JXwY1YCu3CScfy7U+TP8hBdythsS8k84hF VAVz+AGwb8dZ4Lm9lrTxXdzlY5S7YnvdWsZDPJtOU8sbALYIOXA8pW+NjwuK9jLTfLMr RJA3nikqAFVj9KDznoZw/QIgHgfqcCD28nhKOeUaQAetG/Xt67j/jrhJTB66KqYvh4Aw Y0KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=3rFQ5YOQyJCcjWRaEXaDv0l6ekVp8tIORqYcBJwvCSw=; b=stjpCETb9Rg0w4+YwTKH6u0LPiqFGp9/GgcCyKHbVtNZhBEr6upkBFVN68Lblh8oF7 WuGdIBpgH5bGoS01UZrhKe4Sxmkc4TseXjqGfp9T7j4uHyvCIIIEoNo+LznwvnKzi23h 0xUuJcukLcbg7DSmYMZ/x2NZ7rTX2hKM2mL7QfOE/wSHeL7cXv5KlOYklp24BQEcrN7K K4ILE2VPR7imTvuCCz9Btt6lz7CXI2Is3zWJHCCBjQwhkEyy7bSyygscy31SvevmehfN e+PVbOV6tiOiIdegswQQS8V2Wvgc4+iwOV8YA6w2sLTPT0mMqaKyhFVditkRf799s3Cy 7/SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fhUf3ysL; 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 q15si13923017eja.36.2019.09.12.19.38.48; Thu, 12 Sep 2019 19:39: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=@ti.com header.s=ti-com-17Q1 header.b=fhUf3ysL; 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 S1727277AbfIMCJQ (ORCPT + 99 others); Thu, 12 Sep 2019 22:09:16 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:50890 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726740AbfIMCJQ (ORCPT ); Thu, 12 Sep 2019 22:09:16 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8D29AF2059679; Thu, 12 Sep 2019 21:09:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568340550; bh=3rFQ5YOQyJCcjWRaEXaDv0l6ekVp8tIORqYcBJwvCSw=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=fhUf3ysL0s9b7ekP7xEBsh8/9FWT7jKAt48LjdWbveQGDguhI297l+A+yY6LOzfV6 P5mbtVnjbxD0zkjLaV919bKrj10EBc4YogFL4wyLPwvcgqBqpJ7YO3VNpIKbgJAsTg 2bm3vOviig07JHQ5sVv9TnPvsMRwYcZF7zDY+w0o= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8D29AFd079295 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Sep 2019 21:09:10 -0500 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 21:09:08 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE104.ent.ti.com (157.170.170.34) 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, 12 Sep 2019 21:09:08 -0500 Received: from [10.250.65.13] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8D298TQ051406; Thu, 12 Sep 2019 21:09:08 -0500 Subject: Re: [PATCH v5 2/9] documention: leds: Add multicolor class documentation To: Pavel Machek CC: , , , References: <20190911180115.21035-1-dmurphy@ti.com> <20190911180115.21035-3-dmurphy@ti.com> <20190912205551.GA13514@amd> From: Dan Murphy Message-ID: <61ccb700-88df-03c0-3fb0-7f955d2b6cb2@ti.com> Date: Thu, 12 Sep 2019 21:09:22 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190912205551.GA13514@amd> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US 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 Hello Pavel Thanks for looking at this again On 9/12/19 3:55 PM, Pavel Machek wrote: > Hi! > >> +Directory Layout Example >> +======================== >> +root:/sys/class/leds/rgb:grouped_leds# ls -lR colors/ >> +colors/: >> +drwxr-xr-x 2 root root 0 Jun 28 20:21 blue >> +drwxr-xr-x 2 root root 0 Jun 28 20:21 green >> +drwxr-xr-x 2 root root 0 Jun 28 20:21 red >> +-rw------- 1 root root 4096 Jun 28 20:21 color_mix >> + >> +colors/blue: >> +-rw------- 1 root root 4096 Jun 28 20:21 intensity >> +-r-------- 1 root root 4096 Jun 28 20:27 max_intensity >> +-r-------- 1 root root 4096 Jun 28 20:21 color_id > I don't really like the directories... A bit too much complexity, and > it will have a memory footprint, too. The directories should be fine to have I am not seeing the complexity. Is memory footprint really an issue? Maybe in the IoT space but this is small and memory footprint should be able to handle this for IoT and larger systems. Having dedicated directories and files clears up issues for user space to know about the parameters for each LED especially with the color_mix file which I still am not a fan of, but conceded and implemented anyway.? It also gives the user space flexibility to call the monochrome LEDs specific intensity file.? The user space can either use the color intensity file or the color_mix file it is a choice for them to make. This code was modeled off the LP50xx device which has individual LED intensity controls as well as a overall brightness control. Since we have no feedback from user space folks I feel we have to give some options not very many but some. > > I'd expect max_intensity to be same for all the leds in > rgb:grouped_leds... Could we simply rely on max_brightness file? I went under the assumption that not all grouped LEDs would have the same max_intensity. I don't have specific use cases but wanted this as an option. Dan > [If not, would one "max_intensity" file in rgb:grouped_leds be > enough?] > > Best regards, > Pavel >