From patchwork Thu Dec 21 18:58:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anjelique Melendez X-Patchwork-Id: 182418 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp624757dyi; Thu, 21 Dec 2023 11:01:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9QJN2svHBmyrBv9Ezj617cZZE1pPmh/PWvtN5Ejzhcas9vMSrIe3+7ilaXB+Oapgk2Obm X-Received: by 2002:a62:e70e:0:b0:6ce:2731:5f6d with SMTP id s14-20020a62e70e000000b006ce27315f6dmr128805pfh.44.1703185314871; Thu, 21 Dec 2023 11:01:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703185314; cv=none; d=google.com; s=arc-20160816; b=co9BwB16hd5oRHXdMLfFpW77hlnuAjUJDHhtHM8lXK3CFKwToTCw1BGLmi3bL2+lpX RxY+FD/hAoLIzbNdosCLgHIAEwKdAEppX82PajwCKDE/noZ9wKml4CVOcECFXHEn+XSA zqqwYdfpdmmLpjqMU3rHBu3SHy95O5iVLh3A7eZSQOGywDm5JEgciHfuBvkgcRqt4yft pfJRm9oCF2ZXLWf1ttosevln4VV8uPe6T7Wj1cM2EVR/QsGYzoXldjwiYCt4qiErWOYD f1sxn28D/KsL97untwLGfpzW/Yn9J9Bry6YZtCfn++TVp5XPuKLJCQb/XL6rRQbeA5uu qSyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=vI4fOUwFK0VcXmgY7qzLx++zI2cGUEqjilCQmaxzv+M=; fh=taLs6UBhCJ5jXRTuE2Pv7pQVkD+FQ9+sBPG6a4w/cyA=; b=fUrzoXLPhxHoTfdJpUlZY5eFm4ZXIqBKLdbvfw2D9bcxuzIfLocMwKD8aHMD3Y/Two itNedEr7kcbM48jqpya7FMqHbVE5hdikJ3g1HEXaf+v1S0I1xQfoO1g0S8wQjj4L933n vZUNezVz7e/7Quy6GGhiGxSaTx96VDau1E3RvrRF04XF2Ye9rf4SskF59VrXaUJxUHT9 1E/eQWK/Iopir4OHdDBm3HfcU7NXMT1ml/bAZeOD3wZYjv0TaB9VtByc4VBghTOl6ghP t2l5B6V8f8EwRowdwZnPrHh0V1+/mBR75Wlaf6IzPbeTq3AvoBfjCYmV8ivNjxs5ZFo+ JI9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fc9rJilt; spf=pass (google.com: domain of linux-kernel+bounces-8972-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8972-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id bj19-20020a056a02019300b005b57aa8517bsi2065759pgb.91.2023.12.21.11.01.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 11:01:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8972-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fc9rJilt; spf=pass (google.com: domain of linux-kernel+bounces-8972-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8972-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8C4AAB2309B for ; Thu, 21 Dec 2023 19:01:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4012077F38; Thu, 21 Dec 2023 18:59:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="fc9rJilt" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5796C76DBC; Thu, 21 Dec 2023 18:59:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BLDROhK014686; Thu, 21 Dec 2023 18:59:06 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=vI4fOUwFK0VcXmgY7qzLx++zI2cGUEqjilCQmaxzv+M=; b=fc 9rJiltheFyDySJSL3STt65DjWXI4NA3rt/CeSHuhCrSnDLQ8aBzt+y+qIsDbglxC tydq+EeZp64nt1BjKJBabdjpdLUgsJ95ZYbWXvXYLzCiD7mbJ+dDQGcTltv4TG3b 6i1vl58xPjUuoqq5VBJH4og2XJ1H3jo1u6FF4zXYNTw/qkSNH1+up/tzHSjwz4rV +P6fJkBZ6aGQyuH3IpG1Ry8dudPAHfCSo47LB2rU2m2BsYqHm6WvCnUZ4KqoNDDT +ec2r9UVsayTlcmaSeW1S+jNx/sSiRk95kve86cQ36G3nkT50IWjhl17ni5qHoDs VWlzvyHpJOf11LZNbTXA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3v4g8ej9y8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Dec 2023 18:59:06 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BLIx5IZ006465 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Dec 2023 18:59:05 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.40; Thu, 21 Dec 2023 10:59:05 -0800 From: Anjelique Melendez To: , , , , , , , CC: , , , , , , , , , , "Anjelique Melendez" Subject: [PATCH v8 7/7] leds: rgb: Update PM8350C lpg_data to support two-nvmem PPG Scheme Date: Thu, 21 Dec 2023 10:58:37 -0800 Message-ID: <20231221185838.28440-8-quic_amelende@quicinc.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231221185838.28440-1-quic_amelende@quicinc.com> References: <20231221185838.28440-1-quic_amelende@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) 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: m1WRqX9o65bP2RfPKYT0YyxFOAaEsp36 X-Proofpoint-ORIG-GUID: m1WRqX9o65bP2RfPKYT0YyxFOAaEsp36 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 impostorscore=0 malwarescore=0 adultscore=0 phishscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312210144 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785919244731398605 X-GMAIL-MSGID: 1785919244731398605 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 eec49027ccf1..b11412af860e 100644 --- a/drivers/leds/rgb/leds-qcom-lpg.c +++ b/drivers/leds/rgb/leds-qcom-lpg.c @@ -1780,11 +1780,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 }, }, };