linux/drivers/regulator/palmas-regulator.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Driver for Regulator part of Palmas PMIC Chips
 *
 * Copyright 2011-2013 Texas Instruments Inc.
 *
 * Author: Graeme Gregory <[email protected]>
 * Author: Ian Lartey <[email protected]>
 */

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

static const struct linear_range smps_low_ranges[] =;

static const struct linear_range smps_high_ranges[] =;

static struct palmas_regs_info palmas_generic_regs_info[] =;

static struct palmas_regs_info tps65917_regs_info[] =;

#define EXTERNAL_REQUESTOR(_id, _offset, _pos)

static struct palmas_sleep_requestor_info palma_sleep_req_info[] =;

#define EXTERNAL_REQUESTOR_TPS65917(_id, _offset, _pos)

static struct palmas_sleep_requestor_info tps65917_sleep_req_info[] =;

static const unsigned int palmas_smps_ramp_delay[4] =;

#define SMPS_CTRL_MODE_OFF
#define SMPS_CTRL_MODE_ON
#define SMPS_CTRL_MODE_ECO
#define SMPS_CTRL_MODE_PWM

#define PALMAS_SMPS_NUM_VOLTAGES
#define PALMAS_SMPS10_NUM_VOLTAGES
#define PALMAS_LDO_NUM_VOLTAGES

#define SMPS10_VSEL
#define SMPS10_BOOST_EN
#define SMPS10_BYPASS_EN
#define SMPS10_SWITCH_EN

#define REGULATOR_SLAVE

static int palmas_smps_read(struct palmas *palmas, unsigned int reg,
		unsigned int *dest)
{}

static int palmas_smps_write(struct palmas *palmas, unsigned int reg,
		unsigned int value)
{}

static int palmas_ldo_read(struct palmas *palmas, unsigned int reg,
		unsigned int *dest)
{}

static int palmas_ldo_write(struct palmas *palmas, unsigned int reg,
		unsigned int value)
{}

static int palmas_set_mode_smps(struct regulator_dev *dev, unsigned int mode)
{}

static unsigned int palmas_get_mode_smps(struct regulator_dev *dev)
{}

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

static const struct regulator_ops palmas_ops_smps =;

static const struct regulator_ops palmas_ops_ext_control_smps =;

static const struct regulator_ops palmas_ops_smps10 =;

static const struct regulator_ops tps65917_ops_smps =;

static const struct regulator_ops tps65917_ops_ext_control_smps =;

static int palmas_is_enabled_ldo(struct regulator_dev *dev)
{}

static const struct regulator_ops palmas_ops_ldo =;

static const struct regulator_ops palmas_ops_ldo9 =;

static const struct regulator_ops palmas_ops_ext_control_ldo =;

static const struct regulator_ops palmas_ops_extreg =;

static const struct regulator_ops palmas_ops_ext_control_extreg =;

static const struct regulator_ops tps65917_ops_ldo =;

static const struct regulator_ops tps65917_ops_ldo_1_2 =;

static int palmas_regulator_config_external(struct palmas *palmas, int id,
		struct palmas_reg_init *reg_init)
{}

/*
 * setup the hardware based sleep configuration of the SMPS/LDO regulators
 * from the platform data. This is different to the software based control
 * supported by the regulator framework as it is controlled by toggling
 * pins on the PMIC such as PREQ, SYSEN, ...
 */
static int palmas_smps_init(struct palmas *palmas, int id,
		struct palmas_reg_init *reg_init)
{}

static int palmas_ldo_init(struct palmas *palmas, int id,
		struct palmas_reg_init *reg_init)
{}

static int palmas_extreg_init(struct palmas *palmas, int id,
		struct palmas_reg_init *reg_init)
{}

static void palmas_enable_ldo8_track(struct palmas *palmas)
{}

static int palmas_ldo_registration(struct palmas_pmic *pmic,
				   struct palmas_pmic_driver_data *ddata,
				   struct palmas_pmic_platform_data *pdata,
				   const char *pdev_name,
				   struct regulator_config config)
{}

static int tps65917_ldo_registration(struct palmas_pmic *pmic,
				     struct palmas_pmic_driver_data *ddata,
				     struct palmas_pmic_platform_data *pdata,
				     const char *pdev_name,
				     struct regulator_config config)
{}

static int palmas_smps_registration(struct palmas_pmic *pmic,
				    struct palmas_pmic_driver_data *ddata,
				    struct palmas_pmic_platform_data *pdata,
				    const char *pdev_name,
				    struct regulator_config config)
{}

static int tps65917_smps_registration(struct palmas_pmic *pmic,
				      struct palmas_pmic_driver_data *ddata,
				      struct palmas_pmic_platform_data *pdata,
				      const char *pdev_name,
				      struct regulator_config config)
{}

static struct of_regulator_match palmas_matches[] =;

static struct of_regulator_match tps65917_matches[] =;

static struct palmas_pmic_driver_data palmas_ddata =;

static struct palmas_pmic_driver_data tps65917_ddata =;

static int palmas_dt_to_pdata(struct device *dev,
			      struct device_node *node,
			      struct palmas_pmic_platform_data *pdata,
			      struct palmas_pmic_driver_data *ddata)
{}

static const struct of_device_id of_palmas_match_tbl[] =;

static int palmas_regulators_probe(struct platform_device *pdev)
{}

static struct platform_driver palmas_driver =;

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

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

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_ALIAS();
MODULE_DEVICE_TABLE(of, of_palmas_match_tbl);