linux/drivers/regulator/lp3971.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Regulator driver for National Semiconductors LP3971 PMIC chip
 *
 *  Copyright (C) 2009 Samsung Electronics
 *  Author: Marek Szyprowski <[email protected]>
 *
 * Based on wm8350.c
 */

#include <linux/bug.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/lp3971.h>
#include <linux/slab.h>

struct lp3971 {};

static u8 lp3971_reg_read(struct lp3971 *lp3971, u8 reg);
static int lp3971_set_bits(struct lp3971 *lp3971, u8 reg, u16 mask, u16 val);

#define LP3971_SYS_CONTROL1_REG

/* System control register 1 initial value,
   bits 4 and 5 are EPROM programmable */
#define SYS_CONTROL1_INIT_VAL
#define SYS_CONTROL1_INIT_MASK

#define LP3971_BUCK_VOL_ENABLE_REG
#define LP3971_BUCK_VOL_CHANGE_REG

/*	Voltage control registers shift:
	LP3971_BUCK1 -> 0
	LP3971_BUCK2 -> 4
	LP3971_BUCK3 -> 6
*/
#define BUCK_VOL_CHANGE_SHIFT(x)
#define BUCK_VOL_CHANGE_FLAG_GO
#define BUCK_VOL_CHANGE_FLAG_TARGET
#define BUCK_VOL_CHANGE_FLAG_MASK

#define LP3971_BUCK1_BASE
#define LP3971_BUCK2_BASE
#define LP3971_BUCK3_BASE

static const int buck_base_addr[] =;

#define LP3971_BUCK_TARGET_VOL1_REG(x)
#define LP3971_BUCK_TARGET_VOL2_REG(x)

static const unsigned int buck_voltage_map[] =;

#define BUCK_TARGET_VOL_MASK

#define LP3971_BUCK_RAMP_REG(x)

#define LP3971_LDO_ENABLE_REG
#define LP3971_LDO_VOL_CONTR_BASE

/*	Voltage control registers:
	LP3971_LDO1 -> LP3971_LDO_VOL_CONTR_BASE + 0
	LP3971_LDO2 -> LP3971_LDO_VOL_CONTR_BASE + 0
	LP3971_LDO3 -> LP3971_LDO_VOL_CONTR_BASE + 1
	LP3971_LDO4 -> LP3971_LDO_VOL_CONTR_BASE + 1
	LP3971_LDO5 -> LP3971_LDO_VOL_CONTR_BASE + 2
*/
#define LP3971_LDO_VOL_CONTR_REG(x)

/*	Voltage control registers shift:
	LP3971_LDO1 -> 0, LP3971_LDO2 -> 4
	LP3971_LDO3 -> 0, LP3971_LDO4 -> 4
	LP3971_LDO5 -> 0
*/
#define LDO_VOL_CONTR_SHIFT(x)
#define LDO_VOL_CONTR_MASK

static const unsigned int ldo45_voltage_map[] =;

static const unsigned int ldo123_voltage_map[] =;

#define LDO_VOL_MIN_IDX
#define LDO_VOL_MAX_IDX

static int lp3971_ldo_is_enabled(struct regulator_dev *dev)
{}

static int lp3971_ldo_enable(struct regulator_dev *dev)
{}

static int lp3971_ldo_disable(struct regulator_dev *dev)
{}

static int lp3971_ldo_get_voltage_sel(struct regulator_dev *dev)
{}

static int lp3971_ldo_set_voltage_sel(struct regulator_dev *dev,
				      unsigned int selector)
{}

static const struct regulator_ops lp3971_ldo_ops =;

static int lp3971_dcdc_is_enabled(struct regulator_dev *dev)
{}

static int lp3971_dcdc_enable(struct regulator_dev *dev)
{}

static int lp3971_dcdc_disable(struct regulator_dev *dev)
{}

static int lp3971_dcdc_get_voltage_sel(struct regulator_dev *dev)
{}

static int lp3971_dcdc_set_voltage_sel(struct regulator_dev *dev,
				       unsigned int selector)
{}

static const struct regulator_ops lp3971_dcdc_ops =;

static const struct regulator_desc regulators[] =;

static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count,
	u16 *dest)
{}

static int lp3971_i2c_write(struct i2c_client *i2c, char reg, int count,
	const u16 *src)
{}

static u8 lp3971_reg_read(struct lp3971 *lp3971, u8 reg)
{}

static int lp3971_set_bits(struct lp3971 *lp3971, u8 reg, u16 mask, u16 val)
{}

static int setup_regulators(struct lp3971 *lp3971,
				      struct lp3971_platform_data *pdata)
{}

static int lp3971_i2c_probe(struct i2c_client *i2c)
{}

static const struct i2c_device_id lp3971_i2c_id[] =;
MODULE_DEVICE_TABLE(i2c, lp3971_i2c_id);

static struct i2c_driver lp3971_i2c_driver =;

module_i2c_driver();

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();