- 04 4月, 2017 1 次提交
-
-
由 Philipp Zabel 提交于
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->of_node == NULL. Fixes: bb475230 ("reset: make optional functions really optional") Reported-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Ramiro Oliveira <Ramiro.Oliveira@synopsys.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
- 22 3月, 2017 1 次提交
-
-
由 Philipp Zabel 提交于
When RESET_CONTROLLER is not enabled, the optional reset_control_get stubs should now also return NULL. Since it is now valid for reset_control_assert/deassert/reset/status/put to be called unconditionally, with NULL as an argument for optional resets, the stubs are not allowed to warn anymore. Fixes: bb475230 ("reset: make optional functions really optional") Reported-by: NAndrzej Hajda <a.hajda@samsung.com> Tested-by: NAndrzej Hajda <a.hajda@samsung.com> Reviewed-by: NAndrzej Hajda <a.hajda@samsung.com> Cc: Ramiro Oliveira <Ramiro.Oliveira@synopsys.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
- 20 1月, 2017 2 次提交
-
-
由 Ramiro Oliveira 提交于
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: NRamiro Oliveira <Ramiro.Oliveira@synopsys.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
由 Ramiro Oliveira 提交于
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: NRamiro Oliveira <Ramiro.Oliveira@synopsys.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
- 30 6月, 2016 5 次提交
-
-
由 Lee Jones 提交于
Standardise the way inline functions: devm_reset_control_get_shared_by_index devm_reset_control_get_exclusive_by_index ... are formatted. Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
由 Lee Jones 提交于
Consumers need to be able to specify whether they are requesting an 'exclusive' or 'shared' reset line no matter which API (of_*, devm_*, etc) they are using. This change allows users of the optional_* API in particular to specify that their request is for a 'shared' line. Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
由 Lee Jones 提交于
Consumers need to be able to specify whether they are requesting an 'exclusive' or 'shared' reset line no matter which API (of_*, devm_*, etc) they are using. This change allows users of the of_* API in particular to specify that their request is for a 'shared' line. Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
由 Lee Jones 提交于
Phasing out generic reset line requests enables us to make some better decisions on when and how to (de)assert said lines. If an 'exclusive' line is requested, we know a device *requires* a reset and that it's preferable to act upon a request right away. However, if a 'shared' reset line is requested, we can reasonably assume sure that placing a device into reset isn't a hard requirement, but probably a measure to save power and is thus able to cope with not being asserted if another device is still in use. In order allow gentle adoption and not to forcing all consumers to move to the API immediately, causing administration headache between subsystems, this patch adds some temporary stand-in shim-calls. This will ease the burden at merge time and allow subsystems to migrate over to the new API in a more realistic time-frame. Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
由 Lee Jones 提交于
We're about to split the current API into two, where consumers will be forced to be explicit when requesting reset lines. The choice will be to either the call the *_exclusive or *_shared variant depending on whether they can actually tolorate not being asserted when that request is made. The new API will look like this once reorded and complete: reset_control_get_exclusive() reset_control_get_shared() reset_control_get_optional_exclusive() reset_control_get_optional_shared() of_reset_control_get_exclusive() of_reset_control_get_shared() of_reset_control_get_exclusive_by_index() of_reset_control_get_shared_by_index() devm_reset_control_get_exclusive() devm_reset_control_get_shared() devm_reset_control_get_optional_exclusive() devm_reset_control_get_optional_shared() devm_reset_control_get_exclusive_by_index() devm_reset_control_get_shared_by_index() Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
- 01 6月, 2016 1 次提交
-
-
由 John Youn 提交于
Prior to commit 6c96f05c ("reset: Make [of_]reset_control_get[_foo] functions wrappers"), the "optional" functions returned -ENOTSUPP when CONFIG_RESET_CONTROLLER was not set. Revert back to the old behavior by changing the new __devm_reset_control_get() and __of_reset_control_get() functions to return ERR_PTR(-ENOTSUPP) when compiled without CONFIG_RESET_CONTROLLER. Otherwise they will return -EINVAL causing users to think that an error occurred when CONFIG_RESET_CONTROLLER is not set. Fixes: 6c96f05c ("reset: Make [of_]reset_control_get[_foo] functions wrappers") Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
- 05 4月, 2016 1 次提交
-
-
由 Daniel Lezcano 提交于
The Mediatek's thermal driver fails to compile when the RESET_CONTROLLER option is not set. Logically, as the driver depends on this option to compile, the Kconfig should select it but actually that is not correct because the Kconfig provides also the COMPILE_TEST to increase the compile test coverage. By providing the missing 'device_reset' stub for the driver in reset.h, that let the kernel to compile on different platforms with the Mediatek thermal driver enabled with the COMPILE_TEST option. Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
- 30 3月, 2016 2 次提交
-
-
由 Hans de Goede 提交于
In some SoCs some hw-blocks share a reset control. Add support for this setup by adding new: reset_control_get_shared() devm_reset_control_get_shared() devm_reset_control_get_shared_by_index() methods to get a reset_control. Note that this patch omits adding of_ variants, if these are needed later they can be easily added. This patch also changes the behavior of the existing exclusive reset_control_get() variants, if these are now called more then once for the same reset_control they will return -EBUSY. To catch existing drivers triggering this error (there should not be any) a WARN_ON(1) is added in this path. When a reset_control is shared, the behavior of reset_control_assert / deassert is changed, for shared reset_controls these will work like the clock-enable/disable and regulator-on/off functions. They will keep a deassert_count, and only (re-)assert the reset after reset_control_assert has been called as many times as reset_control_deassert was called. Calling reset_control_assert without first calling reset_control_deassert is not allowed on a shared reset control. Calling reset_control_reset is also not allowed on a shared reset control. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
由 Hans de Goede 提交于
With both the regular, _by_index and _optional variants we already have quite a few variants of [of_]reset_control_get[_foo], the upcoming addition of shared reset lines support makes this worse. This commit changes all the variants into wrappers around common core functions. For completeness sake this commit also adds a new devm_get_reset_control_by_index wrapper. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
- 16 11月, 2015 2 次提交
-
-
由 Philipp Zabel 提交于
ENOSYS is reserved to report invalid syscalls to userspace. Consistently return ENOTSUPP to indicate that the driver doesn't support the functionality or the reset framework is not enabled at all. Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
由 Vince Hsu 提交于
Add of_reset_control_get_by_index() to allow the drivers to get reset device without knowing its name. Signed-off-by: NVince Hsu <vinceh@nvidia.com> [jonathanh@nvidia.com: Updated stub function to return -ENOTSUPP instead of -ENOSYS which should only be used for system calls.] Signed-off-by: NJon Hunter <jonathanh@nvidia.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
- 01 9月, 2015 1 次提交
-
-
由 Axel Lin 提交于
So the drivers can be compiled with CONFIG_RESET_CONTROLLER disabled. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
- 20 10月, 2014 1 次提交
-
-
由 Dinh Nguyen 提交于
There are cases where a system will want to read a reset status bit before doing any other toggling. Add a reset_control_status helper function to the reset controller API. Signed-off-by: NDinh Nguyen <dinguyen@opensource.altera.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
- 14 4月, 2014 1 次提交
-
-
由 Hans de Goede 提交于
of_reset_control_get is not declared static in drivers/reset/core.c, which is correct as we want to use it elsewhere too. But it does not have a protype declared anywhere under include/linux. Add a prototype / stub for it to linux/reset.h to fix this. Reviewed-by: NJosh Triplett <josh@joshtriplett.org> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
- 10 3月, 2014 1 次提交
-
-
由 Philipp Zabel 提交于
This patch adds device_reset_optional and (devm_)reset_control_get_optional variants that drivers can use to indicate they can function without control over the reset line. For those functions, stubs are added so the drivers can be compiled with CONFIG_RESET_CONTROLLER disabled. Also, device_reset is annotated with __must_check. Drivers ignoring the return value should use device_reset_optional instead. Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Reviewed-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: NMarek Vasut <marex@denx.de> Acked-by: NWolfram Sang <wsa@the-dreams.de>
-
- 03 2月, 2014 1 次提交
-
-
由 Maxime Ripard 提交于
In some cases, you might need to deassert from reset an hardware block that doesn't associated to a struct device (CPUs, timers, etc.). Add a small helper to retrieve the reset controller from the device tree without the need to pass a struct device. Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
- 12 4月, 2013 1 次提交
-
-
由 Philipp Zabel 提交于
This adds a simple API for devices to request being reset by separate reset controller hardware and implements the reset signal device tree binding. Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Reviewed-by: NStephen Warren <swarren@nvidia.com> Reviewed-by: NShawn Guo <shawn.guo@linaro.org> Reviewed-by: NMarek Vasut <marex@denx.de> Reviewed-by: NPavel Machek <pavel@ucw.cz>
-