Sundar R Iyer | 549931f | 2010-07-13 11:51:28 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) ST-Ericsson SA 2010 |
| 3 | * |
| 4 | * License Terms: GNU General Public License v2 |
| 5 | * |
Bengt Jonsson | 79568b9 | 2011-03-11 11:54:46 +0100 | [diff] [blame] | 6 | * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson |
| 7 | * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson |
Sundar R Iyer | 549931f | 2010-07-13 11:51:28 +0530 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef __LINUX_MFD_AB8500_REGULATOR_H |
| 11 | #define __LINUX_MFD_AB8500_REGULATOR_H |
| 12 | |
| 13 | /* AB8500 regulators */ |
Bengt Jonsson | cb189b0 | 2010-12-10 11:08:40 +0100 | [diff] [blame] | 14 | enum ab8500_regulator_id { |
| 15 | AB8500_LDO_AUX1, |
| 16 | AB8500_LDO_AUX2, |
| 17 | AB8500_LDO_AUX3, |
| 18 | AB8500_LDO_INTCORE, |
| 19 | AB8500_LDO_TVOUT, |
Bengt Jonsson | ea05ef3 | 2011-03-10 14:43:31 +0100 | [diff] [blame] | 20 | AB8500_LDO_USB, |
Bengt Jonsson | cb189b0 | 2010-12-10 11:08:40 +0100 | [diff] [blame] | 21 | AB8500_LDO_AUDIO, |
| 22 | AB8500_LDO_ANAMIC1, |
| 23 | AB8500_LDO_ANAMIC2, |
| 24 | AB8500_LDO_DMIC, |
| 25 | AB8500_LDO_ANA, |
| 26 | AB8500_NUM_REGULATORS, |
| 27 | }; |
Bengt Jonsson | 79568b9 | 2011-03-11 11:54:46 +0100 | [diff] [blame] | 28 | |
| 29 | /* AB8500 register initialization */ |
| 30 | struct ab8500_regulator_reg_init { |
| 31 | int id; |
| 32 | u8 value; |
| 33 | }; |
| 34 | |
| 35 | #define INIT_REGULATOR_REGISTER(_id, _value) \ |
| 36 | { \ |
| 37 | .id = _id, \ |
| 38 | .value = _value, \ |
| 39 | } |
| 40 | |
| 41 | /* AB8500 registers */ |
| 42 | enum ab8500_regulator_reg { |
| 43 | AB8500_REGUREQUESTCTRL2, |
| 44 | AB8500_REGUREQUESTCTRL3, |
| 45 | AB8500_REGUREQUESTCTRL4, |
| 46 | AB8500_REGUSYSCLKREQ1HPVALID1, |
| 47 | AB8500_REGUSYSCLKREQ1HPVALID2, |
| 48 | AB8500_REGUHWHPREQ1VALID1, |
| 49 | AB8500_REGUHWHPREQ1VALID2, |
| 50 | AB8500_REGUHWHPREQ2VALID1, |
| 51 | AB8500_REGUHWHPREQ2VALID2, |
| 52 | AB8500_REGUSWHPREQVALID1, |
| 53 | AB8500_REGUSWHPREQVALID2, |
| 54 | AB8500_REGUSYSCLKREQVALID1, |
| 55 | AB8500_REGUSYSCLKREQVALID2, |
| 56 | AB8500_REGUMISC1, |
| 57 | AB8500_VAUDIOSUPPLY, |
| 58 | AB8500_REGUCTRL1VAMIC, |
| 59 | AB8500_VPLLVANAREGU, |
| 60 | AB8500_VREFDDR, |
| 61 | AB8500_EXTSUPPLYREGU, |
| 62 | AB8500_VAUX12REGU, |
| 63 | AB8500_VRF1VAUX3REGU, |
| 64 | AB8500_VAUX1SEL, |
| 65 | AB8500_VAUX2SEL, |
| 66 | AB8500_VRF1VAUX3SEL, |
| 67 | AB8500_REGUCTRL2SPARE, |
| 68 | AB8500_REGUCTRLDISCH, |
| 69 | AB8500_REGUCTRLDISCH2, |
| 70 | AB8500_VSMPS1SEL1, |
| 71 | AB8500_NUM_REGULATOR_REGISTERS, |
| 72 | }; |
| 73 | |
Sundar R Iyer | 549931f | 2010-07-13 11:51:28 +0530 | [diff] [blame] | 74 | #endif |