linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 4/4] video: fbdev: pxafb: Add support for lcd-supply regulator
Date: Tue, 26 Jun 2018 09:04:43 +0000	[thread overview]
Message-ID: <874lhpnck4.fsf@belgarion.home> (raw)
In-Reply-To: <20180624153817.24387-4-daniel@zonque.org>

Daniel Mack <daniel@zonque.org> writes:

> On Tuesday, June 26, 2018 10:27 AM, Robert Jarzmik wrote:
>> Daniel Mack <daniel@zonque.org> writes:
>>
>>> +	if (fbi->lcd_supply && fbi->lcd_supply_enabled != on) {
>> Mmh this looks weird ...
>> If lcd_supply_enabled = on, then the next block is never evaluated, and the
>> value of "on" is not considered in order to call regulator_disable() ...
>
> Hmm? This early bail just avoids unbalanced calls to the regulator core, which
> doesn't like that at all. IOW, the rest of this function is only executed if the
> desired supply state differs from our locally cached version.
>
> This also worked well in my tests. Am I missing something?
Ah yes, you're right.

My brain read : "if the cached value is not _on_ (ie. lcd_supply_enabled != 1),
then ..." instead of "if the cached value is not the new desired value" ...

> That should be done with devm_of_find_backlight() I figure, and not via a
> regulator. But it's trivial to do as a separate patch, yes.
Yep.

Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>

Cheers.

-- 
Robert

  parent reply	other threads:[~2018-06-26  9:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180624153827epcas3p37952be3cd47f8a63e7083fc88e83fe1e@epcas3p3.samsung.com>
2018-06-24 15:38 ` [PATCH 1/4] video: fbdev: pxafb: clear allocated memory for video modes Daniel Mack
     [not found]   ` <CGME20180624153828epcas4p43ae0bc9085756fae520e8aa8542b3ea4@epcas4p4.samsung.com>
2018-06-24 15:38     ` [PATCH 2/4] video: fbdev: pxafb: switch to devm_* API Daniel Mack
2018-06-25 21:56       ` Robert Jarzmik
2018-07-24 15:01       ` Bartlomiej Zolnierkiewicz
     [not found]   ` <CGME20180624153830epcas4p37cb6f12227eff56e4f94722fcd240455@epcas4p3.samsung.com>
2018-06-24 15:38     ` [PATCH 3/4] video: fbdev: pxafb: handle errors from pxafb_init_fbinfo() correctly Daniel Mack
2018-06-25 22:02       ` Robert Jarzmik
2018-07-24 15:02       ` Bartlomiej Zolnierkiewicz
     [not found]   ` <CGME20180624153829epcas4p1effd3ba1319737e82f2a63cc1499fc85@epcas4p1.samsung.com>
2018-06-24 15:38     ` [PATCH 4/4] video: fbdev: pxafb: Add support for lcd-supply regulator Daniel Mack
2018-06-26  8:27       ` Robert Jarzmik
2018-06-26  8:37       ` Daniel Mack
2018-06-26  9:04       ` Robert Jarzmik [this message]
2018-07-24 15:02       ` Bartlomiej Zolnierkiewicz
2018-07-09  5:12   ` [PATCH 1/4] video: fbdev: pxafb: clear allocated memory for video modes Daniel Mack
2018-07-24 15:03     ` Bartlomiej Zolnierkiewicz
2018-07-24 15:11       ` Daniel Mack
2018-07-24 15:01   ` Bartlomiej Zolnierkiewicz

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=874lhpnck4.fsf@belgarion.home \
    --to=robert.jarzmik@free.fr \
    --cc=linux-fbdev@vger.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).