linux/drivers/regulator/tps51632-regulator.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * tps51632-regulator.c -- TI TPS51632
 *
 * Regulator driver for TPS51632 3-2-1 Phase D-Cap Step Down Driverless
 * Controller with serial VID control and DVFS.
 *
 * Copyright (c) 2012, NVIDIA Corporation.
 *
 * Author: Laxman Dewangan <[email protected]>
 */

#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/kernel.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/regulator/tps51632-regulator.h>
#include <linux/slab.h>

/* Register definitions */
#define TPS51632_VOLTAGE_SELECT_REG
#define TPS51632_VOLTAGE_BASE_REG
#define TPS51632_OFFSET_REG
#define TPS51632_IMON_REG
#define TPS51632_VMAX_REG
#define TPS51632_DVFS_CONTROL_REG
#define TPS51632_POWER_STATE_REG
#define TPS51632_SLEW_REGS
#define TPS51632_FAULT_REG

#define TPS51632_MAX_REG

#define TPS51632_VOUT_MASK
#define TPS51632_VOUT_OFFSET_MASK
#define TPS51632_VMAX_MASK
#define TPS51632_VMAX_LOCK

/* TPS51632_DVFS_CONTROL_REG */
#define TPS51632_DVFS_PWMEN
#define TPS51632_DVFS_STEP_20
#define TPS51632_DVFS_VMAX_PG
#define TPS51632_DVFS_PWMRST
#define TPS51632_DVFS_OCA_EN
#define TPS51632_DVFS_FCCM

/* TPS51632_POWER_STATE_REG */
#define TPS51632_POWER_STATE_MASK
#define TPS51632_POWER_STATE_MULTI_PHASE_CCM
#define TPS51632_POWER_STATE_SINGLE_PHASE_CCM
#define TPS51632_POWER_STATE_SINGLE_PHASE_DCM

#define TPS51632_MIN_VOLTAGE
#define TPS51632_MAX_VOLTAGE
#define TPS51632_VOLTAGE_STEP_10mV
#define TPS51632_VOLTAGE_STEP_20mV
#define TPS51632_MAX_VSEL
#define TPS51632_MIN_VSEL
#define TPS51632_DEFAULT_RAMP_DELAY
#define TPS51632_VOLT_VSEL(uV)

/* TPS51632 chip information */
struct tps51632_chip {};

static int tps51632_dcdc_set_ramp_delay(struct regulator_dev *rdev,
		int ramp_delay)
{}

static const struct regulator_ops tps51632_dcdc_ops =;

static int tps51632_init_dcdc(struct tps51632_chip *tps,
		struct tps51632_regulator_platform_data *pdata)
{}

static bool is_volatile_reg(struct device *dev, unsigned int reg)
{}

static bool is_read_reg(struct device *dev, unsigned int reg)
{}

static bool is_write_reg(struct device *dev, unsigned int reg)
{}

static const struct regmap_config tps51632_regmap_config =;

#if defined(CONFIG_OF)
static const struct of_device_id tps51632_of_match[] =;
MODULE_DEVICE_TABLE(of, tps51632_of_match);

static struct tps51632_regulator_platform_data *
	of_get_tps51632_platform_data(struct device *dev,
				      const struct regulator_desc *desc)
{}
#else
static struct tps51632_regulator_platform_data *
	of_get_tps51632_platform_data(struct device *dev,
				      const struct regulator_desc *desc)
{
	return NULL;
}
#endif

static int tps51632_probe(struct i2c_client *client)
{}

static const struct i2c_device_id tps51632_id[] =;

MODULE_DEVICE_TABLE(i2c, tps51632_id);

static struct i2c_driver tps51632_i2c_driver =;

static int __init tps51632_init(void)
{}
subsys_initcall(tps51632_init);

static void __exit tps51632_cleanup(void)
{}
module_exit(tps51632_cleanup);

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