#include <linux/cleanup.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/gpio/driver.h>
#include <linux/mfd/core.h>
#include <linux/platform_device.h>
#include <linux/seq_file.h>
#include <linux/mfd/wm831x/core.h>
#include <linux/mfd/wm831x/pdata.h>
#include <linux/mfd/wm831x/gpio.h>
#include <linux/mfd/wm831x/irq.h>
struct wm831x_gpio { … };
static int wm831x_gpio_direction_in(struct gpio_chip *chip, unsigned offset)
{ … }
static int wm831x_gpio_get(struct gpio_chip *chip, unsigned offset)
{ … }
static void wm831x_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
{ … }
static int wm831x_gpio_direction_out(struct gpio_chip *chip,
unsigned offset, int value)
{ … }
static int wm831x_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
{ … }
static int wm831x_gpio_set_debounce(struct wm831x *wm831x, unsigned offset,
unsigned debounce)
{ … }
static int wm831x_set_config(struct gpio_chip *chip, unsigned int offset,
unsigned long config)
{ … }
#ifdef CONFIG_DEBUG_FS
static void wm831x_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
{ … }
#else
#define wm831x_gpio_dbg_show …
#endif
static const struct gpio_chip template_chip = …;
static int wm831x_gpio_probe(struct platform_device *pdev)
{ … }
static struct platform_driver wm831x_gpio_driver = …;
static int __init wm831x_gpio_init(void)
{ … }
subsys_initcall(wm831x_gpio_init);
static void __exit wm831x_gpio_exit(void)
{ … }
module_exit(wm831x_gpio_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;