linux/drivers/regulator/fan53555.c

// SPDX-License-Identifier: GPL-2.0
//
// FAN53555 Fairchild Digitally Programmable TinyBuck Regulator Driver.
//
// Supported Part Numbers:
// FAN53555UC00X/01X/03X/04X/05X
//
// Copyright (c) 2012 Marvell Technology Ltd.
// Yunfan Zhang <[email protected]>

#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/param.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/fan53555.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#include <linux/slab.h>

/* Voltage setting */
#define FAN53555_VSEL0
#define FAN53555_VSEL1

#define RK8602_VSEL0
#define RK8602_VSEL1

#define TCS4525_VSEL0
#define TCS4525_VSEL1
#define TCS4525_TIME
#define TCS4525_COMMAND

/* Control register */
#define FAN53555_CONTROL
/* IC Type */
#define FAN53555_ID1
/* IC mask version */
#define FAN53555_ID2
/* Monitor register */
#define FAN53555_MONITOR

/* VSEL bit definitions */
#define VSEL_BUCK_EN
#define VSEL_MODE
/* Chip ID and Version */
#define DIE_ID
#define DIE_REV
/* Control bit definitions */
#define CTL_OUTPUT_DISCHG
#define CTL_SLEW_MASK
#define CTL_RESET
#define CTL_MODE_VSEL0_MODE
#define CTL_MODE_VSEL1_MODE

#define FAN53555_NVOLTAGES
#define FAN53526_NVOLTAGES
#define RK8602_NVOLTAGES

#define TCS_VSEL0_MODE
#define TCS_VSEL1_MODE

#define TCS_SLEW_MASK

enum fan53555_vendor {};

enum {};

enum {};

/* IC Type */
enum {};

enum {};

enum {};

enum {};

enum {};

/* IC mask revision */
enum {};

enum {};

struct fan53555_device_info {};

static int fan53555_set_suspend_voltage(struct regulator_dev *rdev, int uV)
{}

static int fan53555_set_suspend_enable(struct regulator_dev *rdev)
{}

static int fan53555_set_suspend_disable(struct regulator_dev *rdev)
{}

static int fan53555_set_mode(struct regulator_dev *rdev, unsigned int mode)
{}

static unsigned int fan53555_get_mode(struct regulator_dev *rdev)
{}

static const unsigned int slew_rates[] =;

static const unsigned int tcs_slew_rates[] =;

static const struct regulator_ops fan53555_regulator_ops =;

static int fan53526_voltages_setup_fairchild(struct fan53555_device_info *di)
{}

static int fan53555_voltages_setup_fairchild(struct fan53555_device_info *di)
{}

static int fan53555_voltages_setup_rockchip(struct fan53555_device_info *di)
{}

static int rk8602_voltages_setup_rockchip(struct fan53555_device_info *di)
{}

static int fan53555_voltages_setup_silergy(struct fan53555_device_info *di)
{}

static int fan53526_voltages_setup_tcs(struct fan53555_device_info *di)
{}

/* For 00,01,03,05 options:
 * VOUT = 0.60V + NSELx * 10mV, from 0.60 to 1.23V.
 * For 04 option:
 * VOUT = 0.603V + NSELx * 12.826mV, from 0.603 to 1.411V.
 * */
static int fan53555_device_setup(struct fan53555_device_info *di,
				struct fan53555_platform_data *pdata)
{}

static int fan53555_regulator_register(struct fan53555_device_info *di,
			struct regulator_config *config)
{}

static const struct regmap_config fan53555_regmap_config =;

static struct fan53555_platform_data *fan53555_parse_dt(struct device *dev,
					      struct device_node *np,
					      const struct regulator_desc *desc)
{}

static const struct of_device_id __maybe_unused fan53555_dt_ids[] =;
MODULE_DEVICE_TABLE(of, fan53555_dt_ids);

static int fan53555_regulator_probe(struct i2c_client *client)
{}

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

static struct i2c_driver fan53555_regulator_driver =;

module_i2c_driver();

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