Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp427548rwe; Wed, 24 Aug 2022 03:33:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Qq7P8+4528pDPQkijmOQQP5mU6dJFMPjqKjjnppALFkY5nBoFrpLIiOjwq3sfzueZB//b X-Received: by 2002:a17:907:e8d:b0:730:a4e8:27ed with SMTP id ho13-20020a1709070e8d00b00730a4e827edmr2409507ejc.58.1661337202605; Wed, 24 Aug 2022 03:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661337202; cv=none; d=google.com; s=arc-20160816; b=E5JsZrJNZ0ABT9LULzA5Qznml5OyE+mJ6REex0gYWinzmj4CrqItidrn9Ja3bTh+eA 4NH53355aLe3hyrPxQnT6S65shpNPJADkx3ohNk/PAiTGsKK0znIi4ub/973QZh4R/Y+ EMgOZ4O6tN9kzPcCkW+iWQO4W42RVwTjlRf7+/beYtHH/9dduO2mYihrbrbxexYRU8ne hA420s6oOZ9T1KaaO5ZDGimxTGQnLtKCsp0PSlNd0vyHWs1Lihad/j9K2VthL0ZfDuRu abtNxS/2ulh5Uv9wTtwOhVPNiDntDD6O65Vw16Rkj4MxczMS3kZ3SwNL+NE4/iwS2nvy t7cg== 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=HTRv5n1t7ZQ52lAL1xEnlVs4YCg0nDtMEjoxLTcAFR4=; b=G6mzERzO+CYCKTGTNCaC6n71usR2Zqxx6myBerfY9uLB9H6eaym5kSwCxV4JZGJJ6/ tG8pIsY5pZybt7gj6plNHat9WUoN9nPUJJmB7rRZYo9E9Gad9dhIVR+wtYGnFsLnpMIL w1OkMB4qF9FhZclqIxvF9CyKOF2KCTOyfdyPdfl1z04yD3EdqeeVQ4pd/L+VSe/2/bFg Ekv92BXcWMjpTEf8+AbUfHAwlX+k4vVtI4mDDkAaqEhbKIf9NuOqVfQvb3bUGeiVGBTC hljPFD7kiZjr+qSIAxWbhRO3SjCeWG2551rMiK14gpqiEfit6ijHJ8dXZ5VghFBvhtPQ kHuA== 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 n11-20020a17090695cb00b0073d786c730fsi1331539ejy.237.2022.08.24.03.32.55; Wed, 24 Aug 2022 03:33:22 -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 S232143AbiHXKbI (ORCPT + 99 others); Wed, 24 Aug 2022 06:31:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231569AbiHXKbH (ORCPT ); Wed, 24 Aug 2022 06:31:07 -0400 Received: from smtpout1.mo3004.mail-out.ovh.net (smtpout1.mo3004.mail-out.ovh.net [79.137.123.219]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2764676768; Wed, 24 Aug 2022 03:31:04 -0700 (PDT) Received: from pro2.mail.ovh.net (unknown [10.109.138.144]) by mo3004.mail-out.ovh.net (Postfix) with ESMTPS id 058F223D8F9; Wed, 24 Aug 2022 10:31:01 +0000 (UTC) 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; Wed, 24 Aug 2022 12:31:01 +0200 From: Jean-Jacques Hiblot To: , , , CC: , , , , , , , Jean-Jacques Hiblot Subject: [PATCH v3 0/4] Add a multicolor LED driver for groups of monochromatic LEDs Date: Wed, 24 Aug 2022 12:30:28 +0200 Message-ID: <20220824103032.163451-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: DAG4EX1.emp2.local (172.16.2.31) To DAG1EX1.emp2.local (172.16.2.1) X-Ovh-Tracer-Id: 18295310536303851995 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrvdejuddgvdelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgtghisehtkeertdertddtnecuhfhrohhmpeflvggrnhdqlfgrtghquhgvshcujfhisghlohhtuceojhhjhhhisghlohhtsehtrhgrphhhrghnughlvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeejuefhkeelgffhlefhtefhgeektdevvdfgkeeltdehgeeujeeutdehkeeuhffftdenucfkpheptddrtddrtddrtddpkeekrdduiedurddvhedrvdeffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepphhrohdvrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepjhhjhhhisghlohhtsehtrhgrphhhrghnughlvghrrdgtohhmpdhnsggprhgtphhtthhopedupdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdfovfetjfhoshhtpehmoheftddtge X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 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. 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 | 61 +++++++ 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, 235 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