linux/drivers/regulator/wm8350-regulator.c

// SPDX-License-Identifier: GPL-2.0+
//
// wm8350.c  --  Voltage and current regulation for the Wolfson WM8350 PMIC
//
// Copyright 2007, 2008 Wolfson Microelectronics PLC.
//
// Author: Liam Girdwood
//         [email protected]

#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>

/* Maximum value possible for VSEL */
#define WM8350_DCDC_MAX_VSEL

/* Microamps */
static const unsigned int isink_cur[] =;

/* turn on ISINK followed by DCDC */
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)
{}

/* Query the regulator for it's most efficient mode @ uV,uA
 * WM8350 regulator efficiency is pretty similar over
 * different input and output uV.
 */
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();

/**
 * wm8350_register_led - Register a WM8350 LED output
 *
 * @wm8350: The WM8350 device to configure.
 * @lednum: LED device index to create.
 * @dcdc: The DCDC to use for the LED.
 * @isink: The ISINK to use for the LED.
 * @pdata: Configuration for the LED.
 *
 * The WM8350 supports the use of an ISINK together with a DCDC to
 * provide a power-efficient LED driver.  This function registers the
 * regulators and instantiates the platform device for a LED.  The
 * operating modes for the LED regulators must be configured using
 * wm8350_isink_set_flash(), wm8350_dcdc25_set_mode() and
 * wm8350_dcdc_set_slot() prior to calling this function.
 */
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 information */
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_ALIAS();