Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4724461rwl; Tue, 28 Mar 2023 10:24:15 -0700 (PDT) X-Google-Smtp-Source: AKy350YVy2rbBSgcVyTZbqpGWzW0AYf58AheyZayh16Q8v7+xtnzEPOhc80iIXfUwnvyFutmpW7r X-Received: by 2002:a17:906:4fc5:b0:939:4d6d:1f26 with SMTP id i5-20020a1709064fc500b009394d6d1f26mr20138355ejw.50.1680024255205; Tue, 28 Mar 2023 10:24:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680024255; cv=none; d=google.com; s=arc-20160816; b=Mz7WjD6vUqXBDi+i1BImSBMPXYj+s9ZYGEZpjW1eIs24Lt0aQaS8+344DB2MH9H4I/ u6uVht5oFDouJ50EbL6Y+kobN//++vjMEDO3xAB9+n7p7wrF+rOsi+fqhlkewNoowQ8A T5XRCp8vebdO1NvkQUPdTBr9XYLtRzVGTkjfNz44Icr/zmv0Y6vZUFLcjYaN+NIRkO90 8mdFCG7LNKluQ+rqN9iSYmop3kgM1Y8qIbT6M4+5AGnu7fGz2U7Baq9eNe42XqPa5jwm 5vr0UZH4HQwTVluIGVHo2uefWqU0i91kWuegBA30nJ/ZUhQCpsRGACwa3ruzUH49xjc8 XbuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=SgQ1uDWJ12zSyFLa1KL/uO5pZA8CWTbblaTqGRUiRdo=; b=ZeyKFIdVeDGJYIEvQVyvOTDGSHVWgj0Gxxc7NZUB3yd9qkr+XI2YDLys3LBxnvuwiA kwrDY3fZ+ayi3zQAEzP193O/4cMgHVD268tqgNC7O4vFbF9oZ7/cPVgHGIZHYuELJUps fZZt6HBv9/Xh8Y1SHaPsfetw0GYjiDz88hhEOYZ9EoHufENIZ3UrisVpLqydNn/rBJjb lmFg8hBsKTXKSAVuEiDk+4hKKV98IXH6HR2E79KAKnUHUVjdbMXDoABBSC88h2qk8nHu 6jaITRDMUS/4hKueFrcV3KWkntPJ3aSTXBym8Ga/1uusuodZlVhP5Dt3+Zrc/vO+dky3 M5mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kMK0ic7Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e21-20020a170906845500b0092679d231easi27535138ejy.332.2023.03.28.10.23.49; Tue, 28 Mar 2023 10:24:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kMK0ic7Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229768AbjC1RQA (ORCPT + 99 others); Tue, 28 Mar 2023 13:16:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229606AbjC1RP7 (ORCPT ); Tue, 28 Mar 2023 13:15:59 -0400 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B8DA9750; Tue, 28 Mar 2023 10:15:58 -0700 (PDT) Received: by mail-qv1-xf29.google.com with SMTP id m16so9607471qvi.12; Tue, 28 Mar 2023 10:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680023757; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SgQ1uDWJ12zSyFLa1KL/uO5pZA8CWTbblaTqGRUiRdo=; b=kMK0ic7Qlbdr8IiQGvB14KNwUzwnLDcN3k5kZYiVrk866xZWXej5yNhbPmlwS8pUFT qDQ0KvDTlJzkVHZdYJZrjh6rLIbvg55Ur9P4jzY3UiwOCsiJj9MZRRmBRxNq56TCsAa8 GC12vX8Lu7XVDOTxGNCyyTh3VhxsPFLGJFINGm5Gox3apZWsrHKWfpKNiZeIGBqtiQwD 7UQlL7vVwYGHzJD1gGQFjC52QMT/Ow6Mm1QwNLW8pCEpGl4c7BGxiAptB9WiqbmAKdQQ 2jh0tASRTnTpnjcz49IBZtriyiqEZLlAxLVZfGxYV+IoRCAP3iD78SHJ2C9EHlVK7GjW IzUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680023757; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SgQ1uDWJ12zSyFLa1KL/uO5pZA8CWTbblaTqGRUiRdo=; b=GZXayN/UMzAYNx8O4DyQ2tnBFB85bjXwCeTaVA9x8DyQQvNhYg3XVxuJu4Gwl8UiRg lQ/oyGRJrKsqyUTDwo19259Cyu4Hqof51QcJ/pfIzhGHixDY9Cja8JJa/CvW0lfkoEOq vZkc3EviSpOxCWnxzaYe/ORMQ2gsw7wfRYTaQuVGLBNSXaRwQw7wuyYOzUmbeEBiNxCE HJUvGIp2JMwkPlmln++Xrn8OvZBEQrYv6NOv175rNM38n64+w2gNxsNSwzaVMqhD+mrx 7XRANl7D3qRuCrygLbfxxHlCNzvnJTB1eOEwKEBsUvfHPZGkw8JjsprSCzw3hsUkWz48 hhcA== X-Gm-Message-State: AAQBX9foY73wNBigAqDGWzBpxI9eE2CfEOMuBclOElvVn6ZRQ8UJciGg Bhu/kxszD8wIEgmDqyLZ9iRzGmkIpUBLFp0mjrXWxMvtCyo= X-Received: by 2002:ad4:4a6d:0:b0:56f:6925:eb2c with SMTP id cn13-20020ad44a6d000000b0056f6925eb2cmr2803163qvb.10.1680023757607; Tue, 28 Mar 2023 10:15:57 -0700 (PDT) MIME-Version: 1.0 References: <20230328161541.599463-1-jjhiblot@traphandler.com> <20230328161541.599463-5-jjhiblot@traphandler.com> In-Reply-To: <20230328161541.599463-5-jjhiblot@traphandler.com> From: Andy Shevchenko Date: Tue, 28 Mar 2023 20:15:21 +0300 Message-ID: Subject: Re: [PATCH v8 4/6] leds: class: store the color index in struct led_classdev To: Jean-Jacques Hiblot Cc: lee.jones@linaro.org, pavel@ucw.cz, robh+dt@kernel.org, sven.schwermer@disruptive-technologies.com, krzysztof.kozlowski+dt@linaro.org, johan+linaro@kernel.org, marijn.suijten@somainline.org, jacek.anaszewski@gmail.com, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 28, 2023 at 7:15=E2=80=AFPM Jean-Jacques Hiblot wrote: > > This information might be useful for more than only deriving the led's > name. And since we have this information, we can expose it in the sysfs. ... > +Date: March 2023 > +KernelVersion: 6.3 Outdated version. ... > + Color of the led. > + > + This is a read-only file. Reading this file returns the c= olor > + of the led as a string (ex: "red", "green"). There are no strict rules about colour and I don't think it's a good idea. Why in such a case is it different to label? My proposal here at least documenting that the colour must follow one of the existing naming standards (like RGB in hex, HTML, or name in accordance with chosen standard). Yet, it won't technically prevent abusing that, but at least will show the intention and allow pointing out to the bugs or develop user space tooling based on existing parsers (if any). --=20 With Best Regards, Andy Shevchenko