Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp98170rwb; Sat, 17 Sep 2022 01:26:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6cFBmOTm0iHZEqLAzdreyN+RptZj5TAosiF2JWrRiD8eA/EuPrdosiB3vOxhR1YKrN7tUm X-Received: by 2002:a05:6402:538f:b0:444:c17b:1665 with SMTP id ew15-20020a056402538f00b00444c17b1665mr7108824edb.98.1663403203836; Sat, 17 Sep 2022 01:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663403203; cv=none; d=google.com; s=arc-20160816; b=uymvYMPiUUYc2sVNjrH1H+2UvTbgvgVUQKjYqFTZh9HuZGTmXoRSnK8ArTbYHhS6w6 jEtLOBEoOpNdSwk5oCjKhOHTo1wa2ar+Qj3XC1M0eFfVnHpcdIGG3PZKNd4DPOVdrVh9 HAvymNdoQxuf838qPASt/9owOzY3dvoeAT+X9VOocJAvEkZOZ8o4WiJIczANi7xZlavX VPXhE/b+OcDDXAmmzFDyXFPaBZox03wpkHxOhqZMlPRmNBzT4QSxGPFIQF2NcGj/lLDh tMD+zbrLVOAQCCxVagVA92X/xBFxWSuphwPDC77q6cNZterVoYbesXoLZ2jHDlTwm0F5 qJgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=rjoqCgggwIqArC1Dv7wHMfVvNc56RysVs8lpjV0M4eE=; b=a0ZhAznh+kAgX9QPSbV1wJQpFNBW7qpLHemDYoFcLjca38pf6yARvJaZFU3E7n/cg9 XRdzB6AM58aqTW83KdEOxgSDnEuH5xLbFL4dUdh0D8JYIkziHaWFGc6vj9CY9ym7C8Qw NscbQ+SvFZQiX3Hnt9VWvXd4Ky9ErKE6z/tGNB9wiQDV8kKPXYyo8EpSs1Nhj2UMF4Sm dnZF2OMzPGOmBopYzoCh+hH+13PCRgewT4hR6aptcr5akqldXfdITDVyVJkm+PqyaCuw 6CJdvbzCBL173ShhjQLLjrwwiN6m0VGozawh7HeriWWZQWxTC4jF8C7RsZCE/zPssmYG UIug== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t13-20020a056402524d00b0043ce8b2c72dsi4832750edd.36.2022.09.17.01.26.16; Sat, 17 Sep 2022 01:26:43 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229743AbiIQIOc (ORCPT + 99 others); Sat, 17 Sep 2022 04:14:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbiIQIOR (ORCPT ); Sat, 17 Sep 2022 04:14:17 -0400 Received: from smtpout1.mo528.mail-out.ovh.net (smtpout1.mo528.mail-out.ovh.net [46.105.34.251]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14CC93E740; Sat, 17 Sep 2022 01:14:15 -0700 (PDT) Received: from pro2.mail.ovh.net (unknown [10.109.156.240]) by mo528.mail-out.ovh.net (Postfix) with ESMTPS id DED98128726EB; Sat, 17 Sep 2022 10:13:54 +0200 (CEST) Received: from localhost.localdomain (88.161.25.233) by DAG1EX1.emp2.local (172.16.2.1) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Sat, 17 Sep 2022 10:13:54 +0200 From: Jean-Jacques Hiblot To: , , , CC: , , , , , , , , Jean-Jacques Hiblot Subject: [RESEND PATCH v3 0/4] Add a multicolor LED driver for groups of monochromatic LEDs Date: Sat, 17 Sep 2022 10:13:35 +0200 Message-ID: <20220917081339.3354075-1-jjhiblot@traphandler.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [88.161.25.233] X-ClientProxiedBy: DAG1EX2.emp2.local (172.16.2.2) To DAG1EX1.emp2.local (172.16.2.1) X-Ovh-Tracer-Id: 9350317254453311767 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvvddgtddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgtghisehtkeertdertddtnecuhfhrohhmpeflvggrnhdqlfgrtghquhgvshcujfhisghlohhtuceojhhjhhhisghlohhtsehtrhgrphhhrghnughlvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeejuefhkeelgffhlefhtefhgeektdevvdfgkeeltdehgeeujeeutdehkeeuhffftdenucfkpheptddrtddrtddrtddpkeekrdduiedurddvhedrvdeffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepphhrohdvrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepjhhjhhhisghlohhtsehtrhgrphhhrghnughlvghrrdgtohhmpdhnsggprhgtphhtthhopedupdhrtghpthhtohepshhhrgesphgvnhhguhhtrhhonhhigidruggvpdfovfetjfhoshhtpehmohehvdek X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE autolearn=ham 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 Hi, Resending this series with only a minor modification in the binding example after the comments from Sascha Hauer. Thanks, JJ Original v3 message: Some HW design implement multicolor LEDs with several monochromatic LEDs. Grouping the monochromatic LEDs allows to configure them in sync and use the triggers. The PWM multicolor LED driver implements such grouping but only for PWM-based LEDs. As this feature is also desirable for the other types of LEDs, this series implements it for any kind of LED device. changes v2->v3, only minor changes: - rephrased the Kconfig descritpion - make the sysfs interface of underlying LEDs read-only only if the probe is successful. - sanitize the header files - removed the useless call to dev_set_drvdata() - use dev_fwnode() to get the fwnode to the device. changes v1->v2: - Followed Rob Herrings's suggestion to make the dt binding much simpler. - Added a patch to store the color property of a LED in its class structure (struct led_classdev). Jean-Jacques Hiblot (4): leds: class: simplify the implementation of devm_of_led_get() leds: class: store the color index in struct led_classdev dt-bindings: leds: Add binding for a multicolor group of LEDs leds: Add a multicolor LED driver to group monochromatic LEDs .../bindings/leds/leds-group-multicolor.yaml | 64 ++++++++ drivers/leds/led-class.c | 27 ++-- drivers/leds/rgb/Kconfig | 6 + drivers/leds/rgb/Makefile | 1 + drivers/leds/rgb/leds-group-multicolor.c | 153 ++++++++++++++++++ include/linux/leds.h | 1 + 6 files changed, 238 insertions(+), 14 deletions(-) create mode 100644 Documentation/devicetree/bindings/leds/leds-group-multicolor.yaml create mode 100644 drivers/leds/rgb/leds-group-multicolor.c -- 2.25.1