summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
Commit message (Collapse)AuthorAgeFilesLines
* regulator: Port ANATOP driver from LinuxAndrey Smirnov2019-01-183-1/+172
| | | | | | | | Port a subset of Linux driver sufficient enough to support feature needed for PCIe on i.MX7. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: Assume probe deferral instead of missing regulatorAndrey Smirnov2019-01-181-1/+6
| | | | | | | | | | Don't report requested regulator (via of_regulator_get()) as non-existent if said regulator is missing from regulator list. Instead report it as probe deferral to give other, unprobed, drivers a chance to resolve this. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: Add support for setting regulator's voltageAndrey Smirnov2019-01-182-0/+143
| | | | | | | | | 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-182-1/+88
| | | | | | | | 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-183-8/+12
| | | | | | | | 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: pfuze: provide power over standby handlerOleksij Rempel2017-07-072-0/+68
| | | | | | | | | | | | This patch is providing an optional power off handler which will configure standby state of the PMIC to disable all power lines. In my power consumption test on RIoTBoard, I got the following results: power off without this patch: 320 mA power off with this patch: 2 mA Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* regulator: Add pfuze driverSascha Hauer2017-01-203-0/+174
| | | | | | | | This is not yet a regulator driver, only the register map is exported as /dev/pfuze* so the registers can be accessed for debugging purposes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* string: Fix (v)asprintf prototypesSascha Hauer2016-04-151-1/+1
| | | | | | | | | | Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: fixed: Init gpio properlySascha Hauer2016-02-231-0/+1
| | | | | | | gpio has to be initialized with an invalid gpio number. 0 is a valid number and it will be requested and used by the driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bcm2835: introduce mach-bcm283xAlexander Aring2016-01-042-3/+3
| | | | | | | | | | | | This patch changes the most part of mach-bcm2835 to mach-bcm283x. This prepares to add RPi2 support which is a bcm2836. This patch changes the Kconfig entry namens to BCM283X for drivers only. These drivers should working the same in bcm2836. While updating defconfig I added LED support/trigger option. Signed-off-by: Alexander Aring <alex.aring@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/+15
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: Factor out functions to work with regulator_internalSascha Hauer2015-07-151-41/+45
| | | | | | | | Internally we only have a struct regulator_internal, so factor out regulator_enable_internal and regulator_disable_internal functions which can be called from regulator internal code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: add bcm2835 driverJean-Christophe PLAGNIOL-VILLARD2015-02-043-0/+155
| | | | | | | | | | | this will allow to handle IP power automatically and not at board level Mainline kernel need this as they do not have the regulator driver support as some IP such as USB are not power on at boot Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: allow to use it with non DT deviceJean-Christophe PLAGNIOL-VILLARD2015-02-042-17/+83
| | | | | | | | | 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>
* sandbox: allow "make ARCH=sandbox allyesconfig"Holger Schurig2014-07-221-0/+1
| | | | | | | | | | | | | Compiling the tree with allyesconfig is helpful because different compilers (gcc, clang) or static checkers (e.g. clang's scan-build) can then process and check more code. This patch introduces two new configuration symbols that Kconfig files can depend on. That way, code that is only working where a cache or DMA implementation exists can be opted out. Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: fixed: add always-on propertySteffen Trumtrar2014-07-111-0/+9
| | | | | | | | | Support the "regulator-always-on" property for fixed regulators. The regulator gets enabled on probe and subsequent disable calls are ignored. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add initial regulator supportSascha Hauer2014-04-294-0/+380
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>