From patchwork Wed Jun 21 18:59:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anjelique Melendez X-Patchwork-Id: 111285 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4588902vqr; Wed, 21 Jun 2023 12:19:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ63LRI973TReQ5CCNnv2Y++aXjPWMnQNrlkDrj2JmQMqtyikGG/99Say4laRy0ToTBVPfhn X-Received: by 2002:a05:6a21:3005:b0:11d:1f5a:d708 with SMTP id yd5-20020a056a21300500b0011d1f5ad708mr9069361pzb.33.1687375190441; Wed, 21 Jun 2023 12:19:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687375190; cv=none; d=google.com; s=arc-20160816; b=LumpCrn0CiOSIx9o+aEyh6M+lDzfMH9B8HyIoJplBJcAx6SQQSxJh56iSKt/ZJmXvj FYOqqD4HLFZPlhypGOhLvnbnb6R4Q/VMQxH4BobM5mQuEW/SNolmqBNQ8wJL2yQ5hUXR ePDpZDqU84IqLD3gtpogpOsBMQGe0c7EYPXvhEtekA+kYK4h62fvTVukDrjxTRTfE5RO 4ei3Lca1lp/juziyedbUBg72U5HOXXDo6gcJiUOc4SghX5enCngOJp3y6hq1TTKakk2A zTt//S3F6DuUjxShxsju9fimrHk54VJxEdAW2mKSSR8JoqxsBoEurD8VmqdUG0Ygf/O0 inKg== 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=czoDckN1HUKMEUeXe72L4dOzSHzEvVv2O9Hf0JuHwDs=; b=e7Bpt/bEy3IhOZbBQ54ZpCeX5PcyDkXKgG/7gtcgmBlJ5fM1wAab98qO5/ORJTvR0B d65ULW/fTMgeSBrP4GNzmcRbp8KalsbhzGHIBej5ufcGXI8K3HtKje6WmORi5uF4Rvkg Y7RL0o9vcE/B7Pf3Zu7z7Vc0vG+Shf9iEj9KlMoUww9vDoRcaEuBT/i2K28GaZBfEO+Y cy2FdRNs2PddpxKq1OT+8utPOPU1i3cHjQOLkAYYH0RUlHCn9IAUAdTRIISFBI3hcc+n mB4jQZ886gtdDV4FM2ycp4VL9tBLg9Lwoz9bwatE9YOj4gN6c793almmQcFkMxvmZEbp vrwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=MkTb0cSC; 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=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q6-20020aa79826000000b0066215192dd4si1103548pfl.295.2023.06.21.12.19.37; Wed, 21 Jun 2023 12:19:50 -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=@quicinc.com header.s=qcppdkim1 header.b=MkTb0cSC; 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=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231664AbjFUTC0 (ORCPT + 99 others); Wed, 21 Jun 2023 15:02:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231703AbjFUTCM (ORCPT ); Wed, 21 Jun 2023 15:02:12 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF5EC2690; Wed, 21 Jun 2023 12:01:38 -0700 (PDT) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35LHtEM9012682; Wed, 21 Jun 2023 19:01:31 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=czoDckN1HUKMEUeXe72L4dOzSHzEvVv2O9Hf0JuHwDs=; b=MkTb0cSCE5727scn7zIMrEC2ZH+0w8tvFJgZJMlIQx/0RFG0L6auSobuP71TNHlUuZ1W LnK8MiQxEhUyUTTEiH5C8FfZevZIBR8lyJVQwYIfhuI4QuFUFE8/FBd/gJx44IDanH+V PEkWJrDf8CWGX9IX7UGF/cmwzpkOYl9oL3Gpkxh/AJ4q0O+aCcevB6hB4qCIODqcS6Cu kA3CZ9Tea+ezpZD3PMuBcLDz+MdHVxq0rCY+LmWLcKeZ3O0wSFjyTJPGikGM9ooXf2Lk 8tbsjaXgaHRyMosxSdyszU9Gb9pFJSSzXTyEuKrEuVUn3NwdrZbqbN21CH+KYQIn7prH cA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3rc0sk10hm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jun 2023 19:01:31 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 35LJ1B5o019468 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jun 2023 19:01:11 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.986.42; Wed, 21 Jun 2023 12:01:10 -0700 From: Anjelique Melendez To: , , , , , , , CC: , , , , , , , Anjelique Melendez Subject: [PATCH 7/7] leds: rgb: Update PM8350C lpg_data to support two-nvmem PPG Scheme Date: Wed, 21 Jun 2023 11:59:51 -0700 Message-ID: <20230621185949.2068-8-quic_amelende@quicinc.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230621185949.2068-1-quic_amelende@quicinc.com> References: <20230621185949.2068-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-GUID: PVVCGiZw3IRgCwWe5xHQLvLWDUZxz5q7 X-Proofpoint-ORIG-GUID: PVVCGiZw3IRgCwWe5xHQLvLWDUZxz5q7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-21_11,2023-06-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxscore=0 phishscore=0 impostorscore=0 mlxlogscore=999 priorityscore=1501 malwarescore=0 adultscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306210159 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,URIBL_BLOCKED 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769341127379859866?= X-GMAIL-MSGID: =?utf-8?q?1769341127379859866?= 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 --- drivers/leds/rgb/leds-qcom-lpg.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c index 273cb81260e7..6260e2c9fd94 100644 --- a/drivers/leds/rgb/leds-qcom-lpg.c +++ b/drivers/leds/rgb/leds-qcom-lpg.c @@ -1826,11 +1826,15 @@ static const struct lpg_data pm8150l_lpg_data = { static const struct lpg_data pm8350c_pwm_data = { .triled_base = 0xef00, + .lut_size = 122, + .lut_sdam_base = 0x45, + .nvmem_count = 2, + .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 }, }, };