From: Dylan Van Assche <me@dylanvanassche.be>
To: pavel@ucw.cz, quic_fenglinw@quicinc.com, lee@kernel.org
Cc: trix@redhat.com, linux-leds@vger.kernel.org,
linux-kernel@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org,
Dylan Van Assche <me@dylanvanassche.be>
Subject: [PATCH 1/2] leds: flash: leds-qcom-flash: add PMI8998 support
Date: Sun, 7 May 2023 19:29:40 +0200 [thread overview]
Message-ID: <20230507172941.364852-2-me@dylanvanassche.be> (raw)
In-Reply-To: <20230507172941.364852-1-me@dylanvanassche.be>
Add subtype for the Qualcomm PMI8998 PMIC to support it besides the
PM8150 PMIC which has the same registers. Adjust the driver to recognize
both PMIC subtypes as a 3 channel LED driver.
Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
---
drivers/leds/flash/leds-qcom-flash.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/leds/flash/leds-qcom-flash.c b/drivers/leds/flash/leds-qcom-flash.c
index 90a24fa25a49..16045b5d89b1 100644
--- a/drivers/leds/flash/leds-qcom-flash.c
+++ b/drivers/leds/flash/leds-qcom-flash.c
@@ -18,7 +18,8 @@
#define FLASH_TYPE_VAL 0x18
#define FLASH_SUBTYPE_REG 0x05
-#define FLASH_SUBTYPE_3CH_VAL 0x04
+#define FLASH_SUBTYPE_3CH_PM8150_VAL 0x04
+#define FLASH_SUBTYPE_3CH_PMI8998_VAL 0x03
#define FLASH_SUBTYPE_4CH_VAL 0x07
#define FLASH_STS_3CH_OTST1 BIT(0)
@@ -682,7 +683,7 @@ static int qcom_flash_led_probe(struct platform_device *pdev)
return rc;
}
- if (val == FLASH_SUBTYPE_3CH_VAL) {
+ if (val == FLASH_SUBTYPE_3CH_PM8150_VAL || val == FLASH_SUBTYPE_3CH_PMI8998_VAL) {
flash_data->hw_type = QCOM_MVFLASH_3CH;
flash_data->max_channels = 3;
regs = mvflash_3ch_regs;
--
2.40.1
next prev parent reply other threads:[~2023-05-07 17:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-07 17:29 [PATCH 0/2] " Dylan Van Assche
2023-05-07 17:29 ` Dylan Van Assche [this message]
2023-05-15 16:18 ` [PATCH 1/2] " Lee Jones
2023-05-07 17:29 ` [PATCH 2/2] leds: flash: leds-qcom-flash: disable LED when changing brightness Dylan Van Assche
2023-05-15 16:19 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230507172941.364852-2-me@dylanvanassche.be \
--to=me@dylanvanassche.be \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=phone-devel@vger.kernel.org \
--cc=quic_fenglinw@quicinc.com \
--cc=trix@redhat.com \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®