Source
13
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
14
* GNU General Public License for more details.
15
15
*/
16
16
17
17
#include <linux/init.h>
18
18
#include <linux/kernel.h>
19
19
#include <linux/module.h>
20
20
#include <linux/bitops.h>
21
21
#include <linux/errno.h>
22
22
#include <linux/platform_device.h>
23
-
#include <linux/gpio.h>
23
+
#include <linux/gpio/driver.h>
24
24
#include <linux/mfd/kempld.h>
25
25
26
26
#define KEMPLD_GPIO_MAX_NUM 16
27
27
#define KEMPLD_GPIO_MASK(x) (BIT((x) % 8))
28
28
#define KEMPLD_GPIO_DIR_NUM(x) (0x40 + (x) / 8)
29
29
#define KEMPLD_GPIO_LVL_NUM(x) (0x42 + (x) / 8)
30
30
#define KEMPLD_GPIO_EVT_LVL_EDGE 0x46
31
31
#define KEMPLD_GPIO_IEN 0x4A
32
32
33
33
struct kempld_gpio_data {