linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFC 0/2] simplefb: Add regulator handling support
Date: Tue, 13 Oct 2015 07:16:56 +0000	[thread overview]
Message-ID: <561CAFE8.9080506@redhat.com> (raw)
In-Reply-To: <1444669458-5588-1-git-send-email-wens@csie.org>

Hi,

On 12-10-15 19:04, Chen-Yu Tsai wrote:
> Hi everyone,
>
> This series adds regulator claiming and enabling support for simplefb.
>
> Sometimes the simplefb display output path consits of external conversion
> chips and/or LCD drivers and backlights. These devices normally have
> GPIOs to turn them on and/or bring them out of reset, and regulators
> supplying power to them.
>
> While the kernel does not touch unclaimed GPIOs, the regulator core
> happily disables unused regulators. Thus we need simplefb to claim
> and enable the regulators used throughout the display pipeline.

Ack for doing something like this (adding regulator support) to simplefb,
it makes sense to have this.

> Now the DT bindings don't support a list of regulators directly, so
> I'm working around it by having a "num-supplies" property to specify
> the number of supply properties to check, and name the actual supplies
> as "vinN-supply".

Hmm, I can see the need for a "supplies" property with a list of regulators
in other use-cases (e.g. the generic mmc-pwrseq driver) too. Now as discussed
we can simply do vin0-supply - vinN-supply properties and be done with it,
but maybe we need to actually add support for a generic "supplies" property ?

And if not then maybe we need a few generic helper devm helper function which
takes a node, figures out how much vinN-supply properties there are and returns
a dynamically allocated array containing references to all the regulators, or
a PTR_ERR in case of err, at which point the caller is expected to fail the
probe so that any successfully acquired regulators are released.

Mark, what are your thoughts on this ?

Regards,

Hans

  parent reply	other threads:[~2015-10-13  7:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-12 17:04 [PATCH RFC 0/2] simplefb: Add regulator handling support Chen-Yu Tsai
2015-10-12 17:04 ` [PATCH RFC 1/2] dt-bindings: simplefb: Support a list of regulator supply properties Chen-Yu Tsai
2015-10-12 17:10   ` Mark Rutland
2015-10-13  2:22     ` Chen-Yu Tsai
2015-10-13  7:08       ` Hans de Goede
2015-10-14 10:36         ` Mark Brown
2015-10-12 17:04 ` [PATCH RFC 2/2] simplefb: Claim and enable regulators Chen-Yu Tsai
2015-10-13  7:16 ` Hans de Goede [this message]
2015-10-14 10:55   ` [PATCH RFC 0/2] simplefb: Add regulator handling support Mark Brown
2015-10-14 11:31     ` Hans de Goede
2015-10-18 19:57       ` Mark Brown
2015-10-19  7:59         ` Hans de Goede

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=561CAFE8.9080506@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.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).