summaryrefslogtreecommitdiff
path: root/include/linux/mfd/ab8500/gpio.h
blob: 76d5ee22c60cadea1248b0f87e9421b21e54c6d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * Copyright ST-Ericsson 2010.
 *
 * Author: Bibek Basu <bibek.basu@stericsson.com>
 * Licensed under GPLv2.
 */

#ifndef _AB8500_GPIO_H
#define _AB8500_GPIO_H

/*
 * Platform data to register a block: only the initial gpio/irq number.
 */

struct ab8500_gpio_platform_data {
	int gpio_base;
	u32 irq_base;
	u8  initial_pin_config[7];
	u8  initial_pin_direction[6];
	u8  initial_pin_pullups[6];
};

int ab8500_config_pull_up_or_down(struct device *dev,
				unsigned ab8500_gpio_offset, bool enable);

int ab8500_gpio_config_select(struct device *dev,
			unsigned ab8500_gpio_offset, bool gpio_select);

int ab8500_gpio_config_get_select(struct device *dev,
			unsigned ab8500_gpio_offset, bool *gpio_select);

#endif /* _AB8500_GPIO_H */