linux/drivers/regulator/hi6421v530-regulator.c

// SPDX-License-Identifier: GPL-2.0
//
// Device driver for regulators in Hi6421V530 IC
//
// Copyright (c) <2017> HiSilicon Technologies Co., Ltd.
//              http://www.hisilicon.com
// Copyright (c) <2017> Linaro Ltd.
//              https://www.linaro.org
//
// Author: Wang Xiaoyin <[email protected]>
//         Guodong Xu <[email protected]>

#include <linux/mfd/hi6421-pmic.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>

/*
 * struct hi6421v530_regulator_info - hi6421v530 regulator information
 * @desc: regulator description
 * @mode_mask: ECO mode bitmask of LDOs; for BUCKs, this masks sleep
 * @eco_microamp: eco mode load upper limit (in uA), valid for LDOs only
 */
struct hi6421v530_regulator_info {};

/* HI6421v530 regulators */
enum hi6421v530_regulator_id {};

static const unsigned int ldo_3_voltages[] =;

static const unsigned int ldo_9_11_voltages[] =;

static const unsigned int ldo_15_16_voltages[] =;

static const struct regulator_ops hi6421v530_ldo_ops;

#define HI6421V530_LDO_ENABLE_TIME

/*
 * _id - LDO id name string
 * v_table - voltage table
 * vreg - voltage select register
 * vmask - voltage select mask
 * ereg - enable register
 * emask - enable mask
 * odelay - off/on delay time in uS
 * ecomask - eco mode mask
 * ecoamp - eco mode load uppler limit in uA
 */
#define HI6421V530_LDO(_ID, v_table, vreg, vmask, ereg, emask,		\
		   odelay, ecomask, ecoamp)

/* HI6421V530 regulator information */

static struct hi6421v530_regulator_info hi6421v530_regulator_info[] =;

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

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


static const struct regulator_ops hi6421v530_ldo_ops =;

static int hi6421v530_regulator_probe(struct platform_device *pdev)
{}

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

static struct platform_driver hi6421v530_regulator_driver =;
module_platform_driver();

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