#include <linux/bitops.h>
#include <linux/gpio/driver.h>
#include <linux/ioport.h>
#include <linux/mfd/lpc_ich.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#define DRV_NAME …
enum GPIO_REG { … };
static const u8 ichx_regs[4][3] = …;
static const u8 ichx_reglen[3] = …;
static const u8 avoton_regs[4][3] = …;
static const u8 avoton_reglen[3] = …;
#define ICHX_WRITE(val, reg, base_res) …
#define ICHX_READ(reg, base_res) …
struct ichx_desc { … };
static struct { … } ichx_priv;
static int modparam_gpiobase = …;
module_param_named(gpiobase, modparam_gpiobase, int, 0444);
MODULE_PARM_DESC(…) …;
static int ichx_write_bit(int reg, unsigned int nr, int val, int verify)
{ … }
static int ichx_read_bit(int reg, unsigned int nr)
{ … }
static bool ichx_gpio_check_available(struct gpio_chip *gpio, unsigned int nr)
{ … }
static int ichx_gpio_get_direction(struct gpio_chip *gpio, unsigned int nr)
{ … }
static int ichx_gpio_direction_input(struct gpio_chip *gpio, unsigned int nr)
{ … }
static int ichx_gpio_direction_output(struct gpio_chip *gpio, unsigned int nr,
int val)
{ … }
static int ichx_gpio_get(struct gpio_chip *chip, unsigned int nr)
{ … }
static int ich6_gpio_get(struct gpio_chip *chip, unsigned int nr)
{ … }
static int ichx_gpio_request(struct gpio_chip *chip, unsigned int nr)
{ … }
static int ich6_gpio_request(struct gpio_chip *chip, unsigned int nr)
{ … }
static void ichx_gpio_set(struct gpio_chip *chip, unsigned int nr, int val)
{ … }
static void ichx_gpiolib_setup(struct gpio_chip *chip)
{ … }
static struct ichx_desc ich6_desc = …;
static struct ichx_desc i3100_desc = …;
static struct ichx_desc ich7_desc = …;
static struct ichx_desc ich9_desc = …;
static struct ichx_desc ich10_cons_desc = …;
static struct ichx_desc ich10_corp_desc = …;
static struct ichx_desc intel5_desc = …;
static struct ichx_desc avoton_desc = …;
static int ichx_gpio_request_regions(struct device *dev,
struct resource *res_base, const char *name, u8 use_gpio)
{ … }
static int ichx_gpio_probe(struct platform_device *pdev)
{ … }
static struct platform_driver ichx_gpio_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;