reset: Add devm_reset_control_get_optional_exclusive_released()
NVIDIA Tegra DRM and media drivers will need a resource-managed-optional variant of reset_control_get_exclusive_released() in order to switch away from a legacy Tegra-specific PD API to a GENPD API without much hassle. Add the new reset helper to the reset API. Tested-by: Peter Geis <pgwipeout@gmail.com> # Ouya T30 Tested-by: Nicolas Chauvet <kwizart@gmail.com> # PAZ00 T20 Tested-by: Matt Merhar <mattmerhar@protonmail.com> # Ouya T30 Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
Родитель
ac9b7554af
Коммит
d17655759b
|
@ -362,6 +362,25 @@ __must_check devm_reset_control_get_exclusive_released(struct device *dev,
|
||||||
return __devm_reset_control_get(dev, id, 0, false, false, false);
|
return __devm_reset_control_get(dev, id, 0, false, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* devm_reset_control_get_optional_exclusive_released - resource managed
|
||||||
|
* reset_control_get_optional_exclusive_released()
|
||||||
|
* @dev: device to be reset by the controller
|
||||||
|
* @id: reset line name
|
||||||
|
*
|
||||||
|
* Managed-and-optional variant of reset_control_get_exclusive_released(). For
|
||||||
|
* reset controllers returned from this function, reset_control_put() is called
|
||||||
|
* automatically on driver detach.
|
||||||
|
*
|
||||||
|
* See reset_control_get_exclusive_released() for more information.
|
||||||
|
*/
|
||||||
|
static inline struct reset_control *
|
||||||
|
__must_check devm_reset_control_get_optional_exclusive_released(struct device *dev,
|
||||||
|
const char *id)
|
||||||
|
{
|
||||||
|
return __devm_reset_control_get(dev, id, 0, false, true, false);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* devm_reset_control_get_shared - resource managed reset_control_get_shared()
|
* devm_reset_control_get_shared - resource managed reset_control_get_shared()
|
||||||
* @dev: device to be reset by the controller
|
* @dev: device to be reset by the controller
|
||||||
|
|
Загрузка…
Ссылка в новой задаче