#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/mfd/wm8350/core.h>
#include <linux/mfd/wm8350/pmic.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#define WM8350_DCDC_MAX_VSEL …
static const unsigned int isink_cur[] = …;
static int wm8350_isink_enable(struct regulator_dev *rdev)
{ … }
static int wm8350_isink_disable(struct regulator_dev *rdev)
{ … }
static int wm8350_isink_is_enabled(struct regulator_dev *rdev)
{ … }
static int wm8350_isink_enable_time(struct regulator_dev *rdev)
{ … }
int wm8350_isink_set_flash(struct wm8350 *wm8350, int isink, u16 mode,
u16 trigger, u16 duration, u16 on_ramp, u16 off_ramp,
u16 drive)
{ … }
EXPORT_SYMBOL_GPL(…);
static int wm8350_dcdc_set_suspend_voltage(struct regulator_dev *rdev, int uV)
{ … }
static int wm8350_dcdc_set_suspend_enable(struct regulator_dev *rdev)
{ … }
static int wm8350_dcdc_set_suspend_disable(struct regulator_dev *rdev)
{ … }
static int wm8350_dcdc25_set_suspend_enable(struct regulator_dev *rdev)
{ … }
static int wm8350_dcdc25_set_suspend_disable(struct regulator_dev *rdev)
{ … }
static int wm8350_dcdc_set_suspend_mode(struct regulator_dev *rdev,
unsigned int mode)
{ … }
static const struct linear_range wm8350_ldo_ranges[] = …;
static int wm8350_ldo_set_suspend_voltage(struct regulator_dev *rdev, int uV)
{ … }
static int wm8350_ldo_set_suspend_enable(struct regulator_dev *rdev)
{ … }
static int wm8350_ldo_set_suspend_disable(struct regulator_dev *rdev)
{ … }
int wm8350_dcdc_set_slot(struct wm8350 *wm8350, int dcdc, u16 start,
u16 stop, u16 fault)
{ … }
EXPORT_SYMBOL_GPL(…);
int wm8350_ldo_set_slot(struct wm8350 *wm8350, int ldo, u16 start, u16 stop)
{ … }
EXPORT_SYMBOL_GPL(…);
int wm8350_dcdc25_set_mode(struct wm8350 *wm8350, int dcdc, u16 mode,
u16 ilim, u16 ramp, u16 feedback)
{ … }
EXPORT_SYMBOL_GPL(…);
static int force_continuous_enable(struct wm8350 *wm8350, int dcdc, int enable)
{ … }
static int wm8350_dcdc_set_mode(struct regulator_dev *rdev, unsigned int mode)
{ … }
static unsigned int wm8350_dcdc_get_mode(struct regulator_dev *rdev)
{ … }
static unsigned int wm8350_ldo_get_mode(struct regulator_dev *rdev)
{ … }
struct wm8350_dcdc_efficiency { … };
static const struct wm8350_dcdc_efficiency dcdc1_6_efficiency[] = …;
static const struct wm8350_dcdc_efficiency dcdc3_4_efficiency[] = …;
static unsigned int get_mode(int uA, const struct wm8350_dcdc_efficiency *eff)
{ … }
static unsigned int wm8350_dcdc_get_optimum_mode(struct regulator_dev *rdev,
int input_uV, int output_uV,
int output_uA)
{ … }
static const struct regulator_ops wm8350_dcdc_ops = …;
static const struct regulator_ops wm8350_dcdc2_5_ops = …;
static const struct regulator_ops wm8350_ldo_ops = …;
static const struct regulator_ops wm8350_isink_ops = …;
static const struct regulator_desc wm8350_reg[NUM_WM8350_REGULATORS] = …;
static irqreturn_t pmic_uv_handler(int irq, void *data)
{ … }
static int wm8350_regulator_probe(struct platform_device *pdev)
{ … }
static void wm8350_regulator_remove(struct platform_device *pdev)
{ … }
int wm8350_register_regulator(struct wm8350 *wm8350, int reg,
struct regulator_init_data *initdata)
{ … }
EXPORT_SYMBOL_GPL(…);
int wm8350_register_led(struct wm8350 *wm8350, int lednum, int dcdc, int isink,
struct wm8350_led_platform_data *pdata)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct platform_driver wm8350_regulator_driver = …;
static int __init wm8350_regulator_init(void)
{ … }
subsys_initcall(wm8350_regulator_init);
static void __exit wm8350_regulator_exit(void)
{ … }
module_exit(wm8350_regulator_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;