Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4846736imw; Tue, 19 Jul 2022 14:37:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s7rO0+VsKOC+HimXHiF8YvV3Dbx0VeqbDX3otKbkDm7Fmso3N8GgBfEZWwmqSCiOqIGSbJ X-Received: by 2002:a17:906:6a14:b0:72b:64bd:ea2b with SMTP id qw20-20020a1709066a1400b0072b64bdea2bmr30816775ejc.680.1658266675253; Tue, 19 Jul 2022 14:37:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658266675; cv=none; d=google.com; s=arc-20160816; b=cLL5F5YAz9KH6eKRBBJchXGwGza4AVyjwXAAOYm9agqPiqOs6CZ3Mn6x1H8I3rnHG/ sKmroCldHWt9XbpEV7ShIZ/No0I5tDuUSLeCLy0J/hspj9G+KwM/7zkhTKjNc0lTuTa2 S703vDk03t5k5kd4wmd4KPWOw6WzeP4ceO44CrGbwxHrDxgwN6z4c8hQz2PLIpgWqi6z P6o/H76fuIgaJCpNB7Bbn/8tg8JkvKi1CLcS3iBnPNOTg02lOkdY4wKPBHcdqYNPqRQS fzBGEgty5IcGiaCdz/fC368Ykia5Gc9ayLHE/vCZfMw1U59raWxq2SFiUqGeoP+dCm0o PISw== 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; bh=tBnBvEW4+Wf6lnsyEuZ+VbktwVpVWRR9xZoOgap2ydg=; b=xj926H5/UFdIIJT2k9PN2qkPQebPGNdNZmKyIH/0Q6MmzYSkXZhT1TJAR8O+dPCXt4 de2NaoXUC4iSc3R3APeP5wevwANLHdTI2xyI9QBKVPGSWF27HJu5B743HkVnMa9IiSqz Y8aEHGxJrYp248U4lJbBdhEwoVCa0SKtJIbpE6mfaHlHBBlfIVPqOkKA2tMsDPFAk5mH EHV5kiswfuaBJq5hsaDHNwn3hFW0ORzP3H2N0/ANtJXSeoufRzVfiFdKIdSlPRP8/9n9 5IrwB2+TJr8ellvU5/llXwkj2VyIUuFC9QjMAPcGn29lI+zg+/WVQI/HeGDiBh2HQy1m TWEQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc2-20020a1709071c0200b00710939b43a6si6249833ejc.69.2022.07.19.14.37.29; Tue, 19 Jul 2022 14:37:55 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236214AbiGSVTT (ORCPT + 99 others); Tue, 19 Jul 2022 17:19:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237769AbiGSVTR (ORCPT ); Tue, 19 Jul 2022 17:19:17 -0400 Received: from relay01.th.seeweb.it (relay01.th.seeweb.it [5.144.164.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 891015FAD7 for ; Tue, 19 Jul 2022 14:19:16 -0700 (PDT) Received: from localhost.localdomain (94-209-165-62.cable.dynamic.v4.ziggo.nl [94.209.165.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 90DD52004B; Tue, 19 Jul 2022 23:19:14 +0200 (CEST) From: Marijn Suijten To: phone-devel@vger.kernel.org, Pavel Machek , Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-leds@vger.kernel.org, Rob Herring , Bhupesh Sharma , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Boyd , Satya Priya Subject: [PATCH v4 2/2] leds: qcom-lpg: Add PM660L configuration and compatible Date: Tue, 19 Jul 2022 23:18:48 +0200 Message-Id: <20220719211848.1653920-2-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719211848.1653920-1-marijn.suijten@somainline.org> References: <20220719211848.1653920-1-marijn.suijten@somainline.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Inherit PM660L PMIC LPG/triled block configuration from downstream drivers and DT sources, consisting of a triled block with automatic trickle charge control and source selection, three colored led channels belonging to the synchronized triled block and one loose PWM channel. Signed-off-by: Marijn Suijten Reviewed-by: Bjorn Andersson --- Changes since v3: - Rebased on -next; - (series) dropped DTS patches that have been applied through the Qualcomm DTS tree, leaving only leds changes (driver and accompanying dt-bindings). v3: https://lore.kernel.org/linux-arm-msm/20220511190718.764445-2-marijn.suijten@somainline.org/ Changes since v2: - Constify channels struct-array (Bjorn); - Correct LUT size to 49 slots (Bjorn). v2: https://lore.kernel.org/linux-leds/20220507221123.2201668-1-marijn.suijten@somainline.org/T/#u Changes since v1: - Rebased to pick up pm8350c in the diff-context (Pavel). v1: https://lore.kernel.org/linux-leds/20220504205704.699500-1-marijn.suijten@somainline.org/T/#u drivers/leds/rgb/leds-qcom-lpg.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c index 02f51cc61837..102ab0c33887 100644 --- a/drivers/leds/rgb/leds-qcom-lpg.c +++ b/drivers/leds/rgb/leds-qcom-lpg.c @@ -1304,6 +1304,23 @@ static int lpg_remove(struct platform_device *pdev) return 0; } +static const struct lpg_data pm660l_lpg_data = { + .lut_base = 0xb000, + .lut_size = 49, + + .triled_base = 0xd000, + .triled_has_atc_ctl = true, + .triled_has_src_sel = true, + + .num_channels = 4, + .channels = (const struct lpg_channel_data[]) { + { .base = 0xb100, .triled_mask = BIT(5) }, + { .base = 0xb200, .triled_mask = BIT(6) }, + { .base = 0xb300, .triled_mask = BIT(7) }, + { .base = 0xb400 }, + }, +}; + static const struct lpg_data pm8916_pwm_data = { .num_channels = 1, .channels = (const struct lpg_channel_data[]) { @@ -1424,6 +1441,7 @@ static const struct lpg_data pm8350c_pwm_data = { }; static const struct of_device_id lpg_of_table[] = { + { .compatible = "qcom,pm660l-lpg", .data = &pm660l_lpg_data }, { .compatible = "qcom,pm8150b-lpg", .data = &pm8150b_lpg_data }, { .compatible = "qcom,pm8150l-lpg", .data = &pm8150l_lpg_data }, { .compatible = "qcom,pm8350c-pwm", .data = &pm8350c_pwm_data }, -- 2.37.1