linux/drivers/regulator/ltc3589.c

// SPDX-License-Identifier: GPL-2.0
//
// Linear Technology LTC3589,LTC3589-1 regulator support
//
// Copyright (c) 2014 Philipp Zabel <[email protected]>, Pengutronix

#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/of_regulator.h>

#define DRIVER_NAME

#define LTC3589_IRQSTAT
#define LTC3589_SCR1
#define LTC3589_OVEN
#define LTC3589_SCR2
#define LTC3589_PGSTAT
#define LTC3589_VCCR
#define LTC3589_CLIRQ
#define LTC3589_B1DTV1
#define LTC3589_B1DTV2
#define LTC3589_VRRCR
#define LTC3589_B2DTV1
#define LTC3589_B2DTV2
#define LTC3589_B3DTV1
#define LTC3589_B3DTV2
#define LTC3589_L2DTV1
#define LTC3589_L2DTV2

#define LTC3589_IRQSTAT_PGOOD_TIMEOUT
#define LTC3589_IRQSTAT_UNDERVOLT_WARN
#define LTC3589_IRQSTAT_UNDERVOLT_FAULT
#define LTC3589_IRQSTAT_THERMAL_WARN
#define LTC3589_IRQSTAT_THERMAL_FAULT

#define LTC3589_OVEN_SW1
#define LTC3589_OVEN_SW2
#define LTC3589_OVEN_SW3
#define LTC3589_OVEN_BB_OUT
#define LTC3589_OVEN_LDO2
#define LTC3589_OVEN_LDO3
#define LTC3589_OVEN_LDO4
#define LTC3589_OVEN_SW_CTRL

#define LTC3589_VCCR_SW1_GO
#define LTC3589_VCCR_SW2_GO
#define LTC3589_VCCR_SW3_GO
#define LTC3589_VCCR_LDO2_GO

#define LTC3589_VRRCR_SW1_RAMP_MASK
#define LTC3589_VRRCR_SW2_RAMP_MASK
#define LTC3589_VRRCR_SW3_RAMP_MASK
#define LTC3589_VRRCR_LDO2_RAMP_MASK

enum ltc3589_reg {};

struct ltc3589_info {};

struct ltc3589 {};

static const int ltc3589_ldo4[] =;

static const int ltc3589_12_ldo4[] =;

static const unsigned int ltc3589_ramp_table[] =;

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

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

/* SW1, SW2, SW3, LDO2 */
static const struct regulator_ops ltc3589_linear_regulator_ops =;

/* BB_OUT, LDO3 */
static const struct regulator_ops ltc3589_fixed_regulator_ops =;

/* LDO1 */
static const struct regulator_ops ltc3589_fixed_standby_regulator_ops =;

/* LDO4 */
static const struct regulator_ops ltc3589_table_regulator_ops =;

static inline unsigned int ltc3589_scale(unsigned int uV, u32 r1, u32 r2)
{}

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

#define LTC3589_REG(_name, _of_name, _ops, en_bit, dtv1_reg, dtv_mask)

#define LTC3589_LINEAR_REG(_name, _of_name, _dtv1)


#define LTC3589_FIXED_REG(_name, _of_name)

static const struct regulator_desc ltc3589_regulators[] =;

static bool ltc3589_writeable_reg(struct device *dev, unsigned int reg)
{}

static bool ltc3589_readable_reg(struct device *dev, unsigned int reg)
{}

static bool ltc3589_volatile_reg(struct device *dev, unsigned int reg)
{}

static const struct reg_default ltc3589_reg_defaults[] =;

static const struct regmap_config ltc3589_regmap_config =;

static irqreturn_t ltc3589_isr(int irq, void *dev_id)
{}

static int ltc3589_probe(struct i2c_client *client)
{}

static const struct ltc3589_info ltc3589_info =;

static const struct ltc3589_info ltc3589_12_info =;

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

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

static struct i2c_driver ltc3589_driver =;
module_i2c_driver();

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