From patchwork Fri Sep 29 00:39:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anjelique Melendez X-Patchwork-Id: 146419 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3781945vqu; Thu, 28 Sep 2023 21:49:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFl0/iN6B2aP+srFvSdlKvNMdBPn0dVHd56F2WUMC0RwGvPRQgg4QwmyyZj+84uXoVIXn8h X-Received: by 2002:a17:902:650d:b0:1c6:11ca:8861 with SMTP id b13-20020a170902650d00b001c611ca8861mr4394839plk.21.1695962984736; Thu, 28 Sep 2023 21:49:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695962984; cv=none; d=google.com; s=arc-20160816; b=aPspGn3JdWRgoGzV6S0eTG+3DbhDJbY9yc9sEK8zQ5AJLmY1SA+LzSBC0cxedYgEtE KOm/pTMU3g17Fdkd+I52LQnv06Ppdw8YyejuCzsrPIgPgbGzPMqXcagZ+wIlFaz4Gs8e crI/zkSPjFFt4lc/TnqqBBNMsCVMdZvmvlM+pShTNvvxQBlHMkdeo2v1dBdefPBEfDEZ b1942cuL3VREOOoWjmyDrCVzFVVm2vDiP60wkfVUhAFS08w5b5SEqdMqdlqFoVB+V/Iz XHVWgZhrBWmPjCit6AN6JI1G/BH/3BbENA116NolxivRXyE7zONJxZwR6f2ycunp31CH bZcg== 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=I9dx6LUsLUJSb1nV43JIBs0f9oI+YdzUawuhRAHsOUw=; fh=lDvKNFV5Xl6+a2SDgD5JDR2yxCiIT+vRupumJE4NWmE=; b=zg0P+03keK15fYunM8TtERNpcT0JURqZexGvzSI6vd8lqYwfps6m5Cptyie9BTwpgH +SMrzFy6Ud8rOxqORMYtZNOB6LxuCV4ELUZ7U7Gx/69wcvKjPASoPFBCkCtUBQ48/Nt7 ZNyvNGrH1j72TcOfODPKTt4Pe1Dof5DqqeyZS23Q36alpxx9osqUSHIQjYH3rdfsdd5H 04MfMNy2fuG0q7LN5dvTo1ZfjI6RFd24mWBjzXGDIwY4xHq6jOqzsCSOx2kXG7cSSDJq mQymj5OJcfDV/rQHxUYA+kGy+cZI65IVHmhqDZxPxT9MsYpJs/pzpN/Ug4s8Asp/D5Rq niQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=CfhZvQmJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id a17-20020a170902ecd100b001c5616520cfsi11704437plh.204.2023.09.28.21.49.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 21:49:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=CfhZvQmJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 5B23C8534F38; Thu, 28 Sep 2023 17:39:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232590AbjI2Aju (ORCPT + 21 others); Thu, 28 Sep 2023 20:39:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232481AbjI2Ajp (ORCPT ); Thu, 28 Sep 2023 20:39:45 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10ED319F; Thu, 28 Sep 2023 17:39:42 -0700 (PDT) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38SNun1a019827; Fri, 29 Sep 2023 00:39:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=I9dx6LUsLUJSb1nV43JIBs0f9oI+YdzUawuhRAHsOUw=; b=CfhZvQmJJEKv+b7jKpbxzBc8Vs67IaEIk0LUW9aXgcGrKqcI7xCkIDkSntbA9R63KXir eq6iK6bHYSS2rWktUd4fo5fVl9zFvQ2mcDrxzll01tm0ECbiVjuHGNTHaMlmPTd0c7ER EevtCivlwJVUT5ZK/ZJiO7bAPif+FxN5tqKExkoWwOI9aOqjcASsxjEBSTVdBdMnEngN 2DrddXTk6utG7/o/sn3wEbQPdzNlrcW6WKuoyB6xILRmY6g2nVlT7U0/L34PWjGmzIAx y3kwusMcE7SvBmXEVXuk2nybRxMiNGeFUHnwVE3tg8vSeLRqENyfLm4SudgichDOfO7P Gg== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tdhru06dt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Sep 2023 00:39:34 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38T0dX1I025949 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Sep 2023 00:39:33 GMT Received: from hu-amelende-lv.qualcomm.com (10.49.16.6) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.36; Thu, 28 Sep 2023 17:39:30 -0700 From: Anjelique Melendez To: , , , , , , , CC: , , , , , , , , , , , Anjelique Melendez Subject: [PATCH v5 7/7] leds: rgb: Update PM8350C lpg_data to support two-nvmem PPG Scheme Date: Thu, 28 Sep 2023 17:39:00 -0700 Message-ID: <20230929003901.15086-8-quic_amelende@quicinc.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230929003901.15086-1-quic_amelende@quicinc.com> References: <20230929003901.15086-1-quic_amelende@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: isK-hsiEQbyUlnLMdJ2HS70y2OGzor5j X-Proofpoint-GUID: isK-hsiEQbyUlnLMdJ2HS70y2OGzor5j X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-28_23,2023-09-28_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 impostorscore=0 spamscore=0 bulkscore=0 adultscore=0 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309290002 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 28 Sep 2023 17:39:58 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778346082590772698 X-GMAIL-MSGID: 1778346082590772698 Update the pm8350c lpg_data struct so that pm8350c devices are treated as PWM devices that support two-nvmem PPG scheme. Signed-off-by: Anjelique Melendez Reviewed-by: Lee Jones --- drivers/leds/rgb/leds-qcom-lpg.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c index 910c7cf740cc..8962ea13df29 100644 --- a/drivers/leds/rgb/leds-qcom-lpg.c +++ b/drivers/leds/rgb/leds-qcom-lpg.c @@ -1800,11 +1800,13 @@ static const struct lpg_data pm8150l_lpg_data = { static const struct lpg_data pm8350c_pwm_data = { .triled_base = 0xef00, + .lut_size = 122, + .num_channels = 4, .channels = (const struct lpg_channel_data[]) { - { .base = 0xe800, .triled_mask = BIT(7) }, - { .base = 0xe900, .triled_mask = BIT(6) }, - { .base = 0xea00, .triled_mask = BIT(5) }, + { .base = 0xe800, .triled_mask = BIT(7), .sdam_offset = 0x48 }, + { .base = 0xe900, .triled_mask = BIT(6), .sdam_offset = 0x56 }, + { .base = 0xea00, .triled_mask = BIT(5), .sdam_offset = 0x64 }, { .base = 0xeb00 }, }, };