|
Linux Kernel
3.7.1
|
#include <linux/module.h>#include <linux/string.h>#include <linux/slab.h>#include <linux/init.h>#include <linux/err.h>#include <linux/platform_device.h>#include <linux/of.h>#include <linux/of_device.h>#include <linux/regulator/driver.h>#include <linux/regulator/machine.h>#include <linux/regulator/of_regulator.h>#include <linux/i2c/twl.h>Go to the source code of this file.
Data Structures | |
| struct | twlreg_info |
Macros | |
| #define | VREG_GRP 0 |
| #define | VREG_TYPE 1 |
| #define | VREG_REMAP 2 |
| #define | VREG_DEDICATED 3 /* LDO control */ |
| #define | VREG_VOLTAGE_SMPS_4030 9 |
| #define | VREG_TRANS 1 |
| #define | VREG_STATE 2 |
| #define | VREG_VOLTAGE 3 |
| #define | VREG_VOLTAGE_SMPS 4 |
| #define | VREG_BC_ALL 1 |
| #define | VREG_BC_REF 2 |
| #define | VREG_BC_PROC 3 |
| #define | VREG_BC_CLK_RST 4 |
| #define | TWL6030_CFG_STATE_OFF 0x00 |
| #define | TWL6030_CFG_STATE_ON 0x01 |
| #define | TWL6030_CFG_STATE_OFF2 0x02 |
| #define | TWL6030_CFG_STATE_SLEEP 0x03 |
| #define | TWL6030_CFG_STATE_GRP_SHIFT 5 |
| #define | TWL6030_CFG_STATE_APP_SHIFT 2 |
| #define | TWL6030_CFG_STATE_APP_MASK (0x03 << TWL6030_CFG_STATE_APP_SHIFT) |
| #define | TWL6030_CFG_STATE_APP(v) |
| #define | SMPS_OFFSET_EN BIT(0) |
| #define | SMPS_EXTENDED_EN BIT(1) |
| #define | TWL6030_SMPS_OFFSET 0xB0 |
| #define | TWL6030_SMPS_MULT 0xB3 |
| #define | SMPS_MULTOFFSET_SMPS4 BIT(0) |
| #define | SMPS_MULTOFFSET_VIO BIT(1) |
| #define | SMPS_MULTOFFSET_SMPS3 BIT(6) |
| #define | P3_GRP_4030 BIT(7) /* "peripherals" */ |
| #define | P2_GRP_4030 BIT(6) /* secondary processor, modem, etc */ |
| #define | P1_GRP_4030 BIT(5) /* CPU/Linux */ |
| #define | P3_GRP_6030 BIT(2) /* secondary processor, modem, etc */ |
| #define | P2_GRP_6030 BIT(1) /* "peripherals" */ |
| #define | P1_GRP_6030 BIT(0) /* CPU/Linux */ |
| #define | UNSUP_MASK 0x8000 |
| #define | UNSUP(x) (UNSUP_MASK | (x)) |
| #define | IS_UNSUP(info, x) |
| #define | LDO_MV(x) (~UNSUP_MASK & (x)) |
| #define | TWL4030_FIXED_LDO(label, offset, mVolts, num, turnon_delay, remap_conf) |
| #define | TWL6030_FIXED_LDO(label, offset, mVolts, turnon_delay) |
| #define | TWL4030_ADJUSTABLE_LDO(label, offset, num, turnon_delay, remap_conf) |
| #define | TWL4030_ADJUSTABLE_SMPS(label, offset, num, turnon_delay, remap_conf) |
| #define | TWL6030_ADJUSTABLE_SMPS(label) |
| #define | TWL6030_ADJUSTABLE_LDO(label, offset, min_mVolts, max_mVolts) |
| #define | TWL6025_ADJUSTABLE_LDO(label, offset, min_mVolts, max_mVolts) |
| #define | TWL_FIXED_LDO(label, offset, mVolts, num, turnon_delay, remap_conf, family, operations) |
| #define | TWL6030_FIXED_RESOURCE(label, offset, turnon_delay) |
| #define | TWL6025_ADJUSTABLE_SMPS(label, offset) |
| #define | TWL_OF_MATCH(comp, family, label) |
| #define | TWL4030_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL4030, label) |
| #define | TWL6030_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6030, label) |
| #define | TWL6025_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6025, label) |
| #define | TWLFIXED_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLFIXED, label) |
| #define | TWLSMPS_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLSMPS, label) |
Functions | |
| TWL4030_ADJUSTABLE_LDO (VAUX1, 0x17, 1, 100, 0x08) | |
| TWL4030_ADJUSTABLE_LDO (VAUX2_4030, 0x1b, 2, 100, 0x08) | |
| TWL4030_ADJUSTABLE_LDO (VAUX2, 0x1b, 2, 100, 0x08) | |
| TWL4030_ADJUSTABLE_LDO (VAUX3, 0x1f, 3, 100, 0x08) | |
| TWL4030_ADJUSTABLE_LDO (VAUX4, 0x23, 4, 100, 0x08) | |
| TWL4030_ADJUSTABLE_LDO (VMMC1, 0x27, 5, 100, 0x08) | |
| TWL4030_ADJUSTABLE_LDO (VMMC2, 0x2b, 6, 100, 0x08) | |
| TWL4030_ADJUSTABLE_LDO (VPLL1, 0x2f, 7, 100, 0x00) | |
| TWL4030_ADJUSTABLE_LDO (VPLL2, 0x33, 8, 100, 0x08) | |
| TWL4030_ADJUSTABLE_LDO (VSIM, 0x37, 9, 100, 0x00) | |
| TWL4030_ADJUSTABLE_LDO (VDAC, 0x3b, 10, 100, 0x08) | |
| TWL4030_ADJUSTABLE_LDO (VINTANA2, 0x43, 12, 100, 0x08) | |
| TWL4030_ADJUSTABLE_LDO (VIO, 0x4b, 14, 1000, 0x08) | |
| TWL4030_ADJUSTABLE_SMPS (VDD1, 0x55, 15, 1000, 0x08) | |
| TWL4030_ADJUSTABLE_SMPS (VDD2, 0x63, 16, 1000, 0x08) | |
| TWL6030_ADJUSTABLE_SMPS (VDD1) | |
| TWL6030_ADJUSTABLE_SMPS (VDD2) | |
| TWL6030_ADJUSTABLE_SMPS (VDD3) | |
| TWL6030_ADJUSTABLE_LDO (VAUX1_6030, 0x54, 1000, 3300) | |
| TWL6030_ADJUSTABLE_LDO (VAUX2_6030, 0x58, 1000, 3300) | |
| TWL6030_ADJUSTABLE_LDO (VAUX3_6030, 0x5c, 1000, 3300) | |
| TWL6030_ADJUSTABLE_LDO (VMMC, 0x68, 1000, 3300) | |
| TWL6030_ADJUSTABLE_LDO (VPP, 0x6c, 1000, 3300) | |
| TWL6030_ADJUSTABLE_LDO (VUSIM, 0x74, 1000, 3300) | |
| TWL6025_ADJUSTABLE_LDO (LDO2, 0x54, 1000, 3300) | |
| TWL6025_ADJUSTABLE_LDO (LDO4, 0x58, 1000, 3300) | |
| TWL6025_ADJUSTABLE_LDO (LDO3, 0x5c, 1000, 3300) | |
| TWL6025_ADJUSTABLE_LDO (LDO5, 0x68, 1000, 3300) | |
| TWL6025_ADJUSTABLE_LDO (LDO1, 0x6c, 1000, 3300) | |
| TWL6025_ADJUSTABLE_LDO (LDO7, 0x74, 1000, 3300) | |
| TWL6025_ADJUSTABLE_LDO (LDO6, 0x60, 1000, 3300) | |
| TWL6025_ADJUSTABLE_LDO (LDOLN, 0x64, 1000, 3300) | |
| TWL6025_ADJUSTABLE_LDO (LDOUSB, 0x70, 1000, 3300) | |
| TWL4030_FIXED_LDO (VINTANA1, 0x3f, 1500, 11, 100, 0x08) | |
| TWL4030_FIXED_LDO (VINTDIG, 0x47, 1500, 13, 100, 0x08) | |
| TWL4030_FIXED_LDO (VUSB1V5, 0x71, 1500, 17, 100, 0x08) | |
| TWL4030_FIXED_LDO (VUSB1V8, 0x74, 1800, 18, 100, 0x08) | |
| TWL4030_FIXED_LDO (VUSB3V1, 0x77, 3100, 19, 150, 0x08) | |
| TWL6030_FIXED_LDO (VANA, 0x50, 2100, 0) | |
| TWL6030_FIXED_LDO (VCXIO, 0x60, 1800, 0) | |
| TWL6030_FIXED_LDO (VDAC, 0x64, 1800, 0) | |
| TWL6030_FIXED_LDO (VUSB, 0x70, 3300, 0) | |
| TWL6030_FIXED_LDO (V1V8, 0x16, 1800, 0) | |
| TWL6030_FIXED_LDO (V2V1, 0x1c, 2100, 0) | |
| TWL6025_ADJUSTABLE_SMPS (SMPS3, 0x34) | |
| TWL6025_ADJUSTABLE_SMPS (SMPS4, 0x10) | |
| TWL6025_ADJUSTABLE_SMPS (VIO, 0x16) | |
| MODULE_DEVICE_TABLE (of, twl_of_match) | |
| MODULE_ALIAS ("platform:twl_reg") | |
| subsys_initcall (twlreg_init) | |
Definition at line 386 of file twl-regulator.c.
| #define LDO_MV | ( | x | ) | (~UNSUP_MASK & (x)) |
Definition at line 389 of file twl-regulator.c.
Definition at line 155 of file twl-regulator.c.
Definition at line 159 of file twl-regulator.c.
Definition at line 154 of file twl-regulator.c.
| #define P2_GRP_6030 BIT(1) /* "peripherals" */ |
Definition at line 158 of file twl-regulator.c.
| #define P3_GRP_4030 BIT(7) /* "peripherals" */ |
Definition at line 153 of file twl-regulator.c.
Definition at line 157 of file twl-regulator.c.
| #define SMPS_EXTENDED_EN BIT(1) |
Definition at line 110 of file twl-regulator.c.
| #define SMPS_MULTOFFSET_SMPS3 BIT(6) |
Definition at line 117 of file twl-regulator.c.
| #define SMPS_MULTOFFSET_SMPS4 BIT(0) |
Definition at line 115 of file twl-regulator.c.
| #define SMPS_MULTOFFSET_VIO BIT(1) |
Definition at line 116 of file twl-regulator.c.
| #define SMPS_OFFSET_EN BIT(0) |
Definition at line 109 of file twl-regulator.c.
Definition at line 860 of file twl-regulator.c.
Definition at line 878 of file twl-regulator.c.
Definition at line 852 of file twl-regulator.c.
| #define TWL4030_OF_MATCH | ( | comp, | |
| label | |||
| ) | TWL_OF_MATCH(comp, TWL4030, label) |
Definition at line 1061 of file twl-regulator.c.
Definition at line 919 of file twl-regulator.c.
Definition at line 965 of file twl-regulator.c.
| #define TWL6025_OF_MATCH | ( | comp, | |
| label | |||
| ) | TWL_OF_MATCH(comp, TWL6025, label) |
Definition at line 1063 of file twl-regulator.c.
Definition at line 904 of file twl-regulator.c.
| #define TWL6030_ADJUSTABLE_SMPS | ( | label | ) |
Definition at line 893 of file twl-regulator.c.
| #define TWL6030_CFG_STATE_APP | ( | v | ) |
Definition at line 105 of file twl-regulator.c.
| #define TWL6030_CFG_STATE_APP_MASK (0x03 << TWL6030_CFG_STATE_APP_SHIFT) |
Definition at line 104 of file twl-regulator.c.
| #define TWL6030_CFG_STATE_APP_SHIFT 2 |
Definition at line 103 of file twl-regulator.c.
| #define TWL6030_CFG_STATE_GRP_SHIFT 5 |
Definition at line 102 of file twl-regulator.c.
| #define TWL6030_CFG_STATE_OFF 0x00 |
Definition at line 98 of file twl-regulator.c.
| #define TWL6030_CFG_STATE_OFF2 0x02 |
Definition at line 100 of file twl-regulator.c.
| #define TWL6030_CFG_STATE_ON 0x01 |
Definition at line 99 of file twl-regulator.c.
| #define TWL6030_CFG_STATE_SLEEP 0x03 |
Definition at line 101 of file twl-regulator.c.
Definition at line 856 of file twl-regulator.c.
Definition at line 952 of file twl-regulator.c.
| #define TWL6030_OF_MATCH | ( | comp, | |
| label | |||
| ) | TWL_OF_MATCH(comp, TWL6030, label) |
Definition at line 1062 of file twl-regulator.c.
| #define TWL6030_SMPS_MULT 0xB3 |
Definition at line 114 of file twl-regulator.c.
| #define TWL6030_SMPS_OFFSET 0xB0 |
Definition at line 113 of file twl-regulator.c.
Definition at line 934 of file twl-regulator.c.
Definition at line 1055 of file twl-regulator.c.
| #define TWLFIXED_OF_MATCH | ( | comp, | |
| label | |||
| ) | TWL_OF_MATCH(comp, TWLFIXED, label) |
Definition at line 1064 of file twl-regulator.c.
| #define TWLSMPS_OF_MATCH | ( | comp, | |
| label | |||
| ) | TWL_OF_MATCH(comp, TWLSMPS, label) |
Definition at line 1065 of file twl-regulator.c.
| #define UNSUP | ( | x | ) | (UNSUP_MASK | (x)) |
Definition at line 385 of file twl-regulator.c.
| #define UNSUP_MASK 0x8000 |
Definition at line 383 of file twl-regulator.c.
| #define VREG_BC_ALL 1 |
Definition at line 92 of file twl-regulator.c.
| #define VREG_BC_CLK_RST 4 |
Definition at line 95 of file twl-regulator.c.
| #define VREG_BC_PROC 3 |
Definition at line 94 of file twl-regulator.c.
| #define VREG_BC_REF 2 |
Definition at line 93 of file twl-regulator.c.
| #define VREG_DEDICATED 3 /* LDO control */ |
Definition at line 84 of file twl-regulator.c.
| #define VREG_GRP 0 |
Definition at line 80 of file twl-regulator.c.
| #define VREG_REMAP 2 |
Definition at line 83 of file twl-regulator.c.
| #define VREG_STATE 2 |
Definition at line 88 of file twl-regulator.c.
| #define VREG_TRANS 1 |
Definition at line 87 of file twl-regulator.c.
| #define VREG_TYPE 1 |
Definition at line 82 of file twl-regulator.c.
| #define VREG_VOLTAGE 3 |
Definition at line 89 of file twl-regulator.c.
| #define VREG_VOLTAGE_SMPS 4 |
Definition at line 90 of file twl-regulator.c.
| #define VREG_VOLTAGE_SMPS_4030 9 |
Definition at line 85 of file twl-regulator.c.
| MODULE_ALIAS | ( | "platform:twl_reg" | ) |
| MODULE_DEVICE_TABLE | ( | of | , |
| twl_of_match | |||
| ) |
| subsys_initcall | ( | twlreg_init | ) |
| TWL4030_ADJUSTABLE_LDO | ( | VAUX1 | , |
| 0x17 | , | ||
| 1 | , | ||
| 100 | , | ||
| 0x08 | |||
| ) |
| TWL4030_ADJUSTABLE_LDO | ( | VAUX2_4030 | , |
| 0x1b | , | ||
| 2 | , | ||
| 100 | , | ||
| 0x08 | |||
| ) |
| TWL4030_ADJUSTABLE_LDO | ( | VAUX2 | , |
| 0x1b | , | ||
| 2 | , | ||
| 100 | , | ||
| 0x08 | |||
| ) |
| TWL4030_ADJUSTABLE_LDO | ( | VAUX3 | , |
| 0x1f | , | ||
| 3 | , | ||
| 100 | , | ||
| 0x08 | |||
| ) |
| TWL4030_ADJUSTABLE_LDO | ( | VAUX4 | , |
| 0x23 | , | ||
| 4 | , | ||
| 100 | , | ||
| 0x08 | |||
| ) |
| TWL4030_ADJUSTABLE_LDO | ( | VMMC1 | , |
| 0x27 | , | ||
| 5 | , | ||
| 100 | , | ||
| 0x08 | |||
| ) |
| TWL4030_ADJUSTABLE_LDO | ( | VMMC2 | , |
| 0x2b | , | ||
| 6 | , | ||
| 100 | , | ||
| 0x08 | |||
| ) |
| TWL4030_ADJUSTABLE_LDO | ( | VPLL1 | , |
| 0x2f | , | ||
| 7 | , | ||
| 100 | , | ||
| 0x00 | |||
| ) |
| TWL4030_ADJUSTABLE_LDO | ( | VPLL2 | , |
| 0x33 | , | ||
| 8 | , | ||
| 100 | , | ||
| 0x08 | |||
| ) |
| TWL4030_ADJUSTABLE_LDO | ( | VSIM | , |
| 0x37 | , | ||
| 9 | , | ||
| 100 | , | ||
| 0x00 | |||
| ) |
| TWL4030_ADJUSTABLE_LDO | ( | VDAC | , |
| 0x3b | , | ||
| 10 | , | ||
| 100 | , | ||
| 0x08 | |||
| ) |
| TWL4030_ADJUSTABLE_LDO | ( | VINTANA2 | , |
| 0x43 | , | ||
| 12 | , | ||
| 100 | , | ||
| 0x08 | |||
| ) |
| TWL4030_ADJUSTABLE_LDO | ( | VIO | , |
| 0x4b | , | ||
| 14 | , | ||
| 1000 | , | ||
| 0x08 | |||
| ) |
| TWL4030_ADJUSTABLE_SMPS | ( | VDD1 | , |
| 0x55 | , | ||
| 15 | , | ||
| 1000 | , | ||
| 0x08 | |||
| ) |
| TWL4030_ADJUSTABLE_SMPS | ( | VDD2 | , |
| 0x63 | , | ||
| 16 | , | ||
| 1000 | , | ||
| 0x08 | |||
| ) |
| TWL4030_FIXED_LDO | ( | VINTANA1 | , |
| 0x3f | , | ||
| 1500 | , | ||
| 11 | , | ||
| 100 | , | ||
| 0x08 | |||
| ) |
| TWL4030_FIXED_LDO | ( | VINTDIG | , |
| 0x47 | , | ||
| 1500 | , | ||
| 13 | , | ||
| 100 | , | ||
| 0x08 | |||
| ) |
| TWL4030_FIXED_LDO | ( | VUSB1V5 | , |
| 0x71 | , | ||
| 1500 | , | ||
| 17 | , | ||
| 100 | , | ||
| 0x08 | |||
| ) |
| TWL4030_FIXED_LDO | ( | VUSB1V8 | , |
| 0x74 | , | ||
| 1800 | , | ||
| 18 | , | ||
| 100 | , | ||
| 0x08 | |||
| ) |
| TWL4030_FIXED_LDO | ( | VUSB3V1 | , |
| 0x77 | , | ||
| 3100 | , | ||
| 19 | , | ||
| 150 | , | ||
| 0x08 | |||
| ) |
| TWL6025_ADJUSTABLE_LDO | ( | LDO2 | , |
| 0x54 | , | ||
| 1000 | , | ||
| 3300 | |||
| ) |
| TWL6025_ADJUSTABLE_LDO | ( | LDO4 | , |
| 0x58 | , | ||
| 1000 | , | ||
| 3300 | |||
| ) |
| TWL6025_ADJUSTABLE_LDO | ( | LDO3 | , |
| 0x5c | , | ||
| 1000 | , | ||
| 3300 | |||
| ) |
| TWL6025_ADJUSTABLE_LDO | ( | LDO5 | , |
| 0x68 | , | ||
| 1000 | , | ||
| 3300 | |||
| ) |
| TWL6025_ADJUSTABLE_LDO | ( | LDO1 | , |
| 0x6c | , | ||
| 1000 | , | ||
| 3300 | |||
| ) |
| TWL6025_ADJUSTABLE_LDO | ( | LDO7 | , |
| 0x74 | , | ||
| 1000 | , | ||
| 3300 | |||
| ) |
| TWL6025_ADJUSTABLE_LDO | ( | LDO6 | , |
| 0x60 | , | ||
| 1000 | , | ||
| 3300 | |||
| ) |
| TWL6025_ADJUSTABLE_LDO | ( | LDOLN | , |
| 0x64 | , | ||
| 1000 | , | ||
| 3300 | |||
| ) |
| TWL6025_ADJUSTABLE_LDO | ( | LDOUSB | , |
| 0x70 | , | ||
| 1000 | , | ||
| 3300 | |||
| ) |
| TWL6025_ADJUSTABLE_SMPS | ( | SMPS3 | , |
| 0x34 | |||
| ) |
| TWL6025_ADJUSTABLE_SMPS | ( | SMPS4 | , |
| 0x10 | |||
| ) |
| TWL6025_ADJUSTABLE_SMPS | ( | VIO | , |
| 0x16 | |||
| ) |
| TWL6030_ADJUSTABLE_LDO | ( | VAUX1_6030 | , |
| 0x54 | , | ||
| 1000 | , | ||
| 3300 | |||
| ) |
| TWL6030_ADJUSTABLE_LDO | ( | VAUX2_6030 | , |
| 0x58 | , | ||
| 1000 | , | ||
| 3300 | |||
| ) |
| TWL6030_ADJUSTABLE_LDO | ( | VAUX3_6030 | , |
| 0x5c | , | ||
| 1000 | , | ||
| 3300 | |||
| ) |
| TWL6030_ADJUSTABLE_LDO | ( | VMMC | , |
| 0x68 | , | ||
| 1000 | , | ||
| 3300 | |||
| ) |
| TWL6030_ADJUSTABLE_LDO | ( | VPP | , |
| 0x6c | , | ||
| 1000 | , | ||
| 3300 | |||
| ) |
| TWL6030_ADJUSTABLE_LDO | ( | VUSIM | , |
| 0x74 | , | ||
| 1000 | , | ||
| 3300 | |||
| ) |
| TWL6030_ADJUSTABLE_SMPS | ( | VDD1 | ) |
| TWL6030_ADJUSTABLE_SMPS | ( | VDD2 | ) |
| TWL6030_ADJUSTABLE_SMPS | ( | VDD3 | ) |
| TWL6030_FIXED_LDO | ( | VANA | , |
| 0x50 | , | ||
| 2100 | , | ||
| 0 | |||
| ) |
| TWL6030_FIXED_LDO | ( | VCXIO | , |
| 0x60 | , | ||
| 1800 | , | ||
| 0 | |||
| ) |
| TWL6030_FIXED_LDO | ( | VDAC | , |
| 0x64 | , | ||
| 1800 | , | ||
| 0 | |||
| ) |
| TWL6030_FIXED_LDO | ( | VUSB | , |
| 0x70 | , | ||
| 3300 | , | ||
| 0 | |||
| ) |
| TWL6030_FIXED_LDO | ( | V1V8 | , |
| 0x16 | , | ||
| 1800 | , | ||
| 0 | |||
| ) |
| TWL6030_FIXED_LDO | ( | V2V1 | , |
| 0x1c | , | ||
| 2100 | , | ||
| 0 | |||
| ) |
1.8.2