linux/drivers/regulator/mt6357-regulator.c

// SPDX-License-Identifier: GPL-2.0
//
// Copyright (c) 2022 MediaTek Inc.
// Copyright (c) 2022 BayLibre, SAS.
// Author: Chen Zhong <[email protected]>
// Author: Fabien Parent <[email protected]>
// Author: Alexandre Mergnat <[email protected]>
//
// Based on mt6397-regulator.c
//

#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/mt6357/registers.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/mt6357-regulator.h>
#include <linux/regulator/of_regulator.h>

/*
 * MT6357 regulators' information
 *
 * @desc: standard fields of regulator description.
 * @da_vsel_reg: Monitor register for query buck's voltage.
 * @da_vsel_mask: Mask for query buck's voltage.
 */
struct mt6357_regulator_info {};

#define MT6357_BUCK(match, vreg, min, max, step,		\
	volt_ranges, vosel_reg, vosel_mask, _da_vsel_mask)

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

#define MT6357_LDO1(match, vreg, min, max, step, volt_ranges,	\
	enreg, vosel, vosel_mask)

#define MT6357_REG_FIXED(match, vreg, volt)

/**
 * mt6357_get_buck_voltage_sel - get_voltage_sel for regmap users
 *
 * @rdev: regulator to operate on
 *
 * Regulators that use regmap for their register I/O can set the
 * da_vsel_reg and da_vsel_mask fields in the info structure and
 * then use this as their get_voltage_vsel operation.
 */
static int mt6357_get_buck_voltage_sel(struct regulator_dev *rdev)
{}

static const struct regulator_ops mt6357_volt_range_ops =;

static const struct regulator_ops mt6357_volt_table_ops =;

static const struct regulator_ops mt6357_volt_fixed_ops =;

static const int vxo22_voltages[] =;

static const int vefuse_voltages[] =;

static const int vcn33_voltages[] =;

static const int vcama_voltages[] =;

static const int vcamd_voltages[] =;

static const int vldo28_voltages[] =;

static const int vdram_voltages[] =;

static const int vsim_voltages[] =;

static const int vibr_voltages[] =;

static const int vmc_voltages[] =;

static const int vmch_voltages[] =;

static const int vemc_voltages[] =;

static const int vusb_voltages[] =;

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 struct linear_range buck_volt_range4[] =;

/* The array is indexed by id(MT6357_ID_XXX) */
static struct mt6357_regulator_info mt6357_regulators[] =;

static int mt6357_regulator_probe(struct platform_device *pdev)
{}

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

static struct platform_driver mt6357_regulator_driver =;

module_platform_driver();

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