#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/gpio/driver.h>
#include <linux/i2c.h>
#include <linux/platform_device.h>
#include <linux/mfd/tps65910.h>
#include <linux/of.h>
struct tps65910_gpio { … };
static int tps65910_gpio_get(struct gpio_chip *gc, unsigned offset)
{ … }
static void tps65910_gpio_set(struct gpio_chip *gc, unsigned offset,
int value)
{ … }
static int tps65910_gpio_output(struct gpio_chip *gc, unsigned offset,
int value)
{ … }
static int tps65910_gpio_input(struct gpio_chip *gc, unsigned offset)
{ … }
#ifdef CONFIG_OF
static struct tps65910_board *tps65910_parse_dt_for_gpio(struct device *dev,
struct tps65910 *tps65910, int chip_ngpio)
{ … }
#else
static struct tps65910_board *tps65910_parse_dt_for_gpio(struct device *dev,
struct tps65910 *tps65910, int chip_ngpio)
{
return NULL;
}
#endif
static int tps65910_gpio_probe(struct platform_device *pdev)
{ … }
static struct platform_driver tps65910_gpio_driver = …;
static int __init tps65910_gpio_init(void)
{ … }
subsys_initcall(tps65910_gpio_init);