#include <linux/gpio/consumer.h>
#include <linux/gpio/driver.h>
#include <linux/i2c-mux.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#define LTC4305_MAX_NCHANS …
#define LTC4306_MAX_NCHANS …
#define LTC_REG_STATUS …
#define LTC_REG_CONFIG …
#define LTC_REG_MODE …
#define LTC_REG_SWITCH …
#define LTC_DOWNSTREAM_ACCL_EN …
#define LTC_UPSTREAM_ACCL_EN …
#define LTC_GPIO_ALL_INPUT …
#define LTC_SWITCH_MASK …
enum ltc_type { … };
struct chip_desc { … };
struct ltc4306 { … };
static const struct chip_desc chips[] = …;
static bool ltc4306_is_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config ltc4306_regmap_config = …;
static int ltc4306_gpio_get(struct gpio_chip *chip, unsigned int offset)
{ … }
static void ltc4306_gpio_set(struct gpio_chip *chip, unsigned int offset,
int value)
{ … }
static int ltc4306_gpio_get_direction(struct gpio_chip *chip,
unsigned int offset)
{ … }
static int ltc4306_gpio_direction_input(struct gpio_chip *chip,
unsigned int offset)
{ … }
static int ltc4306_gpio_direction_output(struct gpio_chip *chip,
unsigned int offset, int value)
{ … }
static int ltc4306_gpio_set_config(struct gpio_chip *chip,
unsigned int offset, unsigned long config)
{ … }
static int ltc4306_gpio_init(struct ltc4306 *data)
{ … }
static int ltc4306_select_mux(struct i2c_mux_core *muxc, u32 chan)
{ … }
static int ltc4306_deselect_mux(struct i2c_mux_core *muxc, u32 chan)
{ … }
static const struct i2c_device_id ltc4306_id[] = …;
MODULE_DEVICE_TABLE(i2c, ltc4306_id);
static const struct of_device_id ltc4306_of_match[] = …;
MODULE_DEVICE_TABLE(of, ltc4306_of_match);
static int ltc4306_probe(struct i2c_client *client)
{ … }
static void ltc4306_remove(struct i2c_client *client)
{ … }
static struct i2c_driver ltc4306_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;