Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: regulator: Add MODULE_DEVICE_TABLE to max8997 and max8998 regulator: fix tps6524x section mismatch regulator: Remove more wm831x-specific IRQ operations regulator: add ab8500 enable and raise time delays regulator: provide consumer interface for fall/rise time regulator: add set_voltage_time_sel infrastructure regulator: initialization for ab8500 regulators regulator: add support for USB voltage regulator regulator: switch the ab3100 to use enable_time() Regulator: add suspend-finish API for regulator core. regulator: fix typo in Kconfig regulator: Convert WM831x regulators to genirq regulator: If we fail when setting up a supply say which supply
This commit is contained in:
@@ -139,17 +139,23 @@ struct ab8500 {
|
||||
u8 oldmask[AB8500_NUM_IRQ_REGS];
|
||||
};
|
||||
|
||||
struct regulator_reg_init;
|
||||
struct regulator_init_data;
|
||||
|
||||
/**
|
||||
* struct ab8500_platform_data - AB8500 platform data
|
||||
* @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used
|
||||
* @init: board-specific initialization after detection of ab8500
|
||||
* @num_regulator_reg_init: number of regulator init registers
|
||||
* @regulator_reg_init: regulator init registers
|
||||
* @num_regulator: number of regulators
|
||||
* @regulator: machine-specific constraints for regulators
|
||||
*/
|
||||
struct ab8500_platform_data {
|
||||
int irq_base;
|
||||
void (*init) (struct ab8500 *);
|
||||
int num_regulator_reg_init;
|
||||
struct ab8500_regulator_reg_init *regulator_reg_init;
|
||||
int num_regulator;
|
||||
struct regulator_init_data *regulator;
|
||||
};
|
||||
|
@@ -3,8 +3,8 @@
|
||||
*
|
||||
* License Terms: GNU General Public License v2
|
||||
*
|
||||
* Author: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson
|
||||
*
|
||||
* Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson
|
||||
* Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_MFD_AB8500_REGULATOR_H
|
||||
@@ -17,6 +17,7 @@ enum ab8500_regulator_id {
|
||||
AB8500_LDO_AUX3,
|
||||
AB8500_LDO_INTCORE,
|
||||
AB8500_LDO_TVOUT,
|
||||
AB8500_LDO_USB,
|
||||
AB8500_LDO_AUDIO,
|
||||
AB8500_LDO_ANAMIC1,
|
||||
AB8500_LDO_ANAMIC2,
|
||||
@@ -24,4 +25,50 @@ enum ab8500_regulator_id {
|
||||
AB8500_LDO_ANA,
|
||||
AB8500_NUM_REGULATORS,
|
||||
};
|
||||
|
||||
/* AB8500 register initialization */
|
||||
struct ab8500_regulator_reg_init {
|
||||
int id;
|
||||
u8 value;
|
||||
};
|
||||
|
||||
#define INIT_REGULATOR_REGISTER(_id, _value) \
|
||||
{ \
|
||||
.id = _id, \
|
||||
.value = _value, \
|
||||
}
|
||||
|
||||
/* AB8500 registers */
|
||||
enum ab8500_regulator_reg {
|
||||
AB8500_REGUREQUESTCTRL2,
|
||||
AB8500_REGUREQUESTCTRL3,
|
||||
AB8500_REGUREQUESTCTRL4,
|
||||
AB8500_REGUSYSCLKREQ1HPVALID1,
|
||||
AB8500_REGUSYSCLKREQ1HPVALID2,
|
||||
AB8500_REGUHWHPREQ1VALID1,
|
||||
AB8500_REGUHWHPREQ1VALID2,
|
||||
AB8500_REGUHWHPREQ2VALID1,
|
||||
AB8500_REGUHWHPREQ2VALID2,
|
||||
AB8500_REGUSWHPREQVALID1,
|
||||
AB8500_REGUSWHPREQVALID2,
|
||||
AB8500_REGUSYSCLKREQVALID1,
|
||||
AB8500_REGUSYSCLKREQVALID2,
|
||||
AB8500_REGUMISC1,
|
||||
AB8500_VAUDIOSUPPLY,
|
||||
AB8500_REGUCTRL1VAMIC,
|
||||
AB8500_VPLLVANAREGU,
|
||||
AB8500_VREFDDR,
|
||||
AB8500_EXTSUPPLYREGU,
|
||||
AB8500_VAUX12REGU,
|
||||
AB8500_VRF1VAUX3REGU,
|
||||
AB8500_VAUX1SEL,
|
||||
AB8500_VAUX2SEL,
|
||||
AB8500_VRF1VAUX3SEL,
|
||||
AB8500_REGUCTRL2SPARE,
|
||||
AB8500_REGUCTRLDISCH,
|
||||
AB8500_REGUCTRLDISCH2,
|
||||
AB8500_VSMPS1SEL1,
|
||||
AB8500_NUM_REGULATOR_REGISTERS,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -153,6 +153,8 @@ int regulator_list_voltage(struct regulator *regulator, unsigned selector);
|
||||
int regulator_is_supported_voltage(struct regulator *regulator,
|
||||
int min_uV, int max_uV);
|
||||
int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV);
|
||||
int regulator_set_voltage_time(struct regulator *regulator,
|
||||
int old_uV, int new_uV);
|
||||
int regulator_get_voltage(struct regulator *regulator);
|
||||
int regulator_sync_voltage(struct regulator *regulator);
|
||||
int regulator_set_current_limit(struct regulator *regulator,
|
||||
|
@@ -63,7 +63,11 @@ enum regulator_status {
|
||||
* when running with the specified parameters.
|
||||
*
|
||||
* @enable_time: Time taken for the regulator voltage output voltage to
|
||||
* stabalise after being enabled, in microseconds.
|
||||
* stabilise after being enabled, in microseconds.
|
||||
* @set_voltage_time_sel: Time taken for the regulator voltage output voltage
|
||||
* to stabilise after being set to a new value, in microseconds.
|
||||
* The function provides the from and to voltage selector, the
|
||||
* function should return the worst case.
|
||||
*
|
||||
* @set_suspend_voltage: Set the voltage for the regulator when the system
|
||||
* is suspended.
|
||||
@@ -103,8 +107,11 @@ struct regulator_ops {
|
||||
int (*set_mode) (struct regulator_dev *, unsigned int mode);
|
||||
unsigned int (*get_mode) (struct regulator_dev *);
|
||||
|
||||
/* Time taken to enable the regulator */
|
||||
/* Time taken to enable or set voltage on the regulator */
|
||||
int (*enable_time) (struct regulator_dev *);
|
||||
int (*set_voltage_time_sel) (struct regulator_dev *,
|
||||
unsigned int old_selector,
|
||||
unsigned int new_selector);
|
||||
|
||||
/* report regulator status ... most other accessors report
|
||||
* control inputs, this reports results of combining inputs
|
||||
|
@@ -186,6 +186,7 @@ struct regulator_init_data {
|
||||
};
|
||||
|
||||
int regulator_suspend_prepare(suspend_state_t state);
|
||||
int regulator_suspend_finish(void);
|
||||
|
||||
#ifdef CONFIG_REGULATOR
|
||||
void regulator_has_full_constraints(void);
|
||||
|
Reference in New Issue
Block a user