#include <linux/acpi.h>
#include <linux/auxiliary_bus.h>
#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/dev_printk.h>
#include <linux/gpio/driver.h>
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/kref.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/usb/ljca.h>
#define LJCA_GPIO_CONFIG …
#define LJCA_GPIO_READ …
#define LJCA_GPIO_WRITE …
#define LJCA_GPIO_INT_EVENT …
#define LJCA_GPIO_INT_MASK …
#define LJCA_GPIO_INT_UNMASK …
#define LJCA_GPIO_CONF_DISABLE …
#define LJCA_GPIO_CONF_INPUT …
#define LJCA_GPIO_CONF_OUTPUT …
#define LJCA_GPIO_CONF_PULLUP …
#define LJCA_GPIO_CONF_PULLDOWN …
#define LJCA_GPIO_CONF_DEFAULT …
#define LJCA_GPIO_CONF_INTERRUPT …
#define LJCA_GPIO_INT_TYPE …
#define LJCA_GPIO_CONF_EDGE …
#define LJCA_GPIO_CONF_LEVEL …
#define LJCA_GPIO_CONF_SET …
#define LJCA_GPIO_CONF_CLR …
#define LJCA_GPIO_BUF_SIZE …
struct ljca_gpio_op { … } __packed;
struct ljca_gpio_packet { … } __packed;
struct ljca_gpio_dev { … };
static int ljca_gpio_config(struct ljca_gpio_dev *ljca_gpio, u8 gpio_id,
u8 config)
{ … }
static int ljca_gpio_read(struct ljca_gpio_dev *ljca_gpio, u8 gpio_id)
{ … }
static int ljca_gpio_write(struct ljca_gpio_dev *ljca_gpio, u8 gpio_id, int value)
{ … }
static int ljca_gpio_get_value(struct gpio_chip *chip, unsigned int offset)
{ … }
static void ljca_gpio_set_value(struct gpio_chip *chip, unsigned int offset,
int val)
{ … }
static int ljca_gpio_direction_input(struct gpio_chip *chip, unsigned int offset)
{ … }
static int ljca_gpio_direction_output(struct gpio_chip *chip,
unsigned int offset, int val)
{ … }
static int ljca_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
{ … }
static int ljca_gpio_set_config(struct gpio_chip *chip, unsigned int offset,
unsigned long config)
{ … }
static int ljca_gpio_init_valid_mask(struct gpio_chip *chip,
unsigned long *valid_mask,
unsigned int ngpios)
{ … }
static void ljca_gpio_irq_init_valid_mask(struct gpio_chip *chip,
unsigned long *valid_mask,
unsigned int ngpios)
{ … }
static int ljca_enable_irq(struct ljca_gpio_dev *ljca_gpio, int gpio_id,
bool enable)
{ … }
static void ljca_gpio_async(struct work_struct *work)
{ … }
static void ljca_gpio_event_cb(void *context, u8 cmd, const void *evt_data,
int len)
{ … }
static void ljca_irq_unmask(struct irq_data *irqd)
{ … }
static void ljca_irq_mask(struct irq_data *irqd)
{ … }
static int ljca_irq_set_type(struct irq_data *irqd, unsigned int type)
{ … }
static void ljca_irq_bus_lock(struct irq_data *irqd)
{ … }
static void ljca_irq_bus_unlock(struct irq_data *irqd)
{ … }
static const struct irq_chip ljca_gpio_irqchip = …;
static int ljca_gpio_probe(struct auxiliary_device *auxdev,
const struct auxiliary_device_id *aux_dev_id)
{ … }
static void ljca_gpio_remove(struct auxiliary_device *auxdev)
{ … }
static const struct auxiliary_device_id ljca_gpio_id_table[] = …;
MODULE_DEVICE_TABLE(auxiliary, ljca_gpio_id_table);
static struct auxiliary_driver ljca_gpio_driver = …;
module_auxiliary_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_IMPORT_NS(…);