Merge tag 'v3.3.7' into 3.3/master
[zen-stable.git] / include / linux / mfd / pcf50633 / gpio.h
bloba42b845efc54089eac7207c59fbb93c74d02bb74
1 /*
2 * gpio.h -- GPIO driver for NXP PCF50633
4 * (C) 2006-2008 by Openmoko, Inc.
5 * All rights reserved.
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
13 #ifndef __LINUX_MFD_PCF50633_GPIO_H
14 #define __LINUX_MFD_PCF50633_GPIO_H
16 #include <linux/mfd/pcf50633/core.h>
18 #define PCF50633_GPIO1 1
19 #define PCF50633_GPIO2 2
20 #define PCF50633_GPIO3 3
21 #define PCF50633_GPO 4
23 #define PCF50633_REG_GPIO1CFG 0x14
24 #define PCF50633_REG_GPIO2CFG 0x15
25 #define PCF50633_REG_GPIO3CFG 0x16
26 #define PCF50633_REG_GPOCFG 0x17
28 #define PCF50633_GPOCFG_GPOSEL_MASK 0x07
30 enum pcf50633_reg_gpocfg {
31 PCF50633_GPOCFG_GPOSEL_0 = 0x00,
32 PCF50633_GPOCFG_GPOSEL_LED_NFET = 0x01,
33 PCF50633_GPOCFG_GPOSEL_SYSxOK = 0x02,
34 PCF50633_GPOCFG_GPOSEL_CLK32K = 0x03,
35 PCF50633_GPOCFG_GPOSEL_ADAPUSB = 0x04,
36 PCF50633_GPOCFG_GPOSEL_USBxOK = 0x05,
37 PCF50633_GPOCFG_GPOSEL_ACTPH4 = 0x06,
38 PCF50633_GPOCFG_GPOSEL_1 = 0x07,
39 PCF50633_GPOCFG_GPOSEL_INVERSE = 0x08,
42 int pcf50633_gpio_set(struct pcf50633 *pcf, int gpio, u8 val);
43 u8 pcf50633_gpio_get(struct pcf50633 *pcf, int gpio);
45 int pcf50633_gpio_invert_set(struct pcf50633 *, int gpio, int invert);
46 int pcf50633_gpio_invert_get(struct pcf50633 *pcf, int gpio);
48 int pcf50633_gpio_power_supply_set(struct pcf50633 *,
49 int gpio, int regulator, int on);
50 #endif /* __LINUX_MFD_PCF50633_GPIO_H */