Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 1 | /* |
| 2 | * max77686.c - Regulator driver for the Maxim 77686 |
| 3 | * |
| 4 | * Copyright (C) 2012 Samsung Electronics |
Fabio Estevam | e4e8ccc | 2015-04-20 16:19:01 -0300 | [diff] [blame] | 5 | * Chiwoong Byun <woong.byun@samsung.com> |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 6 | * Jonghwa Lee <jonghwa3.lee@samsung.com> |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 21 | * |
| 22 | * This driver is based on max8997.c |
| 23 | */ |
| 24 | |
| 25 | #include <linux/kernel.h> |
| 26 | #include <linux/bug.h> |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 27 | #include <linux/err.h> |
| 28 | #include <linux/gpio.h> |
Krzysztof Kozlowski | 3307e90 | 2015-01-05 12:48:43 +0100 | [diff] [blame] | 29 | #include <linux/of_gpio.h> |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 30 | #include <linux/slab.h> |
| 31 | #include <linux/platform_device.h> |
| 32 | #include <linux/regulator/driver.h> |
| 33 | #include <linux/regulator/machine.h> |
Yadwinder Singh Brar | 4706fca | 2012-07-05 09:28:25 +0530 | [diff] [blame] | 34 | #include <linux/regulator/of_regulator.h> |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 35 | #include <linux/mfd/max77686.h> |
| 36 | #include <linux/mfd/max77686-private.h> |
| 37 | |
| 38 | #define MAX77686_LDO_MINUV 800000 |
| 39 | #define MAX77686_LDO_UVSTEP 50000 |
| 40 | #define MAX77686_LDO_LOW_MINUV 800000 |
| 41 | #define MAX77686_LDO_LOW_UVSTEP 25000 |
| 42 | #define MAX77686_BUCK_MINUV 750000 |
| 43 | #define MAX77686_BUCK_UVSTEP 50000 |
Krzysztof Kozlowski | a959730 | 2016-04-29 12:59:51 +0200 | [diff] [blame] | 44 | #define MAX77686_BUCK_ENABLE_TIME 40 /* us */ |
| 45 | #define MAX77686_DVS_ENABLE_TIME 22 /* us */ |
Yadwinder Singh Brar | 852abad | 2012-06-19 13:23:42 +0530 | [diff] [blame] | 46 | #define MAX77686_RAMP_DELAY 100000 /* uV/us */ |
| 47 | #define MAX77686_DVS_RAMP_DELAY 27500 /* uV/us */ |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 48 | #define MAX77686_DVS_MINUV 600000 |
| 49 | #define MAX77686_DVS_UVSTEP 12500 |
| 50 | |
Krzysztof Kozlowski | 7636f19 | 2014-10-27 13:11:47 +0100 | [diff] [blame] | 51 | /* |
Krzysztof Kozlowski | 3307e90 | 2015-01-05 12:48:43 +0100 | [diff] [blame] | 52 | * Value for configuring buck[89] and LDO{20,21,22} as GPIO control. |
| 53 | * It is the same as 'off' for other regulators. |
| 54 | */ |
| 55 | #define MAX77686_GPIO_CONTROL 0x0 |
| 56 | /* |
Krzysztof Kozlowski | 7636f19 | 2014-10-27 13:11:47 +0100 | [diff] [blame] | 57 | * Values used for configuring LDOs and bucks. |
| 58 | * Forcing low power mode: LDO1, 3-5, 9, 13, 17-26 |
| 59 | */ |
| 60 | #define MAX77686_LDO_LOWPOWER 0x1 |
| 61 | /* |
| 62 | * On/off controlled by PWRREQ: |
| 63 | * - LDO2, 6-8, 10-12, 14-16 |
| 64 | * - buck[1234] |
| 65 | */ |
| 66 | #define MAX77686_OFF_PWRREQ 0x1 |
| 67 | /* Low power mode controlled by PWRREQ: All LDOs */ |
| 68 | #define MAX77686_LDO_LOWPOWER_PWRREQ 0x2 |
| 69 | /* Forcing low power mode: buck[234] */ |
| 70 | #define MAX77686_BUCK_LOWPOWER 0x2 |
| 71 | #define MAX77686_NORMAL 0x3 |
| 72 | |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 73 | #define MAX77686_OPMODE_SHIFT 6 |
| 74 | #define MAX77686_OPMODE_BUCK234_SHIFT 4 |
| 75 | #define MAX77686_OPMODE_MASK 0x3 |
| 76 | |
| 77 | #define MAX77686_VSEL_MASK 0x3F |
| 78 | #define MAX77686_DVS_VSEL_MASK 0xFF |
| 79 | |
| 80 | #define MAX77686_RAMP_RATE_MASK 0xC0 |
| 81 | |
| 82 | #define MAX77686_REGULATORS MAX77686_REG_MAX |
| 83 | #define MAX77686_LDOS 26 |
| 84 | |
| 85 | enum max77686_ramp_rate { |
| 86 | RAMP_RATE_13P75MV, |
| 87 | RAMP_RATE_27P5MV, |
| 88 | RAMP_RATE_55MV, |
| 89 | RAMP_RATE_NO_CTRL, /* 100mV/us */ |
| 90 | }; |
| 91 | |
| 92 | struct max77686_data { |
Joe Perches | c53403a | 2015-05-18 10:01:03 -0700 | [diff] [blame] | 93 | DECLARE_BITMAP(gpio_enabled, MAX77686_REGULATORS); |
Krzysztof Kozlowski | 3307e90 | 2015-01-05 12:48:43 +0100 | [diff] [blame] | 94 | |
Krzysztof Kozlowski | eca29da | 2014-11-04 09:49:41 +0100 | [diff] [blame] | 95 | /* Array indexed by regulator id */ |
Yadwinder Singh Brar | 6d2c896 | 2012-10-16 17:24:18 +0530 | [diff] [blame] | 96 | unsigned int opmode[MAX77686_REGULATORS]; |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 97 | }; |
| 98 | |
Krzysztof Kozlowski | 68c5d18 | 2014-10-27 13:11:48 +0100 | [diff] [blame] | 99 | static unsigned int max77686_get_opmode_shift(int id) |
| 100 | { |
| 101 | switch (id) { |
| 102 | case MAX77686_BUCK1: |
| 103 | case MAX77686_BUCK5 ... MAX77686_BUCK9: |
| 104 | return 0; |
| 105 | case MAX77686_BUCK2 ... MAX77686_BUCK4: |
| 106 | return MAX77686_OPMODE_BUCK234_SHIFT; |
| 107 | default: |
| 108 | /* all LDOs */ |
| 109 | return MAX77686_OPMODE_SHIFT; |
| 110 | } |
| 111 | } |
| 112 | |
Krzysztof Kozlowski | 3307e90 | 2015-01-05 12:48:43 +0100 | [diff] [blame] | 113 | /* |
| 114 | * When regulator is configured for GPIO control then it |
| 115 | * replaces "normal" mode. Any change from low power mode to normal |
| 116 | * should actually change to GPIO control. |
| 117 | * Map normal mode to proper value for such regulators. |
| 118 | */ |
| 119 | static unsigned int max77686_map_normal_mode(struct max77686_data *max77686, |
| 120 | int id) |
| 121 | { |
| 122 | switch (id) { |
| 123 | case MAX77686_BUCK8: |
| 124 | case MAX77686_BUCK9: |
| 125 | case MAX77686_LDO20 ... MAX77686_LDO22: |
Joe Perches | c53403a | 2015-05-18 10:01:03 -0700 | [diff] [blame] | 126 | if (test_bit(id, max77686->gpio_enabled)) |
Krzysztof Kozlowski | 3307e90 | 2015-01-05 12:48:43 +0100 | [diff] [blame] | 127 | return MAX77686_GPIO_CONTROL; |
| 128 | } |
| 129 | |
| 130 | return MAX77686_NORMAL; |
| 131 | } |
| 132 | |
Krzysztof Kozlowski | 78ce612 | 2014-10-29 12:14:52 +0100 | [diff] [blame] | 133 | /* Some BUCKs and LDOs supports Normal[ON/OFF] mode during suspend */ |
| 134 | static int max77686_set_suspend_disable(struct regulator_dev *rdev) |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 135 | { |
Krzysztof Kozlowski | 68c5d18 | 2014-10-27 13:11:48 +0100 | [diff] [blame] | 136 | unsigned int val, shift; |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 137 | struct max77686_data *max77686 = rdev_get_drvdata(rdev); |
Axel Lin | 3ecf198 | 2013-04-27 16:18:16 +0800 | [diff] [blame] | 138 | int ret, id = rdev_get_id(rdev); |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 139 | |
Krzysztof Kozlowski | 68c5d18 | 2014-10-27 13:11:48 +0100 | [diff] [blame] | 140 | shift = max77686_get_opmode_shift(id); |
| 141 | val = MAX77686_OFF_PWRREQ; |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 142 | |
Axel Lin | 3ecf198 | 2013-04-27 16:18:16 +0800 | [diff] [blame] | 143 | ret = regmap_update_bits(rdev->regmap, rdev->desc->enable_reg, |
Krzysztof Kozlowski | 68c5d18 | 2014-10-27 13:11:48 +0100 | [diff] [blame] | 144 | rdev->desc->enable_mask, val << shift); |
Axel Lin | 3ecf198 | 2013-04-27 16:18:16 +0800 | [diff] [blame] | 145 | if (ret) |
| 146 | return ret; |
| 147 | |
Thiago Farina | 40e7214 | 2013-02-13 17:52:26 -0200 | [diff] [blame] | 148 | max77686->opmode[id] = val; |
Axel Lin | 3ecf198 | 2013-04-27 16:18:16 +0800 | [diff] [blame] | 149 | return 0; |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 150 | } |
| 151 | |
| 152 | /* Some LDOs supports [LPM/Normal]ON mode during suspend state */ |
| 153 | static int max77686_set_suspend_mode(struct regulator_dev *rdev, |
| 154 | unsigned int mode) |
| 155 | { |
| 156 | struct max77686_data *max77686 = rdev_get_drvdata(rdev); |
| 157 | unsigned int val; |
Axel Lin | 3ecf198 | 2013-04-27 16:18:16 +0800 | [diff] [blame] | 158 | int ret, id = rdev_get_id(rdev); |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 159 | |
| 160 | /* BUCK[5-9] doesn't support this feature */ |
Thiago Farina | 40e7214 | 2013-02-13 17:52:26 -0200 | [diff] [blame] | 161 | if (id >= MAX77686_BUCK5) |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 162 | return 0; |
| 163 | |
| 164 | switch (mode) { |
| 165 | case REGULATOR_MODE_IDLE: /* ON in LP Mode */ |
Krzysztof Kozlowski | 68c5d18 | 2014-10-27 13:11:48 +0100 | [diff] [blame] | 166 | val = MAX77686_LDO_LOWPOWER_PWRREQ; |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 167 | break; |
| 168 | case REGULATOR_MODE_NORMAL: /* ON in Normal Mode */ |
Krzysztof Kozlowski | 3307e90 | 2015-01-05 12:48:43 +0100 | [diff] [blame] | 169 | val = max77686_map_normal_mode(max77686, id); |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 170 | break; |
| 171 | default: |
| 172 | pr_warn("%s: regulator_suspend_mode : 0x%x not supported\n", |
| 173 | rdev->desc->name, mode); |
| 174 | return -EINVAL; |
| 175 | } |
| 176 | |
Axel Lin | 3ecf198 | 2013-04-27 16:18:16 +0800 | [diff] [blame] | 177 | ret = regmap_update_bits(rdev->regmap, rdev->desc->enable_reg, |
Krzysztof Kozlowski | 68c5d18 | 2014-10-27 13:11:48 +0100 | [diff] [blame] | 178 | rdev->desc->enable_mask, |
| 179 | val << MAX77686_OPMODE_SHIFT); |
Axel Lin | 3ecf198 | 2013-04-27 16:18:16 +0800 | [diff] [blame] | 180 | if (ret) |
| 181 | return ret; |
| 182 | |
Thiago Farina | 40e7214 | 2013-02-13 17:52:26 -0200 | [diff] [blame] | 183 | max77686->opmode[id] = val; |
Axel Lin | 3ecf198 | 2013-04-27 16:18:16 +0800 | [diff] [blame] | 184 | return 0; |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 185 | } |
| 186 | |
| 187 | /* Some LDOs supports LPM-ON/OFF/Normal-ON mode during suspend state */ |
| 188 | static int max77686_ldo_set_suspend_mode(struct regulator_dev *rdev, |
| 189 | unsigned int mode) |
| 190 | { |
| 191 | unsigned int val; |
| 192 | struct max77686_data *max77686 = rdev_get_drvdata(rdev); |
Krzysztof Kozlowski | 3307e90 | 2015-01-05 12:48:43 +0100 | [diff] [blame] | 193 | int ret, id = rdev_get_id(rdev); |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 194 | |
| 195 | switch (mode) { |
| 196 | case REGULATOR_MODE_STANDBY: /* switch off */ |
Krzysztof Kozlowski | 68c5d18 | 2014-10-27 13:11:48 +0100 | [diff] [blame] | 197 | val = MAX77686_OFF_PWRREQ; |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 198 | break; |
| 199 | case REGULATOR_MODE_IDLE: /* ON in LP Mode */ |
Krzysztof Kozlowski | 68c5d18 | 2014-10-27 13:11:48 +0100 | [diff] [blame] | 200 | val = MAX77686_LDO_LOWPOWER_PWRREQ; |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 201 | break; |
| 202 | case REGULATOR_MODE_NORMAL: /* ON in Normal Mode */ |
Krzysztof Kozlowski | 3307e90 | 2015-01-05 12:48:43 +0100 | [diff] [blame] | 203 | val = max77686_map_normal_mode(max77686, id); |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 204 | break; |
| 205 | default: |
| 206 | pr_warn("%s: regulator_suspend_mode : 0x%x not supported\n", |
| 207 | rdev->desc->name, mode); |
| 208 | return -EINVAL; |
| 209 | } |
| 210 | |
Axel Lin | 3ecf198 | 2013-04-27 16:18:16 +0800 | [diff] [blame] | 211 | ret = regmap_update_bits(rdev->regmap, rdev->desc->enable_reg, |
Krzysztof Kozlowski | 68c5d18 | 2014-10-27 13:11:48 +0100 | [diff] [blame] | 212 | rdev->desc->enable_mask, |
| 213 | val << MAX77686_OPMODE_SHIFT); |
Axel Lin | 3ecf198 | 2013-04-27 16:18:16 +0800 | [diff] [blame] | 214 | if (ret) |
| 215 | return ret; |
| 216 | |
Krzysztof Kozlowski | 3307e90 | 2015-01-05 12:48:43 +0100 | [diff] [blame] | 217 | max77686->opmode[id] = val; |
Axel Lin | 3ecf198 | 2013-04-27 16:18:16 +0800 | [diff] [blame] | 218 | return 0; |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 219 | } |
| 220 | |
Yadwinder Singh Brar | 38d3403 | 2012-10-22 09:39:28 +0530 | [diff] [blame] | 221 | static int max77686_enable(struct regulator_dev *rdev) |
Yadwinder Singh Brar | 6d2c896 | 2012-10-16 17:24:18 +0530 | [diff] [blame] | 222 | { |
| 223 | struct max77686_data *max77686 = rdev_get_drvdata(rdev); |
Krzysztof Kozlowski | 68c5d18 | 2014-10-27 13:11:48 +0100 | [diff] [blame] | 224 | unsigned int shift; |
| 225 | int id = rdev_get_id(rdev); |
| 226 | |
| 227 | shift = max77686_get_opmode_shift(id); |
Yadwinder Singh Brar | 6d2c896 | 2012-10-16 17:24:18 +0530 | [diff] [blame] | 228 | |
Krzysztof Kozlowski | 78ce612 | 2014-10-29 12:14:52 +0100 | [diff] [blame] | 229 | if (max77686->opmode[id] == MAX77686_OFF_PWRREQ) |
Krzysztof Kozlowski | 3307e90 | 2015-01-05 12:48:43 +0100 | [diff] [blame] | 230 | max77686->opmode[id] = max77686_map_normal_mode(max77686, id); |
Krzysztof Kozlowski | 78ce612 | 2014-10-29 12:14:52 +0100 | [diff] [blame] | 231 | |
Yadwinder Singh Brar | 6d2c896 | 2012-10-16 17:24:18 +0530 | [diff] [blame] | 232 | return regmap_update_bits(rdev->regmap, rdev->desc->enable_reg, |
| 233 | rdev->desc->enable_mask, |
Krzysztof Kozlowski | 68c5d18 | 2014-10-27 13:11:48 +0100 | [diff] [blame] | 234 | max77686->opmode[id] << shift); |
Yadwinder Singh Brar | 6d2c896 | 2012-10-16 17:24:18 +0530 | [diff] [blame] | 235 | } |
| 236 | |
Yadwinder Singh Brar | f503071 | 2012-06-20 10:50:51 +0530 | [diff] [blame] | 237 | static int max77686_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay) |
| 238 | { |
| 239 | unsigned int ramp_value = RAMP_RATE_NO_CTRL; |
| 240 | |
| 241 | switch (ramp_delay) { |
| 242 | case 1 ... 13750: |
| 243 | ramp_value = RAMP_RATE_13P75MV; |
| 244 | break; |
| 245 | case 13751 ... 27500: |
| 246 | ramp_value = RAMP_RATE_27P5MV; |
| 247 | break; |
| 248 | case 27501 ... 55000: |
| 249 | ramp_value = RAMP_RATE_55MV; |
| 250 | break; |
| 251 | case 55001 ... 100000: |
| 252 | break; |
| 253 | default: |
| 254 | pr_warn("%s: ramp_delay: %d not supported, setting 100000\n", |
| 255 | rdev->desc->name, ramp_delay); |
| 256 | } |
| 257 | |
| 258 | return regmap_update_bits(rdev->regmap, rdev->desc->enable_reg, |
| 259 | MAX77686_RAMP_RATE_MASK, ramp_value << 6); |
| 260 | } |
| 261 | |
Krzysztof Kozlowski | 3307e90 | 2015-01-05 12:48:43 +0100 | [diff] [blame] | 262 | static int max77686_of_parse_cb(struct device_node *np, |
| 263 | const struct regulator_desc *desc, |
| 264 | struct regulator_config *config) |
| 265 | { |
| 266 | struct max77686_data *max77686 = config->driver_data; |
| 267 | |
| 268 | switch (desc->id) { |
| 269 | case MAX77686_BUCK8: |
| 270 | case MAX77686_BUCK9: |
| 271 | case MAX77686_LDO20 ... MAX77686_LDO22: |
| 272 | config->ena_gpio = of_get_named_gpio(np, |
| 273 | "maxim,ena-gpios", 0); |
| 274 | config->ena_gpio_flags = GPIOF_OUT_INIT_HIGH; |
| 275 | config->ena_gpio_initialized = true; |
| 276 | break; |
| 277 | default: |
| 278 | return 0; |
| 279 | } |
| 280 | |
| 281 | if (gpio_is_valid(config->ena_gpio)) { |
Joe Perches | c53403a | 2015-05-18 10:01:03 -0700 | [diff] [blame] | 282 | set_bit(desc->id, max77686->gpio_enabled); |
Krzysztof Kozlowski | 3307e90 | 2015-01-05 12:48:43 +0100 | [diff] [blame] | 283 | |
| 284 | return regmap_update_bits(config->regmap, desc->enable_reg, |
| 285 | desc->enable_mask, |
| 286 | MAX77686_GPIO_CONTROL); |
| 287 | } |
| 288 | |
| 289 | return 0; |
| 290 | } |
| 291 | |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 292 | static struct regulator_ops max77686_ops = { |
| 293 | .list_voltage = regulator_list_voltage_linear, |
Axel Lin | 2e3f7f2 | 2012-06-03 22:46:14 +0800 | [diff] [blame] | 294 | .map_voltage = regulator_map_voltage_linear, |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 295 | .is_enabled = regulator_is_enabled_regmap, |
Yadwinder Singh Brar | 6d2c896 | 2012-10-16 17:24:18 +0530 | [diff] [blame] | 296 | .enable = max77686_enable, |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 297 | .disable = regulator_disable_regmap, |
| 298 | .get_voltage_sel = regulator_get_voltage_sel_regmap, |
| 299 | .set_voltage_sel = regulator_set_voltage_sel_regmap, |
Yadwinder Singh Brar | 852abad | 2012-06-19 13:23:42 +0530 | [diff] [blame] | 300 | .set_voltage_time_sel = regulator_set_voltage_time_sel, |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 301 | .set_suspend_mode = max77686_set_suspend_mode, |
| 302 | }; |
| 303 | |
| 304 | static struct regulator_ops max77686_ldo_ops = { |
| 305 | .list_voltage = regulator_list_voltage_linear, |
| 306 | .map_voltage = regulator_map_voltage_linear, |
| 307 | .is_enabled = regulator_is_enabled_regmap, |
| 308 | .enable = max77686_enable, |
| 309 | .disable = regulator_disable_regmap, |
| 310 | .get_voltage_sel = regulator_get_voltage_sel_regmap, |
| 311 | .set_voltage_sel = regulator_set_voltage_sel_regmap, |
| 312 | .set_voltage_time_sel = regulator_set_voltage_time_sel, |
| 313 | .set_suspend_mode = max77686_ldo_set_suspend_mode, |
Krzysztof Kozlowski | 78ce612 | 2014-10-29 12:14:52 +0100 | [diff] [blame] | 314 | .set_suspend_disable = max77686_set_suspend_disable, |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 315 | }; |
| 316 | |
| 317 | static struct regulator_ops max77686_buck1_ops = { |
| 318 | .list_voltage = regulator_list_voltage_linear, |
| 319 | .map_voltage = regulator_map_voltage_linear, |
| 320 | .is_enabled = regulator_is_enabled_regmap, |
| 321 | .enable = max77686_enable, |
| 322 | .disable = regulator_disable_regmap, |
| 323 | .get_voltage_sel = regulator_get_voltage_sel_regmap, |
| 324 | .set_voltage_sel = regulator_set_voltage_sel_regmap, |
| 325 | .set_voltage_time_sel = regulator_set_voltage_time_sel, |
Krzysztof Kozlowski | 78ce612 | 2014-10-29 12:14:52 +0100 | [diff] [blame] | 326 | .set_suspend_disable = max77686_set_suspend_disable, |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 327 | }; |
| 328 | |
| 329 | static struct regulator_ops max77686_buck_dvs_ops = { |
| 330 | .list_voltage = regulator_list_voltage_linear, |
Axel Lin | 2e3f7f2 | 2012-06-03 22:46:14 +0800 | [diff] [blame] | 331 | .map_voltage = regulator_map_voltage_linear, |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 332 | .is_enabled = regulator_is_enabled_regmap, |
Yadwinder Singh Brar | 6d2c896 | 2012-10-16 17:24:18 +0530 | [diff] [blame] | 333 | .enable = max77686_enable, |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 334 | .disable = regulator_disable_regmap, |
| 335 | .get_voltage_sel = regulator_get_voltage_sel_regmap, |
| 336 | .set_voltage_sel = regulator_set_voltage_sel_regmap, |
Yadwinder Singh Brar | 852abad | 2012-06-19 13:23:42 +0530 | [diff] [blame] | 337 | .set_voltage_time_sel = regulator_set_voltage_time_sel, |
Yadwinder Singh Brar | f503071 | 2012-06-20 10:50:51 +0530 | [diff] [blame] | 338 | .set_ramp_delay = max77686_set_ramp_delay, |
Krzysztof Kozlowski | 78ce612 | 2014-10-29 12:14:52 +0100 | [diff] [blame] | 339 | .set_suspend_disable = max77686_set_suspend_disable, |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 340 | }; |
| 341 | |
| 342 | #define regulator_desc_ldo(num) { \ |
| 343 | .name = "LDO"#num, \ |
Krzysztof Kozlowski | 0480395 | 2014-11-05 10:47:50 +0100 | [diff] [blame] | 344 | .of_match = of_match_ptr("LDO"#num), \ |
| 345 | .regulators_node = of_match_ptr("voltage-regulators"), \ |
Krzysztof Kozlowski | 3307e90 | 2015-01-05 12:48:43 +0100 | [diff] [blame] | 346 | .of_parse_cb = max77686_of_parse_cb, \ |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 347 | .id = MAX77686_LDO##num, \ |
| 348 | .ops = &max77686_ops, \ |
| 349 | .type = REGULATOR_VOLTAGE, \ |
| 350 | .owner = THIS_MODULE, \ |
| 351 | .min_uV = MAX77686_LDO_MINUV, \ |
| 352 | .uV_step = MAX77686_LDO_UVSTEP, \ |
Yadwinder Singh Brar | 852abad | 2012-06-19 13:23:42 +0530 | [diff] [blame] | 353 | .ramp_delay = MAX77686_RAMP_DELAY, \ |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 354 | .n_voltages = MAX77686_VSEL_MASK + 1, \ |
| 355 | .vsel_reg = MAX77686_REG_LDO1CTRL1 + num - 1, \ |
| 356 | .vsel_mask = MAX77686_VSEL_MASK, \ |
| 357 | .enable_reg = MAX77686_REG_LDO1CTRL1 + num - 1, \ |
| 358 | .enable_mask = MAX77686_OPMODE_MASK \ |
| 359 | << MAX77686_OPMODE_SHIFT, \ |
| 360 | } |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 361 | #define regulator_desc_lpm_ldo(num) { \ |
| 362 | .name = "LDO"#num, \ |
Krzysztof Kozlowski | 0480395 | 2014-11-05 10:47:50 +0100 | [diff] [blame] | 363 | .of_match = of_match_ptr("LDO"#num), \ |
| 364 | .regulators_node = of_match_ptr("voltage-regulators"), \ |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 365 | .id = MAX77686_LDO##num, \ |
| 366 | .ops = &max77686_ldo_ops, \ |
| 367 | .type = REGULATOR_VOLTAGE, \ |
| 368 | .owner = THIS_MODULE, \ |
| 369 | .min_uV = MAX77686_LDO_MINUV, \ |
| 370 | .uV_step = MAX77686_LDO_UVSTEP, \ |
| 371 | .ramp_delay = MAX77686_RAMP_DELAY, \ |
| 372 | .n_voltages = MAX77686_VSEL_MASK + 1, \ |
| 373 | .vsel_reg = MAX77686_REG_LDO1CTRL1 + num - 1, \ |
| 374 | .vsel_mask = MAX77686_VSEL_MASK, \ |
| 375 | .enable_reg = MAX77686_REG_LDO1CTRL1 + num - 1, \ |
| 376 | .enable_mask = MAX77686_OPMODE_MASK \ |
| 377 | << MAX77686_OPMODE_SHIFT, \ |
| 378 | } |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 379 | #define regulator_desc_ldo_low(num) { \ |
| 380 | .name = "LDO"#num, \ |
Krzysztof Kozlowski | 0480395 | 2014-11-05 10:47:50 +0100 | [diff] [blame] | 381 | .of_match = of_match_ptr("LDO"#num), \ |
| 382 | .regulators_node = of_match_ptr("voltage-regulators"), \ |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 383 | .id = MAX77686_LDO##num, \ |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 384 | .ops = &max77686_ldo_ops, \ |
| 385 | .type = REGULATOR_VOLTAGE, \ |
| 386 | .owner = THIS_MODULE, \ |
| 387 | .min_uV = MAX77686_LDO_LOW_MINUV, \ |
| 388 | .uV_step = MAX77686_LDO_LOW_UVSTEP, \ |
| 389 | .ramp_delay = MAX77686_RAMP_DELAY, \ |
| 390 | .n_voltages = MAX77686_VSEL_MASK + 1, \ |
| 391 | .vsel_reg = MAX77686_REG_LDO1CTRL1 + num - 1, \ |
| 392 | .vsel_mask = MAX77686_VSEL_MASK, \ |
| 393 | .enable_reg = MAX77686_REG_LDO1CTRL1 + num - 1, \ |
| 394 | .enable_mask = MAX77686_OPMODE_MASK \ |
| 395 | << MAX77686_OPMODE_SHIFT, \ |
| 396 | } |
| 397 | #define regulator_desc_ldo1_low(num) { \ |
| 398 | .name = "LDO"#num, \ |
Krzysztof Kozlowski | 0480395 | 2014-11-05 10:47:50 +0100 | [diff] [blame] | 399 | .of_match = of_match_ptr("LDO"#num), \ |
| 400 | .regulators_node = of_match_ptr("voltage-regulators"), \ |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 401 | .id = MAX77686_LDO##num, \ |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 402 | .ops = &max77686_ops, \ |
| 403 | .type = REGULATOR_VOLTAGE, \ |
| 404 | .owner = THIS_MODULE, \ |
| 405 | .min_uV = MAX77686_LDO_LOW_MINUV, \ |
| 406 | .uV_step = MAX77686_LDO_LOW_UVSTEP, \ |
Yadwinder Singh Brar | 852abad | 2012-06-19 13:23:42 +0530 | [diff] [blame] | 407 | .ramp_delay = MAX77686_RAMP_DELAY, \ |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 408 | .n_voltages = MAX77686_VSEL_MASK + 1, \ |
| 409 | .vsel_reg = MAX77686_REG_LDO1CTRL1 + num - 1, \ |
| 410 | .vsel_mask = MAX77686_VSEL_MASK, \ |
| 411 | .enable_reg = MAX77686_REG_LDO1CTRL1 + num - 1, \ |
| 412 | .enable_mask = MAX77686_OPMODE_MASK \ |
| 413 | << MAX77686_OPMODE_SHIFT, \ |
| 414 | } |
| 415 | #define regulator_desc_buck(num) { \ |
| 416 | .name = "BUCK"#num, \ |
Krzysztof Kozlowski | 0480395 | 2014-11-05 10:47:50 +0100 | [diff] [blame] | 417 | .of_match = of_match_ptr("BUCK"#num), \ |
| 418 | .regulators_node = of_match_ptr("voltage-regulators"), \ |
Krzysztof Kozlowski | 3307e90 | 2015-01-05 12:48:43 +0100 | [diff] [blame] | 419 | .of_parse_cb = max77686_of_parse_cb, \ |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 420 | .id = MAX77686_BUCK##num, \ |
| 421 | .ops = &max77686_ops, \ |
| 422 | .type = REGULATOR_VOLTAGE, \ |
| 423 | .owner = THIS_MODULE, \ |
| 424 | .min_uV = MAX77686_BUCK_MINUV, \ |
| 425 | .uV_step = MAX77686_BUCK_UVSTEP, \ |
Yadwinder Singh Brar | 852abad | 2012-06-19 13:23:42 +0530 | [diff] [blame] | 426 | .ramp_delay = MAX77686_RAMP_DELAY, \ |
Krzysztof Kozlowski | a959730 | 2016-04-29 12:59:51 +0200 | [diff] [blame] | 427 | .enable_time = MAX77686_BUCK_ENABLE_TIME, \ |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 428 | .n_voltages = MAX77686_VSEL_MASK + 1, \ |
| 429 | .vsel_reg = MAX77686_REG_BUCK5OUT + (num - 5) * 2, \ |
| 430 | .vsel_mask = MAX77686_VSEL_MASK, \ |
| 431 | .enable_reg = MAX77686_REG_BUCK5CTRL + (num - 5) * 2, \ |
| 432 | .enable_mask = MAX77686_OPMODE_MASK, \ |
| 433 | } |
| 434 | #define regulator_desc_buck1(num) { \ |
| 435 | .name = "BUCK"#num, \ |
Krzysztof Kozlowski | 0480395 | 2014-11-05 10:47:50 +0100 | [diff] [blame] | 436 | .of_match = of_match_ptr("BUCK"#num), \ |
| 437 | .regulators_node = of_match_ptr("voltage-regulators"), \ |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 438 | .id = MAX77686_BUCK##num, \ |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 439 | .ops = &max77686_buck1_ops, \ |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 440 | .type = REGULATOR_VOLTAGE, \ |
| 441 | .owner = THIS_MODULE, \ |
| 442 | .min_uV = MAX77686_BUCK_MINUV, \ |
| 443 | .uV_step = MAX77686_BUCK_UVSTEP, \ |
Yadwinder Singh Brar | 852abad | 2012-06-19 13:23:42 +0530 | [diff] [blame] | 444 | .ramp_delay = MAX77686_RAMP_DELAY, \ |
Krzysztof Kozlowski | a959730 | 2016-04-29 12:59:51 +0200 | [diff] [blame] | 445 | .enable_time = MAX77686_BUCK_ENABLE_TIME, \ |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 446 | .n_voltages = MAX77686_VSEL_MASK + 1, \ |
| 447 | .vsel_reg = MAX77686_REG_BUCK1OUT, \ |
| 448 | .vsel_mask = MAX77686_VSEL_MASK, \ |
| 449 | .enable_reg = MAX77686_REG_BUCK1CTRL, \ |
| 450 | .enable_mask = MAX77686_OPMODE_MASK, \ |
| 451 | } |
| 452 | #define regulator_desc_buck_dvs(num) { \ |
| 453 | .name = "BUCK"#num, \ |
Krzysztof Kozlowski | 0480395 | 2014-11-05 10:47:50 +0100 | [diff] [blame] | 454 | .of_match = of_match_ptr("BUCK"#num), \ |
| 455 | .regulators_node = of_match_ptr("voltage-regulators"), \ |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 456 | .id = MAX77686_BUCK##num, \ |
Axel Lin | 74adfee5 | 2012-06-04 10:19:18 +0800 | [diff] [blame] | 457 | .ops = &max77686_buck_dvs_ops, \ |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 458 | .type = REGULATOR_VOLTAGE, \ |
| 459 | .owner = THIS_MODULE, \ |
| 460 | .min_uV = MAX77686_DVS_MINUV, \ |
| 461 | .uV_step = MAX77686_DVS_UVSTEP, \ |
Yadwinder Singh Brar | 852abad | 2012-06-19 13:23:42 +0530 | [diff] [blame] | 462 | .ramp_delay = MAX77686_DVS_RAMP_DELAY, \ |
Krzysztof Kozlowski | a959730 | 2016-04-29 12:59:51 +0200 | [diff] [blame] | 463 | .enable_time = MAX77686_DVS_ENABLE_TIME, \ |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 464 | .n_voltages = MAX77686_DVS_VSEL_MASK + 1, \ |
| 465 | .vsel_reg = MAX77686_REG_BUCK2DVS1 + (num - 2) * 10, \ |
| 466 | .vsel_mask = MAX77686_DVS_VSEL_MASK, \ |
| 467 | .enable_reg = MAX77686_REG_BUCK2CTRL1 + (num - 2) * 10, \ |
| 468 | .enable_mask = MAX77686_OPMODE_MASK \ |
| 469 | << MAX77686_OPMODE_BUCK234_SHIFT, \ |
| 470 | } |
| 471 | |
Krzysztof Kozlowski | 73dbdf8 | 2014-10-27 16:03:42 +0100 | [diff] [blame] | 472 | static const struct regulator_desc regulators[] = { |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 473 | regulator_desc_ldo1_low(1), |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 474 | regulator_desc_ldo_low(2), |
| 475 | regulator_desc_ldo(3), |
| 476 | regulator_desc_ldo(4), |
| 477 | regulator_desc_ldo(5), |
| 478 | regulator_desc_ldo_low(6), |
| 479 | regulator_desc_ldo_low(7), |
| 480 | regulator_desc_ldo_low(8), |
| 481 | regulator_desc_ldo(9), |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 482 | regulator_desc_lpm_ldo(10), |
| 483 | regulator_desc_lpm_ldo(11), |
| 484 | regulator_desc_lpm_ldo(12), |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 485 | regulator_desc_ldo(13), |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 486 | regulator_desc_lpm_ldo(14), |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 487 | regulator_desc_ldo_low(15), |
Yadwinder Singh Brar | 15282ba | 2012-10-16 17:24:19 +0530 | [diff] [blame] | 488 | regulator_desc_lpm_ldo(16), |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 489 | regulator_desc_ldo(17), |
| 490 | regulator_desc_ldo(18), |
| 491 | regulator_desc_ldo(19), |
| 492 | regulator_desc_ldo(20), |
| 493 | regulator_desc_ldo(21), |
| 494 | regulator_desc_ldo(22), |
| 495 | regulator_desc_ldo(23), |
| 496 | regulator_desc_ldo(24), |
| 497 | regulator_desc_ldo(25), |
| 498 | regulator_desc_ldo(26), |
| 499 | regulator_desc_buck1(1), |
| 500 | regulator_desc_buck_dvs(2), |
| 501 | regulator_desc_buck_dvs(3), |
| 502 | regulator_desc_buck_dvs(4), |
| 503 | regulator_desc_buck(5), |
| 504 | regulator_desc_buck(6), |
| 505 | regulator_desc_buck(7), |
| 506 | regulator_desc_buck(8), |
| 507 | regulator_desc_buck(9), |
| 508 | }; |
| 509 | |
Bill Pemberton | a502357 | 2012-11-19 13:22:22 -0500 | [diff] [blame] | 510 | static int max77686_pmic_probe(struct platform_device *pdev) |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 511 | { |
| 512 | struct max77686_dev *iodev = dev_get_drvdata(pdev->dev.parent); |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 513 | struct max77686_data *max77686; |
Krzysztof Kozlowski | 0480395 | 2014-11-05 10:47:50 +0100 | [diff] [blame] | 514 | int i; |
Axel Lin | c59d2a6 | 2012-06-20 15:01:25 +0800 | [diff] [blame] | 515 | struct regulator_config config = { }; |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 516 | |
| 517 | dev_dbg(&pdev->dev, "%s\n", __func__); |
| 518 | |
| 519 | max77686 = devm_kzalloc(&pdev->dev, sizeof(struct max77686_data), |
| 520 | GFP_KERNEL); |
| 521 | if (!max77686) |
| 522 | return -ENOMEM; |
| 523 | |
Krzysztof Kozlowski | 0480395 | 2014-11-05 10:47:50 +0100 | [diff] [blame] | 524 | config.dev = iodev->dev; |
Yadwinder Singh Brar | f503071 | 2012-06-20 10:50:51 +0530 | [diff] [blame] | 525 | config.regmap = iodev->regmap; |
Yadwinder Singh Brar | 6d2c896 | 2012-10-16 17:24:18 +0530 | [diff] [blame] | 526 | config.driver_data = max77686; |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 527 | platform_set_drvdata(pdev, max77686); |
| 528 | |
Axel Lin | ab0d1cb | 2012-06-08 12:03:04 +0800 | [diff] [blame] | 529 | for (i = 0; i < MAX77686_REGULATORS; i++) { |
Krzysztof Kozlowski | b0c13e8 | 2014-03-10 09:32:45 +0100 | [diff] [blame] | 530 | struct regulator_dev *rdev; |
Krzysztof Kozlowski | eca29da | 2014-11-04 09:49:41 +0100 | [diff] [blame] | 531 | int id = regulators[i].id; |
Krzysztof Kozlowski | b0c13e8 | 2014-03-10 09:32:45 +0100 | [diff] [blame] | 532 | |
Krzysztof Kozlowski | 4524df8 | 2014-11-04 09:49:42 +0100 | [diff] [blame] | 533 | max77686->opmode[id] = MAX77686_NORMAL; |
Krzysztof Kozlowski | b0c13e8 | 2014-03-10 09:32:45 +0100 | [diff] [blame] | 534 | rdev = devm_regulator_register(&pdev->dev, |
Sachin Kamat | 44815b4 | 2013-09-04 11:07:54 +0530 | [diff] [blame] | 535 | ®ulators[i], &config); |
Krzysztof Kozlowski | b0c13e8 | 2014-03-10 09:32:45 +0100 | [diff] [blame] | 536 | if (IS_ERR(rdev)) { |
Krzysztof Kozlowski | 0480395 | 2014-11-05 10:47:50 +0100 | [diff] [blame] | 537 | int ret = PTR_ERR(rdev); |
Yadwinder Singh Brar | f503071 | 2012-06-20 10:50:51 +0530 | [diff] [blame] | 538 | dev_err(&pdev->dev, |
Krzysztof Kozlowski | 0480395 | 2014-11-05 10:47:50 +0100 | [diff] [blame] | 539 | "regulator init failed for %d: %d\n", i, ret); |
| 540 | return ret; |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 541 | } |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 542 | } |
Axel Lin | ab0d1cb | 2012-06-08 12:03:04 +0800 | [diff] [blame] | 543 | |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 544 | return 0; |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 545 | } |
| 546 | |
| 547 | static const struct platform_device_id max77686_pmic_id[] = { |
| 548 | {"max77686-pmic", 0}, |
| 549 | { }, |
| 550 | }; |
| 551 | MODULE_DEVICE_TABLE(platform, max77686_pmic_id); |
| 552 | |
| 553 | static struct platform_driver max77686_pmic_driver = { |
| 554 | .driver = { |
| 555 | .name = "max77686-pmic", |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 556 | }, |
| 557 | .probe = max77686_pmic_probe, |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 558 | .id_table = max77686_pmic_id, |
| 559 | }; |
| 560 | |
Javier Martinez Canillas | 314a820 | 2016-04-06 09:49:47 -0400 | [diff] [blame] | 561 | module_platform_driver(max77686_pmic_driver); |
Jonghwa Lee | 133d401 | 2012-06-01 13:17:14 +0900 | [diff] [blame] | 562 | |
| 563 | MODULE_DESCRIPTION("MAXIM 77686 Regulator Driver"); |
| 564 | MODULE_AUTHOR("Chiwoong Byun <woong.byun@samsung.com>"); |
| 565 | MODULE_LICENSE("GPL"); |