aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/88pm860x.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mfd/88pm860x.h')
-rw-r--r--include/linux/mfd/88pm860x.h28
1 files changed, 21 insertions, 7 deletions
diff --git a/include/linux/mfd/88pm860x.h b/include/linux/mfd/88pm860x.h
index bfd23bef7363..63b4fb8e3b6f 100644
--- a/include/linux/mfd/88pm860x.h
+++ b/include/linux/mfd/88pm860x.h
@@ -131,14 +131,16 @@ enum {
131 PM8607_ID_LDO8, 131 PM8607_ID_LDO8,
132 PM8607_ID_LDO9, 132 PM8607_ID_LDO9,
133 PM8607_ID_LDO10, 133 PM8607_ID_LDO10,
134 PM8607_ID_LDO11,
134 PM8607_ID_LDO12, 135 PM8607_ID_LDO12,
135 PM8607_ID_LDO13, 136 PM8607_ID_LDO13,
136 PM8607_ID_LDO14, 137 PM8607_ID_LDO14,
138 PM8607_ID_LDO15,
137 139
138 PM8607_ID_RG_MAX, 140 PM8607_ID_RG_MAX,
139}; 141};
140 142
141#define PM8607_VERSION (0x40) /* 8607 chip ID */ 143/* 8607 chip ID is 0x40 or 0x50 */
142#define PM8607_VERSION_MASK (0xF0) /* 8607 chip ID mask */ 144#define PM8607_VERSION_MASK (0xF0) /* 8607 chip ID mask */
143 145
144/* Interrupt Registers */ 146/* Interrupt Registers */
@@ -310,8 +312,6 @@ struct pm860x_chip {
310 312
311}; 313};
312 314
313#define PM8607_MAX_REGULATOR PM8607_ID_RG_MAX /* 3 Bucks, 13 LDOs */
314
315enum { 315enum {
316 GI2C_PORT = 0, 316 GI2C_PORT = 0,
317 PI2C_PORT, 317 PI2C_PORT,
@@ -330,6 +330,11 @@ struct pm860x_led_pdata {
330 unsigned long flags; 330 unsigned long flags;
331}; 331};
332 332
333struct pm860x_rtc_pdata {
334 int (*sync)(unsigned int ticks);
335 int vrtc;
336};
337
333struct pm860x_touch_pdata { 338struct pm860x_touch_pdata {
334 int gpadc_prebias; 339 int gpadc_prebias;
335 int slot_cycle; 340 int slot_cycle;
@@ -349,25 +354,34 @@ struct pm860x_power_pdata {
349struct pm860x_platform_data { 354struct pm860x_platform_data {
350 struct pm860x_backlight_pdata *backlight; 355 struct pm860x_backlight_pdata *backlight;
351 struct pm860x_led_pdata *led; 356 struct pm860x_led_pdata *led;
357 struct pm860x_rtc_pdata *rtc;
352 struct pm860x_touch_pdata *touch; 358 struct pm860x_touch_pdata *touch;
353 struct pm860x_power_pdata *power; 359 struct pm860x_power_pdata *power;
360 struct regulator_init_data *regulator;
354 361
355 unsigned short companion_addr; /* I2C address of companion chip */ 362 unsigned short companion_addr; /* I2C address of companion chip */
356 int i2c_port; /* Controlled by GI2C or PI2C */ 363 int i2c_port; /* Controlled by GI2C or PI2C */
357 int irq_mode; /* Clear interrupt by read/write(0/1) */ 364 int irq_mode; /* Clear interrupt by read/write(0/1) */
358 int irq_base; /* IRQ base number of 88pm860x */ 365 int irq_base; /* IRQ base number of 88pm860x */
359 struct regulator_init_data *regulator[PM8607_MAX_REGULATOR]; 366 int num_leds;
367 int num_backlights;
368 int num_regulators;
360}; 369};
361 370
362extern char pm860x_backlight_name[][MFD_NAME_SIZE];
363extern char pm860x_led_name[][MFD_NAME_SIZE];
364
365extern int pm860x_reg_read(struct i2c_client *, int); 371extern int pm860x_reg_read(struct i2c_client *, int);
366extern int pm860x_reg_write(struct i2c_client *, int, unsigned char); 372extern int pm860x_reg_write(struct i2c_client *, int, unsigned char);
367extern int pm860x_bulk_read(struct i2c_client *, int, int, unsigned char *); 373extern int pm860x_bulk_read(struct i2c_client *, int, int, unsigned char *);
368extern int pm860x_bulk_write(struct i2c_client *, int, int, unsigned char *); 374extern int pm860x_bulk_write(struct i2c_client *, int, int, unsigned char *);
369extern int pm860x_set_bits(struct i2c_client *, int, unsigned char, 375extern int pm860x_set_bits(struct i2c_client *, int, unsigned char,
370 unsigned char); 376 unsigned char);
377extern int pm860x_page_reg_read(struct i2c_client *, int);
378extern int pm860x_page_reg_write(struct i2c_client *, int, unsigned char);
379extern int pm860x_page_bulk_read(struct i2c_client *, int, int,
380 unsigned char *);
381extern int pm860x_page_bulk_write(struct i2c_client *, int, int,
382 unsigned char *);
383extern int pm860x_page_set_bits(struct i2c_client *, int, unsigned char,
384 unsigned char);
371 385
372extern int pm860x_device_init(struct pm860x_chip *chip, 386extern int pm860x_device_init(struct pm860x_chip *chip,
373 struct pm860x_platform_data *pdata) __devinit ; 387 struct pm860x_platform_data *pdata) __devinit ;