<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/include/linux/regulator, branch v4.18-rc2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v4.18-rc2</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v4.18-rc2'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2018-06-07T13:23:08Z</updated>
<entry>
<title>regulator: gpio: Revert</title>
<updated>2018-06-07T13:23:08Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2018-06-07T13:10:56Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=e536700ef5bf9788af185bf890a52f296d055ed7'/>
<id>urn:sha1:e536700ef5bf9788af185bf890a52f296d055ed7</id>
<content type='text'>
regulator: fixed/gpio: Revert GPIO descriptor changes due to platform breakage

Commit 6059577cb28 "regulator: fixed: Convert to use GPIO descriptor
only" broke at least the ams-delta platform since the lookup tables
added to the board files use the function name "enable" while the driver
uses NULL causing the regulator to not acquire and control the enable
GPIOs.  Revert that and a couple of other commits that are caught up
with it to fix the issue:

2b6c00c157c5bf80 "ARM: pxa, regulator: fix building ezx e680"
6059577cb28d8b15 "regulator: fixed: Convert to use GPIO descriptor only"
37bed97f00734ce3 "regulator: gpio: Get enable GPIO using GPIO descriptor"

Reported-by: Janusz Krzysztofik &lt;jmkrzyszt@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: gpio: Get enable GPIO using GPIO descriptor</title>
<updated>2018-05-29T14:55:12Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2018-05-14T08:06:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=37bed97f00734ce329495823d9682181028b51e4'/>
<id>urn:sha1:37bed97f00734ce329495823d9682181028b51e4</id>
<content type='text'>
We augment the GPIO regulator to get the *enable* regulator
GPIO line (not the other lines) using a descriptor rather than
a global number.

We then pass this into the regulator core which has been
prepared to hande enable descriptors in a separate patch.

Switch over the two boardfiles using this facility and clean
up so we only pass descriptors around.

Cc: Philipp Zabel &lt;philipp.zabel@gmail.com&gt; # HX4700/Magician maintainer
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: fixed: Convert to use GPIO descriptor only</title>
<updated>2018-05-29T14:53:17Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2018-05-14T08:06:22Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=6059577cb28d8b15d2b7dad51eb90d885f1ed9ab'/>
<id>urn:sha1:6059577cb28d8b15d2b7dad51eb90d885f1ed9ab</id>
<content type='text'>
As we augmented the regulator core to accept a GPIO descriptor instead
of a GPIO number, we can augment the fixed GPIO regulator to look up
and pass that descriptor directly from device tree or board GPIO
descriptor look up tables.

Some boards just auto-enumerate their fixed regulator platform devices
and I have assumed they get names like "fixed-regulator.0" but it's
pretty hard to guess this. I need some testing from board maintainers to
be sure. Other boards are straight forward, using just plain
"fixed-regulator" (ID -1) or "fixed-regulator.1" hammering down the
device ID.

The OMAP didn't have proper label names on its GPIO chips so I have fixed
this with a separate patch to the GPIO tree, see
commit 088413bc0bd5f5fb66ca22a19d66a49d7154ba4c
"gpio: omap: Give unique labels to each GPIO bank/chip"

It seems the da9055 and da9211 has never got around to actually passing
any enable gpio into its platform data (not the in-tree code anyway) so we
can just decide to simply pass a descriptor instead.

The fixed GPIO-controlled regulator in mach-pxa/ezx.c was confusingly named
"*_dummy_supply_device" while it is a very real device backed by a GPIO
line. There is nothing dummy about it at all, so I renamed it with the
infix *_regulator_* as part of this patch set.

For the patch hunk hitting arch/blackfin I would say I do not expect
testing, review or ACKs anymore so if it works, it works.

The hunk hitting the x86 BCM43xx driver is especially tricky as the number
comes out of SFI which is a mystery to me. I definately need someone to
look at this. (Hi Andy.)

Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt; # Check the x86 BCM stuff
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: 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
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Acked-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: max8952: Pass descriptor instead of GPIO number</title>
<updated>2018-05-24T15:50:36Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2018-05-14T08:06:29Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=d7a261c2d1f233260c48651b4e68987ce1206139'/>
<id>urn:sha1:d7a261c2d1f233260c48651b4e68987ce1206139</id>
<content type='text'>
Instead of passing a global GPIO number for the enable GPIO, pass
a descriptor looked up with the standard devm_gpiod_get_optional()
call.

All users of this regulator use device tree so the transition is
pretty smooth.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: core: Parse coupled regulators properties</title>
<updated>2018-05-17T07:05:48Z</updated>
<author>
<name>Maciej Purski</name>
<email>m.purski@samsung.com</email>
</author>
<published>2018-04-23T14:33:39Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=a085a31af566254fb8f7721911c828c8fa797894'/>
<id>urn:sha1:a085a31af566254fb8f7721911c828c8fa797894</id>
<content type='text'>
On Odroid XU3/4 and other Exynos5422 based boards there is a case, that
different devices on the board are supplied by different regulators
with non-fixed voltages. If one of these devices temporarily requires
higher voltage, there might occur a situation that the spread between
devices' voltages is so high, that there is a risk of changing
'high' and 'low' states on the interconnection between devices powered
by those regulators.

Add new structure "coupling_desc" to regulator_dev, which contains
pointers to all coupled regulators including the owner of the structure,
number of coupled regulators and counter of currently resolved
regulators.

Add of_functions to parse all data needed in regulator coupling.
Provide method to check DTS data consistency. Check if each coupled
regulator's max_spread is equal and if their lists of regulators match.

Signed-off-by: Maciej Purski &lt;m.purski@samsung.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: core: Make locks re-entrant</title>
<updated>2018-05-17T07:05:03Z</updated>
<author>
<name>Maciej Purski</name>
<email>m.purski@samsung.com</email>
</author>
<published>2018-04-23T14:33:37Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=66cf9a7e0192734c1c94751e628bd075be62cff4'/>
<id>urn:sha1:66cf9a7e0192734c1c94751e628bd075be62cff4</id>
<content type='text'>
Setting voltage, enabling/disabling regulators requires operations on
all regulators related with the regulator being changed. Therefore,
all of them should be locked for the whole operation. With the current
locking implementation, adding additional dependency (regulators
coupling) causes deadlocks in some cases.

Introduce a possibility to attempt to lock a mutex multiple times
by the same task without waiting on a mutex. This should handle all
reasonable coupling-supplying combinations, especially when two coupled
regulators share common supplies. The only situation that should be
forbidden is simultaneous coupling and supplying between a pair of
regulators.

The idea is based on clk core.

Signed-off-by: Maciej Purski &lt;m.purski@samsung.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: arizona-ldo1: Look up a descriptor and pass to the core</title>
<updated>2018-05-17T06:42:53Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2018-05-14T08:06:24Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=e1739e86f0cb9c48e8745a610e6981a4e24cadad'/>
<id>urn:sha1:e1739e86f0cb9c48e8745a610e6981a4e24cadad</id>
<content type='text'>
Instead of passing a global GPIO number, pass a descriptor looked
up with the standard devm_gpiod_get_optional() call.

We have augmented the GPIO core to look up the regulator special
GPIO "wlf,ldoena" in commit 6a537d48461d
"gpio: of: Support regulator nonstandard GPIO properties".

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Acked-by: Charles Keepax &lt;ckeepax@opensource.wolfsonmicro.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: core: Allow for regulators that can't be read at bootup</title>
<updated>2018-05-17T05:08:37Z</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2018-05-15T22:07:17Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=84b3a7c9c6befe5ab4d49070fe7bcab2da22637e'/>
<id>urn:sha1:84b3a7c9c6befe5ab4d49070fe7bcab2da22637e</id>
<content type='text'>
Regulators attached via RPMh on Qualcomm sdm845 apparently are
write-only.  Specifically you can send a request for a certain voltage
but you can't read back to see what voltage you've requested.  What
this means is that at bootup we have absolutely no idea what voltage
we could be at.

As discussed in the patches to try to support the RPMh regulators [1],
the fact that regulators are write-only means that its driver's
get_voltage_sel() should return an error code if it's called before
any calls to set_voltage_sel().  This causes problems in
machine_constraints_voltage() when trying to apply the constraints.

A proposed fix was to come up with an error code that could be
returned by get_voltage_sel() which would cause the regulator
framework to simply try setting the voltage with the current
constraints.

In this patch I propose the error code -ENOTRECOVERABLE.  In errno.h
this error is described as "State not recoverable".  Though the error
code was originally intended "for robust mutexes", the description of
the error code seems to apply here because we can't read the state of
the regulator.  Also note that the only existing user of this error
code in the regulator framework is tps65090-regulator.c which returns
this error code from the enable() call (not get_voltage() or
get_voltage_sel()), so there should be no existing regulators that
might accidentally get the new behavior.  (Side note is that tps65090
seems to interpret this error code to mean an error that you can't
recover from rather than some data that can't be recovered).

[1] https://patchwork.kernel.org/patch/10340897/

Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: Don't return or expect -errno from of_map_mode()</title>
<updated>2018-04-20T11:45:36Z</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2018-04-18T15:54:18Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=02f3703934a42417021405ef336fe45add13c3d1'/>
<id>urn:sha1:02f3703934a42417021405ef336fe45add13c3d1</id>
<content type='text'>
In of_get_regulation_constraints() we were taking the result of
of_map_mode() (an unsigned int) and assigning it to an int.  We were
then checking whether this value was -EINVAL.  Some implementers of
of_map_mode() were returning -EINVAL (even though the return type of
their function needed to be unsigned int) because they needed to
signal an error back to of_get_regulation_constraints().

In general in the regulator framework the mode is always referred to
as an unsigned int.  While we could fix this to be a signed int (the
highest value we store in there right now is 0x8), it's actually
pretty clean to just define the regulator mode 0x0 (the lack of any
bits set) as an invalid mode.  Let's do that.

Fixes: 5e5e3a42c653 ("regulator: of: Add support for parsing initial and suspend modes")
Suggested-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: ab8500: Drop AB8540/9540 support</title>
<updated>2018-04-16T12:08:59Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2018-03-22T10:17:40Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=ec1ba3e519c0f46523cf40b83dc71562171b7c08'/>
<id>urn:sha1:ec1ba3e519c0f46523cf40b83dc71562171b7c08</id>
<content type='text'>
The AB8540 was an evolved version of the AB8500, but it was never
mass produced or put into products, only reference designs exist.
The upstream support was never completed and it is unlikely that
this will happen so drop the support for now to simplify
maintenance of the AB8500.

Cc: Loic Pallardy &lt;loic.pallardy@st.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
