power: Add a GPIO driver for the as3722 PMIC

This pmic includes GPIOs which should have their own driver. Add
a driver to support these.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-on: Beaver, Jetson-TK1
Tested-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
Simon Glass
2017-07-25 08:30:11 -06:00
parent deea211aec
commit c2012cb47c
2 changed files with 125 additions and 0 deletions

View File

@@ -20,6 +20,11 @@
#define AS3722_ASIC_ID1 0x90
#define AS3722_ASIC_ID2 0x91
#define AS3722_GPIO_CONTROL(n) (0x08 + (n))
#define AS3722_GPIO_CONTROL_MODE_OUTPUT_VDDH (1 << 0)
#define AS3722_GPIO_CONTROL_MODE_OUTPUT_VDDL (7 << 0)
#define AS3722_GPIO_CONTROL_INVERT (1 << 7)
struct udevice;
int as3722_init(struct udevice **devp);