Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4702503iob; Sun, 8 May 2022 22:34:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1OhVdvxGXU41EhaB/4l3p+rtUR/nNyYkV/60pf7jE8mtcc9tjVh2TXCg5ySJJCLKX4pqz X-Received: by 2002:a17:903:18a:b0:15e:c983:7c14 with SMTP id z10-20020a170903018a00b0015ec9837c14mr14876219plg.9.1652074456743; Sun, 08 May 2022 22:34:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652074456; cv=none; d=google.com; s=arc-20160816; b=yY65tdMttbWTzERhbjFjox9qCd6Pz7eStxNNRYS2S2IAg7Mf0JRzrJHg0GUzYqc05V dVI5+JDUiizNkPeNLq4NuCH0jE9WmVHE7T28/ZTiigJ390U+QReYQjyGvchC33kSnuao Jp5lw4DXPkT1vlvXAd4Fqyzf4J8T8TOf5EmVc138Y7lzVr6xI4R+vpowMlCuwWhjW+36 N48liww2rYEy5JlFHlXPZOn89eGuYDtuBvvMaWv0em26ySw5jAspnW6MJuO772znLY9A aVGPpL3FDK8JC1qhjclH758l67SYbQP5H/q9eI9tym1a4KFjCxbCstccqK0B5oB/MIss lxxw== 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=EQ3Ra51RHuNQvbU90UPKMiQYwRql/lNDopIuQHpJ/cw=; b=zw58ZHyl+ii0vUCA3+MJbmFzZDJCC5prR7HLsxYEeyoS74gOuupDJPipq9asz8Apc0 onOYnjUt7ry0bY/IVJ90ztb04vICdemSDE9J4VvBNlP3XNiMO64vC676cJ+i0IBJyeUW sUccoS7i6NMb1X3yTCj6sX/iZFjT6/M2bSwSdyB7H1Yn8uc0UP72Ez1b8nzeJaJBXFvO wrRzQU6AOtquoiMyXvH/T+Y7hl2ttiatJe+sHrvF+JCPfKLMcKSvs0uM6jERCRqKh/mK BYeIn6kbHsr7734G/1saiQbO5d+hGkzw7iIgPcpzRH6/UQT9PQB7W+NH0mzZfnet9Iiv z8xw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b21-20020a621b15000000b005105cb7e94fsi12250929pfb.271.2022.05.08.22.34.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 22:34:16 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CFF2C154021; Sun, 8 May 2022 22:34:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387657AbiEGWPY (ORCPT + 99 others); Sat, 7 May 2022 18:15:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387598AbiEGWPU (ORCPT ); Sat, 7 May 2022 18:15:20 -0400 Received: from relay08.th.seeweb.it (relay08.th.seeweb.it [5.144.164.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D4831F62C; Sat, 7 May 2022 15:11:32 -0700 (PDT) Received: from Marijn-Arch-PC.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-r2.th.seeweb.it (Postfix) with ESMTPSA id 8C21D3EE89; Sun, 8 May 2022 00:11:29 +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 , Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-leds@vger.kernel.org, Rob Herring , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Matthias Kaehlcke , Stephen Boyd , Satya Priya Subject: [PATCH 2/4] leds: qcom-lpg: Add PM660L configuration and compatible Date: Sun, 8 May 2022 00:11:21 +0200 Message-Id: <20220507221123.2201668-2-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220507221123.2201668-1-marijn.suijten@somainline.org> References: <20220507221123.2201668-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, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 --- 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 cfa3362b2457..30c12ac8eed4 100644 --- a/drivers/leds/rgb/leds-qcom-lpg.c +++ b/drivers/leds/rgb/leds-qcom-lpg.c @@ -1271,6 +1271,23 @@ static int lpg_remove(struct platform_device *pdev) return 0; } +static const struct lpg_data pm660l_lpg_data = { + .lut_base = 0xb000, + .lut_size = 0x100, + + .triled_base = 0xd000, + .triled_has_atc_ctl = true, + .triled_has_src_sel = true, + + .num_channels = 4, + .channels = (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[]) { @@ -1391,6 +1408,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.36.0