From 12ce15538a4512834138ee4d0ded416286ec46ad Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 22 Apr 2015 16:27:01 +0200 Subject: sunxi: axp: Change axp_gpio_foo prototypes to match gpio uclass ops Change the axp_gpio_foo function prototypes to match the gpio uclass op prototypes, this is a preparation patch for moving the axp gpio code to a separate driver-model gpio driver. Note that the ugly calls with a NULL udev pointer in drivers/gpio/sunxi_gpio.c this adds are removed in a later patch. Signed-off-by: Hans de Goede Reviewed-by: Simon Glass Acked-by: Ian Campbell --- include/axp221.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include/axp221.h') diff --git a/include/axp221.h b/include/axp221.h index 0aac04d..e826ca8 100644 --- a/include/axp221.h +++ b/include/axp221.h @@ -6,6 +6,8 @@ * SPDX-License-Identifier: GPL-2.0+ */ +struct udevice; + #define AXP221_CHIP_ADDR 0x68 #define AXP221_CTRL_ADDR 0x3e #define AXP221_INIT_DATA 0x3e @@ -80,7 +82,7 @@ int axp221_set_eldo(int eldo_num, unsigned int mvolt); int axp221_init(void); int axp221_get_sid(unsigned int *sid); -int axp_gpio_direction_input(unsigned int pin); -int axp_gpio_direction_output(unsigned int pin, unsigned int val); -int axp_gpio_get_value(unsigned int pin); -int axp_gpio_set_value(unsigned int pin, unsigned int val); +int axp_gpio_direction_input(struct udevice *dev, unsigned offset); +int axp_gpio_direction_output(struct udevice *dev, unsigned offset, int val); +int axp_gpio_get_value(struct udevice *dev, unsigned offset); +int axp_gpio_set_value(struct udevice *dev, unsigned offset, int val); -- cgit v1.1