#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/export.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/of.h>
#include <linux/pm.h>
#include <linux/slab.h>
#include <linux/mfd/core.h>
#include <linux/delay.h>
#include <linux/regulator/consumer.h>
#include "stmpe.h"
struct stmpe_platform_data { … };
static int __stmpe_enable(struct stmpe *stmpe, unsigned int blocks)
{ … }
static int __stmpe_disable(struct stmpe *stmpe, unsigned int blocks)
{ … }
static int __stmpe_reg_read(struct stmpe *stmpe, u8 reg)
{ … }
static int __stmpe_reg_write(struct stmpe *stmpe, u8 reg, u8 val)
{ … }
static int __stmpe_set_bits(struct stmpe *stmpe, u8 reg, u8 mask, u8 val)
{ … }
static int __stmpe_block_read(struct stmpe *stmpe, u8 reg, u8 length,
u8 *values)
{ … }
static int __stmpe_block_write(struct stmpe *stmpe, u8 reg, u8 length,
const u8 *values)
{ … }
int stmpe_enable(struct stmpe *stmpe, unsigned int blocks)
{ … }
EXPORT_SYMBOL_GPL(…);
int stmpe_disable(struct stmpe *stmpe, unsigned int blocks)
{ … }
EXPORT_SYMBOL_GPL(…);
int stmpe_reg_read(struct stmpe *stmpe, u8 reg)
{ … }
EXPORT_SYMBOL_GPL(…);
int stmpe_reg_write(struct stmpe *stmpe, u8 reg, u8 val)
{ … }
EXPORT_SYMBOL_GPL(…);
int stmpe_set_bits(struct stmpe *stmpe, u8 reg, u8 mask, u8 val)
{ … }
EXPORT_SYMBOL_GPL(…);
int stmpe_block_read(struct stmpe *stmpe, u8 reg, u8 length, u8 *values)
{ … }
EXPORT_SYMBOL_GPL(…);
int stmpe_block_write(struct stmpe *stmpe, u8 reg, u8 length,
const u8 *values)
{ … }
EXPORT_SYMBOL_GPL(…);
int stmpe_set_altfunc(struct stmpe *stmpe, u32 pins, enum stmpe_block block)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct resource stmpe_gpio_resources[] = …;
static const struct mfd_cell stmpe_gpio_cell = …;
static const struct mfd_cell stmpe_gpio_cell_noirq = …;
static struct resource stmpe_keypad_resources[] = …;
static const struct mfd_cell stmpe_keypad_cell = …;
static struct resource stmpe_pwm_resources[] = …;
static const struct mfd_cell stmpe_pwm_cell = …;
static const u8 stmpe801_regs[] = …;
static struct stmpe_variant_block stmpe801_blocks[] = …;
static struct stmpe_variant_block stmpe801_blocks_noirq[] = …;
static int stmpe801_enable(struct stmpe *stmpe, unsigned int blocks,
bool enable)
{ … }
static struct stmpe_variant_info stmpe801 = …;
static struct stmpe_variant_info stmpe801_noirq = …;
static struct resource stmpe_ts_resources[] = …;
static const struct mfd_cell stmpe_ts_cell = …;
static struct resource stmpe_adc_resources[] = …;
static const struct mfd_cell stmpe_adc_cell = …;
static const u8 stmpe811_regs[] = …;
static struct stmpe_variant_block stmpe811_blocks[] = …;
static int stmpe811_enable(struct stmpe *stmpe, unsigned int blocks,
bool enable)
{ … }
int stmpe811_adc_common_init(struct stmpe *stmpe)
{ … }
EXPORT_SYMBOL_GPL(…);
static int stmpe811_get_altfunc(struct stmpe *stmpe, enum stmpe_block block)
{ … }
static struct stmpe_variant_info stmpe811 = …;
static struct stmpe_variant_info stmpe610 = …;
static const u8 stmpe1600_regs[] = …;
static struct stmpe_variant_block stmpe1600_blocks[] = …;
static int stmpe1600_enable(struct stmpe *stmpe, unsigned int blocks,
bool enable)
{ … }
static struct stmpe_variant_info stmpe1600 = …;
static const u8 stmpe1601_regs[] = …;
static struct stmpe_variant_block stmpe1601_blocks[] = …;
static const int stmpe_autosleep_delay[] = …;
static int stmpe_round_timeout(int timeout)
{ … }
static int stmpe_autosleep(struct stmpe *stmpe, int autosleep_timeout)
{ … }
static int stmpe1601_autosleep(struct stmpe *stmpe,
int autosleep_timeout)
{ … }
static int stmpe1601_enable(struct stmpe *stmpe, unsigned int blocks,
bool enable)
{ … }
static int stmpe1601_get_altfunc(struct stmpe *stmpe, enum stmpe_block block)
{ … }
static struct stmpe_variant_info stmpe1601 = …;
static const u8 stmpe1801_regs[] = …;
static struct stmpe_variant_block stmpe1801_blocks[] = …;
static int stmpe1801_enable(struct stmpe *stmpe, unsigned int blocks,
bool enable)
{ … }
static int stmpe_reset(struct stmpe *stmpe)
{ … }
static struct stmpe_variant_info stmpe1801 = …;
static const u8 stmpe24xx_regs[] = …;
static struct stmpe_variant_block stmpe24xx_blocks[] = …;
static int stmpe24xx_enable(struct stmpe *stmpe, unsigned int blocks,
bool enable)
{ … }
static int stmpe24xx_get_altfunc(struct stmpe *stmpe, enum stmpe_block block)
{ … }
static struct stmpe_variant_info stmpe2401 = …;
static struct stmpe_variant_info stmpe2403 = …;
static struct stmpe_variant_info *stmpe_variant_info[STMPE_NBR_PARTS] = …;
static struct stmpe_variant_info *stmpe_noirq_variant_info[STMPE_NBR_PARTS] = …;
static irqreturn_t stmpe_irq(int irq, void *data)
{ … }
static void stmpe_irq_lock(struct irq_data *data)
{ … }
static void stmpe_irq_sync_unlock(struct irq_data *data)
{ … }
static void stmpe_irq_mask(struct irq_data *data)
{ … }
static void stmpe_irq_unmask(struct irq_data *data)
{ … }
static struct irq_chip stmpe_irq_chip = …;
static int stmpe_irq_map(struct irq_domain *d, unsigned int virq,
irq_hw_number_t hwirq)
{ … }
static void stmpe_irq_unmap(struct irq_domain *d, unsigned int virq)
{ … }
static const struct irq_domain_ops stmpe_irq_ops = …;
static int stmpe_irq_init(struct stmpe *stmpe, struct device_node *np)
{ … }
static int stmpe_chip_init(struct stmpe *stmpe)
{ … }
static int stmpe_add_device(struct stmpe *stmpe, const struct mfd_cell *cell)
{ … }
static int stmpe_devices_init(struct stmpe *stmpe)
{ … }
static void stmpe_of_probe(struct stmpe_platform_data *pdata,
struct device_node *np)
{ … }
int stmpe_probe(struct stmpe_client_info *ci, enum stmpe_partnum partnum)
{ … }
void stmpe_remove(struct stmpe *stmpe)
{ … }
static int stmpe_suspend(struct device *dev)
{ … }
static int stmpe_resume(struct device *dev)
{ … }
EXPORT_GPL_SIMPLE_DEV_PM_OPS(…);