aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/ab8500-debugfs.c
diff options
context:
space:
mode:
authorJohn Beckett <john.beckett@stericsson.com>2011-05-31 08:54:27 -0400
committerLee Jones <lee.jones@linaro.org>2013-02-04 03:31:41 -0500
commit1478a316e3ff3c3b0967091ac36bc6987773570a (patch)
tree9d112493c11f6b7175388c8deedd2f4eb1df0060 /drivers/mfd/ab8500-debugfs.c
parent0fbce76eff0e7ea92f51b253c504a79d9b3b5769 (diff)
mfd: ab8500-debugfs: Export all AB8500 ADCs as debugfs nodes
Allow a user to take a glimpse into the inner workings of the AB8500 Analogue-to-Digital Converters, via debugfs. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: John Beckett <john.beckett@stericsson.com> Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Diffstat (limited to 'drivers/mfd/ab8500-debugfs.c')
-rw-r--r--drivers/mfd/ab8500-debugfs.c486
1 files changed, 465 insertions, 21 deletions
diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c
index 79a954f79732..f32ac976577f 100644
--- a/drivers/mfd/ab8500-debugfs.c
+++ b/drivers/mfd/ab8500-debugfs.c
@@ -82,7 +82,7 @@
82#include <linux/slab.h> 82#include <linux/slab.h>
83 83
84#include <linux/mfd/abx500.h> 84#include <linux/mfd/abx500.h>
85#include <linux/mfd/abx500/ab8500.h> 85#include <linux/mfd/abx500/ab8500-gpadc.h>
86 86
87#ifdef CONFIG_DEBUG_FS 87#ifdef CONFIG_DEBUG_FS
88#include <linux/string.h> 88#include <linux/string.h>
@@ -143,6 +143,7 @@ static struct hwreg_cfg hwreg_cfg = {
143}; 143};
144 144
145#define AB8500_NAME_STRING "ab8500" 145#define AB8500_NAME_STRING "ab8500"
146#define AB8500_ADC_NAME_STRING "gpadc"
146#define AB8500_NUM_BANKS 22 147#define AB8500_NUM_BANKS 22
147 148
148#define AB8500_REV_REG 0x80 149#define AB8500_REV_REG 0x80
@@ -672,6 +673,382 @@ static int ab8500_hwreg_open(struct inode *inode, struct file *file)
672 return single_open(file, ab8500_hwreg_print, inode->i_private); 673 return single_open(file, ab8500_hwreg_print, inode->i_private);
673} 674}
674 675
676static int ab8500_gpadc_bat_ctrl_print(struct seq_file *s, void *p)
677{
678 int bat_ctrl_raw;
679 int bat_ctrl_convert;
680 struct ab8500_gpadc *gpadc;
681
682 gpadc = ab8500_gpadc_get();
683 bat_ctrl_raw = ab8500_gpadc_read_raw(gpadc, BAT_CTRL);
684 bat_ctrl_convert = ab8500_gpadc_ad_to_voltage(gpadc,
685 BAT_CTRL, bat_ctrl_raw);
686
687 return seq_printf(s, "%d,0x%X\n",
688 bat_ctrl_convert, bat_ctrl_raw);
689}
690
691static int ab8500_gpadc_bat_ctrl_open(struct inode *inode, struct file *file)
692{
693 return single_open(file, ab8500_gpadc_bat_ctrl_print, inode->i_private);
694}
695
696static const struct file_operations ab8500_gpadc_bat_ctrl_fops = {
697 .open = ab8500_gpadc_bat_ctrl_open,
698 .read = seq_read,
699 .llseek = seq_lseek,
700 .release = single_release,
701 .owner = THIS_MODULE,
702};
703
704static int ab8500_gpadc_btemp_ball_print(struct seq_file *s, void *p)
705{
706 int btemp_ball_raw;
707 int btemp_ball_convert;
708 struct ab8500_gpadc *gpadc;
709
710 gpadc = ab8500_gpadc_get();
711 btemp_ball_raw = ab8500_gpadc_read_raw(gpadc, BTEMP_BALL);
712 btemp_ball_convert = ab8500_gpadc_ad_to_voltage(gpadc, BTEMP_BALL,
713 btemp_ball_raw);
714
715 return seq_printf(s,
716 "%d,0x%X\n", btemp_ball_convert, btemp_ball_raw);
717}
718
719static int ab8500_gpadc_btemp_ball_open(struct inode *inode,
720 struct file *file)
721{
722 return single_open(file, ab8500_gpadc_btemp_ball_print, inode->i_private);
723}
724
725static const struct file_operations ab8500_gpadc_btemp_ball_fops = {
726 .open = ab8500_gpadc_btemp_ball_open,
727 .read = seq_read,
728 .llseek = seq_lseek,
729 .release = single_release,
730 .owner = THIS_MODULE,
731};
732
733static int ab8500_gpadc_main_charger_v_print(struct seq_file *s, void *p)
734{
735 int main_charger_v_raw;
736 int main_charger_v_convert;
737 struct ab8500_gpadc *gpadc;
738
739 gpadc = ab8500_gpadc_get();
740 main_charger_v_raw = ab8500_gpadc_read_raw(gpadc, MAIN_CHARGER_V);
741 main_charger_v_convert = ab8500_gpadc_ad_to_voltage(gpadc,
742 MAIN_CHARGER_V, main_charger_v_raw);
743
744 return seq_printf(s, "%d,0x%X\n",
745 main_charger_v_convert, main_charger_v_raw);
746}
747
748static int ab8500_gpadc_main_charger_v_open(struct inode *inode,
749 struct file *file)
750{
751 return single_open(file, ab8500_gpadc_main_charger_v_print,
752 inode->i_private);
753}
754
755static const struct file_operations ab8500_gpadc_main_charger_v_fops = {
756 .open = ab8500_gpadc_main_charger_v_open,
757 .read = seq_read,
758 .llseek = seq_lseek,
759 .release = single_release,
760 .owner = THIS_MODULE,
761};
762
763static int ab8500_gpadc_acc_detect1_print(struct seq_file *s, void *p)
764{
765 int acc_detect1_raw;
766 int acc_detect1_convert;
767 struct ab8500_gpadc *gpadc;
768
769 gpadc = ab8500_gpadc_get();
770 acc_detect1_raw = ab8500_gpadc_read_raw(gpadc, ACC_DETECT1);
771 acc_detect1_convert = ab8500_gpadc_ad_to_voltage(gpadc, ACC_DETECT1,
772 acc_detect1_raw);
773
774 return seq_printf(s, "%d,0x%X\n",
775 acc_detect1_convert, acc_detect1_raw);
776}
777
778static int ab8500_gpadc_acc_detect1_open(struct inode *inode,
779 struct file *file)
780{
781 return single_open(file, ab8500_gpadc_acc_detect1_print,
782 inode->i_private);
783}
784
785static const struct file_operations ab8500_gpadc_acc_detect1_fops = {
786 .open = ab8500_gpadc_acc_detect1_open,
787 .read = seq_read,
788 .llseek = seq_lseek,
789 .release = single_release,
790 .owner = THIS_MODULE,
791};
792
793static int ab8500_gpadc_acc_detect2_print(struct seq_file *s, void *p)
794{
795 int acc_detect2_raw;
796 int acc_detect2_convert;
797 struct ab8500_gpadc *gpadc;
798
799 gpadc = ab8500_gpadc_get();
800 acc_detect2_raw = ab8500_gpadc_read_raw(gpadc, ACC_DETECT2);
801 acc_detect2_convert = ab8500_gpadc_ad_to_voltage(gpadc,
802 ACC_DETECT2, acc_detect2_raw);
803
804 return seq_printf(s, "%d,0x%X\n",
805 acc_detect2_convert, acc_detect2_raw);
806}
807
808static int ab8500_gpadc_acc_detect2_open(struct inode *inode,
809 struct file *file)
810{
811 return single_open(file, ab8500_gpadc_acc_detect2_print,
812 inode->i_private);
813}
814
815static const struct file_operations ab8500_gpadc_acc_detect2_fops = {
816 .open = ab8500_gpadc_acc_detect2_open,
817 .read = seq_read,
818 .llseek = seq_lseek,
819 .release = single_release,
820 .owner = THIS_MODULE,
821};
822
823static int ab8500_gpadc_aux1_print(struct seq_file *s, void *p)
824{
825 int aux1_raw;
826 int aux1_convert;
827 struct ab8500_gpadc *gpadc;
828
829 gpadc = ab8500_gpadc_get();
830 aux1_raw = ab8500_gpadc_read_raw(gpadc, ADC_AUX1);
831 aux1_convert = ab8500_gpadc_ad_to_voltage(gpadc, ADC_AUX1,
832 aux1_raw);
833
834 return seq_printf(s, "%d,0x%X\n",
835 aux1_convert, aux1_raw);
836}
837
838static int ab8500_gpadc_aux1_open(struct inode *inode, struct file *file)
839{
840 return single_open(file, ab8500_gpadc_aux1_print, inode->i_private);
841}
842
843static const struct file_operations ab8500_gpadc_aux1_fops = {
844 .open = ab8500_gpadc_aux1_open,
845 .read = seq_read,
846 .llseek = seq_lseek,
847 .release = single_release,
848 .owner = THIS_MODULE,
849};
850
851static int ab8500_gpadc_aux2_print(struct seq_file *s, void *p)
852{
853 int aux2_raw;
854 int aux2_convert;
855 struct ab8500_gpadc *gpadc;
856
857 gpadc = ab8500_gpadc_get();
858 aux2_raw = ab8500_gpadc_read_raw(gpadc, ADC_AUX2);
859 aux2_convert = ab8500_gpadc_ad_to_voltage(gpadc, ADC_AUX2,
860 aux2_raw);
861
862 return seq_printf(s, "%d,0x%X\n",
863 aux2_convert, aux2_raw);
864}
865
866static int ab8500_gpadc_aux2_open(struct inode *inode, struct file *file)
867{
868 return single_open(file, ab8500_gpadc_aux2_print, inode->i_private);
869}
870
871static const struct file_operations ab8500_gpadc_aux2_fops = {
872 .open = ab8500_gpadc_aux2_open,
873 .read = seq_read,
874 .llseek = seq_lseek,
875 .release = single_release,
876 .owner = THIS_MODULE,
877};
878
879static int ab8500_gpadc_main_bat_v_print(struct seq_file *s, void *p)
880{
881 int main_bat_v_raw;
882 int main_bat_v_convert;
883 struct ab8500_gpadc *gpadc;
884
885 gpadc = ab8500_gpadc_get();
886 main_bat_v_raw = ab8500_gpadc_read_raw(gpadc, MAIN_BAT_V);
887 main_bat_v_convert = ab8500_gpadc_ad_to_voltage(gpadc, MAIN_BAT_V,
888 main_bat_v_raw);
889
890 return seq_printf(s, "%d,0x%X\n",
891 main_bat_v_convert, main_bat_v_raw);
892}
893
894static int ab8500_gpadc_main_bat_v_open(struct inode *inode,
895 struct file *file)
896{
897 return single_open(file, ab8500_gpadc_main_bat_v_print, inode->i_private);
898}
899
900static const struct file_operations ab8500_gpadc_main_bat_v_fops = {
901 .open = ab8500_gpadc_main_bat_v_open,
902 .read = seq_read,
903 .llseek = seq_lseek,
904 .release = single_release,
905 .owner = THIS_MODULE,
906};
907
908static int ab8500_gpadc_vbus_v_print(struct seq_file *s, void *p)
909{
910 int vbus_v_raw;
911 int vbus_v_convert;
912 struct ab8500_gpadc *gpadc;
913
914 gpadc = ab8500_gpadc_get();
915 vbus_v_raw = ab8500_gpadc_read_raw(gpadc, VBUS_V);
916 vbus_v_convert = ab8500_gpadc_ad_to_voltage(gpadc, VBUS_V,
917 vbus_v_raw);
918
919 return seq_printf(s, "%d,0x%X\n",
920 vbus_v_convert, vbus_v_raw);
921}
922
923static int ab8500_gpadc_vbus_v_open(struct inode *inode, struct file *file)
924{
925 return single_open(file, ab8500_gpadc_vbus_v_print, inode->i_private);
926}
927
928static const struct file_operations ab8500_gpadc_vbus_v_fops = {
929 .open = ab8500_gpadc_vbus_v_open,
930 .read = seq_read,
931 .llseek = seq_lseek,
932 .release = single_release,
933 .owner = THIS_MODULE,
934};
935
936static int ab8500_gpadc_main_charger_c_print(struct seq_file *s, void *p)
937{
938 int main_charger_c_raw;
939 int main_charger_c_convert;
940 struct ab8500_gpadc *gpadc;
941
942 gpadc = ab8500_gpadc_get();
943 main_charger_c_raw = ab8500_gpadc_read_raw(gpadc, MAIN_CHARGER_C);
944 main_charger_c_convert = ab8500_gpadc_ad_to_voltage(gpadc,
945 MAIN_CHARGER_C, main_charger_c_raw);
946
947 return seq_printf(s, "%d,0x%X\n",
948 main_charger_c_convert, main_charger_c_raw);
949}
950
951static int ab8500_gpadc_main_charger_c_open(struct inode *inode,
952 struct file *file)
953{
954 return single_open(file, ab8500_gpadc_main_charger_c_print,
955 inode->i_private);
956}
957
958static const struct file_operations ab8500_gpadc_main_charger_c_fops = {
959 .open = ab8500_gpadc_main_charger_c_open,
960 .read = seq_read,
961 .llseek = seq_lseek,
962 .release = single_release,
963 .owner = THIS_MODULE,
964};
965
966static int ab8500_gpadc_usb_charger_c_print(struct seq_file *s, void *p)
967{
968 int usb_charger_c_raw;
969 int usb_charger_c_convert;
970 struct ab8500_gpadc *gpadc;
971
972 gpadc = ab8500_gpadc_get();
973 usb_charger_c_raw = ab8500_gpadc_read_raw(gpadc, USB_CHARGER_C);
974 usb_charger_c_convert = ab8500_gpadc_ad_to_voltage(gpadc,
975 USB_CHARGER_C, usb_charger_c_raw);
976
977 return seq_printf(s, "%d,0x%X\n",
978 usb_charger_c_convert, usb_charger_c_raw);
979}
980
981static int ab8500_gpadc_usb_charger_c_open(struct inode *inode,
982 struct file *file)
983{
984 return single_open(file, ab8500_gpadc_usb_charger_c_print,
985 inode->i_private);
986}
987
988static const struct file_operations ab8500_gpadc_usb_charger_c_fops = {
989 .open = ab8500_gpadc_usb_charger_c_open,
990 .read = seq_read,
991 .llseek = seq_lseek,
992 .release = single_release,
993 .owner = THIS_MODULE,
994};
995
996static int ab8500_gpadc_bk_bat_v_print(struct seq_file *s, void *p)
997{
998 int bk_bat_v_raw;
999 int bk_bat_v_convert;
1000 struct ab8500_gpadc *gpadc;
1001
1002 gpadc = ab8500_gpadc_get();
1003 bk_bat_v_raw = ab8500_gpadc_read_raw(gpadc, BK_BAT_V);
1004 bk_bat_v_convert = ab8500_gpadc_ad_to_voltage(gpadc,
1005 BK_BAT_V, bk_bat_v_raw);
1006
1007 return seq_printf(s, "%d,0x%X\n",
1008 bk_bat_v_convert, bk_bat_v_raw);
1009}
1010
1011static int ab8500_gpadc_bk_bat_v_open(struct inode *inode, struct file *file)
1012{
1013 return single_open(file, ab8500_gpadc_bk_bat_v_print, inode->i_private);
1014}
1015
1016static const struct file_operations ab8500_gpadc_bk_bat_v_fops = {
1017 .open = ab8500_gpadc_bk_bat_v_open,
1018 .read = seq_read,
1019 .llseek = seq_lseek,
1020 .release = single_release,
1021 .owner = THIS_MODULE,
1022};
1023
1024static int ab8500_gpadc_die_temp_print(struct seq_file *s, void *p)
1025{
1026 int die_temp_raw;
1027 int die_temp_convert;
1028 struct ab8500_gpadc *gpadc;
1029
1030 gpadc = ab8500_gpadc_get();
1031 die_temp_raw = ab8500_gpadc_read_raw(gpadc, DIE_TEMP);
1032 die_temp_convert = ab8500_gpadc_ad_to_voltage(gpadc, DIE_TEMP,
1033 die_temp_raw);
1034
1035 return seq_printf(s, "%d,0x%X\n",
1036 die_temp_convert, die_temp_raw);
1037}
1038
1039static int ab8500_gpadc_die_temp_open(struct inode *inode, struct file *file)
1040{
1041 return single_open(file, ab8500_gpadc_die_temp_print, inode->i_private);
1042}
1043
1044static const struct file_operations ab8500_gpadc_die_temp_fops = {
1045 .open = ab8500_gpadc_die_temp_open,
1046 .read = seq_read,
1047 .llseek = seq_lseek,
1048 .release = single_release,
1049 .owner = THIS_MODULE,
1050};
1051
675/* 1052/*
676 * return length of an ASCII numerical value, 0 is string is not a 1053 * return length of an ASCII numerical value, 0 is string is not a
677 * numerical value. 1054 * numerical value.
@@ -1042,6 +1419,7 @@ static const struct file_operations ab8500_hwreg_fops = {
1042}; 1419};
1043 1420
1044static struct dentry *ab8500_dir; 1421static struct dentry *ab8500_dir;
1422static struct dentry *ab8500_gpadc_dir;
1045 1423
1046static int ab8500_debug_probe(struct platform_device *plf) 1424static int ab8500_debug_probe(struct platform_device *plf)
1047{ 1425{
@@ -1052,14 +1430,14 @@ static int ab8500_debug_probe(struct platform_device *plf)
1052 irq_first = platform_get_irq_byname(plf, "IRQ_FIRST"); 1430 irq_first = platform_get_irq_byname(plf, "IRQ_FIRST");
1053 if (irq_first < 0) { 1431 if (irq_first < 0) {
1054 dev_err(&plf->dev, "First irq not found, err %d\n", 1432 dev_err(&plf->dev, "First irq not found, err %d\n",
1055 irq_first); 1433 irq_first);
1056 return irq_first; 1434 return irq_first;
1057 } 1435 }
1058 1436
1059 irq_last = platform_get_irq_byname(plf, "IRQ_LAST"); 1437 irq_last = platform_get_irq_byname(plf, "IRQ_LAST");
1060 if (irq_last < 0) { 1438 if (irq_last < 0) {
1061 dev_err(&plf->dev, "Last irq not found, err %d\n", 1439 dev_err(&plf->dev, "Last irq not found, err %d\n",
1062 irq_last); 1440 irq_last);
1063 return irq_last; 1441 return irq_last;
1064 } 1442 }
1065 1443
@@ -1067,42 +1445,108 @@ static int ab8500_debug_probe(struct platform_device *plf)
1067 if (!ab8500_dir) 1445 if (!ab8500_dir)
1068 goto err; 1446 goto err;
1069 1447
1070 file = debugfs_create_file("all-bank-registers", 1448 ab8500_gpadc_dir = debugfs_create_dir(AB8500_ADC_NAME_STRING,
1071 S_IRUGO, ab8500_dir, &plf->dev, &ab8500_registers_fops); 1449 ab8500_dir);
1450 if (!ab8500_gpadc_dir)
1451 goto err;
1452
1453 file = debugfs_create_file("all-bank-registers", S_IRUGO,
1454 ab8500_dir, &plf->dev, &ab8500_registers_fops);
1455 if (!file)
1456 goto err;
1457
1458 file = debugfs_create_file("register-bank", (S_IRUGO | S_IWUSR),
1459 ab8500_dir, &plf->dev, &ab8500_bank_fops);
1460 if (!file)
1461 goto err;
1462
1463 file = debugfs_create_file("register-address", (S_IRUGO | S_IWUSR),
1464 ab8500_dir, &plf->dev, &ab8500_address_fops);
1465 if (!file)
1466 goto err;
1467
1468 file = debugfs_create_file("register-value", (S_IRUGO | S_IWUSR),
1469 ab8500_dir, &plf->dev, &ab8500_val_fops);
1470 if (!file)
1471 goto err;
1472
1473 file = debugfs_create_file("irq-subscribe", (S_IRUGO | S_IWUSR),
1474 ab8500_dir, &plf->dev, &ab8500_subscribe_fops);
1475 if (!file)
1476 goto err;
1477
1478 file = debugfs_create_file("irq-unsubscribe", (S_IRUGO | S_IWUSR),
1479 ab8500_dir, &plf->dev, &ab8500_unsubscribe_fops);
1480 if (!file)
1481 goto err;
1482
1483 file = debugfs_create_file("hwreg", (S_IRUGO | S_IWUSR),
1484 ab8500_dir, &plf->dev, &ab8500_hwreg_fops);
1485 if (!file)
1486 goto err;
1487
1488 file = debugfs_create_file("bat_ctrl", (S_IRUGO | S_IWUSR),
1489 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_bat_ctrl_fops);
1490 if (!file)
1491 goto err;
1492
1493 file = debugfs_create_file("btemp_ball", (S_IRUGO | S_IWUSR),
1494 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_btemp_ball_fops);
1495 if (!file)
1496 goto err;
1497
1498 file = debugfs_create_file("main_charger_v", (S_IRUGO | S_IWUSR),
1499 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_main_charger_v_fops);
1500 if (!file)
1501 goto err;
1502
1503 file = debugfs_create_file("acc_detect1", (S_IRUGO | S_IWUSR),
1504 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_acc_detect1_fops);
1505 if (!file)
1506 goto err;
1507
1508 file = debugfs_create_file("acc_detect2", (S_IRUGO | S_IWUSR),
1509 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_acc_detect2_fops);
1510 if (!file)
1511 goto err;
1512
1513 file = debugfs_create_file("adc_aux1", (S_IRUGO | S_IWUSR),
1514 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_aux1_fops);
1515 if (!file)
1516 goto err;
1517
1518 file = debugfs_create_file("adc_aux2", (S_IRUGO | S_IWUSR),
1519 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_aux2_fops);
1072 if (!file) 1520 if (!file)
1073 goto err; 1521 goto err;
1074 1522
1075 file = debugfs_create_file("register-bank", 1523 file = debugfs_create_file("main_bat_v", (S_IRUGO | S_IWUSR),
1076 (S_IRUGO | S_IWUSR), ab8500_dir, &plf->dev, &ab8500_bank_fops); 1524 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_main_bat_v_fops);
1077 if (!file) 1525 if (!file)
1078 goto err; 1526 goto err;
1079 1527
1080 file = debugfs_create_file("register-address", 1528 file = debugfs_create_file("vbus_v", (S_IRUGO | S_IWUSR),
1081 (S_IRUGO | S_IWUSR), ab8500_dir, &plf->dev, 1529 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_vbus_v_fops);
1082 &ab8500_address_fops);
1083 if (!file) 1530 if (!file)
1084 goto err; 1531 goto err;
1085 1532
1086 file = debugfs_create_file("register-value", 1533 file = debugfs_create_file("main_charger_c", (S_IRUGO | S_IWUSR),
1087 (S_IRUGO | S_IWUSR), ab8500_dir, &plf->dev, &ab8500_val_fops); 1534 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_main_charger_c_fops);
1088 if (!file) 1535 if (!file)
1089 goto err; 1536 goto err;
1090 1537
1091 file = debugfs_create_file("irq-subscribe", 1538 file = debugfs_create_file("usb_charger_c", (S_IRUGO | S_IWUSR),
1092 (S_IRUGO | S_IWUSR), ab8500_dir, &plf->dev, 1539 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_usb_charger_c_fops);
1093 &ab8500_subscribe_fops);
1094 if (!file) 1540 if (!file)
1095 goto err; 1541 goto err;
1096 1542
1097 file = debugfs_create_file("irq-unsubscribe", 1543 file = debugfs_create_file("bk_bat_v", (S_IRUGO | S_IWUSR),
1098 (S_IRUGO | S_IWUSR), ab8500_dir, &plf->dev, 1544 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_bk_bat_v_fops);
1099 &ab8500_unsubscribe_fops);
1100 if (!file) 1545 if (!file)
1101 goto err; 1546 goto err;
1102 1547
1103 file = debugfs_create_file("hwreg", 1548 file = debugfs_create_file("die_temp", (S_IRUGO | S_IWUSR),
1104 (S_IRUGO | S_IWUSR), ab8500_dir, &plf->dev, 1549 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_die_temp_fops);
1105 &ab8500_hwreg_fops);
1106 if (!file) 1550 if (!file)
1107 goto err; 1551 goto err;
1108 1552