This source file includes following definitions.
- ti_abb_rmw
- ti_abb_check_txdone
- ti_abb_clear_txdone
- ti_abb_wait_txdone
- ti_abb_clear_all_txdone
- ti_abb_program_ldovbb
- ti_abb_set_opp
- ti_abb_set_voltage_sel
- ti_abb_get_voltage_sel
- ti_abb_init_timings
- ti_abb_init_table
- ti_abb_probe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #include <linux/clk.h>
21 #include <linux/delay.h>
22 #include <linux/err.h>
23 #include <linux/io.h>
24 #include <linux/module.h>
25 #include <linux/of_device.h>
26 #include <linux/of.h>
27 #include <linux/platform_device.h>
28 #include <linux/regulator/driver.h>
29 #include <linux/regulator/machine.h>
30 #include <linux/regulator/of_regulator.h>
31
32
33
34
35
36
37
38 #define TI_ABB_NOMINAL_OPP 0
39 #define TI_ABB_FAST_OPP 1
40 #define TI_ABB_SLOW_OPP 3
41
42
43
44
45
46
47
48
49
50 struct ti_abb_info {
51 u32 opp_sel;
52 u32 vset;
53 };
54
55
56
57
58
59
60
61
62
63
64
65
66 struct ti_abb_reg {
67 u32 setup_off;
68 u32 control_off;
69
70
71 u32 sr2_wtcnt_value_mask;
72 u32 fbb_sel_mask;
73 u32 rbb_sel_mask;
74 u32 sr2_en_mask;
75
76
77 u32 opp_change_mask;
78 u32 opp_sel_mask;
79 };
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100 struct ti_abb {
101 struct regulator_desc rdesc;
102 struct clk *clk;
103 void __iomem *base;
104 void __iomem *setup_reg;
105 void __iomem *control_reg;
106 void __iomem *int_base;
107 void __iomem *efuse_base;
108 void __iomem *ldo_base;
109
110 const struct ti_abb_reg *regs;
111 u32 txdone_mask;
112 u32 ldovbb_override_mask;
113 u32 ldovbb_vset_mask;
114
115 struct ti_abb_info *info;
116 int current_info_idx;
117
118 u32 settling_time;
119 };
120
121
122
123
124
125
126
127
128
129 static inline u32 ti_abb_rmw(u32 mask, u32 value, void __iomem *reg)
130 {
131 u32 val;
132
133 val = readl(reg);
134 val &= ~mask;
135 val |= (value << __ffs(mask)) & mask;
136 writel(val, reg);
137
138 return val;
139 }
140
141
142
143
144
145
146
147 static inline bool ti_abb_check_txdone(const struct ti_abb *abb)
148 {
149 return !!(readl(abb->int_base) & abb->txdone_mask);
150 }
151
152
153
154
155
156 static inline void ti_abb_clear_txdone(const struct ti_abb *abb)
157 {
158 writel(abb->txdone_mask, abb->int_base);
159 };
160
161
162
163
164
165
166
167
168 static int ti_abb_wait_txdone(struct device *dev, struct ti_abb *abb)
169 {
170 int timeout = 0;
171 bool status;
172
173 while (timeout++ <= abb->settling_time) {
174 status = ti_abb_check_txdone(abb);
175 if (status)
176 return 0;
177
178 udelay(1);
179 }
180
181 dev_warn_ratelimited(dev, "%s:TRANXDONE timeout(%duS) int=0x%08x\n",
182 __func__, timeout, readl(abb->int_base));
183 return -ETIMEDOUT;
184 }
185
186
187
188
189
190
191
192
193 static int ti_abb_clear_all_txdone(struct device *dev, const struct ti_abb *abb)
194 {
195 int timeout = 0;
196 bool status;
197
198 while (timeout++ <= abb->settling_time) {
199 ti_abb_clear_txdone(abb);
200
201 status = ti_abb_check_txdone(abb);
202 if (!status)
203 return 0;
204
205 udelay(1);
206 }
207
208 dev_warn_ratelimited(dev, "%s:TRANXDONE timeout(%duS) int=0x%08x\n",
209 __func__, timeout, readl(abb->int_base));
210 return -ETIMEDOUT;
211 }
212
213
214
215
216
217
218
219 static void ti_abb_program_ldovbb(struct device *dev, const struct ti_abb *abb,
220 struct ti_abb_info *info)
221 {
222 u32 val;
223
224 val = readl(abb->ldo_base);
225
226 val &= ~(abb->ldovbb_override_mask | abb->ldovbb_vset_mask);
227
228 switch (info->opp_sel) {
229 case TI_ABB_SLOW_OPP:
230 case TI_ABB_FAST_OPP:
231 val |= abb->ldovbb_override_mask;
232 val |= info->vset << __ffs(abb->ldovbb_vset_mask);
233 break;
234 }
235
236 writel(val, abb->ldo_base);
237 }
238
239
240
241
242
243
244
245
246
247 static int ti_abb_set_opp(struct regulator_dev *rdev, struct ti_abb *abb,
248 struct ti_abb_info *info)
249 {
250 const struct ti_abb_reg *regs = abb->regs;
251 struct device *dev = &rdev->dev;
252 int ret;
253
254 ret = ti_abb_clear_all_txdone(dev, abb);
255 if (ret)
256 goto out;
257
258 ti_abb_rmw(regs->fbb_sel_mask | regs->rbb_sel_mask, 0, abb->setup_reg);
259
260 switch (info->opp_sel) {
261 case TI_ABB_SLOW_OPP:
262 ti_abb_rmw(regs->rbb_sel_mask, 1, abb->setup_reg);
263 break;
264 case TI_ABB_FAST_OPP:
265 ti_abb_rmw(regs->fbb_sel_mask, 1, abb->setup_reg);
266 break;
267 }
268
269
270 ti_abb_rmw(regs->opp_sel_mask, info->opp_sel, abb->control_reg);
271
272
273
274
275
276
277 if (abb->ldo_base && info->opp_sel != TI_ABB_NOMINAL_OPP)
278 ti_abb_program_ldovbb(dev, abb, info);
279
280
281 ti_abb_rmw(regs->opp_change_mask, 1, abb->control_reg);
282
283
284 ret = ti_abb_wait_txdone(dev, abb);
285 if (ret)
286 goto out;
287
288 ret = ti_abb_clear_all_txdone(dev, abb);
289 if (ret)
290 goto out;
291
292
293
294
295
296
297 if (abb->ldo_base && info->opp_sel == TI_ABB_NOMINAL_OPP)
298 ti_abb_program_ldovbb(dev, abb, info);
299
300 out:
301 return ret;
302 }
303
304
305
306
307
308
309
310
311
312 static int ti_abb_set_voltage_sel(struct regulator_dev *rdev, unsigned sel)
313 {
314 const struct regulator_desc *desc = rdev->desc;
315 struct ti_abb *abb = rdev_get_drvdata(rdev);
316 struct device *dev = &rdev->dev;
317 struct ti_abb_info *info, *oinfo;
318 int ret = 0;
319
320 if (!abb) {
321 dev_err_ratelimited(dev, "%s: No regulator drvdata\n",
322 __func__);
323 return -ENODEV;
324 }
325
326 if (!desc->n_voltages || !abb->info) {
327 dev_err_ratelimited(dev,
328 "%s: No valid voltage table entries?\n",
329 __func__);
330 return -EINVAL;
331 }
332
333 if (sel >= desc->n_voltages) {
334 dev_err(dev, "%s: sel idx(%d) >= n_voltages(%d)\n", __func__,
335 sel, desc->n_voltages);
336 return -EINVAL;
337 }
338
339
340 if (sel == abb->current_info_idx) {
341 dev_dbg(dev, "%s: Already at sel=%d\n", __func__, sel);
342 return ret;
343 }
344
345
346 info = &abb->info[sel];
347 oinfo = &abb->info[abb->current_info_idx];
348 if (!memcmp(info, oinfo, sizeof(*info))) {
349 dev_dbg(dev, "%s: Same data new idx=%d, old idx=%d\n", __func__,
350 sel, abb->current_info_idx);
351 goto out;
352 }
353
354 ret = ti_abb_set_opp(rdev, abb, info);
355
356 out:
357 if (!ret)
358 abb->current_info_idx = sel;
359 else
360 dev_err_ratelimited(dev,
361 "%s: Volt[%d] idx[%d] mode[%d] Fail(%d)\n",
362 __func__, desc->volt_table[sel], sel,
363 info->opp_sel, ret);
364 return ret;
365 }
366
367
368
369
370
371
372
373 static int ti_abb_get_voltage_sel(struct regulator_dev *rdev)
374 {
375 const struct regulator_desc *desc = rdev->desc;
376 struct ti_abb *abb = rdev_get_drvdata(rdev);
377 struct device *dev = &rdev->dev;
378
379 if (!abb) {
380 dev_err_ratelimited(dev, "%s: No regulator drvdata\n",
381 __func__);
382 return -ENODEV;
383 }
384
385 if (!desc->n_voltages || !abb->info) {
386 dev_err_ratelimited(dev,
387 "%s: No valid voltage table entries?\n",
388 __func__);
389 return -EINVAL;
390 }
391
392 if (abb->current_info_idx >= (int)desc->n_voltages) {
393 dev_err(dev, "%s: Corrupted data? idx(%d) >= n_voltages(%d)\n",
394 __func__, abb->current_info_idx, desc->n_voltages);
395 return -EINVAL;
396 }
397
398 return abb->current_info_idx;
399 }
400
401
402
403
404
405
406
407
408 static int ti_abb_init_timings(struct device *dev, struct ti_abb *abb)
409 {
410 u32 clock_cycles;
411 u32 clk_rate, sr2_wt_cnt_val, cycle_rate;
412 const struct ti_abb_reg *regs = abb->regs;
413 int ret;
414 char *pname = "ti,settling-time";
415
416
417 ret = of_property_read_u32(dev->of_node, pname, &abb->settling_time);
418 if (ret) {
419 dev_err(dev, "Unable to get property '%s'(%d)\n", pname, ret);
420 return ret;
421 }
422
423
424 if (!abb->settling_time) {
425 dev_err(dev, "Invalid property:'%s' set as 0!\n", pname);
426 return -EINVAL;
427 }
428
429 pname = "ti,clock-cycles";
430 ret = of_property_read_u32(dev->of_node, pname, &clock_cycles);
431 if (ret) {
432 dev_err(dev, "Unable to get property '%s'(%d)\n", pname, ret);
433 return ret;
434 }
435
436 if (!clock_cycles) {
437 dev_err(dev, "Invalid property:'%s' set as 0!\n", pname);
438 return -EINVAL;
439 }
440
441 abb->clk = devm_clk_get(dev, NULL);
442 if (IS_ERR(abb->clk)) {
443 ret = PTR_ERR(abb->clk);
444 dev_err(dev, "%s: Unable to get clk(%d)\n", __func__, ret);
445 return ret;
446 }
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472 clk_rate = DIV_ROUND_CLOSEST(clk_get_rate(abb->clk), 1000000);
473
474
475 cycle_rate = DIV_ROUND_CLOSEST(clock_cycles * 10, clk_rate);
476
477
478 sr2_wt_cnt_val = DIV_ROUND_CLOSEST(abb->settling_time * 10, cycle_rate);
479
480 dev_dbg(dev, "%s: Clk_rate=%ld, sr2_cnt=0x%08x\n", __func__,
481 clk_get_rate(abb->clk), sr2_wt_cnt_val);
482
483 ti_abb_rmw(regs->sr2_wtcnt_value_mask, sr2_wt_cnt_val, abb->setup_reg);
484
485 return 0;
486 }
487
488
489
490
491
492
493
494
495
496 static int ti_abb_init_table(struct device *dev, struct ti_abb *abb,
497 struct regulator_init_data *rinit_data)
498 {
499 struct ti_abb_info *info;
500 const u32 num_values = 6;
501 char *pname = "ti,abb_info";
502 u32 i;
503 unsigned int *volt_table;
504 int num_entries, min_uV = INT_MAX, max_uV = 0;
505 struct regulation_constraints *c = &rinit_data->constraints;
506
507
508
509
510
511
512 num_entries = of_property_count_u32_elems(dev->of_node, pname);
513 if (num_entries < 0) {
514 dev_err(dev, "No '%s' property?\n", pname);
515 return num_entries;
516 }
517
518 if (!num_entries || (num_entries % num_values)) {
519 dev_err(dev, "All '%s' list entries need %d vals\n", pname,
520 num_values);
521 return -EINVAL;
522 }
523 num_entries /= num_values;
524
525 info = devm_kcalloc(dev, num_entries, sizeof(*info), GFP_KERNEL);
526 if (!info)
527 return -ENOMEM;
528
529 abb->info = info;
530
531 volt_table = devm_kcalloc(dev, num_entries, sizeof(unsigned int),
532 GFP_KERNEL);
533 if (!volt_table)
534 return -ENOMEM;
535
536 abb->rdesc.n_voltages = num_entries;
537 abb->rdesc.volt_table = volt_table;
538
539 abb->current_info_idx = -EINVAL;
540
541 for (i = 0; i < num_entries; i++, info++, volt_table++) {
542 u32 efuse_offset, rbb_mask, fbb_mask, vset_mask;
543 u32 efuse_val;
544
545
546 of_property_read_u32_index(dev->of_node, pname, i * num_values,
547 volt_table);
548 of_property_read_u32_index(dev->of_node, pname,
549 i * num_values + 1, &info->opp_sel);
550 of_property_read_u32_index(dev->of_node, pname,
551 i * num_values + 2, &efuse_offset);
552 of_property_read_u32_index(dev->of_node, pname,
553 i * num_values + 3, &rbb_mask);
554 of_property_read_u32_index(dev->of_node, pname,
555 i * num_values + 4, &fbb_mask);
556 of_property_read_u32_index(dev->of_node, pname,
557 i * num_values + 5, &vset_mask);
558
559 dev_dbg(dev,
560 "[%d]v=%d ABB=%d ef=0x%x rbb=0x%x fbb=0x%x vset=0x%x\n",
561 i, *volt_table, info->opp_sel, efuse_offset, rbb_mask,
562 fbb_mask, vset_mask);
563
564
565 if (min_uV > *volt_table)
566 min_uV = *volt_table;
567 if (max_uV < *volt_table)
568 max_uV = *volt_table;
569
570 if (!abb->efuse_base) {
571
572 if (efuse_offset || rbb_mask || fbb_mask || vset_mask)
573 dev_err(dev, "prop '%s': v=%d,bad efuse/mask\n",
574 pname, *volt_table);
575 goto check_abb;
576 }
577
578 efuse_val = readl(abb->efuse_base + efuse_offset);
579
580
581 if (efuse_val & rbb_mask)
582 info->opp_sel = TI_ABB_SLOW_OPP;
583 else if (efuse_val & fbb_mask)
584 info->opp_sel = TI_ABB_FAST_OPP;
585 else if (rbb_mask || fbb_mask)
586 info->opp_sel = TI_ABB_NOMINAL_OPP;
587
588 dev_dbg(dev,
589 "[%d]v=%d efusev=0x%x final ABB=%d\n",
590 i, *volt_table, efuse_val, info->opp_sel);
591
592
593 if (!abb->ldo_base) {
594 if (vset_mask)
595 dev_err(dev, "prop'%s':v=%d vst=%x LDO base?\n",
596 pname, *volt_table, vset_mask);
597 continue;
598 }
599 info->vset = (efuse_val & vset_mask) >> __ffs(vset_mask);
600 dev_dbg(dev, "[%d]v=%d vset=%x\n", i, *volt_table, info->vset);
601 check_abb:
602 switch (info->opp_sel) {
603 case TI_ABB_NOMINAL_OPP:
604 case TI_ABB_FAST_OPP:
605 case TI_ABB_SLOW_OPP:
606
607 break;
608 default:
609 dev_err(dev, "%s:[%d]v=%d, ABB=%d is invalid! Abort!\n",
610 __func__, i, *volt_table, info->opp_sel);
611 return -EINVAL;
612 }
613 }
614
615
616 c->min_uV = min_uV;
617 c->max_uV = max_uV;
618
619 return 0;
620 }
621
622 static struct regulator_ops ti_abb_reg_ops = {
623 .list_voltage = regulator_list_voltage_table,
624
625 .set_voltage_sel = ti_abb_set_voltage_sel,
626 .get_voltage_sel = ti_abb_get_voltage_sel,
627 };
628
629
630 static const struct ti_abb_reg abb_regs_v1 = {
631
632 .setup_off = 0x04,
633 .control_off = 0x00,
634
635 .sr2_wtcnt_value_mask = (0xff << 8),
636 .fbb_sel_mask = (0x01 << 2),
637 .rbb_sel_mask = (0x01 << 1),
638 .sr2_en_mask = (0x01 << 0),
639
640 .opp_change_mask = (0x01 << 2),
641 .opp_sel_mask = (0x03 << 0),
642 };
643
644 static const struct ti_abb_reg abb_regs_v2 = {
645 .setup_off = 0x00,
646 .control_off = 0x04,
647
648 .sr2_wtcnt_value_mask = (0xff << 8),
649 .fbb_sel_mask = (0x01 << 2),
650 .rbb_sel_mask = (0x01 << 1),
651 .sr2_en_mask = (0x01 << 0),
652
653 .opp_change_mask = (0x01 << 2),
654 .opp_sel_mask = (0x03 << 0),
655 };
656
657 static const struct ti_abb_reg abb_regs_generic = {
658 .sr2_wtcnt_value_mask = (0xff << 8),
659 .fbb_sel_mask = (0x01 << 2),
660 .rbb_sel_mask = (0x01 << 1),
661 .sr2_en_mask = (0x01 << 0),
662
663 .opp_change_mask = (0x01 << 2),
664 .opp_sel_mask = (0x03 << 0),
665 };
666
667 static const struct of_device_id ti_abb_of_match[] = {
668 {.compatible = "ti,abb-v1", .data = &abb_regs_v1},
669 {.compatible = "ti,abb-v2", .data = &abb_regs_v2},
670 {.compatible = "ti,abb-v3", .data = &abb_regs_generic},
671 { },
672 };
673
674 MODULE_DEVICE_TABLE(of, ti_abb_of_match);
675
676
677
678
679
680
681
682
683
684
685
686 static int ti_abb_probe(struct platform_device *pdev)
687 {
688 struct device *dev = &pdev->dev;
689 const struct of_device_id *match;
690 struct resource *res;
691 struct ti_abb *abb;
692 struct regulator_init_data *initdata = NULL;
693 struct regulator_dev *rdev = NULL;
694 struct regulator_desc *desc;
695 struct regulation_constraints *c;
696 struct regulator_config config = { };
697 char *pname;
698 int ret = 0;
699
700 match = of_match_device(ti_abb_of_match, dev);
701 if (!match) {
702
703 dev_err(dev, "%s: Unable to match device\n", __func__);
704 return -ENODEV;
705 }
706 if (!match->data) {
707 dev_err(dev, "%s: Bad data in match\n", __func__);
708 return -EINVAL;
709 }
710
711 abb = devm_kzalloc(dev, sizeof(struct ti_abb), GFP_KERNEL);
712 if (!abb)
713 return -ENOMEM;
714 abb->regs = match->data;
715
716
717 if (abb->regs->setup_off || abb->regs->control_off) {
718 pname = "base-address";
719 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, pname);
720 abb->base = devm_ioremap_resource(dev, res);
721 if (IS_ERR(abb->base))
722 return PTR_ERR(abb->base);
723
724 abb->setup_reg = abb->base + abb->regs->setup_off;
725 abb->control_reg = abb->base + abb->regs->control_off;
726
727 } else {
728 pname = "control-address";
729 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, pname);
730 abb->control_reg = devm_ioremap_resource(dev, res);
731 if (IS_ERR(abb->control_reg))
732 return PTR_ERR(abb->control_reg);
733
734 pname = "setup-address";
735 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, pname);
736 abb->setup_reg = devm_ioremap_resource(dev, res);
737 if (IS_ERR(abb->setup_reg))
738 return PTR_ERR(abb->setup_reg);
739 }
740
741 pname = "int-address";
742 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, pname);
743 if (!res) {
744 dev_err(dev, "Missing '%s' IO resource\n", pname);
745 return -ENODEV;
746 }
747
748
749
750
751 abb->int_base = devm_ioremap_nocache(dev, res->start,
752 resource_size(res));
753 if (!abb->int_base) {
754 dev_err(dev, "Unable to map '%s'\n", pname);
755 return -ENOMEM;
756 }
757
758
759 pname = "efuse-address";
760 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, pname);
761 if (!res) {
762 dev_dbg(dev, "Missing '%s' IO resource\n", pname);
763 ret = -ENODEV;
764 goto skip_opt;
765 }
766
767
768
769
770
771 abb->efuse_base = devm_ioremap_nocache(dev, res->start,
772 resource_size(res));
773 if (!abb->efuse_base) {
774 dev_err(dev, "Unable to map '%s'\n", pname);
775 return -ENOMEM;
776 }
777
778 pname = "ldo-address";
779 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, pname);
780 if (!res) {
781 dev_dbg(dev, "Missing '%s' IO resource\n", pname);
782 ret = -ENODEV;
783 goto skip_opt;
784 }
785 abb->ldo_base = devm_ioremap_resource(dev, res);
786 if (IS_ERR(abb->ldo_base))
787 return PTR_ERR(abb->ldo_base);
788
789
790 pname = "ti,ldovbb-override-mask";
791 ret =
792 of_property_read_u32(pdev->dev.of_node, pname,
793 &abb->ldovbb_override_mask);
794 if (ret) {
795 dev_err(dev, "Missing '%s' (%d)\n", pname, ret);
796 return ret;
797 }
798 if (!abb->ldovbb_override_mask) {
799 dev_err(dev, "Invalid property:'%s' set as 0!\n", pname);
800 return -EINVAL;
801 }
802
803 pname = "ti,ldovbb-vset-mask";
804 ret =
805 of_property_read_u32(pdev->dev.of_node, pname,
806 &abb->ldovbb_vset_mask);
807 if (ret) {
808 dev_err(dev, "Missing '%s' (%d)\n", pname, ret);
809 return ret;
810 }
811 if (!abb->ldovbb_vset_mask) {
812 dev_err(dev, "Invalid property:'%s' set as 0!\n", pname);
813 return -EINVAL;
814 }
815
816 skip_opt:
817 pname = "ti,tranxdone-status-mask";
818 ret =
819 of_property_read_u32(pdev->dev.of_node, pname,
820 &abb->txdone_mask);
821 if (ret) {
822 dev_err(dev, "Missing '%s' (%d)\n", pname, ret);
823 return ret;
824 }
825 if (!abb->txdone_mask) {
826 dev_err(dev, "Invalid property:'%s' set as 0!\n", pname);
827 return -EINVAL;
828 }
829
830 initdata = of_get_regulator_init_data(dev, pdev->dev.of_node,
831 &abb->rdesc);
832 if (!initdata) {
833 dev_err(dev, "%s: Unable to alloc regulator init data\n",
834 __func__);
835 return -ENOMEM;
836 }
837
838
839 ret = ti_abb_init_table(dev, abb, initdata);
840 if (ret)
841 return ret;
842
843
844 ret = ti_abb_init_timings(dev, abb);
845 if (ret)
846 return ret;
847
848 desc = &abb->rdesc;
849 desc->name = dev_name(dev);
850 desc->owner = THIS_MODULE;
851 desc->type = REGULATOR_VOLTAGE;
852 desc->ops = &ti_abb_reg_ops;
853
854 c = &initdata->constraints;
855 if (desc->n_voltages > 1)
856 c->valid_ops_mask |= REGULATOR_CHANGE_VOLTAGE;
857 c->always_on = true;
858
859 config.dev = dev;
860 config.init_data = initdata;
861 config.driver_data = abb;
862 config.of_node = pdev->dev.of_node;
863
864 rdev = devm_regulator_register(dev, desc, &config);
865 if (IS_ERR(rdev)) {
866 ret = PTR_ERR(rdev);
867 dev_err(dev, "%s: failed to register regulator(%d)\n",
868 __func__, ret);
869 return ret;
870 }
871 platform_set_drvdata(pdev, rdev);
872
873
874 ti_abb_rmw(abb->regs->sr2_en_mask, 1, abb->setup_reg);
875
876 return 0;
877 }
878
879 MODULE_ALIAS("platform:ti_abb");
880
881 static struct platform_driver ti_abb_driver = {
882 .probe = ti_abb_probe,
883 .driver = {
884 .name = "ti_abb",
885 .of_match_table = of_match_ptr(ti_abb_of_match),
886 },
887 };
888 module_platform_driver(ti_abb_driver);
889
890 MODULE_DESCRIPTION("Texas Instruments ABB LDO regulator driver");
891 MODULE_AUTHOR("Texas Instruments Inc.");
892 MODULE_LICENSE("GPL v2");