From patchwork Thu Jun 1 11:08:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13263527 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7C223C7EE32 for ; Thu, 1 Jun 2023 11:08:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=q6cB9U/nY8u9tXnddVb5lj4gimQnZ8nYytEmMQ8SdGE=; b=5AD8S2xBDpv1oz hYwjuz9QWDXp9au0FxHGgzp4JNvlF2a+ly9eGOZ43uVJ0NKoFtP6uswMAWjgM+pe6+iD+AGCkU+b3 yXEOGZ02e66lqBtDIU4pHhXy/vcSgqgz5mtlkafsQYOKlpFV0OYLIMdRMAlCpwbwY4f3nct5hgJwx 3KAOZlzqgRUExJvpdjPBi0KnrGULIGELBkRjW0UHDoV0kix7PYA2dP2BUxPva1BZncDurx+smeMNN w5VGn02vmzdi5/A6t1UZE/GP1hCc0GByKMajOxNXvt4ztTHF2rLj1lUk7NggqAUlC5I3+zkUhUU2o 30s5LXoukzUsl7UDqB7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q4gAO-003Awp-2B; Thu, 01 Jun 2023 11:08:28 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q4gAK-003Apj-0t; Thu, 01 Jun 2023 11:08:25 +0000 Received: from IcarusMOD.eternityproject.eu (unknown [IPv6:2001:b07:2ed:14ed:a962:cd4d:a84:1eab]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 0C5E26606EBB; Thu, 1 Jun 2023 12:08:18 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1685617698; bh=Sse+Q1M/NQWUrVoTeA+SiLfS8fyeSQsrOZ1ZDEDAn2U=; h=From:To:Cc:Subject:Date:From; b=lRPk/Z3FXbz2jdk5r/vUaSO1C6jjTZmtwzaAZGeFXsPn+6Dx0WyuyeJF1VNxMCfUj n1VC4p+3H3MkKKmUB6WyVFbujawywFv9CMmkKe6VwikoYjjbjeSAv/KL61dXq1PiG6 EormIXqeimQpdSJeKy/FM2LowMeX0yOqN9+xOPESI3zBuHu6+NQH44NTvFvvE8BnZi frJU1KlWKv2s4P8igJ7x6p5OmJEmOFnU1d7qBJ/s98YVq1G7Mbn9b8fqefe88kRVOE mECU7d2tH7sa8ftssUXSC2QhAA6qmgl5FOD8ig99MJ5kfPdficOXYCplkJyBtRSZIv 4jbLR9Sj+js2w== From: AngeloGioacchino Del Regno To: pavel@ucw.cz Cc: lee@kernel.org, sean.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com, AngeloGioacchino Del Regno Subject: [PATCH v3 0/8] Add support for MT6331 and MT6332 LEDs Date: Thu, 1 Jun 2023 13:08:05 +0200 Message-Id: <20230601110813.2373764-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230601_040824_471328_B5C85FBD X-CRM114-Status: GOOD ( 12.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Changes in v3: - Rebase over next-20230601 - Beautified ISINK_CON0 comment - Added binding for mediatek,is-wled property Changes in v2: - Rebase over next-20230412 NOTE: Since v1 of this series was sent in Semptember 2022 and got ignored for *7 months* with no feedback, I'm retrying the upstreaming of this same series. There are no changes, if not just a simple rebase and another test run on the same hardware. MT6323 is not the only PMIC that has a LEDs controller IP and it was found that the others do have a compatible register layout, except for some register offsets. The logic contained in this driver can be totally reused for other PMICs as well, so I can't see any reason to keep this specific to the MT6323 part. This series brings meaningful platform data to this driver, giving it flexibility and adding support for LED controllers found in the MT6331 and MT6332 PMICs. Tested on MT6795 Sony Xperia M5 smartphone. AngeloGioacchino Del Regno (8): dt-bindings: leds: leds-mt6323: Document mt6331 compatible dt-bindings: leds: leds-mt6323: Document mt6332 compatible dt-bindings: leds: leds-mt6323: Support WLED output leds: leds-mt6323: Specify registers and specs in platform data leds: leds-mt6323: Drop MT6323_ prefix from macros and defines leds: leds-mt6323: Open code and drop MT6323_CAL_HW_DUTY macro leds: leds-mt6323: Add support for MT6331 leds leds: leds-mt6323: Add support for WLEDs and MT6332 .../devicetree/bindings/leds/leds-mt6323.txt | 6 +- drivers/leds/leds-mt6323.c | 448 ++++++++++++++---- 2 files changed, 352 insertions(+), 102 deletions(-)