#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/mfd/lp873x.h>
#define BITS_PER_GPO …
#define LP873X_GPO_CTRL_OD …
struct lp873x_gpio { … };
static int lp873x_gpio_get_direction(struct gpio_chip *chip,
unsigned int offset)
{ … }
static int lp873x_gpio_direction_input(struct gpio_chip *chip,
unsigned int offset)
{ … }
static int lp873x_gpio_direction_output(struct gpio_chip *chip,
unsigned int offset, int value)
{ … }
static int lp873x_gpio_get(struct gpio_chip *chip, unsigned int offset)
{ … }
static void lp873x_gpio_set(struct gpio_chip *chip, unsigned int offset,
int value)
{ … }
static int lp873x_gpio_request(struct gpio_chip *gc, unsigned int offset)
{ … }
static int lp873x_gpio_set_config(struct gpio_chip *gc, unsigned offset,
unsigned long config)
{ … }
static const struct gpio_chip template_chip = …;
static int lp873x_gpio_probe(struct platform_device *pdev)
{ … }
static const struct platform_device_id lp873x_gpio_id_table[] = …;
MODULE_DEVICE_TABLE(platform, lp873x_gpio_id_table);
static struct platform_driver lp873x_gpio_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;