#include <linux/gpio/driver.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#define SPRD_PMIC_EIC_DATA …
#define SPRD_PMIC_EIC_DMSK …
#define SPRD_PMIC_EIC_IEV …
#define SPRD_PMIC_EIC_IE …
#define SPRD_PMIC_EIC_RIS …
#define SPRD_PMIC_EIC_MIS …
#define SPRD_PMIC_EIC_IC …
#define SPRD_PMIC_EIC_TRIG …
#define SPRD_PMIC_EIC_CTRL0 …
#define SPRD_PMIC_EIC_PER_BANK_NR …
#define SPRD_PMIC_EIC_NR …
#define SPRD_PMIC_EIC_DATA_MASK …
#define SPRD_PMIC_EIC_BIT(x) …
#define SPRD_PMIC_EIC_DBNC_MASK …
enum { … };
struct sprd_pmic_eic { … };
static void sprd_pmic_eic_update(struct gpio_chip *chip, unsigned int offset,
u16 reg, unsigned int val)
{ … }
static int sprd_pmic_eic_read(struct gpio_chip *chip, unsigned int offset,
u16 reg)
{ … }
static int sprd_pmic_eic_request(struct gpio_chip *chip, unsigned int offset)
{ … }
static void sprd_pmic_eic_free(struct gpio_chip *chip, unsigned int offset)
{ … }
static int sprd_pmic_eic_get(struct gpio_chip *chip, unsigned int offset)
{ … }
static int sprd_pmic_eic_direction_input(struct gpio_chip *chip,
unsigned int offset)
{ … }
static void sprd_pmic_eic_set(struct gpio_chip *chip, unsigned int offset,
int value)
{ … }
static int sprd_pmic_eic_set_debounce(struct gpio_chip *chip,
unsigned int offset,
unsigned int debounce)
{ … }
static int sprd_pmic_eic_set_config(struct gpio_chip *chip, unsigned int offset,
unsigned long config)
{ … }
static void sprd_pmic_eic_irq_mask(struct irq_data *data)
{ … }
static void sprd_pmic_eic_irq_unmask(struct irq_data *data)
{ … }
static int sprd_pmic_eic_irq_set_type(struct irq_data *data,
unsigned int flow_type)
{ … }
static void sprd_pmic_eic_bus_lock(struct irq_data *data)
{ … }
static void sprd_pmic_eic_bus_sync_unlock(struct irq_data *data)
{ … }
static void sprd_pmic_eic_toggle_trigger(struct gpio_chip *chip,
unsigned int irq, unsigned int offset)
{ … }
static irqreturn_t sprd_pmic_eic_irq_handler(int irq, void *data)
{ … }
static const struct irq_chip pmic_eic_irq_chip = …;
static int sprd_pmic_eic_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id sprd_pmic_eic_of_match[] = …;
MODULE_DEVICE_TABLE(of, sprd_pmic_eic_of_match);
static struct platform_driver sprd_pmic_eic_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;