Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: tps65023: Added support for the similiar TPS65020 chip

Defines a new voltage-table and allows registering of the tps65020 device.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>

authored by

Marcus Folkesson and committed by
Liam Girdwood
437afd2a 1c3ede05

+53
+53
drivers/regulator/tps65023-regulator.c
··· 110 110 1500, 1525, 1550, 1600, 111 111 }; 112 112 113 + /* Supported voltage values for LDO regulators for tps65020 */ 114 + static const u16 TPS65020_LDO1_VSEL_table[] = { 115 + 1000, 1050, 1100, 1300, 116 + 1800, 2500, 3000, 3300, 117 + }; 113 118 119 + static const u16 TPS65020_LDO2_VSEL_table[] = { 120 + 1000, 1050, 1100, 1300, 121 + 1800, 2500, 3000, 3300, 122 + }; 114 123 115 124 /* Supported voltage values for LDO regulators 116 125 * for tps65021 and tps65023 */ ··· 557 548 return 0; 558 549 } 559 550 551 + static const struct tps_info tps65020_regs[] = { 552 + { 553 + .name = "VDCDC1", 554 + .min_uV = 3300000, 555 + .max_uV = 3300000, 556 + .fixed = 1, 557 + }, 558 + { 559 + .name = "VDCDC2", 560 + .min_uV = 1800000, 561 + .max_uV = 1800000, 562 + .fixed = 1, 563 + }, 564 + { 565 + .name = "VDCDC3", 566 + .min_uV = 800000, 567 + .max_uV = 1600000, 568 + .table_len = ARRAY_SIZE(VCORE_VSEL_table), 569 + .table = VCORE_VSEL_table, 570 + }, 571 + 572 + { 573 + .name = "LDO1", 574 + .min_uV = 1000000, 575 + .max_uV = 3150000, 576 + .table_len = ARRAY_SIZE(TPS65020_LDO1_VSEL_table), 577 + .table = TPS65020_LDO1_VSEL_table, 578 + }, 579 + { 580 + .name = "LDO2", 581 + .min_uV = 1050000, 582 + .max_uV = 3300000, 583 + .table_len = ARRAY_SIZE(TPS65020_LDO2_VSEL_table), 584 + .table = TPS65020_LDO2_VSEL_table, 585 + }, 586 + }; 587 + 560 588 static const struct tps_info tps65021_regs[] = { 561 589 { 562 590 .name = "VDCDC1", ··· 666 620 }, 667 621 }; 668 622 623 + static struct tps_driver_data tps65020_drv_data = { 624 + .info = tps65020_regs, 625 + .core_regulator = TPS65023_DCDC_3, 626 + }; 627 + 669 628 static struct tps_driver_data tps65021_drv_data = { 670 629 .info = tps65021_regs, 671 630 .core_regulator = TPS65023_DCDC_3, ··· 686 635 .driver_data = (unsigned long) &tps65023_drv_data}, 687 636 {.name = "tps65021", 688 637 .driver_data = (unsigned long) &tps65021_drv_data,}, 638 + {.name = "tps65020", 639 + .driver_data = (unsigned long) &tps65020_drv_data}, 689 640 { }, 690 641 }; 691 642