#include <linux/err.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#include <linux/mfd/motorola-cpcap.h>
#define CPCAP_BIT_VSDIO_SEL …
#define CPCAP_BIT_VDIG_SEL …
#define CPCAP_BIT_VCAM_SEL …
#define CPCAP_BIT_SW6_SEL …
#define CPCAP_BIT_SW5_SEL …
#define CPCAP_BIT_SW4_SEL …
#define CPCAP_BIT_SW3_SEL …
#define CPCAP_BIT_SW2_SEL …
#define CPCAP_BIT_SW1_SEL …
#define CPCAP_BIT_VUSBINT2_SEL …
#define CPCAP_BIT_VUSBINT1_SEL …
#define CPCAP_BIT_VVIB_SEL …
#define CPCAP_BIT_VWLAN1_SEL …
#define CPCAP_BIT_VRF1_SEL …
#define CPCAP_BIT_VHVIO_SEL …
#define CPCAP_BIT_VDAC_SEL …
#define CPCAP_BIT_VUSB_SEL …
#define CPCAP_BIT_VSIM_SEL …
#define CPCAP_BIT_VRFREF_SEL …
#define CPCAP_BIT_VPLL_SEL …
#define CPCAP_BIT_VFUSE_SEL …
#define CPCAP_BIT_VCSI_SEL …
#define CPCAP_BIT_SPARE_14_2 …
#define CPCAP_BIT_VWLAN2_SEL …
#define CPCAP_BIT_VRF2_SEL …
#define CPCAP_BIT_VAUDIO_SEL …
#define CPCAP_BIT_AUDIO_LOW_PWR …
#define CPCAP_BIT_AUD_LOWPWR_SPEED …
#define CPCAP_BIT_VAUDIOPRISTBY …
#define CPCAP_BIT_VAUDIO_MODE1 …
#define CPCAP_BIT_VAUDIO_MODE0 …
#define CPCAP_BIT_V_AUDIO_EN …
#define CPCAP_BIT_AUDIO_NORMAL_MODE …
#define CPCAP_REG_OFF_MODE_SEC …
struct cpcap_regulator { … };
#define CPCAP_REG(_ID, reg, assignment_reg, assignment_mask, val_tbl, \
mode_mask, volt_mask, mode_val, off_val, \
volt_trans_time) …
struct cpcap_ddata { … };
enum cpcap_regulator_id { … };
static int cpcap_regulator_enable(struct regulator_dev *rdev)
{ … }
static int cpcap_regulator_disable(struct regulator_dev *rdev)
{ … }
static unsigned int cpcap_map_mode(unsigned int mode)
{ … }
static unsigned int cpcap_regulator_get_mode(struct regulator_dev *rdev)
{ … }
static int cpcap_regulator_set_mode(struct regulator_dev *rdev,
unsigned int mode)
{ … }
static const struct regulator_ops cpcap_regulator_ops = …;
static const unsigned int unknown_val_tbl[] = …;
static const unsigned int sw2_sw4_val_tbl[] = …;
static const unsigned int sw5_val_tbl[] = …;
static const unsigned int vcam_val_tbl[] = …;
static const unsigned int vcsi_val_tbl[] = …;
static const unsigned int vdac_val_tbl[] = …;
static const unsigned int vdig_val_tbl[] = …;
static const unsigned int vfuse_val_tbl[] = …;
static const unsigned int vhvio_val_tbl[] = …;
static const unsigned int vsdio_val_tbl[] = …;
static const unsigned int vpll_val_tbl[] = …;
static const unsigned int vrf1_val_tbl[] = …;
static const unsigned int vrf2_val_tbl[] = …;
static const unsigned int vrfref_val_tbl[] = …;
static const unsigned int vwlan1_val_tbl[] = …;
static const unsigned int vwlan2_val_tbl[] = …;
static const unsigned int vsim_val_tbl[] = …;
static const unsigned int vsimcard_val_tbl[] = …;
static const unsigned int vvib_val_tbl[] = …;
static const unsigned int vusb_val_tbl[] = …;
static const unsigned int vaudio_val_tbl[] = …;
static const struct cpcap_regulator omap4_regulators[] = …;
static const struct cpcap_regulator xoom_regulators[] = …;
static const struct of_device_id cpcap_regulator_id_table[] = …;
MODULE_DEVICE_TABLE(of, cpcap_regulator_id_table);
static int cpcap_regulator_probe(struct platform_device *pdev)
{ … }
static struct platform_driver cpcap_regulator_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;