Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1260459
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] regulator: of: removing two variables min_uV and max_uV |
| Date | 2015-11-02 10:00 +0100 |
| Message-ID | <qqj86-3aX-7@gated-at.bofh.it> (permalink) |
| References | <qpFX3-4ov-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Sat, Oct 31, 2015 at 08:31:31PM +0530, Saurabh Sengar wrote: > - min_uV = of_get_property(np, "regulator-min-microvolt", NULL); > - if (min_uV) > - constraints->min_uV = be32_to_cpu(*min_uV); > + if (!of_property_read_u32(np, "regulator-max-microvolt", &pval)) > + constraints->max_uV = pval; > /* Only one voltage? Then make sure it's set. */ > - if (min_uV && max_uV && constraints->min_uV == constraints->max_uV) > + if (constraints->min_uV == constraints->max_uV) > constraints->apply_uV = true; Your new code is not equivalent to the existing code. The new code will set apply_uV even if the DT properties are not present which will in turn mean that we will end up attempting to apply a setting of 0V if that happens which is not desirable.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] regulator: of: removing two variables min_uV and max_uV Saurabh Sengar <saurabh.truth@gmail.com> - 2015-10-31 16:10 +0100
Re: [PATCH] regulator: of: removing two variables min_uV and max_uV Mark Brown <broonie@kernel.org> - 2015-11-02 10:00 +0100
[PATCH v2] regulator: of: removing two variables min_uV and max_uV Saurabh Sengar <saurabh.truth@gmail.com> - 2015-11-02 10:50 +0100
Re: [PATCH v2] regulator: of: removing two variables min_uV and max_uV Mark Brown <broonie@kernel.org> - 2015-11-03 18:30 +0100
csiph-web