#include <linux/gpio/driver.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/mutex.h>
#define TPIC2810_WS_COMMAND …
struct tpic2810 { … };
static void tpic2810_set(struct gpio_chip *chip, unsigned offset, int value);
static int tpic2810_get_direction(struct gpio_chip *chip,
unsigned offset)
{ … }
static int tpic2810_direction_input(struct gpio_chip *chip,
unsigned offset)
{ … }
static int tpic2810_direction_output(struct gpio_chip *chip,
unsigned offset, int value)
{ … }
static void tpic2810_set_mask_bits(struct gpio_chip *chip, u8 mask, u8 bits)
{ … }
static void tpic2810_set(struct gpio_chip *chip, unsigned offset, int value)
{ … }
static void tpic2810_set_multiple(struct gpio_chip *chip, unsigned long *mask,
unsigned long *bits)
{ … }
static const struct gpio_chip template_chip = …;
static const struct of_device_id tpic2810_of_match_table[] = …;
MODULE_DEVICE_TABLE(of, tpic2810_of_match_table);
static int tpic2810_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id tpic2810_id_table[] = …;
MODULE_DEVICE_TABLE(i2c, tpic2810_id_table);
static struct i2c_driver tpic2810_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;