#include <linux/module.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/gpio/consumer.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/mfd/core.h>
#include <linux/mfd/twl6040.h>
#include <linux/regulator/consumer.h>
#define VIBRACTRL_MEMBER(reg) …
#define TWL6040_NUM_SUPPLIES …
static const struct reg_default twl6040_defaults[] = …;
static struct reg_sequence twl6040_patch[] = …;
static bool twl6040_has_vibra(struct device_node *parent)
{ … }
int twl6040_reg_read(struct twl6040 *twl6040, unsigned int reg)
{ … }
EXPORT_SYMBOL(…);
int twl6040_reg_write(struct twl6040 *twl6040, unsigned int reg, u8 val)
{ … }
EXPORT_SYMBOL(…);
int twl6040_set_bits(struct twl6040 *twl6040, unsigned int reg, u8 mask)
{ … }
EXPORT_SYMBOL(…);
int twl6040_clear_bits(struct twl6040 *twl6040, unsigned int reg, u8 mask)
{ … }
EXPORT_SYMBOL(…);
static int twl6040_power_up_manual(struct twl6040 *twl6040)
{ … }
static void twl6040_power_down_manual(struct twl6040 *twl6040)
{ … }
static irqreturn_t twl6040_readyint_handler(int irq, void *data)
{ … }
static irqreturn_t twl6040_thint_handler(int irq, void *data)
{ … }
static int twl6040_power_up_automatic(struct twl6040 *twl6040)
{ … }
int twl6040_power(struct twl6040 *twl6040, int on)
{ … }
EXPORT_SYMBOL(…);
int twl6040_set_pll(struct twl6040 *twl6040, int pll_id,
unsigned int freq_in, unsigned int freq_out)
{ … }
EXPORT_SYMBOL(…);
int twl6040_get_pll(struct twl6040 *twl6040)
{ … }
EXPORT_SYMBOL(…);
unsigned int twl6040_get_sysclk(struct twl6040 *twl6040)
{ … }
EXPORT_SYMBOL(…);
int twl6040_get_vibralr_status(struct twl6040 *twl6040)
{ … }
EXPORT_SYMBOL(…);
static struct resource twl6040_vibra_rsrc[] = …;
static struct resource twl6040_codec_rsrc[] = …;
static bool twl6040_readable_reg(struct device *dev, unsigned int reg)
{ … }
static bool twl6040_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static bool twl6040_writeable_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config twl6040_regmap_config = …;
static const struct regmap_irq twl6040_irqs[] = …;
static struct regmap_irq_chip twl6040_irq_chip = …;
static int twl6040_probe(struct i2c_client *client)
{ … }
static void twl6040_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id twl6040_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, twl6040_i2c_id);
static struct i2c_driver twl6040_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;