regulator: devres: add API for reference voltage supplies
authorDavid Lechner <dlechner@baylibre.com>
Mon, 29 Apr 2024 23:40:09 +0000 (18:40 -0500)
committerMark Brown <broonie@kernel.org>
Fri, 3 May 2024 02:08:12 +0000 (11:08 +0900)
commitb250c20b64290808aa4b5cc6d68819a7ee28237f
tree95f6ddc9481edc67258cf16f10392324d495f13f
parentfec50db7033ea478773b159e0e2efb135270e3b7
regulator: devres: add API for reference voltage supplies

A common use case for regulators is to supply a reference voltage to an
analog input or output device. This adds a new devres API to get,
enable, and get the voltage in a single call. This allows eliminating
boilerplate code in drivers that use reference supplies in this way.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240429-regulator-get-enable-get-votlage-v2-1-b1f11ab766c1@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/driver-api/driver-model/devres.rst
drivers/regulator/devres.c
include/linux/regulator/consumer.h