Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1245405

Re: [PATCH RFC 0/2] simplefb: Add regulator handling support

From Hans de Goede <hdegoede@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH RFC 0/2] simplefb: Add regulator handling support
Date 2015-10-13 09:20 +0200
Message-ID <qj22m-7Ov-21@gated-at.bofh.it> (permalink)
References <qiOLL-5l6-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH RFC 0/2] simplefb: Add regulator handling support Chen-Yu Tsai <wens@csie.org> - 2015-10-12 19:10 +0200
  Re: [PATCH RFC 0/2] simplefb: Add regulator handling support Hans de Goede <hdegoede@redhat.com> - 2015-10-13 09:20 +0200
    Re: [PATCH RFC 0/2] simplefb: Add regulator handling support Mark Brown <broonie@kernel.org> - 2015-10-14 13:00 +0200
      Re: [PATCH RFC 0/2] simplefb: Add regulator handling support Hans de Goede <hdegoede@redhat.com> - 2015-10-14 13:40 +0200

csiph-web