hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/mfd/ab8500-core.c
....@@ -1,7 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) ST-Ericsson SA 2010
34 *
4
- * License Terms: GNU General Public License v2
55 * Author: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
66 * Author: Rabin Vincent <rabin.vincent@stericsson.com>
77 * Author: Mattias Wallin <mattias.wallin@stericsson.com>
....@@ -610,107 +610,53 @@
610610 }
611611
612612 static const struct mfd_cell ab8500_bm_devs[] = {
613
- {
614
- .name = "ab8500-charger",
615
- .of_compatible = "stericsson,ab8500-charger",
616
- .platform_data = &ab8500_bm_data,
617
- .pdata_size = sizeof(ab8500_bm_data),
618
- },
619
- {
620
- .name = "ab8500-btemp",
621
- .of_compatible = "stericsson,ab8500-btemp",
622
- .platform_data = &ab8500_bm_data,
623
- .pdata_size = sizeof(ab8500_bm_data),
624
- },
625
- {
626
- .name = "ab8500-fg",
627
- .of_compatible = "stericsson,ab8500-fg",
628
- .platform_data = &ab8500_bm_data,
629
- .pdata_size = sizeof(ab8500_bm_data),
630
- },
631
- {
632
- .name = "ab8500-chargalg",
633
- .of_compatible = "stericsson,ab8500-chargalg",
634
- .platform_data = &ab8500_bm_data,
635
- .pdata_size = sizeof(ab8500_bm_data),
636
- },
613
+ OF_MFD_CELL("ab8500-charger", NULL, &ab8500_bm_data,
614
+ sizeof(ab8500_bm_data), 0, "stericsson,ab8500-charger"),
615
+ OF_MFD_CELL("ab8500-btemp", NULL, &ab8500_bm_data,
616
+ sizeof(ab8500_bm_data), 0, "stericsson,ab8500-btemp"),
617
+ OF_MFD_CELL("ab8500-fg", NULL, &ab8500_bm_data,
618
+ sizeof(ab8500_bm_data), 0, "stericsson,ab8500-fg"),
619
+ OF_MFD_CELL("ab8500-chargalg", NULL, &ab8500_bm_data,
620
+ sizeof(ab8500_bm_data), 0, "stericsson,ab8500-chargalg"),
637621 };
638622
639623 static const struct mfd_cell ab8500_devs[] = {
640624 #ifdef CONFIG_DEBUG_FS
641
- {
642
- .name = "ab8500-debug",
643
- .of_compatible = "stericsson,ab8500-debug",
644
- },
625
+ OF_MFD_CELL("ab8500-debug",
626
+ NULL, NULL, 0, 0, "stericsson,ab8500-debug"),
645627 #endif
646
- {
647
- .name = "ab8500-sysctrl",
648
- .of_compatible = "stericsson,ab8500-sysctrl",
649
- },
650
- {
651
- .name = "ab8500-ext-regulator",
652
- .of_compatible = "stericsson,ab8500-ext-regulator",
653
- },
654
- {
655
- .name = "ab8500-regulator",
656
- .of_compatible = "stericsson,ab8500-regulator",
657
- },
658
- {
659
- .name = "ab8500-clk",
660
- .of_compatible = "stericsson,ab8500-clk",
661
- },
662
- {
663
- .name = "ab8500-gpadc",
664
- .of_compatible = "stericsson,ab8500-gpadc",
665
- },
666
- {
667
- .name = "ab8500-rtc",
668
- .of_compatible = "stericsson,ab8500-rtc",
669
- },
670
- {
671
- .name = "ab8500-acc-det",
672
- .of_compatible = "stericsson,ab8500-acc-det",
673
- },
674
- {
675
-
676
- .name = "ab8500-poweron-key",
677
- .of_compatible = "stericsson,ab8500-poweron-key",
678
- },
679
- {
680
- .name = "ab8500-pwm",
681
- .of_compatible = "stericsson,ab8500-pwm",
682
- .id = 1,
683
- },
684
- {
685
- .name = "ab8500-pwm",
686
- .of_compatible = "stericsson,ab8500-pwm",
687
- .id = 2,
688
- },
689
- {
690
- .name = "ab8500-pwm",
691
- .of_compatible = "stericsson,ab8500-pwm",
692
- .id = 3,
693
- },
694
- {
695
- .name = "ab8500-denc",
696
- .of_compatible = "stericsson,ab8500-denc",
697
- },
698
- {
699
- .name = "pinctrl-ab8500",
700
- .of_compatible = "stericsson,ab8500-gpio",
701
- },
702
- {
703
- .name = "abx500-temp",
704
- .of_compatible = "stericsson,abx500-temp",
705
- },
706
- {
707
- .name = "ab8500-usb",
708
- .of_compatible = "stericsson,ab8500-usb",
709
- },
710
- {
711
- .name = "ab8500-codec",
712
- .of_compatible = "stericsson,ab8500-codec",
713
- },
628
+ OF_MFD_CELL("ab8500-sysctrl",
629
+ NULL, NULL, 0, 0, "stericsson,ab8500-sysctrl"),
630
+ OF_MFD_CELL("ab8500-ext-regulator",
631
+ NULL, NULL, 0, 0, "stericsson,ab8500-ext-regulator"),
632
+ OF_MFD_CELL("ab8500-regulator",
633
+ NULL, NULL, 0, 0, "stericsson,ab8500-regulator"),
634
+ OF_MFD_CELL("ab8500-clk",
635
+ NULL, NULL, 0, 0, "stericsson,ab8500-clk"),
636
+ OF_MFD_CELL("ab8500-gpadc",
637
+ NULL, NULL, 0, 0, "stericsson,ab8500-gpadc"),
638
+ OF_MFD_CELL("ab8500-rtc",
639
+ NULL, NULL, 0, 0, "stericsson,ab8500-rtc"),
640
+ OF_MFD_CELL("ab8500-acc-det",
641
+ NULL, NULL, 0, 0, "stericsson,ab8500-acc-det"),
642
+ OF_MFD_CELL("ab8500-poweron-key",
643
+ NULL, NULL, 0, 0, "stericsson,ab8500-poweron-key"),
644
+ OF_MFD_CELL("ab8500-pwm",
645
+ NULL, NULL, 0, 1, "stericsson,ab8500-pwm"),
646
+ OF_MFD_CELL("ab8500-pwm",
647
+ NULL, NULL, 0, 2, "stericsson,ab8500-pwm"),
648
+ OF_MFD_CELL("ab8500-pwm",
649
+ NULL, NULL, 0, 3, "stericsson,ab8500-pwm"),
650
+ OF_MFD_CELL("ab8500-denc",
651
+ NULL, NULL, 0, 0, "stericsson,ab8500-denc"),
652
+ OF_MFD_CELL("pinctrl-ab8500",
653
+ NULL, NULL, 0, 0, "stericsson,ab8500-gpio"),
654
+ OF_MFD_CELL("abx500-temp",
655
+ NULL, NULL, 0, 0, "stericsson,abx500-temp"),
656
+ OF_MFD_CELL("ab8500-usb",
657
+ NULL, NULL, 0, 0, "stericsson,ab8500-usb"),
658
+ OF_MFD_CELL("ab8500-codec",
659
+ NULL, NULL, 0, 0, "stericsson,ab8500-codec"),
714660 };
715661
716662 static const struct mfd_cell ab9540_devs[] = {
....@@ -772,17 +718,20 @@
772718 #ifdef CONFIG_DEBUG_FS
773719 {
774720 .name = "ab8500-debug",
721
+ .of_compatible = "stericsson,ab8500-debug",
775722 },
776723 #endif
777724 {
778725 .name = "ab8500-sysctrl",
726
+ .of_compatible = "stericsson,ab8500-sysctrl",
779727 },
780728 {
781729 .name = "ab8500-regulator",
730
+ .of_compatible = "stericsson,ab8505-regulator",
782731 },
783732 {
784733 .name = "abx500-clk",
785
- .of_compatible = "stericsson,abx500-clk",
734
+ .of_compatible = "stericsson,ab8500-clk",
786735 },
787736 {
788737 .name = "ab8500-gpadc",
....@@ -790,25 +739,32 @@
790739 },
791740 {
792741 .name = "ab8500-rtc",
742
+ .of_compatible = "stericsson,ab8500-rtc",
793743 },
794744 {
795745 .name = "ab8500-acc-det",
746
+ .of_compatible = "stericsson,ab8500-acc-det",
796747 },
797748 {
798749 .name = "ab8500-poweron-key",
750
+ .of_compatible = "stericsson,ab8500-poweron-key",
799751 },
800752 {
801753 .name = "ab8500-pwm",
754
+ .of_compatible = "stericsson,ab8500-pwm",
802755 .id = 1,
803756 },
804757 {
805758 .name = "pinctrl-ab8505",
759
+ .of_compatible = "stericsson,ab8505-gpio",
806760 },
807761 {
808762 .name = "ab8500-usb",
763
+ .of_compatible = "stericsson,ab8500-usb",
809764 },
810765 {
811766 .name = "ab8500-codec",
767
+ .of_compatible = "stericsson,ab8500-codec",
812768 },
813769 {
814770 .name = "ab-iddet",
....@@ -1330,7 +1286,7 @@
13301286
13311287 static const struct platform_device_id ab8500_id[] = {
13321288 { "ab8500-core", AB8500_VERSION_AB8500 },
1333
- { "ab8505-i2c", AB8500_VERSION_AB8505 },
1289
+ { "ab8505-core", AB8500_VERSION_AB8505 },
13341290 { "ab9540-i2c", AB8500_VERSION_AB9540 },
13351291 { "ab8540-i2c", AB8500_VERSION_AB8540 },
13361292 { }