From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40E66ECAAD3 for ; Sat, 17 Sep 2022 08:14:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229772AbiIQIOd (ORCPT ); Sat, 17 Sep 2022 04:14:33 -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 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