From patchwork Tue Jul 25 19:34:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anjelique Melendez X-Patchwork-Id: 125792 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2711870vqg; Tue, 25 Jul 2023 13:24:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlFfnUiBOiNuSgcKYV0QiAKsEPIFQDo83lpxuJasi8cPRcKfmhlRXjT+KdS5Aszk7pGUo0n/ X-Received: by 2002:a05:6a20:54a4:b0:12d:5b6:7b32 with SMTP id i36-20020a056a2054a400b0012d05b67b32mr114446pzk.3.1690316642808; Tue, 25 Jul 2023 13:24:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690316642; cv=none; d=google.com; s=arc-20160816; b=aFCVEwUBIJblphwMRv7QrUde7M7LoGHGzOz//75AtCHEh64R+eiloBqnJu53Odh3ZO d9fTUjP38mPcaq4IDSET4eRdBn2TqOVT3te+f5XDqVE8mAj1VF5Ky3uoHUlupwJOmOO8 eBcop+j1LmeMJ6fXXqIKhsbiHen/ME45sdZaPS3rh+mgBx007w4hCZtIu4CR3sWjSTtt 051ijoO3v2eZb29Ptsc4wcKw/3mHy6W5Rl7L6UVeeldC5iFboUYJDrtcNWtrDN9qQbD6 2wuj/omSVkHxW8rsJqLlDo+55GdCc/H6oQ+Az2Kc5WNBd1BuDRBEM74of2wIEWTGw3MO V6IA== 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=1slqsGum+wrVX7fcUwAskcTopuaAycoFru9qUnkR0j8=; fh=e9QPDPfZqr2INXAAFs0dB1hDuKVrayNdZis8MpQoYQo=; b=j/+s7g+n29XfVpZQ2dOEVrEcvjHjbRQdgQ99YCBIih1zVFIXBu/Kck1ICqGcWgwX6o XQmC6EeESXwSjv9cgTigW7rFuHftT8n7m/QIql0UsI+q7wmH4R4Tizg77UV8TNjAr40l e45JTYSqrD5aYv47QDuoAZLqGzhuvsmPKjDIaQksU4L+6MwL25Df7CZkvfvWT/yQzR6J 5lAQHnw4793KM/md06FnVvhr/xVepYoWQaHBeBa8B7Hbpf9jNivM6/zY+MICIRWjPhcj jaCRssW7WYOnJ2ZNR58Y6mwtvKDx3wGAM+kisGVjtueplCAxBlb8Pp3lETal5fO7KvOB +y6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jufv18Dy; 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 a23-20020a637057000000b00563b0cbe80bsi5576735pgn.398.2023.07.25.13.23.38; Tue, 25 Jul 2023 13:24:02 -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=jufv18Dy; 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 S231486AbjGYTg2 (ORCPT + 99 others); Tue, 25 Jul 2023 15:36:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231249AbjGYTgT (ORCPT ); Tue, 25 Jul 2023 15:36:19 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CDC61FE5; Tue, 25 Jul 2023 12:36:16 -0700 (PDT) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36PF1bZm024215; Tue, 25 Jul 2023 19:36:09 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=1slqsGum+wrVX7fcUwAskcTopuaAycoFru9qUnkR0j8=; b=jufv18Dyi8ISZgXtUUu++klk2TBl5JAncnts6/++QOE8R7ozBa66AkyhLGamzTwdUU0z p+ldzu8GXxlEi08pX4HlyGxLxPgXigm1JOOd9y5PCt+y9ohkFGaIFZ+uqW0FVaShwgLE ftiz9oMDWILx/DCZxKs4Obi16jjlzE4ZAQE+NAHcpnn0FBif09djVSJL353x/D/ATknJ ni/zZRqsbFarf3fjoCd8EsWuLcSb80wzzsPl77yE1DGC18mfqn29bR3vfbBz+acLPmI7 FtOFD829nE6WfRtr2FoZFk9F5PPOUMDQGzMj9/qlBpF5QFkQ3r+gJEBQpeKBlHlMDPdo ww== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3s2gp1rjyq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Jul 2023 19:36:09 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 36PJa8v7030667 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Jul 2023 19:36:08 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.30; Tue, 25 Jul 2023 12:36:07 -0700 From: Anjelique Melendez To: , , , , , , , CC: , , , , , , , , , Anjelique Melendez Subject: [PATCH v2 5/7] leds: rgb: leds-qcom-lpg: Update PMI632 lpg_data to support PPG Date: Tue, 25 Jul 2023 12:34:21 -0700 Message-ID: <20230725193423.25047-6-quic_amelende@quicinc.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230725193423.25047-1-quic_amelende@quicinc.com> References: <20230725193423.25047-1-quic_amelende@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] 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: gVEhx-qNVfSdBVJhTC0dSC7h3i49-Yc_ X-Proofpoint-ORIG-GUID: gVEhx-qNVfSdBVJhTC0dSC7h3i49-Yc_ 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-07-25_10,2023-07-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 clxscore=1015 lowpriorityscore=0 bulkscore=0 phishscore=0 malwarescore=0 spamscore=0 suspectscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307250168 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,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: INBOX X-GMAIL-THRID: 1772425463583551395 X-GMAIL-MSGID: 1772425463583551395 Update the pmi632 lpg_data struct so that pmi632 devices use PPG for LUT pattern. 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 6fdf736d3632..822c7bff00df 100644 --- a/drivers/leds/rgb/leds-qcom-lpg.c +++ b/drivers/leds/rgb/leds-qcom-lpg.c @@ -1679,11 +1679,15 @@ static const struct lpg_data pm8994_lpg_data = { static const struct lpg_data pmi632_lpg_data = { .triled_base = 0xd000, + .lut_size = 64, + .lut_sdam_base = 0x80, + .nvmem_count = 1, + .num_channels = 5, .channels = (const struct lpg_channel_data[]) { - { .base = 0xb300, .triled_mask = BIT(7) }, - { .base = 0xb400, .triled_mask = BIT(6) }, - { .base = 0xb500, .triled_mask = BIT(5) }, + { .base = 0xb300, .triled_mask = BIT(7), .sdam_offset = 0x48 }, + { .base = 0xb400, .triled_mask = BIT(6), .sdam_offset = 0x56 }, + { .base = 0xb500, .triled_mask = BIT(5), .sdam_offset = 0x64 }, { .base = 0xb600 }, { .base = 0xb700 }, },