summaryrefslogtreecommitdiffstats
path: root/include/regulator.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/misc' into masterSascha Hauer2020-10-141-0/+2
|\
| * include: regulator.h: forward declare struct device_dAhmad Fatoum2020-09-291-0/+2
| | | | | | | | | | | | | | | | We so far depended on include order for struct device_d to be declared before <regulator.h> inclusion. Fix this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | regulator: add device reference to regulator_devMarco Felsch2020-09-291-0/+2
|/ | | | | | | | | It is useful to know the physical device a regulator_dev belongs to. This is at least needed for the new deep-probe mechanism. It is also useful for a few regulator drivers to drop their own device_d reference. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: provide regulator_get_name() stub for !CONFIG_REGULATORAhmad Fatoum2020-09-151-0/+5
| | | | | | | | | | Otherwise users of this function run into a link error when regulator support is compiled out. Reported-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Tested-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: void function returns voidSascha Hauer2020-04-011-1/+0
| | | | | | Do not return a value from a function returning void. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: import Linux regulator_bulk APIAhmad Fatoum2020-02-251-0/+49
| | | | | | | | | Linux v5.6-rc1 contains 168 references to regultor_bulk_get, which allows getting multiple regulators to set at once. Instead of open coding them when porting code, port over the helpers to barebox. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* include: add SPDX GPL-2.0-only license tags for files without licensing ↵Roland Hieber2020-02-171-0/+1
| | | | | | | | | | | information According to our /README, GPL-2.0-only applies for the whole project except noted otherwise. Signed-off-by: Roland Hieber <rohieb@rohieb.name> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: add function to get regulator by its nameSascha Hauer2019-12-201-0/+1
| | | | | | | Useful for getting regulators that are not correctly associated with a device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: import linear voltage range helpersAhmad Fatoum2019-11-061-0/+46
| | | | | | | | | The incoming stpmic1 regulator driver makes use of these helpers internally. Thus port them out of Linux v5.3. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: copy upstream struct regulator_desc documentationAhmad Fatoum2019-11-061-0/+28
| | | | | | | | This imports the regulator_desc documentation for the fields barebox uses out of Linux v5.4-rc1. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: Add support for setting regulator's voltageAndrey Smirnov2019-01-181-0/+24
| | | | | | | | | Add code needed to implement regulator_set_voltage(). Currently only bare minmum needed for ANATOP driver (added in follow up commit) is supported. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: Port basic regmap regulator functionsAndrey Smirnov2019-01-181-1/+10
| | | | | | | | In order to be able to port Linux driver relying on this API, port various regmap related regulator function to Barebox. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: Convert drivers to use struct regulator_descAndrey Smirnov2019-01-181-1/+5
| | | | | | | | To simplify porting kernel code, port a very basic struct regulator_desc and convert all of the code to use it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: Add support for regulator-boot-on device tree propertySascha Hauer2015-07-151-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: allow to use it with non DT deviceJean-Christophe PLAGNIOL-VILLARD2015-02-041-0/+10
| | | | | | | | | this will use the device name as regulator name with the same Algo as clkdev for lookup Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add initial regulator supportSascha Hauer2014-04-291-0/+47
Provide minimal regulator support. Only supported operations are enabling and disabling regulators. Association of devices with their regulators is limited to devicetree only. If regulator support is disabled the API expands to static inline stubs so consumers can still use the API. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>