linux/drivers/regulator/tps6586x-regulator.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Regulator driver for TI TPS6586x
 *
 * Copyright (C) 2010 Compulab Ltd.
 * Author: Mike Rapoport <[email protected]>
 *
 * Based on da903x
 * Copyright (C) 2006-2008 Marvell International Ltd.
 * Copyright (C) 2008 Compulab Ltd.
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/of.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#include <linux/mfd/tps6586x.h>

/* supply control and voltage setting  */
#define TPS6586X_SUPPLYENA
#define TPS6586X_SUPPLYENB
#define TPS6586X_SUPPLYENC
#define TPS6586X_SUPPLYEND
#define TPS6586X_SUPPLYENE
#define TPS6586X_VCC1
#define TPS6586X_VCC2
#define TPS6586X_SM1V1
#define TPS6586X_SM1V2
#define TPS6586X_SM1SL
#define TPS6586X_SM0V1
#define TPS6586X_SM0V2
#define TPS6586X_SM0SL
#define TPS6586X_LDO2AV1
#define TPS6586X_LDO2AV2
#define TPS6586X_LDO2BV1
#define TPS6586X_LDO2BV2
#define TPS6586X_LDO4V1
#define TPS6586X_LDO4V2

/* converter settings  */
#define TPS6586X_SUPPLYV1
#define TPS6586X_SUPPLYV2
#define TPS6586X_SUPPLYV3
#define TPS6586X_SUPPLYV4
#define TPS6586X_SUPPLYV5
#define TPS6586X_SUPPLYV6
#define TPS6586X_SMODE1
#define TPS6586X_SMODE2

struct tps6586x_regulator {};

static const struct regulator_ops tps6586x_rw_regulator_ops =;

static const struct regulator_ops tps6586x_rw_linear_regulator_ops =;

static const struct regulator_ops tps6586x_ro_regulator_ops =;

static const struct regulator_ops tps6586x_sys_regulator_ops =;

static const unsigned int tps6586x_ldo0_voltages[] =;

static const unsigned int tps6586x_ldo_voltages[] =;

static const unsigned int tps658640_rtc_voltages[] =;

#define TPS6586X_REGULATOR(_id, _ops, _pin_name, vdata, vreg, shift, nbits, \
			   ereg0, ebit0, ereg1, ebit1, goreg, gobit)

#define TPS6586X_REGULATOR_LINEAR(_id, _ops, _pin_name, n_volt, min_uv,	\
				  uv_step, vreg, shift, nbits, ereg0,	\
				  ebit0, ereg1, ebit1, goreg, gobit)

#define TPS6586X_LDO(_id, _pname, vdata, vreg, shift, nbits,		\
		     ereg0, ebit0, ereg1, ebit1)

#define TPS6586X_LDO_LINEAR(_id, _pname, n_volt, min_uv, uv_step, vreg,	\
			    shift, nbits, ereg0, ebit0, ereg1, ebit1)

#define TPS6586X_FIXED_LDO(_id, _pname, vdata, vreg, shift, nbits,	\
			  ereg0, ebit0, ereg1, ebit1)

#define TPS6586X_DVM(_id, _pname, n_volt, min_uv, uv_step, vreg, shift,	\
		     nbits, ereg0, ebit0, ereg1, ebit1, goreg, gobit)

#define TPS6586X_SYS_REGULATOR()

static struct tps6586x_regulator tps6586x_regulator[] =;

static struct tps6586x_regulator tps658623_regulator[] =;

static struct tps6586x_regulator tps658640_regulator[] =;

static struct tps6586x_regulator tps658643_regulator[] =;

/*
 * TPS6586X has 2 enable bits that are OR'ed to determine the actual
 * regulator state. Clearing one of this bits allows switching
 * regulator on and of with single register write.
 */
static inline int tps6586x_regulator_preinit(struct device *parent,
					     struct tps6586x_regulator *ri)
{}

static int tps6586x_regulator_set_slew_rate(struct platform_device *pdev,
			int id, struct regulator_init_data *p)
{}

static struct tps6586x_regulator *find_regulator_info(int id, int version)
{}

#ifdef CONFIG_OF
static struct of_regulator_match tps6586x_matches[] =;

static struct tps6586x_platform_data *tps6586x_parse_regulator_dt(
		struct platform_device *pdev,
		struct of_regulator_match **tps6586x_reg_matches)
{}
#else
static struct tps6586x_platform_data *tps6586x_parse_regulator_dt(
		struct platform_device *pdev,
		struct of_regulator_match **tps6586x_reg_matches)
{
	*tps6586x_reg_matches = NULL;
	return NULL;
}
#endif

static int tps6586x_regulator_probe(struct platform_device *pdev)
{}

static struct platform_driver tps6586x_regulator_driver =;

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

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

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