From patchwork Sat Sep 23 13:09:00 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: 14430 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp168466vqu; Sat, 23 Sep 2023 06:10:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2hP2Eb4VMfMmVDsBx+5VoQKw0XPUoDvC8WcrVseVeVK2PcXyJTauq/57tYHeFH7vbYtqO X-Received: by 2002:a05:6a20:9152:b0:15e:2d9f:cae0 with SMTP id x18-20020a056a20915200b0015e2d9fcae0mr1330795pzc.10.1695474610511; Sat, 23 Sep 2023 06:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695474610; cv=none; d=google.com; s=arc-20160816; b=RZA4uAFmHolT+hLpnqEEbq3bgpFPSEcQPOnnShNxAZm/j7N6VtYW4y0a/UGfVp02lG U21jCxm3NchyeHU3mplFvPig0E/PnB7suwIZVxiydsEcNoimBVvmDEv2P49mOBHm40fk 4vQ0IM3Lp9f2qcAdERvVDLW2ETR49IGOYYg46fvF1xCSpcxFQbc3AeQo5A6M0C9yMKp3 Gi7YsE2Fi23x1DK5UzBfKPtmk5qdWeY/f40uv5l2BvHfvV/6BWRadQzj1hokSI6Vly/I tw5LX+Lx15AC/91J8G+U1K9kQXpNKi0kS7Ad/P9xDBn2ak6g99DFcMFjZXCdSvnSx7uP iqtw== 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=qNyEwsCnLKrjB8BMccFPfbn+L9qw0fSQs6WBY6spJNw=; fh=PrKrTEb/BXpu20x977EdrkTOIwBMhl/XYMN/8KXgZRc=; b=q/X8P7dg4Zlr1I24qgyxx0FYkIdpEbUq7/I9pOAkueiYw/cu/zQtg1Zrr1yFR0uzlm egdIMUx3dl4HcI4+JdJRQ8Ta/VPBb83AtrjvgSCvuMTXHAQSOhehgPXOYAF6vDa6g27Q 7Gd7O+amof42Hq/RRZ15ZCX80nuBnj7eiZHvalKgBTmrFGv++aEMITUEPiWm8LLiMQOp eAUta5UU2w2gDWTm7C+5EqGZ0i5PU5MdMWCpaBy9BUn4wnJUyBUaajzbur4kE+aEyvev u1lUtHu44EiQlu1GHhuzlnpGZH/qcIiljEEQ5hF4zZboKLMuVmuDGqFWAGW+mtPw18vI nyOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id gl20-20020a17090b121400b00268a8e0cab3si1741672pjb.178.2023.09.23.06.10.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 06:10:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 D31418332374; Sat, 23 Sep 2023 06:10:07 -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 S231741AbjIWNKC (ORCPT + 29 others); Sat, 23 Sep 2023 09:10:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231410AbjIWNKA (ORCPT ); Sat, 23 Sep 2023 09:10:00 -0400 Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.18.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8B24199; Sat, 23 Sep 2023 06:09:50 -0700 (PDT) Received: from [92.206.139.21] (helo=note-book.lan) by smtprelay03.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qk2OD-00056I-S5; Sat, 23 Sep 2023 15:09:41 +0200 From: =?utf-8?q?Andr=C3=A9_Apitzsch?= Subject: [PATCH v4 0/2] leds: Add a driver for KTD202x Date: Sat, 23 Sep 2023 15:09:00 +0200 Message-Id: <20230923-ktd202x-v4-0-14f724f6d43b@apitzsch.eu> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAGzjDmUC/2XNyQ7CIBQF0F8xrMUwdHTlfxhjHvAQorYVauOQ/ rvUTTXdcck9775JxOAxku3qTQIOPvq2SSFbr4h20JyQepMyEUxIVvCKnnuT3g+aZ4USUBqRMUV SW0FEqgI02k19dbvmR3uB6I4BIUyNLqD1j+/W/pCy87Fvw/M7PfDpd7kycMqo1bwSFi0YU+6g8 /0rarfBO5muDGKWNeOzFElKrSrFNDCBZinlryxmKZMsrVY110VuJPzLcRw/gsxM4zYBAAA= 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= X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no 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: 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]); Sat, 23 Sep 2023 06:10:07 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777833985112483734 X-GMAIL-MSGID: 1777833985112483734 Add the binding description and the corresponding driver for the Kinetic KTD2026 and KTD2027. Signed-off-by: André Apitzsch --- 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 | 625 +++++++++++++++++++++ 4 files changed, 810 insertions(+) --- base-commit: 9641a13970d832d821ad304e187b80dbe70bae30 change-id: 20230618-ktd202x-546b2a7d240b Best regards,