Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp575581rwd; Thu, 1 Jun 2023 04:12:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Ry2yYX11VjNZlvYKPaGDT7PqyVaoUCEQYU2wsVB6hLurPxDyrZBlIrjDvo52CkZDdvVwk X-Received: by 2002:a17:902:cecf:b0:1b0:3ab6:5143 with SMTP id d15-20020a170902cecf00b001b03ab65143mr5576782plg.68.1685617937792; Thu, 01 Jun 2023 04:12:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685617937; cv=none; d=google.com; s=arc-20160816; b=lUOTisH9Rej333Lf9fW7iD/mPigG/nD1UKdLtgO0VozbEj6CvTaOhgZZzZgbjcMhNa jPw08uqZ/Ac+y8eZ2bBhFRV9r21uqZZfRdQYrIdrIkt5nuep9ZY5VCAXe42wuP7I+zjY cNpkBRCimfK79YRkMK5aq5oId0SYLhgapQADtANRJxCw5N0cLS7AE5kCSGItuYyC4jse r38T2gftNipaDYt4KK3pausMbbj1ihBy82i+x0ojEEooQaNmX9ZP6HAqQ/PUQHMA2MPP 66MOG8vCIJl+i3RHk6A89Y/PEDlvnX/iLzIadG19u1h1/TTWbfzom6u5FE0dLY6+kMGB hGhw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NbAz+r7uoZ7wuykGk7qr8Q7vqrx3JT2sQ4TzqRjq868=; b=zraOwVA+ELr228KUnbS2R71TpeDc8r3+GO218l8M8qwxJtyR8RleTDJ/i5bT9NBEz+ gB9JIHwhdK6z0RgzyWVsXzCoWOUIysfOmj72P9x/EDVWIBu8AGGxtYpRTuWt+Gb+Zk5Q Th+isqz86J/resup72yxPLbvoCkSxa1CCg+r7oUE5IdF9SNKBxAvliHN63CYxdhaw6/F Lcj8ecxhprKzjlti0ODIj8oLGYZ/Yn7C4JU3T36QUf1JH+FJA2/l3l1tFrEPPjZZMPgz d4s8nlQFisCy8SsrBwoIjLseMubHmovWlNS1rLzZdjYkr55XvPt2YYh1EWAJ0ToZoFvw GOAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=R3IqwhnC; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ij14-20020a170902ab4e00b001a1be5ca65asi2505235plb.528.2023.06.01.04.12.02; Thu, 01 Jun 2023 04:12:17 -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; dkim=pass header.i=@collabora.com header.s=mail header.b=R3IqwhnC; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233258AbjFALIu (ORCPT + 99 others); Thu, 1 Jun 2023 07:08:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232853AbjFALIe (ORCPT ); Thu, 1 Jun 2023 07:08:34 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94C70133; Thu, 1 Jun 2023 04:08:26 -0700 (PDT) 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 A75DE66003B1; Thu, 1 Jun 2023 12:08:24 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1685617705; bh=rtkU/LXfohClR1Fp46CLmRkHJo8bXflFgsmdF+fF9IQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R3IqwhnCOUQ5YmTsSOqw9XdFRg+83XHDCkTO62ylLR0xe/WV4OpHY9agl0/YzJadB qf6XaEV3z5M9Z4NWgfqathD5tfvjH5WTv6bsw2v4lCLEugFVGJdrac28A013ig+XFX APMTSf8Dg/3JjFno1S+ERcfKzsd7J92Uu3GPyFpvNx0XnfXoQfoZwBN9mOtPRRshK6 NTStgOTinKjaOHfXYfgbN2b9X7jC3Nli9fUPrIvRetgGeeVtT845LmW6LYBZBaW6tr 3SwlBd5WLThvFN4qJ3ClTA4pjBgjktrFvJxCypl9xSXCWzLAfzMeS4f3A4EgIrVYvh Os795yIVjI1jA== 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 , Alexandre Mergnat Subject: [PATCH v3 7/8] leds: leds-mt6323: Add support for MT6331 leds Date: Thu, 1 Jun 2023 13:08:12 +0200 Message-Id: <20230601110813.2373764-8-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230601110813.2373764-1-angelogioacchino.delregno@collabora.com> References: <20230601110813.2373764-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, 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 Add the register offsets for MT6331. The hwspec is the same as MT6323. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Pavel Machek Reviewed-by: Alexandre Mergnat --- drivers/leds/leds-mt6323.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/leds/leds-mt6323.c b/drivers/leds/leds-mt6323.c index f8bd9f17e89c..85b056fcd94e 100644 --- a/drivers/leds/leds-mt6323.c +++ b/drivers/leds/leds-mt6323.c @@ -529,6 +529,17 @@ static const struct mt6323_regs mt6323_registers = { .isink_en_ctrl = 0x356, }; +static const struct mt6323_regs mt6331_registers = { + .top_ckpdn = (const u16[]){ 0x138, 0x13e, 0x144 }, + .num_top_ckpdn = 3, + .top_ckcon = (const u16[]){ 0x14c, 0x14a }, + .num_top_ckcon = 2, + .isink_con = (const u16[]){ 0x40c, 0x40e, 0x410, 0x412, 0x414 }, + .num_isink_con = 5, + .isink_max_regs = 4, /* ISINK[0..3] */ + .isink_en_ctrl = 0x43a, +}; + static const struct mt6323_hwspec mt6323_spec = { .max_period = 10000, .max_leds = 4, @@ -541,8 +552,14 @@ static const struct mt6323_data mt6323_pdata = { .spec = &mt6323_spec, }; +static const struct mt6323_data mt6331_pdata = { + .regs = &mt6331_registers, + .spec = &mt6323_spec, +}; + static const struct of_device_id mt6323_led_dt_match[] = { { .compatible = "mediatek,mt6323-led", .data = &mt6323_pdata}, + { .compatible = "mediatek,mt6331-led", .data = &mt6331_pdata }, {}, }; MODULE_DEVICE_TABLE(of, mt6323_led_dt_match); -- 2.40.1