Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2198pxb; Fri, 29 Oct 2021 04:46:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJPBIA8yDUEZziAMZiFj94fG9CsRgrecyzt8DhsXkZfBeUvAuYmSXNvXJjYfyHiP+SB+3R X-Received: by 2002:a05:6a00:b4c:b0:47c:3ae8:571d with SMTP id p12-20020a056a000b4c00b0047c3ae8571dmr10552764pfo.26.1635508019746; Fri, 29 Oct 2021 04:46:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635508019; cv=none; d=google.com; s=arc-20160816; b=g8NosbbWQ3ClDcWzpk4dexRJGBHg5UH+7oEWXYl6PoqKHXM6hQbi9KVRXnmY9v5SwY NnO/lLUsq5ictkPQU00yM3lwrApmqrdYSGkY3mjwLpN4HDd+hl6HPYdcqdk3pbhR216f dtMuCSM29ix2zRDXWLPo6RGgyPa1m87QFSklxa3yXi1y2ABzE5ztOvPv56GTaCiNCxPx qm0u030IdyGJn7MsbzBZFtcwXCPDYUXvDlzfE0fPJlM4hw5FAYrLQX9FOmnp9wFkSbSN QzFU++j7UsZnylTrqLUOFEs3x/AbGuxLlpwNIEDV3BmCuVAo9uHSoepiNPJsmYjNoPhy uWQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=mi0sdBpG49G5h3+Ix/HVKQvWpmMOsZ9XHvRwQ2v4Zrw=; b=kazoeQnicA5DUzsd16ua/jcykUrN3tS3VFCoQ16XOiin18nhSoXuEtidzLMGW0BpDU lzmlxki14NQMX7eiYWN/kx/2o3skNyZ5sBNXu9OD+8dDJR+JONX0830eukRYlnWyKYr+ YcOSCTO7dIyGFgI0nK9lsXoVjcqisYYi45PKBH9kn+rVLxXlIp4OohrabfzqvBweXIFw ULL3qFi8SSmIhnXt/WAermvdXfzB++ecF4oo9JYRezM7OBvlshazdgDfcXq+45rmVvzX 9esv9PBFgvxgT7e/AlwdKkyZaIASj82N3UrAdZ9xcZYWvDiacrP/LHuRR/tXZUIWjXsQ o7UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=jjXe07d1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ot14si1434897pjb.102.2021.10.29.04.46.44; Fri, 29 Oct 2021 04:46:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=jjXe07d1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231465AbhJ2Lr4 (ORCPT + 99 others); Fri, 29 Oct 2021 07:47:56 -0400 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:15613 "EHLO alexa-out-sd-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231431AbhJ2Lry (ORCPT ); Fri, 29 Oct 2021 07:47:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1635507926; x=1667043926; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=mi0sdBpG49G5h3+Ix/HVKQvWpmMOsZ9XHvRwQ2v4Zrw=; b=jjXe07d1E0MOp/9bJCWHU+V3RhwqKeUvuwBTFw++ghwTvGi4duII4PsF WFX5WVLvIQdUJP3Zxf33EV4+z49pVd0F3IteW8aSjq/LXUCzRVMex7nP3 rjhsCLCBp+PEuCD+bYnJJW5z0iOVreXROnfKDLAMfV8qq4XW2wsIjaydZ 0=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-02.qualcomm.com with ESMTP; 29 Oct 2021 04:45:26 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2021 04:45:26 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Fri, 29 Oct 2021 04:45:25 -0700 Received: from c-skakit-linux.qualcomm.com (10.80.80.8) 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.922.7; Fri, 29 Oct 2021 04:45:22 -0700 From: Satya Priya To: Pavel Machek , Rob Herring , Andy Gross , Bjorn Andersson CC: , , , , , , satya priya Subject: [PATCH V3 2/4] leds: Add pm8350c support to Qualcomm LPG driver Date: Fri, 29 Oct 2021 17:14:51 +0530 Message-ID: <1635507893-25490-3-git-send-email-quic_c_skakit@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1635507893-25490-1-git-send-email-quic_c_skakit@quicinc.com> References: <1635507893-25490-1-git-send-email-quic_c_skakit@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: satya priya Add pm8350c compatible and lpg_data to the driver. Signed-off-by: satya priya Reviewed-by: Matthias Kaehlcke --- Changes in V2: - Added const for lpg_channel_data[] struct. Changes in V3: - Correct the num_channels and add respective base addresses. drivers/leds/rgb/leds-qcom-lpg.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c index 45ef4ec..ad99a9b 100644 --- a/drivers/leds/rgb/leds-qcom-lpg.c +++ b/drivers/leds/rgb/leds-qcom-lpg.c @@ -1275,9 +1275,22 @@ static const struct lpg_data pm8150l_lpg_data = { }, }; +static const struct lpg_data pm8350c_pwm_data = { + .pwm_9bit_mask = BIT(2), + + .num_channels = 4, + .channels = (const struct lpg_channel_data[]) { + { .base = 0xe800 }, + { .base = 0xe900 }, + { .base = 0xea00 }, + { .base = 0xeb00 }, + }, +}; + static const struct of_device_id lpg_of_table[] = { { .compatible = "qcom,pm8150b-lpg", .data = &pm8150b_lpg_data }, { .compatible = "qcom,pm8150l-lpg", .data = &pm8150l_lpg_data }, + { .compatible = "qcom,pm8350c-pwm", .data = &pm8350c_pwm_data }, { .compatible = "qcom,pm8916-pwm", .data = &pm8916_pwm_data }, { .compatible = "qcom,pm8941-lpg", .data = &pm8941_lpg_data }, { .compatible = "qcom,pm8994-lpg", .data = &pm8994_lpg_data }, -- 2.7.4