Message ID | 20231001-ktd202x-v5-0-f544a1d0510d@apitzsch.eu |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp882430vqb; Sun, 1 Oct 2023 06:53:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEycTxObBECwQzFfCY/8qA6Yx7upRwPtexwjoYXt5WbftOqWzV1hKW1X8ftchnCPVvuvWh3 X-Received: by 2002:a05:6a21:7887:b0:148:658a:a73d with SMTP id bf7-20020a056a21788700b00148658aa73dmr9128236pzc.5.1696168398773; Sun, 01 Oct 2023 06:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696168398; cv=none; d=google.com; s=arc-20160816; b=udQjOZv8VNXmLRnuozbTr6HVZMqogxktAqtHbRkFGTiGhiq2eDz6pnQkAHjU3C/XGo 4ScE0dAoYvH7LXYSKrfdwh/RARCqDP8RkZzmDgffjKzB08jZIT8+BFFKKS5cBHl2Ap9C nYmfbxkhvmdyDNBV3KbGnzgZUA5wxjrOI+Txeo+dlowfXd3ZCyg8M/iI8cJbiSnwmEOK 3Azt9oXQU7Sddbne+dY10c7VcnQz82KXOfmEC/nevZdFSHYSozdyvXkWDjx38qgBXwSr vDHJpZRdzOhvk4J28MwF1I71DyZOXwjmTsI94ZP3wADEDqRCSbLaCiOtWGDXpvwT8mfo wAyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from; bh=uc5TaKjbNKdLiywhkahM1CmgTRYWpESaZbHhsgsQ2NU=; fh=PrKrTEb/BXpu20x977EdrkTOIwBMhl/XYMN/8KXgZRc=; b=wnW3cRLXvE87mMBm5vdLQJvaoZAKXSenUVBwJjgVes1q+szZSRphnatvJIBf0jYkDK KgQQ7GQ4zk1BcV/TiQGIZXg8ngiySMTme63NYRSFFW5WkVGP0SctEs1SYxbB3Q5ur5WI Muv1AaBTT0HSgaq31ErWoEk4WEJmACGTO7vEzWUQwBKobiV8BrxvJCKmR+4rYOkCykmP L4KLkj53K2QpzK95ugaVtk1v1l7r/3Vg3pPHSBToifZWlDNEmF1X9OEhRIO/yf5ywISE KwfJk3CyWDjNBX+YJh19+DxIJIUvYDqww1g064YV1ofvZM+2lDD27WQCXpMkXxZfwXte l05g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id kg3-20020a170903060300b001bf0e15c0a9si23661070plb.269.2023.10.01.06.53.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 06:53:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 60EEC802F679; Sun, 1 Oct 2023 06:53:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235060AbjJANwu (ORCPT <rfc822;chrisfriedt@gmail.com> + 18 others); Sun, 1 Oct 2023 09:52:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234285AbjJANws (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 1 Oct 2023 09:52:48 -0400 Received: from smtprelay05.ispgateway.de (smtprelay05.ispgateway.de [80.67.18.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8F21AB; Sun, 1 Oct 2023 06:52:44 -0700 (PDT) Received: from [92.206.139.21] (helo=note-book.lan) by smtprelay05.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <git@apitzsch.eu>) id 1qmwsD-0004h3-Cy; Sun, 01 Oct 2023 15:52:41 +0200 From: =?utf-8?q?Andr=C3=A9_Apitzsch?= <git@apitzsch.eu> Subject: [PATCH v5 0/2] leds: Add a driver for KTD202x Date: Sun, 01 Oct 2023 15:52:11 +0200 Message-Id: <20231001-ktd202x-v5-0-f544a1d0510d@apitzsch.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAIt5GWUC/2XNQW7DIBAF0KtErEsEA8ZOV71HFEUDDAW1dVJwr TSR7x6cjRN5x0f/zb+xQjlRYe+bG8s0ppJOfQ3N24a5iP0n8eRrZiBACSM7/jX4+r7wRhsL2Hr QwrLatliI24y9i3Pf/v40x/CNJR4zYZ4b50whXR5b+0PNMZXhlP8f06Ocf9cro+SCByc7CBTQ+ /YDz2m4Fhe39MfmKyMscifkIqFK5WxnhUMB5NdSPUuzSFVlG5zdSWcar3At9ZMEtUhdpdShBR2 M18q+ymma7usZgAlwAQAA To: Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org> 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?= <u.kleine-koenig@pengutronix.de>, =?utf-8?q?Andr=C3=A9_Apitzsch?= <git@apitzsch.eu>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> X-Mailer: b4 0.12.3 X-Df-Sender: YW5kcmVAYXBpdHpzY2guZXU= X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sun, 01 Oct 2023 06:53:08 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778561474970152865 X-GMAIL-MSGID: 1778561474970152865 |
Series |
leds: Add a driver for KTD202x
|
|
Message
André Apitzsch
Oct. 1, 2023, 1:52 p.m. UTC
Add the binding description and the corresponding driver for
the Kinetic KTD2026 and KTD2027.
Signed-off-by: André Apitzsch <git@apitzsch.eu>
---
Changes in v5:
- Restructure brightness_set() + add comments to it to be easier understandable
- Add some line breaks + remove little line-wraps to improve readability
- Move parts of add_led() to setup_led_{rgb,single}()
- Move mutex_init() to the end of probe to omit gotos
- Fix grammar
- Set initial intensity to max brightness to avoid LED staying off when
brightness is changed after switching to timer trigger, because of zero
intensity
- Link to v4: https://lore.kernel.org/r/20230923-ktd202x-v4-0-14f724f6d43b@apitzsch.eu
Changes in v4:
- Annotate struct ktd202x with __counted_by
- Link to v3: https://lore.kernel.org/r/20230906-ktd202x-v3-0-7fcb91c65d3a@apitzsch.eu
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 | 619 +++++++++++++++++++++
4 files changed, 804 insertions(+)
---
base-commit: 165adeea3617ea22dc49f8880474ebf3a98b696d
change-id: 20230618-ktd202x-546b2a7d240b
Best regards,