Source
x
static inline int tps6507x_pmic_write(struct tps6507x_pmic *tps, u8 reg, u8 val)
/*
* tps6507x-regulator.c
*
* Regulator driver for TPS65073 PMIC
*
* Copyright (C) 2009 Texas Instrument Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation version 2.
*
* This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
* whether express or implied; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
/* DCDC's */
/* LDOs */
/* Number of step-down converters available */
/* Number of LDO voltage regulators available */
/* Number of total regulators available */
/* Supported voltage values for regulators (in microVolts) */
static const unsigned int VDCDCx_VSEL_table[] = {
725000, 750000, 775000, 800000,
825000, 850000, 875000, 900000,
925000, 950000, 975000, 1000000,
1025000, 1050000, 1075000, 1100000,
1125000, 1150000, 1175000, 1200000,
1225000, 1250000, 1275000, 1300000,
1325000, 1350000, 1375000, 1400000,
1425000, 1450000, 1475000, 1500000,
1550000, 1600000, 1650000, 1700000,
1750000, 1800000, 1850000, 1900000,
1950000, 2000000, 2050000, 2100000,
2150000, 2200000, 2250000, 2300000,
2350000, 2400000, 2450000, 2500000,
2550000, 2600000, 2650000, 2700000,
2750000, 2800000, 2850000, 2900000,
3000000, 3100000, 3200000, 3300000,
};
static const unsigned int LDO1_VSEL_table[] = {
1000000, 1100000, 1200000, 1250000,
1300000, 1350000, 1400000, 1500000,
1600000, 1800000, 2500000, 2750000,
2800000, 3000000, 3100000, 3300000,
};
/* The voltage mapping table for LDO2 is the same as VDCDCx */
struct tps_info {
const char *name;
u8 table_len;
const unsigned int *table;
/* Does DCDC high or the low register defines output voltage? */
bool defdcdc_default;
};
static struct tps_info tps6507x_pmic_regs[] = {
{
.name = "VDCDC1",
.table_len = ARRAY_SIZE(VDCDCx_VSEL_table),
.table = VDCDCx_VSEL_table,
},