#include <linux/init.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/device.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/regulator/machine.h>
#include <linux/i2c.h>
#include <linux/mfd/core.h>
#include <linux/mfd/twl.h>
#include <linux/mfd/twl4030-audio.h>
#include "twl-core.h"
#define DRIVER_NAME …
#define TWL4030_BASEADD_USB …
#define TWL4030_BASEADD_AUDIO_VOICE …
#define TWL4030_BASEADD_GPIO …
#define TWL4030_BASEADD_INTBR …
#define TWL4030_BASEADD_PIH …
#define TWL4030_BASEADD_TEST …
#define TWL4030_BASEADD_INTERRUPTS …
#define TWL4030_BASEADD_LED …
#define TWL4030_BASEADD_MADC …
#define TWL4030_BASEADD_MAIN_CHARGE …
#define TWL4030_BASEADD_PRECHARGE …
#define TWL4030_BASEADD_PWM …
#define TWL4030_BASEADD_KEYPAD …
#define TWL5031_BASEADD_ACCESSORY …
#define TWL5031_BASEADD_INTERRUPTS …
#define TWL4030_BASEADD_BACKUP …
#define TWL4030_BASEADD_INT …
#define TWL4030_BASEADD_PM_MASTER …
#define TWL4030_BASEADD_PM_RECEIVER …
#define TWL4030_DCDC_GLOBAL_CFG …
#define SMARTREFLEX_ENABLE …
#define TWL4030_BASEADD_RTC …
#define TWL4030_BASEADD_SECURED_REG …
#define TWL6030_BASEADD_RTC …
#define TWL6030_BASEADD_SECURED_REG …
#define TWL6030_BASEADD_PM_MASTER …
#define TWL6030_BASEADD_PM_SLAVE_MISC …
#define TWL6030_BASEADD_PM_MISC …
#define TWL6030_BASEADD_PM_PUPD …
#define TWL6030_BASEADD_USB …
#define TWL6030_BASEADD_GPADC_CTRL …
#define TWL6030_BASEADD_AUX …
#define TWL6030_BASEADD_PWM …
#define TWL6030_BASEADD_GASGAUGE …
#define TWL6030_BASEADD_PIH …
#define TWL6032_BASEADD_CHARGER …
#define TWL6030_BASEADD_CHARGER …
#define TWL6030_BASEADD_LED …
#define TWL6030_BASEADD_DIEID …
#define TWL6030_BASEADD_AUDIO …
#define TWL6030_BASEADD_RSV …
#define TWL6030_BASEADD_ZERO …
#define TWL6030_APP_DEVOFF …
#define TWL6030_CON_DEVOFF …
#define TWL6030_MOD_DEVOFF …
#define R_CFG_BOOT …
#define HFCLK_FREQ_19p2_MHZ …
#define HFCLK_FREQ_26_MHZ …
#define HFCLK_FREQ_38p4_MHZ …
#define HIGH_PERF_SQ …
#define CK32K_LOWPWR_EN …
struct twl_client { … };
struct twl_mapping { … };
struct twl_private { … };
static struct twl_private *twl_priv;
static struct twl_mapping twl4030_map[] = …;
static const struct reg_default twl4030_49_defaults[] = …;
static bool twl4030_49_nop_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_range twl4030_49_volatile_ranges[] = …;
static const struct regmap_access_table twl4030_49_volatile_table = …;
static const struct regmap_config twl4030_regmap_config[4] = …;
static struct twl_mapping twl6030_map[] = …;
static const struct regmap_config twl6030_regmap_config[3] = …;
static inline int twl_get_num_slaves(void)
{ … }
static inline int twl_get_last_module(void)
{ … }
unsigned int twl_rev(void)
{ … }
EXPORT_SYMBOL(…);
static struct regmap *twl_get_regmap(u8 mod_no)
{ … }
int twl_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes)
{ … }
EXPORT_SYMBOL(…);
int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes)
{ … }
EXPORT_SYMBOL(…);
int twl_set_regcache_bypass(u8 mod_no, bool enable)
{ … }
EXPORT_SYMBOL(…);
static int twl_read_idcode_register(void)
{ … }
int twl_get_type(void)
{ … }
EXPORT_SYMBOL_GPL(…);
int twl_get_version(void)
{ … }
EXPORT_SYMBOL_GPL(…);
int twl_get_hfclk_rate(void)
{ … }
EXPORT_SYMBOL_GPL(…);
static inline int protect_pm_master(void)
{ … }
static inline int unprotect_pm_master(void)
{ … }
static void clocks_init(struct device *dev)
{ … }
static void twl_remove(struct i2c_client *client)
{ … }
static void twl6030_power_off(void)
{ … }
static struct of_dev_auxdata twl_auxdata_lookup[] = …;
static const struct mfd_cell twl6032_cells[] = …;
static int
twl_probe(struct i2c_client *client)
{ … }
static int __maybe_unused twl_suspend(struct device *dev)
{ … }
static int __maybe_unused twl_resume(struct device *dev)
{ … }
static SIMPLE_DEV_PM_OPS(twl_dev_pm_ops, twl_suspend, twl_resume);
static const struct i2c_device_id twl_ids[] = …;
static struct i2c_driver twl_driver = …;
builtin_i2c_driver(…) …;