From patchwork Wed Sep 6 20:55:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Apitzsch?= X-Patchwork-Id: 721010 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 70B31EE14D7 for ; Wed, 6 Sep 2023 20:55:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244580AbjIFU4B (ORCPT ); Wed, 6 Sep 2023 16:56:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236060AbjIFU4A (ORCPT ); Wed, 6 Sep 2023 16:56:00 -0400 Received: from smtprelay06.ispgateway.de (smtprelay06.ispgateway.de [80.67.18.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31AD8133; Wed, 6 Sep 2023 13:55:56 -0700 (PDT) Received: from [77.64.243.219] (helo=note-book.lan) by smtprelay06.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdzZ2-0003MR-GF; Wed, 06 Sep 2023 22:55:52 +0200 From: =?utf-8?q?Andr=C3=A9_Apitzsch?= Subject: [PATCH v3 0/2] leds: Add a driver for KTD202x Date: Wed, 06 Sep 2023 22:55:16 +0200 Message-Id: <20230906-ktd202x-v3-0-7fcb91c65d3a@apitzsch.eu> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIADTn+GQC/2WNyw7CIBBFf6VhLQboU1f+hzHNAIMQta1Qm2rTf 5d20xh3cyfn3DuRgN5hIMdkIh4HF1zbxJDuEqIsNFekTsdMBBMpK3hFb72O90jzrJACSi0yJkm kJQSk0kOj7MLL5yOvzR2CrT2CX4jOo3HjunW+xGxd6Fv/XqcHvnz/VwZOGTWKV8KgAa3LE3Su/ wRl9/giS8sgNvPA+GaKaKZKVpIpYAL1rznP8xe8fIv3/AAAAA== To: Pavel Machek , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , =?utf-8?q?Andr=C3=A9_Apitzsch?= , Krzysztof Kozlowski X-Mailer: b4 0.12.3 X-Df-Sender: YW5kcmVAYXBpdHpzY2guZXU= Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add the binding description and the corresponding driver for the Kinetic KTD2026 and KTD2027. Signed-off-by: André Apitzsch --- Changes in v3: - Add r-b to bindings patch - Replace .probe_new by .probe - Link to v2: https://lore.kernel.org/r/20230901-ktd202x-v2-0-3cb8b0ca02ed@apitzsch.eu Changes in v2: - Make binding description filename match compatible - Address comments by Lee Jones - Extend driver description in Kconfig - Add copyright + link to datasheet - Add unit to definition/variable names, where needed - Define magic numbers - Remove forward declaration of 'struct ktd202x' - Remove superfluous comments - Get rid of struct ktd202x_info - Join ktd202x_chip_init() with ktd202x_chip_enable() - Return the error on ktd202x_chip_disable() - Remove unreachable case from chip_in_use() - Rename ktd202x_brightness_set() argument from num_colors to num_channels - Forward errors received in ktd202x_brightness_set() - Remove variable for 'num_channels = 1' - Add some explanations to blink time calculation - Remove unneeded lcdev from ktd202x_blink_*_set() - Add define for max brightness and replace deprecated LED_FULL by it - Move setting led_classdev.brightness to ktd202x_brightness_*_set() - Move mutex_lock inside ktd202x_blink_set() - Add comment that 'color' property is optional (allow EINVAL) - Replace escaped double quotes by single quotes - Avoid overloading variable 'color' - Do not lock during probe - Remove usage of 'of_match_ptr' - Document interrupt and pull-up supply, like done for aw2013[1] - Fix error in num_steps calculation - Link to v1: https://lore.kernel.org/r/20230618-ktd202x-v1-0-fc182fefadd7@apitzsch.eu [1] https://lore.kernel.org/linux-leds/20230815-aw2013-vio-v3-0-2505296b0856@gerhold.net/ --- André Apitzsch (2): dt-bindings: leds: Add Kinetic KTD2026/2027 LED leds: add ktd202x driver .../devicetree/bindings/leds/kinetic,ktd202x.yaml | 171 ++++++ drivers/leds/rgb/Kconfig | 13 + drivers/leds/rgb/Makefile | 1 + drivers/leds/rgb/leds-ktd202x.c | 625 +++++++++++++++++++++ 4 files changed, 810 insertions(+) --- base-commit: 66d9573193967138cd12e232d4b5bc2b57e0d1ac change-id: 20230618-ktd202x-546b2a7d240b Best regards,