linux/drivers/regulator/mt6397-regulator.c

// SPDX-License-Identifier: GPL-2.0
//
// Copyright (c) 2014 MediaTek Inc.
// Author: Flora Fu <[email protected]>

#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/mfd/mt6397/core.h>
#include <linux/mfd/mt6397/registers.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/mt6397-regulator.h>
#include <linux/regulator/of_regulator.h>
#include <dt-bindings/regulator/mediatek,mt6397-regulator.h>

/*
 * MT6397 regulators' information
 *
 * @desc: standard fields of regulator description.
 * @qi: Mask for query enable signal status of regulators
 * @vselon_reg: Register sections for hardware control mode of bucks
 * @vselctrl_reg: Register for controlling the buck control mode.
 * @vselctrl_mask: Mask for query buck's voltage control mode.
 */
struct mt6397_regulator_info {};

#define MT6397_BUCK(match, vreg, min, max, step, volt_ranges, enreg,	\
		vosel, vosel_mask, voselon, vosel_ctrl, _modeset_reg,	\
		_modeset_shift)

#define MT6397_LDO(match, vreg, ldo_volt_table, enreg, enbit, vosel,	\
		vosel_mask)

#define MT6397_REG_FIXED(match, vreg, enreg, enbit, volt)

static const struct linear_range buck_volt_range1[] =;

static const struct linear_range buck_volt_range2[] =;

static const struct linear_range buck_volt_range3[] =;

static const unsigned int ldo_volt_table1[] =;

static const unsigned int ldo_volt_table2[] =;

static const unsigned int ldo_volt_table3[] =;

static const unsigned int ldo_volt_table4[] =;

static const unsigned int ldo_volt_table5[] =;

static const unsigned int ldo_volt_table5_v2[] =;

static const unsigned int ldo_volt_table6[] =;

static const unsigned int ldo_volt_table7[] =;

static unsigned int mt6397_map_mode(unsigned int mode)
{}

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

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

static int mt6397_get_status(struct regulator_dev *rdev)
{}

static const struct regulator_ops mt6397_volt_range_ops =;

static const struct regulator_ops mt6397_volt_table_ops =;

static const struct regulator_ops mt6397_volt_fixed_ops =;

/* The array is indexed by id(MT6397_ID_XXX) */
static struct mt6397_regulator_info mt6397_regulators[] =;

static int mt6397_set_buck_vosel_reg(struct platform_device *pdev)
{}

static int mt6397_regulator_probe(struct platform_device *pdev)
{}

static const struct platform_device_id mt6397_platform_ids[] =;
MODULE_DEVICE_TABLE(platform, mt6397_platform_ids);

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

static struct platform_driver mt6397_regulator_driver =;

module_platform_driver();

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