linux/drivers/regulator/act8865-regulator.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * act8865-regulator.c - Voltage regulation for active-semi ACT88xx PMUs
 *
 * http://www.active-semi.com/products/power-management-units/act88xx/
 *
 * Copyright (C) 2013 Atmel Corporation
 */

#include <linux/module.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/act8865.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/power_supply.h>
#include <linux/regulator/of_regulator.h>
#include <linux/regmap.h>
#include <dt-bindings/regulator/active-semi,8865-regulator.h>

/*
 * ACT8600 Global Register Map.
 */
#define ACT8600_SYS_MODE
#define ACT8600_SYS_CTRL
#define ACT8600_DCDC1_VSET
#define ACT8600_DCDC1_CTRL
#define ACT8600_DCDC2_VSET
#define ACT8600_DCDC2_CTRL
#define ACT8600_DCDC3_VSET
#define ACT8600_DCDC3_CTRL
#define ACT8600_SUDCDC4_VSET
#define ACT8600_SUDCDC4_CTRL
#define ACT8600_LDO5_VSET
#define ACT8600_LDO5_CTRL
#define ACT8600_LDO6_VSET
#define ACT8600_LDO6_CTRL
#define ACT8600_LDO7_VSET
#define ACT8600_LDO7_CTRL
#define ACT8600_LDO8_VSET
#define ACT8600_LDO8_CTRL
#define ACT8600_LDO910_CTRL
#define ACT8600_APCH0
#define ACT8600_APCH1
#define ACT8600_APCH2
#define ACT8600_APCH_STAT
#define ACT8600_OTG0
#define ACT8600_OTG1

/*
 * ACT8846 Global Register Map.
 */
#define ACT8846_SYS0
#define ACT8846_SYS1
#define ACT8846_REG1_VSET
#define ACT8846_REG1_CTRL
#define ACT8846_REG2_VSET0
#define ACT8846_REG2_VSET1
#define ACT8846_REG2_CTRL
#define ACT8846_REG3_VSET0
#define ACT8846_REG3_VSET1
#define ACT8846_REG3_CTRL
#define ACT8846_REG4_VSET0
#define ACT8846_REG4_VSET1
#define ACT8846_REG4_CTRL
#define ACT8846_REG5_VSET
#define ACT8846_REG5_CTRL
#define ACT8846_REG6_VSET
#define ACT8846_REG6_CTRL
#define ACT8846_REG7_VSET
#define ACT8846_REG7_CTRL
#define ACT8846_REG8_VSET
#define ACT8846_REG8_CTRL
#define ACT8846_REG9_VSET
#define ACT8846_REG9_CTRL
#define ACT8846_REG10_VSET
#define ACT8846_REG10_CTRL
#define ACT8846_REG11_VSET
#define ACT8846_REG11_CTRL
#define ACT8846_REG12_VSET
#define ACT8846_REG12_CTRL
#define ACT8846_REG13_CTRL
#define ACT8846_GLB_OFF_CTRL
#define ACT8846_OFF_SYSMASK

/*
 * ACT8865 Global Register Map.
 */
#define ACT8865_SYS_MODE
#define ACT8865_SYS_CTRL
#define ACT8865_SYS_UNLK_REGS
#define ACT8865_DCDC1_VSET1
#define ACT8865_DCDC1_VSET2
#define ACT8865_DCDC1_CTRL
#define ACT8865_DCDC1_SUS
#define ACT8865_DCDC2_VSET1
#define ACT8865_DCDC2_VSET2
#define ACT8865_DCDC2_CTRL
#define ACT8865_DCDC2_SUS
#define ACT8865_DCDC3_VSET1
#define ACT8865_DCDC3_VSET2
#define ACT8865_DCDC3_CTRL
#define ACT8865_DCDC3_SUS
#define ACT8865_LDO1_VSET
#define ACT8865_LDO1_CTRL
#define ACT8865_LDO1_SUS
#define ACT8865_LDO2_VSET
#define ACT8865_LDO2_CTRL
#define ACT8865_LDO2_SUS
#define ACT8865_LDO3_VSET
#define ACT8865_LDO3_CTRL
#define ACT8865_LDO3_SUS
#define ACT8865_LDO4_VSET
#define ACT8865_LDO4_CTRL
#define ACT8865_LDO4_SUS
#define ACT8865_MSTROFF

/*
 * Field Definitions.
 */
#define ACT8865_ENA
#define ACT8865_DIS

#define ACT8865_VSEL_MASK


#define ACT8600_LDO10_ENA
#define ACT8600_SUDCDC_VSEL_MASK

#define ACT8600_APCH_CHG_ACIN
#define ACT8600_APCH_CHG_USB
#define ACT8600_APCH_CSTATE0
#define ACT8600_APCH_CSTATE1

/*
 * ACT8865 voltage number
 */
#define ACT8865_VOLTAGE_NUM
#define ACT8600_SUDCDC_VOLTAGE_NUM

struct act8865 {};

static const struct regmap_range act8600_reg_ranges[] =;

static const struct regmap_range act8600_reg_ro_ranges[] =;

static const struct regmap_range act8600_reg_volatile_ranges[] =;

static const struct regmap_access_table act8600_write_ranges_table =;

static const struct regmap_access_table act8600_read_ranges_table =;

static const struct regmap_access_table act8600_volatile_ranges_table =;

static const struct regmap_config act8600_regmap_config =;

static const struct regmap_config act8865_regmap_config =;

static const struct linear_range act8865_voltage_ranges[] =;

static const struct linear_range act8600_sudcdc_voltage_ranges[] =;

static int act8865_set_suspend_state(struct regulator_dev *rdev, bool enable)
{}

static int act8865_set_suspend_enable(struct regulator_dev *rdev)
{}

static int act8865_set_suspend_disable(struct regulator_dev *rdev)
{}

static unsigned int act8865_of_map_mode(unsigned int mode)
{}

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

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

static const struct regulator_ops act8865_ops =;

static const struct regulator_ops act8865_ldo_ops =;

static const struct regulator_ops act8865_fixed_ldo_ops =;

#define ACT88xx_REG_(_name, _family, _id, _vsel_reg, _supply, _ops)

#define ACT88xx_REG(_name, _family, _id, _vsel_reg, _supply)

#define ACT88xx_LDO(_name, _family, _id, _vsel_reg, _supply)

static const struct regulator_desc act8600_regulators[] =;

static const struct regulator_desc act8846_regulators[] =;

static const struct regulator_desc act8865_regulators[] =;

static const struct regulator_desc act8865_alt_regulators[] =;

#ifdef CONFIG_OF
static const struct of_device_id act8865_dt_ids[] =;
MODULE_DEVICE_TABLE(of, act8865_dt_ids);
#endif

static struct act8865_regulator_data *act8865_get_regulator_data(
		int id, struct act8865_platform_data *pdata)
{}

static struct i2c_client *act8865_i2c_client;
static void act8865_power_off(void)
{}

static int act8600_charger_get_status(struct regmap *map)
{}

static int act8600_charger_get_property(struct power_supply *psy,
		enum power_supply_property psp, union power_supply_propval *val)
{}

static enum power_supply_property act8600_charger_properties[] =;

static const struct power_supply_desc act8600_charger_desc =;

static int act8600_charger_probe(struct device *dev, struct regmap *regmap)
{}

static int act8865_pmic_probe(struct i2c_client *client)
{}

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

static struct i2c_driver act8865_pmic_driver =;

module_i2c_driver();

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