mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>
Cc: kernel@oss.qualcomm.com, Lee Jones <lee@kernel.org>,
	Pavel Machek <pavel@kernel.org>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	Subbaraman Narayanamurthy
	<subbaraman.narayanamurthy@oss.qualcomm.com>,
	Pavel Machek <pavel@ucw.cz>,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] leds: rgb: leds-qcom-lpg: Only enable TRILED when LPG is used by LED
Date: Fri, 14 Nov 2025 15:13:18 +0800	[thread overview]
Message-ID: <7732165a-4147-4917-b76a-1525aae13c25@oss.qualcomm.com> (raw)
In-Reply-To: <7jf4xvqmlymwkyrdp2ulpazfwmhdmfegzigewc5esk2sj323a5@72skiavskrqt>


On 11/14/2025 12:58 PM, Bjorn Andersson wrote:
> If chan->in_use, then the channel is exposed as a LED and
> lpg_pwm_request() should have returned -EBUSY, so we should never reach
> lpg_pwm_apply()?

Yes, I agree.

Change is trying to ignore enabling TRILED channel when the LPG channel 
mapping to TRILED is not used for controlling the LED (not defining the 
LED child nodes).

So the fix should be just removing this line instead of adding the if check.

I will update it in patch v2.

>
> Why do you check chan->triled_mask? I guess we will still read/write the
> triled regiter, but don't make any changes if this is 0?
>
> Or is this the actual issue that you're fixing, that we read/write the
> registers when we shouldn't? If so this should be clarified in the
> commit message.

Yes, there was a case that a LPG channel mapping to TRILED is repurposed 
to control a fan, and it was seen that the BOB1 (supplies to TRILED) 
voltage bumped to higher voltage when the PWM channel was enabled.

>
> Regards,
> Bjorn

  reply	other threads:[~2025-11-14  7:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-14  1:11 Fenglin Wu via B4 Relay
2025-11-14  4:58 ` Bjorn Andersson
2025-11-14  7:13   ` Fenglin Wu [this message]
2025-11-14 14:56     ` Bjorn Andersson
2025-11-17  2:22       ` Fenglin Wu

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=7732165a-4147-4917-b76a-1525aae13c25@oss.qualcomm.com \
    --to=fenglin.wu@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=kernel@oss.qualcomm.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=pavel@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=subbaraman.narayanamurthy@oss.qualcomm.com \
    /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®