#include <linux/gpio/driver.h>
#include <linux/i2c.h>
#include <linux/of.h>
#include <linux/module.h>
#include <linux/regmap.h>
#define DEFAULT_PIN_NUMBER …
#define TS4900_GPIO_OE …
#define TS4900_GPIO_OUT …
#define TS4900_GPIO_IN …
#define TS7970_GPIO_IN …
struct ts4900_gpio_priv { … };
static int ts4900_gpio_get_direction(struct gpio_chip *chip,
unsigned int offset)
{ … }
static int ts4900_gpio_direction_input(struct gpio_chip *chip,
unsigned int offset)
{ … }
static int ts4900_gpio_direction_output(struct gpio_chip *chip,
unsigned int offset, int value)
{ … }
static int ts4900_gpio_get(struct gpio_chip *chip, unsigned int offset)
{ … }
static void ts4900_gpio_set(struct gpio_chip *chip, unsigned int offset,
int value)
{ … }
static const struct regmap_config ts4900_regmap_config = …;
static const struct gpio_chip template_chip = …;
static const struct of_device_id ts4900_gpio_of_match_table[] = …;
MODULE_DEVICE_TABLE(of, ts4900_gpio_of_match_table);
static int ts4900_gpio_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id ts4900_gpio_id_table[] = …;
MODULE_DEVICE_TABLE(i2c, ts4900_gpio_id_table);
static struct i2c_driver ts4900_gpio_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;