Commit af8b5fc3 authored by Kim, Milo's avatar Kim, Milo Committed by Mark Brown

regulator: add new regulator driver for lp872x

This driver supports TI/National LP8720, LP8725 PMIC.
Signed-off-by: default avatarMilo(Woogyom) Kim <milo.kim@ti.com>
Reviewed-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent e90a8447
......@@ -224,6 +224,13 @@ config REGULATOR_LP3972
Say Y here to support the voltage regulators and convertors
on National Semiconductors LP3972 PMIC
config REGULATOR_LP872X
tristate "TI/National Semiconductor LP8720/LP8725 voltage regulators"
depends on I2C
select REGMAP_I2C
help
This driver supports LP8720/LP8725 PMIC
config REGULATOR_PCF50633
tristate "NXP PCF50633 regulator driver"
depends on MFD_PCF50633
......
......@@ -23,6 +23,7 @@ obj-$(CONFIG_REGULATOR_GPIO) += gpio-regulator.o
obj-$(CONFIG_REGULATOR_ISL6271A) += isl6271a-regulator.o
obj-$(CONFIG_REGULATOR_LP3971) += lp3971.o
obj-$(CONFIG_REGULATOR_LP3972) += lp3972.o
obj-$(CONFIG_REGULATOR_LP872X) += lp872x.o
obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o
obj-$(CONFIG_REGULATOR_MAX8649) += max8649.o
obj-$(CONFIG_REGULATOR_MAX8660) += max8660.o
......
This diff is collapsed.
/*
* Copyright 2012 Texas Instruments
*
* Author: Milo(Woogyom) Kim <milo.kim@ti.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#ifndef __LP872X_REGULATOR_H__
#define __LP872X_REGULATOR_H__
#include <linux/regulator/machine.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#define LP872X_MAX_REGULATORS 9
enum lp872x_regulator_id {
LP8720_ID_BASE,
LP8720_ID_LDO1 = LP8720_ID_BASE,
LP8720_ID_LDO2,
LP8720_ID_LDO3,
LP8720_ID_LDO4,
LP8720_ID_LDO5,
LP8720_ID_BUCK,
LP8725_ID_BASE,
LP8725_ID_LDO1 = LP8725_ID_BASE,
LP8725_ID_LDO2,
LP8725_ID_LDO3,
LP8725_ID_LDO4,
LP8725_ID_LDO5,
LP8725_ID_LILO1,
LP8725_ID_LILO2,
LP8725_ID_BUCK1,
LP8725_ID_BUCK2,
LP872X_ID_MAX,
};
enum lp872x_dvs_state {
DVS_LOW = GPIOF_OUT_INIT_LOW,
DVS_HIGH = GPIOF_OUT_INIT_HIGH,
};
enum lp872x_dvs_sel {
SEL_V1,
SEL_V2,
};
/**
* lp872x_dvs
* @gpio : gpio pin number for dvs control
* @vsel : dvs selector for buck v1 or buck v2 register
* @init_state : initial dvs pin state
*/
struct lp872x_dvs {
int gpio;
enum lp872x_dvs_sel vsel;
enum lp872x_dvs_state init_state;
};
/**
* lp872x_regdata
* @id : regulator id
* @init_data : init data for each regulator
*/
struct lp872x_regulator_data {
enum lp872x_regulator_id id;
struct regulator_init_data *init_data;
};
/**
* lp872x_platform_data
* @general_config : the value of LP872X_GENERAL_CFG register
* @update_config : if LP872X_GENERAL_CFG register is updated, set true
* @regulator_data : platform regulator id and init data
* @dvs : dvs data for buck voltage control
*/
struct lp872x_platform_data {
u8 general_config;
bool update_config;
struct lp872x_regulator_data regulator_data[LP872X_MAX_REGULATORS];
struct lp872x_dvs *dvs;
};
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment