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


Groups > linux.kernel > #1621601

Re: [PATCH 2/6] regulator: anatop: only set supply regulator when it actually exists

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/6] regulator: anatop: only set supply regulator when it actually exists
Date 2017-04-11 22:40 +0200
Message-ID <tvaJX-3qG-7@gated-at.bofh.it> (permalink)
References <tvaJX-3qG-9@gated-at.bofh.it> <tvaJX-3qG-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Wed, Apr 12, 2017 at 09:58:43AM +0800, Dong Aisheng wrote:
> Mandatorily set the initdata->supply_regulator while it actually not
> exist will cause regulator core to resolve supply each time whenever
> a new regulator registered which is meaningless and waste CPU mips.
> 
> We can observe more than one hundred times of iteration of resolving
> during a MX6Q SDB board booting up.
> 
> This patch adds the condition check for vin-supply to avoid the issue.

This is an obvious abstraction failure - there is nothing magical about
your driver which means that we need special casing in it to handle
badly written DTs that don't specify supplies.  Exactly the same
argument applies to all other regulators so if this is worth fixing it's
worth fixing in the core so we substitute in a dummy regulator if the
supply is genuinely missing.  Which is something we in fact have code to
do already though for some reason I can't see we bypass it, I'll send a
patch just now...

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


Thread

Re: [PATCH 2/6] regulator: anatop: only set supply regulator when it  actually exists Mark Brown <broonie@kernel.org> - 2017-04-11 22:40 +0200
  Re: [PATCH 2/6] regulator: anatop: only set supply regulator when it  actually exists Dong Aisheng <dongas86@gmail.com> - 2017-04-12 17:20 +0200
    Re: [PATCH 2/6] regulator: anatop: only set supply regulator when it  actually exists Mark Brown <broonie@kernel.org> - 2017-04-12 18:00 +0200
      Re: [PATCH 2/6] regulator: anatop: only set supply regulator when it  actually exists Mark Brown <broonie@kernel.org> - 2017-04-12 18:10 +0200
      Re: [PATCH 2/6] regulator: anatop: only set supply regulator when it  actually exists Dong Aisheng <dongas86@gmail.com> - 2017-04-12 18:10 +0200

csiph-web