<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/reset/core.c, branch v4.14</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.14</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.14'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2017-07-19T10:10:48Z</updated>
<entry>
<title>reset: make (de)assert report success for self-deasserting reset drivers</title>
<updated>2017-07-19T10:10:48Z</updated>
<author>
<name>Philipp Zabel</name>
<email>p.zabel@pengutronix.de</email>
</author>
<published>2017-07-12T15:51:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=21240eb94f1f6df30aa88f7e7b754ed46024d666'/>
<id>urn:sha1:21240eb94f1f6df30aa88f7e7b754ed46024d666</id>
<content type='text'>
By now there are drivers using shared reset controls and (de)assert
calls on platforms with self-deasserting reset lines and thus reset
drivers that do not implement .assert() and .deassert().
As long as the initial state of the reset line is deasserted, there
is no reason for a reset_control_assert call to return an error for
shared reset controls, or for a reset_control_deassert call to return
an error for either shared or exclusive reset controls: after a call
to reset_control_deassert the reset line is guaranteed to be deasserted,
and after a call to reset_control_assert it is valid for the reset
line to stay deasserted for shared reset controls.

Signed-off-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>reset: Add APIs to manage array of resets</title>
<updated>2017-07-19T08:28:12Z</updated>
<author>
<name>Vivek Gautam</name>
<email>vivek.gautam@codeaurora.org</email>
</author>
<published>2017-05-22T11:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=17c82e206d2a3cd876b64921c59116f1ecdce6ad'/>
<id>urn:sha1:17c82e206d2a3cd876b64921c59116f1ecdce6ad</id>
<content type='text'>
Many devices may want to request a bunch of resets and control them. So
it's better to manage them as an array. Add APIs to _get() an array of
reset_control, reusing the _assert(), _deassert(), and _reset() APIs for
single reset controls. Since reset controls already may control multiple
reset lines with a single hardware bit, from the user perspective, reset
control arrays are not at all different from single reset controls.
Note that these APIs don't guarantee that the reset lines managed in the
array are handled in any particular order.

Cc: Felipe Balbi &lt;balbi@kernel.org&gt;
Cc: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Signed-off-by: Vivek Gautam &lt;vivek.gautam@codeaurora.org&gt;
[p.zabel@pengutronix.de: changed API to hide reset control arrays behind
 struct reset_control]
Signed-off-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>reset: use kref for reference counting</title>
<updated>2017-06-06T07:39:20Z</updated>
<author>
<name>Philipp Zabel</name>
<email>p.zabel@pengutronix.de</email>
</author>
<published>2017-05-31T15:42:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d25e4334c2900f15251f16c8ffc5151db800b2aa'/>
<id>urn:sha1:d25e4334c2900f15251f16c8ffc5151db800b2aa</id>
<content type='text'>
Use kref for reference counting and enjoy the advantages of refcount_t.

Signed-off-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>reset: add exported __reset_control_get, return NULL if optional</title>
<updated>2017-04-04T15:36:10Z</updated>
<author>
<name>Philipp Zabel</name>
<email>p.zabel@pengutronix.de</email>
</author>
<published>2016-02-05T12:41:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=62e24c5775ecb387a3eb33701378ccfa6dbc98ee'/>
<id>urn:sha1:62e24c5775ecb387a3eb33701378ccfa6dbc98ee</id>
<content type='text'>
Rename the internal __reset_control_get/put functions to
__reset_control_get/put_internal and add an exported
__reset_control_get equivalent to __of_reset_control_get
that takes a struct device parameter.
This avoids the confusing call to __of_reset_control_get in
the non-DT case and fixes the devm_reset_control_get_optional
function to return NULL if RESET_CONTROLLER is enabled but
dev-&gt;of_node == NULL.

Fixes: bb475230b8e5 ("reset: make optional functions really optional")
Reported-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Tested-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Ramiro Oliveira &lt;Ramiro.Oliveira@synopsys.com&gt;
Signed-off-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc</title>
<updated>2017-02-23T23:57:04Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-02-23T23:57:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b2e3c4319d40c9055c3c587cdb82ba69b50e919d'/>
<id>urn:sha1:b2e3c4319d40c9055c3c587cdb82ba69b50e919d</id>
<content type='text'>
Pull ARM SoC driver updates from Arnd Bergmann:
 "Driver updates for ARM SoCs.

  A handful of driver changes this time around. The larger changes are:

   - Reset drivers for hi3660 and zx2967

   - AHCI driver for Davinci, acked by Tejun and brought in here due to
     platform dependencies

   - Cleanups of atmel-ebi (External Bus Interface)

   - Tweaks for Rockchip GRF (General Register File) usage (kitchensink
     misc register range on the SoCs)

   - PM domains changes for support of two new ZTE SoCs (zx296718 and
     zx2967)"

* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (53 commits)
  soc: samsung: pmu: Add register defines for pad retention control
  reset: make zx2967 explicitly non-modular
  reset: core: fix reset_control_put
  soc: samsung: pm_domains: Read domain name from the new label property
  soc: samsung: pm_domains: Remove message about failed memory allocation
  soc: samsung: pm_domains: Remove unused name field
  soc: samsung: pm_domains: Use full names in subdomains registration log
  sata: ahci-da850: un-hardcode the MPY bits
  sata: ahci-da850: add a workaround for controller instability
  sata: ahci: export ahci_do_hardreset() locally
  sata: ahci-da850: implement a workaround for the softreset quirk
  sata: ahci-da850: add device tree match table
  sata: ahci-da850: get the sata clock using a connection id
  soc: samsung: pmu: Remove duplicated define for ARM_L2_OPTION register
  memory: atmel-ebi: Enable the SMC clock if specified
  soc: samsung: pmu: Remove unused and duplicated defines
  memory: atmel-ebi: Properly handle multiple reference to the same CS
  memory: atmel-ebi: Fix the test to enable generic SMC logic
  soc: samsung: pm_domains: Add new Exynos5433 compatible
  soc: samsung: pmu: Add dummy support for Exynos5433 SoC
  ...
</content>
</entry>
<entry>
<title>reset: fix shared reset triggered_count decrement on error</title>
<updated>2017-02-17T07:11:47Z</updated>
<author>
<name>Jerome Brunet</name>
<email>jbrunet@baylibre.com</email>
</author>
<published>2017-02-15T18:15:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e5a1dadec3648019a838b85357b67f241fbb02e8'/>
<id>urn:sha1:e5a1dadec3648019a838b85357b67f241fbb02e8</id>
<content type='text'>
For a shared reset, when the reset is successful, the triggered_count is
incremented when trying to call the reset callback, so that another device
sharing the same reset line won't trigger it again. If the reset has not
been triggered successfully, the trigger_count should be decremented.

The code does the opposite, and decrements the trigger_count on success.
As a consequence, another device sharing the reset will be able to trigger
it again.

Fixed be removing negation in from of the error code of the reset function.

Fixes: 7da33a37b48f ("reset: allow using reset_control_reset with shared reset")

Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Acked-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Signed-off-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>reset: core: fix reset_control_put</title>
<updated>2017-02-01T15:04:25Z</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2017-02-01T07:05:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4891486fb2c80eaf3bb0f9eb065d15ecd357702f'/>
<id>urn:sha1:4891486fb2c80eaf3bb0f9eb065d15ecd357702f</id>
<content type='text'>
Commit "reset: make optional functions really optional" missed to
adjust one check in reset_control_put, causing a NULL pointer
access for optional resets.

Fixes: bb475230b8e5 "reset: make optional functions really optional"
Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>reset: make optional functions really optional</title>
<updated>2017-01-20T09:36:15Z</updated>
<author>
<name>Ramiro Oliveira</name>
<email>Ramiro.Oliveira@synopsys.com</email>
</author>
<published>2017-01-13T17:57:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bb475230b8e59a547ab66ac3b02572df21a580e9'/>
<id>urn:sha1:bb475230b8e59a547ab66ac3b02572df21a580e9</id>
<content type='text'>
The *_get_optional_* functions weren't really optional so this patch
makes them really optional.

These *_get_optional_* functions will now return NULL instead of an error
if no matching reset phandle is found in the DT, and all the
reset_control_* functions now accept NULL rstc pointers.

Signed-off-by: Ramiro Oliveira &lt;Ramiro.Oliveira@synopsys.com&gt;
Signed-off-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>reset: Change shared flag from int to bool</title>
<updated>2017-01-20T09:36:14Z</updated>
<author>
<name>Ramiro Oliveira</name>
<email>Ramiro.Oliveira@synopsys.com</email>
</author>
<published>2017-01-13T17:57:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee48c726d0b014ac8dd5ec803fb63ce0596a42cf'/>
<id>urn:sha1:ee48c726d0b014ac8dd5ec803fb63ce0596a42cf</id>
<content type='text'>
Since the new parameter being added is going to be a bool this patch
changes the shared flag from int to bool to match the new parameter.

Signed-off-by: Ramiro Oliveira &lt;Ramiro.Oliveira@synopsys.com&gt;
Signed-off-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>reset: allow using reset_control_reset with shared reset</title>
<updated>2016-11-14T08:58:28Z</updated>
<author>
<name>Martin Blumenstingl</name>
<email>martin.blumenstingl@googlemail.com</email>
</author>
<published>2016-11-12T13:13:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7da33a37b48f11ffcb4a718f29a3d4552423fea1'/>
<id>urn:sha1:7da33a37b48f11ffcb4a718f29a3d4552423fea1</id>
<content type='text'>
Some SoCs (for example Amlogic GXBB) implement a reset controller which
only supports a reset pulse (triggered via reset_control_reset). At the
same time multiple devices (in case of the Amlogic GXBB SoC both USB
PHYs) are sharing the same reset line.

This patch allows using reset_control_reset also for shared resets.
There are limitations though:
reset_control_reset can only be used if reset_control_assert was not
used yet.
reset_control_assert can only be used if reset_control_reset was not
used yet.
For shared resets the reset is only triggered once for the lifetime of
the reset_control instance (the reset can be triggered again if all
consumers of that specific reset_control are gone, as the reset
framework will free the reset_control instance in that case).

Signed-off-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Signed-off-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
</content>
</entry>
</feed>
