<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/regulator, branch v5.1-rc1</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>regulator: core: Add set/get_current_limit helpers for regmap users</title>
<updated>2019-03-03T23:45:27+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2019-02-28T13:40:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a32e0c773b5f233b0589dbb621bb2b9681dbfec3'/>
<id>a32e0c773b5f233b0589dbb621bb2b9681dbfec3</id>
<content type='text'>
By setting curr_table, n_current_limits, csel_reg and csel_mask, the
regmap users can use regulator_set_current_limit_regmap and
regulator_get_current_limit_regmap for set/get_current_limit callbacks.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By setting curr_table, n_current_limits, csel_reg and csel_mask, the
regmap users can use regulator_set_current_limit_regmap and
regulator_get_current_limit_regmap for set/get_current_limit callbacks.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: Fix comment for csel_reg and csel_mask</title>
<updated>2019-03-03T23:44:53+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2019-02-28T13:40:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=35d838ff98bc57c882eb610393c6b68455d3d9fe'/>
<id>35d838ff98bc57c882eb610393c6b68455d3d9fe</id>
<content type='text'>
The csel_reg and csel_mask fields in struct regulator_desc needs to
be generic for drivers. Not just for TPS65218.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The csel_reg and csel_mask fields in struct regulator_desc needs to
be generic for drivers. Not just for TPS65218.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: add regulator_desc_list_voltage_linear_range</title>
<updated>2019-02-14T15:12:26+00:00</updated>
<author>
<name>Matti Vaittinen</name>
<email>matti.vaittinen@fi.rohmeurope.com</email>
</author>
<published>2019-02-14T09:38:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6a47b4da551a762217215aeeda22e46469c5868a'/>
<id>6a47b4da551a762217215aeeda22e46469c5868a</id>
<content type='text'>
Add regulator_desc_list_voltage_linear_range which can be used
by drivers for getting the voltages before regulator is registered.
This may be useful for drivers which need to fetch the voltage
selectors at device-tree parsing callback.

Signed-off-by: Matti Vaittinen &lt;matti.vaittinen@fi.rohmeurope.com&gt;
Acked-by: Mark Brown &lt;broonie@kernel.org&gt;
Tested-by: Angus Ainslie &lt;angus@akkea.ca&gt;
Reviewed-by: Angus Ainslie &lt;angus@akkea.ca&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add regulator_desc_list_voltage_linear_range which can be used
by drivers for getting the voltages before regulator is registered.
This may be useful for drivers which need to fetch the voltage
selectors at device-tree parsing callback.

Signed-off-by: Matti Vaittinen &lt;matti.vaittinen@fi.rohmeurope.com&gt;
Acked-by: Mark Brown &lt;broonie@kernel.org&gt;
Tested-by: Angus Ainslie &lt;angus@akkea.ca&gt;
Reviewed-by: Angus Ainslie &lt;angus@akkea.ca&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: core: Only support passing enable GPIO descriptors</title>
<updated>2019-02-06T16:01:31+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2019-01-29T10:31:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=541d052d721506549774ab780a2709e4ff8ca79b'/>
<id>541d052d721506549774ab780a2709e4ff8ca79b</id>
<content type='text'>
Now that we changed all providers to pass descriptors into the core
for enable GPIOs instead of a global GPIO number, delete the support
for passing GPIO numbers in, and we get a cleanup and size reduction
in the core, and from a GPIO point of view we use the modern, cleaner
interface.

Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we changed all providers to pass descriptors into the core
for enable GPIOs instead of a global GPIO number, delete the support
for passing GPIO numbers in, and we get a cleanup and size reduction
in the core, and from a GPIO point of view we use the modern, cleaner
interface.

Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: fixed/gpio: Pull inversion/OD into gpiolib</title>
<updated>2019-02-06T15:58:29+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2019-01-29T10:31:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=01dc79cd6fe7d25b0eba84009634f5435cbdb4e6'/>
<id>01dc79cd6fe7d25b0eba84009634f5435cbdb4e6</id>
<content type='text'>
This pushes the handling of inversion semantics and open drain
settings to the GPIO descriptor and gpiolib. All affected board
files are also augmented.

This is especially nice since we don't have to have any
confusing flags passed around to the left and right littering
the fixed and GPIO regulator drivers and the regulator core.
It is all just very straight-forward: the core asks the GPIO
line to be asserted or deasserted and gpiolib deals with the
rest depending on how the platform is configured: if the line
is active low, it deals with that, if the line is open drain,
it deals with that too.

Cc: Alexander Shiyan &lt;shc_work@mail.ru&gt; # i.MX boards user
Cc: Haojian Zhuang &lt;haojian.zhuang@gmail.com&gt; # MMP2 maintainer
Cc: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt; # OMAP1 maintainer
Cc: Tony Lindgren &lt;tony@atomide.com&gt; # OMAP1,2,3 maintainer
Cc: Mike Rapoport &lt;rppt@linux.vnet.ibm.com&gt; # EM-X270 maintainer
Cc: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt; # EZX maintainer
Cc: Philipp Zabel &lt;philipp.zabel@gmail.com&gt; # Magician maintainer
Cc: Petr Cvek &lt;petr.cvek@tul.cz&gt; # Magician
Cc: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt; # PXA
Cc: Paul Parsons &lt;lost.distance@yahoo.com&gt; # hx4700
Cc: Daniel Mack &lt;zonque@gmail.com&gt; # Raumfeld maintainer
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt; # Zeus maintainer
Cc: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt; # SuperH pinctrl/GPIO maintainer
Cc: Russell King &lt;rmk+kernel@armlinux.org.uk&gt; # SA1100
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Tested-by: Janusz Krzysztofik &lt;jmkrzyszt@gmail.com&gt; #OMAP1 Amstrad Delta
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This pushes the handling of inversion semantics and open drain
settings to the GPIO descriptor and gpiolib. All affected board
files are also augmented.

This is especially nice since we don't have to have any
confusing flags passed around to the left and right littering
the fixed and GPIO regulator drivers and the regulator core.
It is all just very straight-forward: the core asks the GPIO
line to be asserted or deasserted and gpiolib deals with the
rest depending on how the platform is configured: if the line
is active low, it deals with that, if the line is open drain,
it deals with that too.

Cc: Alexander Shiyan &lt;shc_work@mail.ru&gt; # i.MX boards user
Cc: Haojian Zhuang &lt;haojian.zhuang@gmail.com&gt; # MMP2 maintainer
Cc: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt; # OMAP1 maintainer
Cc: Tony Lindgren &lt;tony@atomide.com&gt; # OMAP1,2,3 maintainer
Cc: Mike Rapoport &lt;rppt@linux.vnet.ibm.com&gt; # EM-X270 maintainer
Cc: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt; # EZX maintainer
Cc: Philipp Zabel &lt;philipp.zabel@gmail.com&gt; # Magician maintainer
Cc: Petr Cvek &lt;petr.cvek@tul.cz&gt; # Magician
Cc: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt; # PXA
Cc: Paul Parsons &lt;lost.distance@yahoo.com&gt; # hx4700
Cc: Daniel Mack &lt;zonque@gmail.com&gt; # Raumfeld maintainer
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt; # Zeus maintainer
Cc: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt; # SuperH pinctrl/GPIO maintainer
Cc: Russell King &lt;rmk+kernel@armlinux.org.uk&gt; # SA1100
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Tested-by: Janusz Krzysztofik &lt;jmkrzyszt@gmail.com&gt; #OMAP1 Amstrad Delta
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: gpio: Convert to use descriptors</title>
<updated>2019-02-06T15:58:15+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2019-01-29T10:31:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d6cd33ad71029a3f77ba1686caf55d4dea58d916'/>
<id>d6cd33ad71029a3f77ba1686caf55d4dea58d916</id>
<content type='text'>
This converts the GPIO regulator driver to use decriptors only.

We have to let go of the array gpio handling: the fetched descriptors
are handled individually anyway, and the array retrieveal function
does not make it possible to retrieve each GPIO descriptor with
unique flags. Instead get them one by one.

We request the "enable" GPIO separately as before, and make sure
that this line is requested as nonexclusive since enable lines can
be shared and the regulator core expects this.

Most users of the GPIO regulator are using device tree.

There are two boards in the kernel using the gpio regulator from a
non-devicetree path: PXA hx4700 and magician. Make sure to switch
these over to use descriptors as well.

Cc: Philipp Zabel &lt;p.zabel@pengutronix.de&gt; # Magician
Cc: Petr Cvek &lt;petr.cvek@tul.cz&gt; # Magician
Cc: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt; # PXA
Cc: Paul Parsons &lt;lost.distance@yahoo.com&gt; # hx4700
Cc: Kevin Hilman &lt;khilman@baylibre.com&gt; # Meson
Cc: Neil Armstrong &lt;narmstrong@baylibre.com&gt; # Meson
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This converts the GPIO regulator driver to use decriptors only.

We have to let go of the array gpio handling: the fetched descriptors
are handled individually anyway, and the array retrieveal function
does not make it possible to retrieve each GPIO descriptor with
unique flags. Instead get them one by one.

We request the "enable" GPIO separately as before, and make sure
that this line is requested as nonexclusive since enable lines can
be shared and the regulator core expects this.

Most users of the GPIO regulator are using device tree.

There are two boards in the kernel using the gpio regulator from a
non-devicetree path: PXA hx4700 and magician. Make sure to switch
these over to use descriptors as well.

Cc: Philipp Zabel &lt;p.zabel@pengutronix.de&gt; # Magician
Cc: Petr Cvek &lt;petr.cvek@tul.cz&gt; # Magician
Cc: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt; # PXA
Cc: Paul Parsons &lt;lost.distance@yahoo.com&gt; # hx4700
Cc: Kevin Hilman &lt;khilman@baylibre.com&gt; # Meson
Cc: Neil Armstrong &lt;narmstrong@baylibre.com&gt; # Meson
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: provide rdev_get_regmap()</title>
<updated>2019-01-09T18:36:44+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2019-01-09T17:44:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=03c87b95ac04c2a34045641b25dded6e3e889556'/>
<id>03c87b95ac04c2a34045641b25dded6e3e889556</id>
<content type='text'>
Provide a helper allowing to access regulator's regmap.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide a helper allowing to access regulator's regmap.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-4.21</title>
<updated>2018-12-11T20:44:49+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2018-12-11T20:44:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e6202e8249aa7115af65f2d80b43c132816224ef'/>
<id>e6202e8249aa7115af65f2d80b43c132816224ef</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: core: Only count load for enabled consumers</title>
<updated>2018-11-22T14:38:00+00:00</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2018-11-20T17:52:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5451781dadf85000665e0e2c3288e9e0f34b860a'/>
<id>5451781dadf85000665e0e2c3288e9e0f34b860a</id>
<content type='text'>
In general when the consumer of a regulator requests that the
regulator be disabled it no longer will be drawing much load from the
regulator--it should just be the leakage current and that should be
very close to 0.

Up to this point the regulator framework has continued to count a
consumer's load request for disabled regulators.  This has led to code
patterns that look like this:

  enable_my_thing():
    regular_set_load(reg, load_uA)
    regulator_enable(reg)

  disable_my_thing():
    regulator_disable(reg)
    regulator_set_load(reg, 0)

Sometimes disable_my_thing() sets a nominal (&lt;= 100 uA) load instead
of setting a 0 uA load.  I will make the assertion that nearly all (if
not all) places where we set a nominal load of 100 uA or less we end
up with a result that is the same as if we had set a load of 0 uA.
Specifically:
- The whole point of setting the load is to help set the operating
  mode of the regulator.  Higher loads may need less efficient
  operating modes.
- The only time this matters at all is if there is another consumer of
  the regulator that wants the regulator on.  If there are no other
  consumers of the regulator then the regulator will turn off and we
  don't care about the operating mode.
- If there's another consumer that actually wants the regulator on
  then presumably it is requesting a load that makes our nominal
  &lt;= 100 uA load insignificant.

A quick survey of the existing callers to regulator_set_load() to see
how everyone uses it:

Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In general when the consumer of a regulator requests that the
regulator be disabled it no longer will be drawing much load from the
regulator--it should just be the leakage current and that should be
very close to 0.

Up to this point the regulator framework has continued to count a
consumer's load request for disabled regulators.  This has led to code
patterns that look like this:

  enable_my_thing():
    regular_set_load(reg, load_uA)
    regulator_enable(reg)

  disable_my_thing():
    regulator_disable(reg)
    regulator_set_load(reg, 0)

Sometimes disable_my_thing() sets a nominal (&lt;= 100 uA) load instead
of setting a 0 uA load.  I will make the assertion that nearly all (if
not all) places where we set a nominal load of 100 uA or less we end
up with a result that is the same as if we had set a load of 0 uA.
Specifically:
- The whole point of setting the load is to help set the operating
  mode of the regulator.  Higher loads may need less efficient
  operating modes.
- The only time this matters at all is if there is another consumer of
  the regulator that wants the regulator on.  If there are no other
  consumers of the regulator then the regulator will turn off and we
  don't care about the operating mode.
- If there's another consumer that actually wants the regulator on
  then presumably it is requesting a load that makes our nominal
  &lt;= 100 uA load insignificant.

A quick survey of the existing callers to regulator_set_load() to see
how everyone uses it:

Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: Fix return value of _set_load() stub</title>
<updated>2018-11-20T15:22:46+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2018-11-17T03:19:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f1abf67217de91f5cd3c757ae857632ca565099a'/>
<id>f1abf67217de91f5cd3c757ae857632ca565099a</id>
<content type='text'>
The stub implementation of _set_load() returns a mode value which is
within the bounds of valid return codes for success (the documentation
just says that failures are negative error codes) but not sensible or
what the actual implementation does.  Fix it to just return 0.

Reported-by: Cheng-Yi Chiang &lt;cychiang@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The stub implementation of _set_load() returns a mode value which is
within the bounds of valid return codes for success (the documentation
just says that failures are negative error codes) but not sensible or
what the actual implementation does.  Fix it to just return 0.

Reported-by: Cheng-Yi Chiang &lt;cychiang@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
