diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2015-01-13 07:33:07 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-02-04 15:49:58 +0100 |
commit | 5e8bf4f5d9df9341fdb3d2e5f5b5e8399631ebcd (patch) | |
tree | 1c57099688ca605c1ca70ec3a3fed82b79a7b1f8 /drivers/serial | |
parent | ce6fff7c8b129c563be24bd8ca24b1393835b31d (diff) | |
download | barebox-5e8bf4f5d9df9341fdb3d2e5f5b5e8399631ebcd.tar.gz barebox-5e8bf4f5d9df9341fdb3d2e5f5b5e8399631ebcd.tar.xz |
amba: pl011: add support for regulator
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/amba-pl011.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index fc7723ea8a..4c4067d5b5 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c @@ -28,6 +28,7 @@ #include <init.h> #include <malloc.h> #include <io.h> +#include <regulator.h> #include <linux/amba/serial.h> #include <linux/clk.h> #include <linux/err.h> @@ -181,6 +182,16 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) { struct amba_uart_port *uart; struct console_device *cdev; + struct regulator *r; + + r = regulator_get(&dev->dev, NULL); + if (r) { + int ret; + + ret = regulator_enable(r); + if (ret) + return ret; + } uart = xzalloc(sizeof(struct amba_uart_port)); uart->clk = clk_get(&dev->dev, NULL); |