linux/drivers/regulator/sc2731-regulator.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2017 Spreadtrum Communications Inc.
 */

#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/of_regulator.h>

/*
 * SC2731 regulator lock register
 */
#define SC2731_PWR_WR_PROT
#define SC2731_WR_UNLOCK_VALUE

/*
 * SC2731 enable register
 */
#define SC2731_POWER_PD_SW
#define SC2731_LDO_CAMA0_PD
#define SC2731_LDO_CAMA1_PD
#define SC2731_LDO_CAMMOT_PD
#define SC2731_LDO_VLDO_PD
#define SC2731_LDO_EMMCCORE_PD
#define SC2731_LDO_SDCORE_PD
#define SC2731_LDO_SDIO_PD
#define SC2731_LDO_WIFIPA_PD
#define SC2731_LDO_USB33_PD
#define SC2731_LDO_CAMD0_PD
#define SC2731_LDO_CAMD1_PD
#define SC2731_LDO_CON_PD
#define SC2731_LDO_CAMIO_PD
#define SC2731_LDO_SRAM_PD

/*
 * SC2731 enable mask
 */
#define SC2731_DCDC_CPU0_PD_MASK
#define SC2731_DCDC_CPU1_PD_MASK
#define SC2731_DCDC_RF_PD_MASK
#define SC2731_LDO_CAMA0_PD_MASK
#define SC2731_LDO_CAMA1_PD_MASK
#define SC2731_LDO_CAMMOT_PD_MASK
#define SC2731_LDO_VLDO_PD_MASK
#define SC2731_LDO_EMMCCORE_PD_MASK
#define SC2731_LDO_SDCORE_PD_MASK
#define SC2731_LDO_SDIO_PD_MASK
#define SC2731_LDO_WIFIPA_PD_MASK
#define SC2731_LDO_USB33_PD_MASK
#define SC2731_LDO_CAMD0_PD_MASK
#define SC2731_LDO_CAMD1_PD_MASK
#define SC2731_LDO_CON_PD_MASK
#define SC2731_LDO_CAMIO_PD_MASK
#define SC2731_LDO_SRAM_PD_MASK

/*
 * SC2731 vsel register
 */
#define SC2731_DCDC_CPU0_VOL
#define SC2731_DCDC_CPU1_VOL
#define SC2731_DCDC_RF_VOL
#define SC2731_LDO_CAMA0_VOL
#define SC2731_LDO_CAMA1_VOL
#define SC2731_LDO_CAMMOT_VOL
#define SC2731_LDO_VLDO_VOL
#define SC2731_LDO_EMMCCORE_VOL
#define SC2731_LDO_SDCORE_VOL
#define SC2731_LDO_SDIO_VOL
#define SC2731_LDO_WIFIPA_VOL
#define SC2731_LDO_USB33_VOL
#define SC2731_LDO_CAMD0_VOL
#define SC2731_LDO_CAMD1_VOL
#define SC2731_LDO_CON_VOL
#define SC2731_LDO_CAMIO_VOL
#define SC2731_LDO_SRAM_VOL

/*
 * SC2731 vsel register mask
 */
#define SC2731_DCDC_CPU0_VOL_MASK
#define SC2731_DCDC_CPU1_VOL_MASK
#define SC2731_DCDC_RF_VOL_MASK
#define SC2731_LDO_CAMA0_VOL_MASK
#define SC2731_LDO_CAMA1_VOL_MASK
#define SC2731_LDO_CAMMOT_VOL_MASK
#define SC2731_LDO_VLDO_VOL_MASK
#define SC2731_LDO_EMMCCORE_VOL_MASK
#define SC2731_LDO_SDCORE_VOL_MASK
#define SC2731_LDO_SDIO_VOL_MASK
#define SC2731_LDO_WIFIPA_VOL_MASK
#define SC2731_LDO_USB33_VOL_MASK
#define SC2731_LDO_CAMD0_VOL_MASK
#define SC2731_LDO_CAMD1_VOL_MASK
#define SC2731_LDO_CON_VOL_MASK
#define SC2731_LDO_CAMIO_VOL_MASK
#define SC2731_LDO_SRAM_VOL_MASK

enum sc2731_regulator_id {};

static const struct regulator_ops sc2731_regu_linear_ops =;

#define SC2731_REGU_LINEAR(_id, en_reg, en_mask, vreg, vmask,	\
			  vstep, vmin, vmax)

static const struct regulator_desc regulators[] =;

static int sc2731_regulator_unlock(struct regmap *regmap)
{}

static int sc2731_regulator_probe(struct platform_device *pdev)
{}

static struct platform_driver sc2731_regulator_driver =;

module_platform_driver();

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