linux/drivers/regulator/pca9450-regulator.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright 2020 NXP.
 * NXP PCA9450 pmic driver
 */

#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#include <linux/regulator/pca9450.h>

struct pc9450_dvs_config {};

struct pca9450_regulator_desc {};

struct pca9450 {};

static const struct regmap_range pca9450_status_range =;

static const struct regmap_access_table pca9450_volatile_regs =;

static const struct regmap_config pca9450_regmap_config =;

/*
 * BUCK1/2/3
 * BUCK1RAM[1:0] BUCK1 DVS ramp rate setting
 * 00: 25mV/1usec
 * 01: 25mV/2usec
 * 10: 25mV/4usec
 * 11: 25mV/8usec
 */
static const unsigned int pca9450_dvs_buck_ramp_table[] =;

static const struct regulator_ops pca9450_dvs_buck_regulator_ops =;

static const struct regulator_ops pca9450_buck_regulator_ops =;

static const struct regulator_ops pca9450_ldo_regulator_ops =;

/*
 * BUCK1/2/3
 * 0.60 to 2.1875V (12.5mV step)
 */
static const struct linear_range pca9450_dvs_buck_volts[] =;

/*
 * BUCK1/3
 * 0.65 to 2.2375V (12.5mV step)
 */
static const struct linear_range pca9451a_dvs_buck_volts[] =;

/*
 * BUCK4/5/6
 * 0.6V to 3.4V (25mV step)
 */
static const struct linear_range pca9450_buck_volts[] =;

/*
 * LDO1
 * 1.6 to 3.3V ()
 */
static const struct linear_range pca9450_ldo1_volts[] =;

/*
 * LDO2
 * 0.8 to 1.15V (50mV step)
 */
static const struct linear_range pca9450_ldo2_volts[] =;

/*
 * LDO3/4
 * 0.8 to 3.3V (100mV step)
 */
static const struct linear_range pca9450_ldo34_volts[] =;

/*
 * LDO5
 * 1.8 to 3.3V (100mV step)
 */
static const struct linear_range pca9450_ldo5_volts[] =;

static int buck_set_dvs(const struct regulator_desc *desc,
			struct device_node *np, struct regmap *regmap,
			char *prop, unsigned int reg, unsigned int mask)
{}

static int pca9450_set_dvs_levels(struct device_node *np,
			    const struct regulator_desc *desc,
			    struct regulator_config *cfg)
{}

static const struct pca9450_regulator_desc pca9450a_regulators[] =;

/*
 * Buck3 removed on PCA9450B and connected with Buck1 internal for dual phase
 * on PCA9450C as no Buck3.
 */
static const struct pca9450_regulator_desc pca9450bc_regulators[] =;

static const struct pca9450_regulator_desc pca9451a_regulators[] =;

static irqreturn_t pca9450_irq_handler(int irq, void *data)
{}

static int pca9450_i2c_probe(struct i2c_client *i2c)
{}

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

static struct i2c_driver pca9450_i2c_driver =;

module_i2c_driver();

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