linux/drivers/regulator/hi6421v600-regulator.c

// SPDX-License-Identifier: GPL-2.0
//
// Device driver for regulators in Hisi IC
//
// Copyright (c) 2013 Linaro Ltd.
// Copyright (c) 2011 HiSilicon Ltd.
// Copyright (c) 2020-2021 Huawei Technologies Co., Ltd.
//
// Guodong Xu <[email protected]>

#include <linux/delay.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/spmi.h>

struct hi6421_spmi_reg_priv {};

struct hi6421_spmi_reg_info {};

static const unsigned int range_1v5_to_2v0[] =;

static const unsigned int range_1v725_to_1v9[] =;

static const unsigned int range_1v75_to_3v3[] =;

static const unsigned int range_1v8_to_3v0[] =;

static const unsigned int range_2v5_to_3v3[] =;

static const unsigned int range_2v6_to_3v3[] =;

/**
 * HI6421V600_LDO() - specify a LDO power line
 * @_id: LDO id name string
 * @vtable: voltage table
 * @ereg: enable register
 * @emask: enable mask
 * @vreg: voltage select register
 * @odelay: off/on delay time in uS
 * @etime: enable time in uS
 * @ecomask: eco mode mask
 * @ecoamp: eco mode load uppler limit in uA
 */
#define HI6421V600_LDO(_id, vtable, ereg, emask, vreg,			       \
		       odelay, etime, ecomask, ecoamp)

static int hi6421_spmi_regulator_enable(struct regulator_dev *rdev)
{}

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

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

static unsigned int
hi6421_spmi_regulator_get_optimum_mode(struct regulator_dev *rdev,
				       int input_uV, int output_uV,
				       int load_uA)
{}

static const struct regulator_ops hi6421_spmi_ldo_rops =;

/* HI6421v600 regulators with known registers */
enum hi6421_spmi_regulator_id {};

static struct hi6421_spmi_reg_info regulator_info[] =;

static int hi6421_spmi_regulator_probe(struct platform_device *pdev)
{}

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

static struct platform_driver hi6421_spmi_regulator_driver =;
module_platform_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();