linux/drivers/regulator/pf8x00-regulator.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2017 NXP
 * Copyright (C) 2019 Boundary Devices
 * Copyright (C) 2020 Amarula Solutions(India)
 */

#include <linux/delay.h>
#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>

/* registers */
#define PF8X00_DEVICEID
#define PF8X00_REVID
#define PF8X00_EMREV
#define PF8X00_PROGID
#define PF8X00_IMS_INT
#define PF8X00_IMS_THERM
#define PF8X00_SW_MODE_INT
#define PF8X00_SW_MODE_MASK
#define PF8X00_IMS_SW_ILIM
#define PF8X00_IMS_LDO_ILIM
#define PF8X00_IMS_SW_UV
#define PF8X00_IMS_SW_OV
#define PF8X00_IMS_LDO_UV
#define PF8X00_IMS_LDO_OV
#define PF8X00_IMS_PWRON
#define PF8X00_SYS_INT
#define PF8X00_HARD_FAULT
#define PF8X00_FSOB_FLAGS
#define PF8X00_FSOB_SELECT
#define PF8X00_ABIST_OV1
#define PF8X00_ABIST_OV2
#define PF8X00_ABIST_UV1
#define PF8X00_ABIST_UV2
#define PF8X00_TEST_FLAGS
#define PF8X00_ABIST_RUN
#define PF8X00_RANDOM_GEN
#define PF8X00_RANDOM_CHK
#define PF8X00_VMONEN1
#define PF8X00_VMONEN2
#define PF8X00_CTRL1
#define PF8X00_CTRL2
#define PF8X00_CTRL3
#define PF8X00_PWRUP_CTRL
#define PF8X00_RESETBMCU
#define PF8X00_PGOOD
#define PF8X00_PWRDN_DLY1
#define PF8X00_PWRDN_DLY2
#define PF8X00_FREQ_CTRL
#define PF8X00_COINCELL_CTRL
#define PF8X00_PWRON
#define PF8X00_WD_CONFIG
#define PF8X00_WD_CLEAR
#define PF8X00_WD_EXPIRE
#define PF8X00_WD_COUNTER
#define PF8X00_FAULT_COUNTER
#define PF8X00_FSAFE_COUNTER
#define PF8X00_FAULT_TIMER
#define PF8X00_AMUX
#define PF8X00_SW1_CONFIG1
#define PF8X00_LDO1_CONFIG1
#define PF8X00_VSNVS_CONFIG1
#define PF8X00_PAGE_SELECT

/* regulators */
enum pf8x00_regulators {};

enum pf8x00_buck_states {};
#define PF8X00_SW_BASE(i)

enum pf8x00_ldo_states {};
#define PF8X00_LDO_BASE(i)

enum swxilim_bits {};
#define PF8X00_SWXILIM_SHIFT
#define PF8X00_SWXILIM_MASK
#define PF8X00_SWXPHASE_MASK
#define PF8X00_SWXPHASE_SHIFT

enum pf8x00_devid {};
#define PF8X00_FAM
#define PF8X00_DEVICE_FAM_MASK
#define PF8X00_DEVICE_ID_MASK

struct pf8x00_regulator_data {};

struct pf8x00_chip {};

static const struct regmap_config pf8x00_regmap_config =;

/* VLDOx output: 1.5V to 5.0V */
static const int pf8x00_ldo_voltages[] =;

/* Output: 2.1A to 4.5A */
static const unsigned int pf8x00_sw_current_table[] =;

/* Output: 0.4V to 1.8V */
#define PF8XOO_SW1_6_VOLTAGE_NUM
static const struct linear_range pf8x00_sw1_to_6_voltages[] =;

/* Output: 1.0V to 4.1V */
static const int pf8x00_sw7_voltages[] =;

/* Output: 1.8V, 3.0V, or 3.3V */
static const int pf8x00_vsnvs_voltages[] =;

static void swxilim_select(struct pf8x00_chip *chip, int id, int ilim)
{}

static void handle_ilim_property(struct device_node *np,
			      const struct regulator_desc *desc,
			      struct regulator_config *config)
{}

static void handle_shift_property(struct device_node *np,
			      const struct regulator_desc *desc,
			      struct regulator_config *config)
{}

static int pf8x00_of_parse_cb(struct device_node *np,
			      const struct regulator_desc *desc,
			      struct regulator_config *config)
{}

static int pf8x00_suspend_enable(struct regulator_dev *rdev)
{}

static int pf8x00_suspend_disable(struct regulator_dev *rdev)
{}

static int pf8x00_set_suspend_voltage(struct regulator_dev *rdev, int uV)
{}

static const struct regulator_ops pf8x00_ldo_ops =;


static const struct regulator_ops pf8x00_buck1_6_ops =;

static const struct regulator_ops pf8x00_buck7_ops =;

static const struct regulator_ops pf8x00_vsnvs_ops =;

#define PF8X00LDO(_id, _name, base, voltages)

#define PF8X00BUCK(_id, _name, base, voltages)

#define PF8X00BUCK7(_name, base, voltages)


#define PF8X00VSNVS(_name, base, voltages)

static struct pf8x00_regulator_data pf8x00_regs_data[PF8X00_MAX_REGULATORS] =;

static int pf8x00_identify(struct pf8x00_chip *chip)
{}

static int pf8x00_i2c_probe(struct i2c_client *client)
{}

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

static const struct i2c_device_id pf8x00_i2c_id[] =;
MODULE_DEVICE_TABLE(i2c, pf8x00_i2c_id);

static struct i2c_driver pf8x00_regulator_driver =;
module_i2c_driver();

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