linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kgunda@codeaurora.org
To: Lee Jones <lee.jones@linaro.org>
Cc: bjorn.andersson@linaro.org, jingoohan1@gmail.com,
	b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org,
	daniel.thompson@linaro.org, jacek.anaszewski@gmail.com,
	pavel@ucw.cz, robh+dt@kernel.org, mark.rutland@arm.com,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Andy Gross <agross@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-fbdev@vger.kernel.org,
	linux-arm-msm-owner@vger.kernel.org
Subject: Re: [PATCH V7 6/6] backlight: qcom-wled: Add auto string detection logic
Date: Fri, 18 Oct 2019 05:15:08 +0000	[thread overview]
Message-ID: <1b21d0a80847173c4a1ee1943f974bda@codeaurora.org> (raw)
In-Reply-To: <20191017133024.GQ4365@dell>

On 2019-10-17 19:00, Lee Jones wrote:
> On Thu, 17 Oct 2019, kgunda@codeaurora.org wrote:
> 
>> On 2019-10-17 17:56, Lee Jones wrote:
>> > On Wed, 16 Oct 2019, Kiran Gunda wrote:
>> >
>> > > The auto string detection algorithm checks if the current WLED
>> > > sink configuration is valid. It tries enabling every sink and
>> > > checks if the OVP fault is observed. Based on this information
>> > > it detects and enables the valid sink configuration.
>> > > Auto calibration will be triggered when the OVP fault interrupts
>> > > are seen frequently thereby it tries to fix the sink configuration.
>> > >
>> > > The auto-detection also kicks in when the connected LED string
>> > > of the display-backlight malfunctions (because of damage) and
>> > > requires the damaged string to be turned off to prevent the
>> > > complete panel and/or board from being damaged.
>> > >
>> > > Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
>> > > ---
>> > >  drivers/video/backlight/qcom-wled.c | 410
>> > > +++++++++++++++++++++++++++++++++++-
>> > >  1 file changed, 404 insertions(+), 6 deletions(-)
>> > >
>> > > diff --git a/drivers/video/backlight/qcom-wled.c
>> > > b/drivers/video/backlight/qcom-wled.c
>> > > index b5b125c..ff7c409 100644
>> > > --- a/drivers/video/backlight/qcom-wled.c
>> > > +++ b/drivers/video/backlight/qcom-wled.c
> 
> [...]
> 
>> > > +		if (int_sts & WLED3_CTRL_REG_OVP_FAULT_STATUS)
>> > > +			dev_dbg(wled->dev, "WLED OVP fault detected with SINK %d\n",
>> > > +				i + 1);
>> >
>> > I haven't reviewed the whole patch, but this caught my eye.
>> >
>> > I think this should be upgraded to dev_warn().
>> >
>> Thought of keeping these messages silent, Because the string 
>> configuration
>> will be corrected in this
>> and informing it at end of the auto string detection.
> 
> [...]
> 
>> > > +	} else {
>> > > +		dev_warn(wled->dev, "New WLED string configuration found %x\n",
>> > > +			 sink_valid);
>> >
>> > Why would the user care about this?  Is it not normal?
>> >
>> Actually, it comes here if the user provided string configuration in 
>> the
>> device tree is in-correct.
>> That's why just informing the user about the right string 
>> configuration,
>> after the auto string detection.
> 
> Then I think we need to be more forthcoming.  Tell the user the
> configuration is incorrect and what you've done to rectify it.
> 
> "XXX is not a valid configuration - using YYY instead"
> 
Sure. Will update it in the next series.
> [...]
> 
>> > > +static int wled_configure_ovp_irq(struct wled *wled,
>> > > +				  struct platform_device *pdev)
>> > > +{
>> > > +	int rc;
>> > > +	u32 val;
>> > > +
>> > > +	wled->ovp_irq = platform_get_irq_byname(pdev, "ovp");
>> > > +	if (wled->ovp_irq < 0) {
>> > > +		dev_dbg(&pdev->dev, "ovp irq is not used\n");
>> >
>> > I assume this is optional.  What happens if no IRQ is provided?
>> >
>> Here OVP IRQ is used to detect the wrong string detection. If it is 
>> not
>> provided the auto string detection logic won't work.
> 
> "OVP IRQ not found - disabling automatic string detection"
> 
Sure. Will update it in the next series.
>> > If, for instance, polling mode is enabled, maybe something like this
>> > would be better?
>> >
>> >       dev_warn(&pdev->dev, "No IRQ found, falling back to polling
>> > mode\n");

      reply	other threads:[~2019-10-18  5:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1571220826-7740-1-git-send-email-kgunda@codeaurora.org>
2019-10-16 10:25 ` [PATCH V7 2/6] backlight: qcom-wled: Rename PM8941* to WLED3 Kiran Gunda
2019-10-16 10:25 ` [PATCH V7 3/6] backlight: qcom-wled: Restructure the driver for WLED3 Kiran Gunda
2019-10-16 10:25 ` [PATCH V7 4/6] backlight: qcom-wled: Add support for WLED4 peripheral Kiran Gunda
2019-10-17 11:06   ` Daniel Thompson
2019-10-17 12:39     ` kgunda
2019-10-16 10:25 ` [PATCH V7 5/6] backlight: qcom-wled: add support for short circuit handling Kiran Gunda
2019-10-17 11:09   ` Daniel Thompson
2019-10-17 12:42     ` kgunda
2019-10-16 10:25 ` [PATCH V7 6/6] backlight: qcom-wled: Add auto string detection logic Kiran Gunda
2019-10-17 11:29   ` Daniel Thompson
2019-10-17 12:29     ` kgunda
2019-10-17 13:39       ` Daniel Thompson
2019-10-18  6:54         ` kgunda
2019-10-17 12:26   ` Lee Jones
2019-10-17 13:21     ` kgunda
2019-10-17 13:30       ` Lee Jones
2019-10-18  5:15         ` kgunda [this message]

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=1b21d0a80847173c4a1ee1943f974bda@codeaurora.org \
    --to=kgunda@codeaurora.org \
    --cc=agross@kernel.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel.thompson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=jingoohan1@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-msm-owner@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).