Blame view

drivers/regulator/max77650-regulator.c 12.7 KB
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
1
2
3
4
5
6
  // SPDX-License-Identifier: GPL-2.0
  //
  // Copyright (C) 2018 BayLibre SAS
  // Author: Bartosz Golaszewski <bgolaszewski@baylibre.com>
  //
  // Regulator driver for MAXIM 77650/77651 charger/power-supply.
5358db547   Axel Lin   regulator: max776...
7
  #include <linux/of.h>
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  #include <linux/mfd/max77650.h>
  #include <linux/module.h>
  #include <linux/platform_device.h>
  #include <linux/regmap.h>
  #include <linux/regulator/driver.h>
  
  #define MAX77650_REGULATOR_EN_CTRL_MASK		GENMASK(3, 0)
  #define MAX77650_REGULATOR_EN_CTRL_BITS(_reg) \
  		((_reg) & MAX77650_REGULATOR_EN_CTRL_MASK)
  #define MAX77650_REGULATOR_ENABLED		GENMASK(2, 1)
  #define MAX77650_REGULATOR_DISABLED		BIT(2)
  
  #define MAX77650_REGULATOR_V_LDO_MASK		GENMASK(6, 0)
  #define MAX77650_REGULATOR_V_SBB_MASK		GENMASK(5, 0)
3df4235ac   Axel Lin   regulator: max776...
22
23
  #define MAX77651_REGULATOR_V_SBB1_MASK		GENMASK(5, 2)
  #define MAX77651_REGULATOR_V_SBB1_RANGE_MASK	GENMASK(1, 0)
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
24
25
26
27
28
29
  
  #define MAX77650_REGULATOR_AD_MASK		BIT(3)
  #define MAX77650_REGULATOR_AD_DISABLED		0x00
  #define MAX77650_REGULATOR_AD_ENABLED		BIT(3)
  
  #define MAX77650_REGULATOR_CURR_LIM_MASK	GENMASK(7, 6)
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
30
31
32
33
34
35
36
37
38
39
40
41
42
43
  
  enum {
  	MAX77650_REGULATOR_ID_LDO = 0,
  	MAX77650_REGULATOR_ID_SBB0,
  	MAX77650_REGULATOR_ID_SBB1,
  	MAX77650_REGULATOR_ID_SBB2,
  	MAX77650_REGULATOR_NUM_REGULATORS,
  };
  
  struct max77650_regulator_desc {
  	struct regulator_desc desc;
  	unsigned int regA;
  	unsigned int regB;
  };
59dec1f0f   Nathan Chancellor   regulator: max776...
44
  static struct max77650_regulator_desc max77651_SBB1_desc;
3df4235ac   Axel Lin   regulator: max776...
45
46
  static const unsigned int max77651_sbb1_volt_range_sel[] = {
  	0x0, 0x1, 0x2, 0x3
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
47
  };
60ab7f415   Matti Vaittinen   regulator: use li...
48
  static const struct linear_range max77651_sbb1_volt_ranges[] = {
3df4235ac   Axel Lin   regulator: max776...
49
50
51
52
53
54
55
56
57
  	/* range index 0 */
  	REGULATOR_LINEAR_RANGE(2400000, 0x00, 0x0f, 50000),
  	/* range index 1 */
  	REGULATOR_LINEAR_RANGE(3200000, 0x00, 0x0f, 50000),
  	/* range index 2 */
  	REGULATOR_LINEAR_RANGE(4000000, 0x00, 0x0f, 50000),
  	/* range index 3 */
  	REGULATOR_LINEAR_RANGE(4800000, 0x00, 0x09, 50000),
  };
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
58

6c98ac2a3   Axel Lin   regulator: max776...
59
  static const unsigned int max77650_current_limit_table[] = {
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
  	1000000, 866000, 707000, 500000,
  };
  
  static int max77650_regulator_is_enabled(struct regulator_dev *rdev)
  {
  	struct max77650_regulator_desc *rdesc;
  	struct regmap *map;
  	int val, rv, en;
  
  	rdesc = rdev_get_drvdata(rdev);
  	map = rdev_get_regmap(rdev);
  
  	rv = regmap_read(map, rdesc->regB, &val);
  	if (rv)
  		return rv;
  
  	en = MAX77650_REGULATOR_EN_CTRL_BITS(val);
  
  	return en != MAX77650_REGULATOR_DISABLED;
  }
  
  static int max77650_regulator_enable(struct regulator_dev *rdev)
  {
  	struct max77650_regulator_desc *rdesc;
  	struct regmap *map;
  
  	rdesc = rdev_get_drvdata(rdev);
  	map = rdev_get_regmap(rdev);
  
  	return regmap_update_bits(map, rdesc->regB,
  				  MAX77650_REGULATOR_EN_CTRL_MASK,
  				  MAX77650_REGULATOR_ENABLED);
  }
  
  static int max77650_regulator_disable(struct regulator_dev *rdev)
  {
  	struct max77650_regulator_desc *rdesc;
  	struct regmap *map;
  
  	rdesc = rdev_get_drvdata(rdev);
  	map = rdev_get_regmap(rdev);
  
  	return regmap_update_bits(map, rdesc->regB,
  				  MAX77650_REGULATOR_EN_CTRL_MASK,
  				  MAX77650_REGULATOR_DISABLED);
  }
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
106
107
108
109
110
111
112
  static const struct regulator_ops max77650_regulator_LDO_ops = {
  	.is_enabled		= max77650_regulator_is_enabled,
  	.enable			= max77650_regulator_enable,
  	.disable		= max77650_regulator_disable,
  	.list_voltage		= regulator_list_voltage_linear,
  	.map_voltage		= regulator_map_voltage_linear,
  	.get_voltage_sel	= regulator_get_voltage_sel_regmap,
3c7577d44   Bartosz Golaszewski   regulator: max776...
113
  	.set_voltage_sel	= regulator_set_voltage_sel_regmap,
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
114
115
116
117
118
119
120
121
122
123
  	.set_active_discharge	= regulator_set_active_discharge_regmap,
  };
  
  static const struct regulator_ops max77650_regulator_SBB_ops = {
  	.is_enabled		= max77650_regulator_is_enabled,
  	.enable			= max77650_regulator_enable,
  	.disable		= max77650_regulator_disable,
  	.list_voltage		= regulator_list_voltage_linear,
  	.map_voltage		= regulator_map_voltage_linear,
  	.get_voltage_sel	= regulator_get_voltage_sel_regmap,
3c7577d44   Bartosz Golaszewski   regulator: max776...
124
  	.set_voltage_sel	= regulator_set_voltage_sel_regmap,
6c98ac2a3   Axel Lin   regulator: max776...
125
126
  	.get_current_limit	= regulator_get_current_limit_regmap,
  	.set_current_limit	= regulator_set_current_limit_regmap,
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
127
128
  	.set_active_discharge	= regulator_set_active_discharge_regmap,
  };
3df4235ac   Axel Lin   regulator: max776...
129
  /* Special case for max77651 SBB1 - pickable linear-range voltage mapping. */
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
130
131
132
133
  static const struct regulator_ops max77651_SBB1_regulator_ops = {
  	.is_enabled		= max77650_regulator_is_enabled,
  	.enable			= max77650_regulator_enable,
  	.disable		= max77650_regulator_disable,
3df4235ac   Axel Lin   regulator: max776...
134
135
  	.list_voltage		= regulator_list_voltage_pickable_linear_range,
  	.get_voltage_sel	= regulator_get_voltage_sel_pickable_regmap,
3c7577d44   Bartosz Golaszewski   regulator: max776...
136
  	.set_voltage_sel	= regulator_set_voltage_sel_pickable_regmap,
6c98ac2a3   Axel Lin   regulator: max776...
137
138
  	.get_current_limit	= regulator_get_current_limit_regmap,
  	.set_current_limit	= regulator_set_current_limit_regmap,
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
139
140
141
142
143
144
145
146
147
148
149
150
151
152
  	.set_active_discharge	= regulator_set_active_discharge_regmap,
  };
  
  static struct max77650_regulator_desc max77650_LDO_desc = {
  	.desc = {
  		.name			= "ldo",
  		.of_match		= of_match_ptr("ldo"),
  		.regulators_node	= of_match_ptr("regulators"),
  		.supply_name		= "in-ldo",
  		.id			= MAX77650_REGULATOR_ID_LDO,
  		.ops			= &max77650_regulator_LDO_ops,
  		.min_uV			= 1350000,
  		.uV_step		= 12500,
  		.n_voltages		= 128,
3c7577d44   Bartosz Golaszewski   regulator: max776...
153
  		.vsel_step		= 1,
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
154
155
156
157
158
159
160
161
  		.vsel_mask		= MAX77650_REGULATOR_V_LDO_MASK,
  		.vsel_reg		= MAX77650_REG_CNFG_LDO_A,
  		.active_discharge_off	= MAX77650_REGULATOR_AD_DISABLED,
  		.active_discharge_on	= MAX77650_REGULATOR_AD_ENABLED,
  		.active_discharge_mask	= MAX77650_REGULATOR_AD_MASK,
  		.active_discharge_reg	= MAX77650_REG_CNFG_LDO_B,
  		.enable_time		= 100,
  		.type			= REGULATOR_VOLTAGE,
721efb504   Axel Lin   regulator: max776...
162
  		.owner			= THIS_MODULE,
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
  	},
  	.regA		= MAX77650_REG_CNFG_LDO_A,
  	.regB		= MAX77650_REG_CNFG_LDO_B,
  };
  
  static struct max77650_regulator_desc max77650_SBB0_desc = {
  	.desc = {
  		.name			= "sbb0",
  		.of_match		= of_match_ptr("sbb0"),
  		.regulators_node	= of_match_ptr("regulators"),
  		.supply_name		= "in-sbb0",
  		.id			= MAX77650_REGULATOR_ID_SBB0,
  		.ops			= &max77650_regulator_SBB_ops,
  		.min_uV			= 800000,
  		.uV_step		= 25000,
  		.n_voltages		= 64,
3c7577d44   Bartosz Golaszewski   regulator: max776...
179
  		.vsel_step		= 1,
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
180
181
182
183
184
185
186
187
  		.vsel_mask		= MAX77650_REGULATOR_V_SBB_MASK,
  		.vsel_reg		= MAX77650_REG_CNFG_SBB0_A,
  		.active_discharge_off	= MAX77650_REGULATOR_AD_DISABLED,
  		.active_discharge_on	= MAX77650_REGULATOR_AD_ENABLED,
  		.active_discharge_mask	= MAX77650_REGULATOR_AD_MASK,
  		.active_discharge_reg	= MAX77650_REG_CNFG_SBB0_B,
  		.enable_time		= 100,
  		.type			= REGULATOR_VOLTAGE,
721efb504   Axel Lin   regulator: max776...
188
  		.owner			= THIS_MODULE,
6c98ac2a3   Axel Lin   regulator: max776...
189
190
191
192
  		.csel_reg		= MAX77650_REG_CNFG_SBB0_A,
  		.csel_mask		= MAX77650_REGULATOR_CURR_LIM_MASK,
  		.curr_table		= max77650_current_limit_table,
  		.n_current_limits = ARRAY_SIZE(max77650_current_limit_table),
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
  	},
  	.regA		= MAX77650_REG_CNFG_SBB0_A,
  	.regB		= MAX77650_REG_CNFG_SBB0_B,
  };
  
  static struct max77650_regulator_desc max77650_SBB1_desc = {
  	.desc = {
  		.name			= "sbb1",
  		.of_match		= of_match_ptr("sbb1"),
  		.regulators_node	= of_match_ptr("regulators"),
  		.supply_name		= "in-sbb1",
  		.id			= MAX77650_REGULATOR_ID_SBB1,
  		.ops			= &max77650_regulator_SBB_ops,
  		.min_uV			= 800000,
  		.uV_step		= 12500,
  		.n_voltages		= 64,
3c7577d44   Bartosz Golaszewski   regulator: max776...
209
  		.vsel_step		= 1,
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
210
211
212
213
214
215
216
217
  		.vsel_mask		= MAX77650_REGULATOR_V_SBB_MASK,
  		.vsel_reg		= MAX77650_REG_CNFG_SBB1_A,
  		.active_discharge_off	= MAX77650_REGULATOR_AD_DISABLED,
  		.active_discharge_on	= MAX77650_REGULATOR_AD_ENABLED,
  		.active_discharge_mask	= MAX77650_REGULATOR_AD_MASK,
  		.active_discharge_reg	= MAX77650_REG_CNFG_SBB1_B,
  		.enable_time		= 100,
  		.type			= REGULATOR_VOLTAGE,
721efb504   Axel Lin   regulator: max776...
218
  		.owner			= THIS_MODULE,
6c98ac2a3   Axel Lin   regulator: max776...
219
220
221
222
  		.csel_reg		= MAX77650_REG_CNFG_SBB1_A,
  		.csel_mask		= MAX77650_REGULATOR_CURR_LIM_MASK,
  		.curr_table		= max77650_current_limit_table,
  		.n_current_limits = ARRAY_SIZE(max77650_current_limit_table),
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
223
224
225
226
227
228
229
230
231
232
233
234
235
  	},
  	.regA		= MAX77650_REG_CNFG_SBB1_A,
  	.regB		= MAX77650_REG_CNFG_SBB1_B,
  };
  
  static struct max77650_regulator_desc max77651_SBB1_desc = {
  	.desc = {
  		.name			= "sbb1",
  		.of_match		= of_match_ptr("sbb1"),
  		.regulators_node	= of_match_ptr("regulators"),
  		.supply_name		= "in-sbb1",
  		.id			= MAX77650_REGULATOR_ID_SBB1,
  		.ops			= &max77651_SBB1_regulator_ops,
3df4235ac   Axel Lin   regulator: max776...
236
237
238
239
  		.linear_range_selectors	= max77651_sbb1_volt_range_sel,
  		.linear_ranges		= max77651_sbb1_volt_ranges,
  		.n_linear_ranges	= ARRAY_SIZE(max77651_sbb1_volt_ranges),
  		.n_voltages		= 58,
3c7577d44   Bartosz Golaszewski   regulator: max776...
240
  		.vsel_step		= 1,
3df4235ac   Axel Lin   regulator: max776...
241
242
243
  		.vsel_range_mask	= MAX77651_REGULATOR_V_SBB1_RANGE_MASK,
  		.vsel_range_reg		= MAX77650_REG_CNFG_SBB1_A,
  		.vsel_mask		= MAX77651_REGULATOR_V_SBB1_MASK,
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
244
245
246
247
248
249
250
  		.vsel_reg		= MAX77650_REG_CNFG_SBB1_A,
  		.active_discharge_off	= MAX77650_REGULATOR_AD_DISABLED,
  		.active_discharge_on	= MAX77650_REGULATOR_AD_ENABLED,
  		.active_discharge_mask	= MAX77650_REGULATOR_AD_MASK,
  		.active_discharge_reg	= MAX77650_REG_CNFG_SBB1_B,
  		.enable_time		= 100,
  		.type			= REGULATOR_VOLTAGE,
721efb504   Axel Lin   regulator: max776...
251
  		.owner			= THIS_MODULE,
6c98ac2a3   Axel Lin   regulator: max776...
252
253
254
255
  		.csel_reg		= MAX77650_REG_CNFG_SBB1_A,
  		.csel_mask		= MAX77650_REGULATOR_CURR_LIM_MASK,
  		.curr_table		= max77650_current_limit_table,
  		.n_current_limits = ARRAY_SIZE(max77650_current_limit_table),
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
  	},
  	.regA		= MAX77650_REG_CNFG_SBB1_A,
  	.regB		= MAX77650_REG_CNFG_SBB1_B,
  };
  
  static struct max77650_regulator_desc max77650_SBB2_desc = {
  	.desc = {
  		.name			= "sbb2",
  		.of_match		= of_match_ptr("sbb2"),
  		.regulators_node	= of_match_ptr("regulators"),
  		.supply_name		= "in-sbb0",
  		.id			= MAX77650_REGULATOR_ID_SBB2,
  		.ops			= &max77650_regulator_SBB_ops,
  		.min_uV			= 800000,
  		.uV_step		= 50000,
  		.n_voltages		= 64,
3c7577d44   Bartosz Golaszewski   regulator: max776...
272
  		.vsel_step		= 1,
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
273
274
275
276
277
278
279
280
  		.vsel_mask		= MAX77650_REGULATOR_V_SBB_MASK,
  		.vsel_reg		= MAX77650_REG_CNFG_SBB2_A,
  		.active_discharge_off	= MAX77650_REGULATOR_AD_DISABLED,
  		.active_discharge_on	= MAX77650_REGULATOR_AD_ENABLED,
  		.active_discharge_mask	= MAX77650_REGULATOR_AD_MASK,
  		.active_discharge_reg	= MAX77650_REG_CNFG_SBB2_B,
  		.enable_time		= 100,
  		.type			= REGULATOR_VOLTAGE,
721efb504   Axel Lin   regulator: max776...
281
  		.owner			= THIS_MODULE,
6c98ac2a3   Axel Lin   regulator: max776...
282
283
284
285
  		.csel_reg		= MAX77650_REG_CNFG_SBB2_A,
  		.csel_mask		= MAX77650_REGULATOR_CURR_LIM_MASK,
  		.curr_table		= max77650_current_limit_table,
  		.n_current_limits = ARRAY_SIZE(max77650_current_limit_table),
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
  	},
  	.regA		= MAX77650_REG_CNFG_SBB2_A,
  	.regB		= MAX77650_REG_CNFG_SBB2_B,
  };
  
  static struct max77650_regulator_desc max77651_SBB2_desc = {
  	.desc = {
  		.name			= "sbb2",
  		.of_match		= of_match_ptr("sbb2"),
  		.regulators_node	= of_match_ptr("regulators"),
  		.supply_name		= "in-sbb0",
  		.id			= MAX77650_REGULATOR_ID_SBB2,
  		.ops			= &max77650_regulator_SBB_ops,
  		.min_uV			= 2400000,
  		.uV_step		= 50000,
  		.n_voltages		= 64,
3c7577d44   Bartosz Golaszewski   regulator: max776...
302
  		.vsel_step		= 1,
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
303
304
305
306
307
308
309
310
  		.vsel_mask		= MAX77650_REGULATOR_V_SBB_MASK,
  		.vsel_reg		= MAX77650_REG_CNFG_SBB2_A,
  		.active_discharge_off	= MAX77650_REGULATOR_AD_DISABLED,
  		.active_discharge_on	= MAX77650_REGULATOR_AD_ENABLED,
  		.active_discharge_mask	= MAX77650_REGULATOR_AD_MASK,
  		.active_discharge_reg	= MAX77650_REG_CNFG_SBB2_B,
  		.enable_time		= 100,
  		.type			= REGULATOR_VOLTAGE,
721efb504   Axel Lin   regulator: max776...
311
  		.owner			= THIS_MODULE,
6c98ac2a3   Axel Lin   regulator: max776...
312
313
314
315
  		.csel_reg		= MAX77650_REG_CNFG_SBB2_A,
  		.csel_mask		= MAX77650_REGULATOR_CURR_LIM_MASK,
  		.curr_table		= max77650_current_limit_table,
  		.n_current_limits = ARRAY_SIZE(max77650_current_limit_table),
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
  	},
  	.regA		= MAX77650_REG_CNFG_SBB2_A,
  	.regB		= MAX77650_REG_CNFG_SBB2_B,
  };
  
  static int max77650_regulator_probe(struct platform_device *pdev)
  {
  	struct max77650_regulator_desc **rdescs;
  	struct max77650_regulator_desc *rdesc;
  	struct regulator_config config = { };
  	struct device *dev, *parent;
  	struct regulator_dev *rdev;
  	struct regmap *map;
  	unsigned int val;
  	int i, rv;
  
  	dev = &pdev->dev;
  	parent = dev->parent;
  
  	if (!dev->of_node)
  		dev->of_node = parent->of_node;
  
  	rdescs = devm_kcalloc(dev, MAX77650_REGULATOR_NUM_REGULATORS,
  			      sizeof(*rdescs), GFP_KERNEL);
  	if (!rdescs)
  		return -ENOMEM;
  
  	map = dev_get_regmap(parent, NULL);
  	if (!map)
  		return -ENODEV;
  
  	rv = regmap_read(map, MAX77650_REG_CID, &val);
  	if (rv)
  		return rv;
  
  	rdescs[MAX77650_REGULATOR_ID_LDO] = &max77650_LDO_desc;
  	rdescs[MAX77650_REGULATOR_ID_SBB0] = &max77650_SBB0_desc;
  
  	switch (MAX77650_CID_BITS(val)) {
  	case MAX77650_CID_77650A:
  	case MAX77650_CID_77650C:
  		rdescs[MAX77650_REGULATOR_ID_SBB1] = &max77650_SBB1_desc;
  		rdescs[MAX77650_REGULATOR_ID_SBB2] = &max77650_SBB2_desc;
  		break;
  	case MAX77650_CID_77651A:
  	case MAX77650_CID_77651B:
  		rdescs[MAX77650_REGULATOR_ID_SBB1] = &max77651_SBB1_desc;
  		rdescs[MAX77650_REGULATOR_ID_SBB2] = &max77651_SBB2_desc;
  		break;
  	default:
  		return -ENODEV;
  	}
  
  	config.dev = parent;
  
  	for (i = 0; i < MAX77650_REGULATOR_NUM_REGULATORS; i++) {
  		rdesc = rdescs[i];
  		config.driver_data = rdesc;
  
  		rdev = devm_regulator_register(dev, &rdesc->desc, &config);
  		if (IS_ERR(rdev))
  			return PTR_ERR(rdev);
  	}
  
  	return 0;
  }
100a21100   Bartosz Golaszewski   regulator: max776...
382
383
384
385
386
  static const struct of_device_id max77650_regulator_of_match[] = {
  	{ .compatible = "maxim,max77650-regulator" },
  	{ }
  };
  MODULE_DEVICE_TABLE(of, max77650_regulator_of_match);
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
387
388
389
  static struct platform_driver max77650_regulator_driver = {
  	.driver = {
  		.name = "max77650-regulator",
100a21100   Bartosz Golaszewski   regulator: max776...
390
  		.of_match_table = max77650_regulator_of_match,
bcc61f1c4   Bartosz Golaszewski   regulator: max776...
391
392
393
394
395
396
397
398
  	},
  	.probe = max77650_regulator_probe,
  };
  module_platform_driver(max77650_regulator_driver);
  
  MODULE_DESCRIPTION("MAXIM 77650/77651 regulator driver");
  MODULE_AUTHOR("Bartosz Golaszewski <bgolaszewski@baylibre.com>");
  MODULE_LICENSE("GPL v2");
ba2bf340a   Bartosz Golaszewski   regulator: max776...
399
  MODULE_ALIAS("platform:max77650-regulator");