LKML Archive on
 help / color / Atom feed
From: Vincent Whitchurch <>
To: Mark Brown <>
Cc: <>, <>,
	<>, <>,
	<>, <>
Subject: Re: [PATCH 2/2] regulator: Add support for DA9121 regulator
Date: Mon, 2 Nov 2020 16:48:48 +0100
Message-ID: <> (raw)
In-Reply-To: <>

On Thu, Oct 29, 2020 at 03:28:43PM +0000, Mark Brown wrote:
> On Thu, Oct 29, 2020 at 04:15:38PM +0100, Vincent Whitchurch wrote:
> > +	config.init_data = of_get_regulator_init_data(dev, dev->of_node, &da9121_reg);
> > +	if (!config.init_data)
> > +		return -ENOMEM;
> Don't do this, the core can do the DT bit for you and there is no reason
> not to register the device if there are no constraints.  -ENOMEM would
> also be the wrong error code here.

OK, thanks.  I see that I can get the core to do it if I set ->of_match
on the regulator_desc.  I also see that there is some flexibility about
the placement of the constraints (desc->regulators_node is optional).

This chip has only one output which the datasheet calls Buck1, so I will
remove this call and set the desc.of_match field to get the driver to
support a node which looks like this:

      regulator@68 {
        compatible = "dlg,da9121";
        reg = <0x68>;

        buck1 {
            regulator-min-microvolt = <675000>;
            regulator-max-microvolt = <825000>;

      reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 15:15 [PATCH 0/2] DA9121 regulator support Vincent Whitchurch
2020-10-29 15:15 ` [PATCH 1/2] dt-bindings: regulator: Add DA9121 Vincent Whitchurch
2020-10-29 15:15 ` [PATCH 2/2] regulator: Add support for DA9121 regulator Vincent Whitchurch
2020-10-29 15:28   ` Mark Brown
2020-11-02 15:48     ` Vincent Whitchurch [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git
	git clone --mirror lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone