aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-02-26 07:05:15 -0500
committerLee Jones <lee.jones@linaro.org>2013-03-06 23:29:36 -0500
commit9f9ba15f74cec390ad4a58f9e73fed591e46ddab (patch)
tree2495a018c034a65cf062cd1f81e12f3455824124 /drivers/mfd
parentf348fefd2a227122eb2d723e255c60cf491d0557 (diff)
mfd: ab8500-debugfs: Trivially beautify the debugfs driver
Just lots of white space corrections, changing some of the 4 space tabs to 8 and pulling back some of the double tabbing back into singles, such as the remaining of the driver. Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/ab8500-debugfs.c186
1 files changed, 89 insertions, 97 deletions
diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c
index e33c1628c65b..b88bbbc15f1e 100644
--- a/drivers/mfd/ab8500-debugfs.c
+++ b/drivers/mfd/ab8500-debugfs.c
@@ -1504,8 +1504,8 @@ static int ab8500_address_open(struct inode *inode, struct file *file)
1504} 1504}
1505 1505
1506static ssize_t ab8500_address_write(struct file *file, 1506static ssize_t ab8500_address_write(struct file *file,
1507 const char __user *user_buf, 1507 const char __user *user_buf,
1508 size_t count, loff_t *ppos) 1508 size_t count, loff_t *ppos)
1509{ 1509{
1510 struct device *dev = ((struct seq_file *)(file->private_data))->private; 1510 struct device *dev = ((struct seq_file *)(file->private_data))->private;
1511 unsigned long user_address; 1511 unsigned long user_address;
@@ -1548,8 +1548,8 @@ static int ab8500_val_open(struct inode *inode, struct file *file)
1548} 1548}
1549 1549
1550static ssize_t ab8500_val_write(struct file *file, 1550static ssize_t ab8500_val_write(struct file *file,
1551 const char __user *user_buf, 1551 const char __user *user_buf,
1552 size_t count, loff_t *ppos) 1552 size_t count, loff_t *ppos)
1553{ 1553{
1554 struct device *dev = ((struct seq_file *)(file->private_data))->private; 1554 struct device *dev = ((struct seq_file *)(file->private_data))->private;
1555 unsigned long user_val; 1555 unsigned long user_val;
@@ -1747,7 +1747,7 @@ static int ab8500_gpadc_bat_ctrl_print(struct seq_file *s, void *p)
1747 BAT_CTRL, bat_ctrl_raw); 1747 BAT_CTRL, bat_ctrl_raw);
1748 1748
1749 return seq_printf(s, "%d,0x%X\n", 1749 return seq_printf(s, "%d,0x%X\n",
1750 bat_ctrl_convert, bat_ctrl_raw); 1750 bat_ctrl_convert, bat_ctrl_raw);
1751} 1751}
1752 1752
1753static int ab8500_gpadc_bat_ctrl_open(struct inode *inode, struct file *file) 1753static int ab8500_gpadc_bat_ctrl_open(struct inode *inode, struct file *file)
@@ -1776,11 +1776,11 @@ static int ab8500_gpadc_btemp_ball_print(struct seq_file *s, void *p)
1776 btemp_ball_raw); 1776 btemp_ball_raw);
1777 1777
1778 return seq_printf(s, 1778 return seq_printf(s,
1779 "%d,0x%X\n", btemp_ball_convert, btemp_ball_raw); 1779 "%d,0x%X\n", btemp_ball_convert, btemp_ball_raw);
1780} 1780}
1781 1781
1782static int ab8500_gpadc_btemp_ball_open(struct inode *inode, 1782static int ab8500_gpadc_btemp_ball_open(struct inode *inode,
1783 struct file *file) 1783 struct file *file)
1784{ 1784{
1785 return single_open(file, ab8500_gpadc_btemp_ball_print, inode->i_private); 1785 return single_open(file, ab8500_gpadc_btemp_ball_print, inode->i_private);
1786} 1786}
@@ -1810,10 +1810,10 @@ static int ab8500_gpadc_main_charger_v_print(struct seq_file *s, void *p)
1810} 1810}
1811 1811
1812static int ab8500_gpadc_main_charger_v_open(struct inode *inode, 1812static int ab8500_gpadc_main_charger_v_open(struct inode *inode,
1813 struct file *file) 1813 struct file *file)
1814{ 1814{
1815 return single_open(file, ab8500_gpadc_main_charger_v_print, 1815 return single_open(file, ab8500_gpadc_main_charger_v_print,
1816 inode->i_private); 1816 inode->i_private);
1817} 1817}
1818 1818
1819static const struct file_operations ab8500_gpadc_main_charger_v_fops = { 1819static const struct file_operations ab8500_gpadc_main_charger_v_fops = {
@@ -1837,14 +1837,14 @@ static int ab8500_gpadc_acc_detect1_print(struct seq_file *s, void *p)
1837 acc_detect1_raw); 1837 acc_detect1_raw);
1838 1838
1839 return seq_printf(s, "%d,0x%X\n", 1839 return seq_printf(s, "%d,0x%X\n",
1840 acc_detect1_convert, acc_detect1_raw); 1840 acc_detect1_convert, acc_detect1_raw);
1841} 1841}
1842 1842
1843static int ab8500_gpadc_acc_detect1_open(struct inode *inode, 1843static int ab8500_gpadc_acc_detect1_open(struct inode *inode,
1844 struct file *file) 1844 struct file *file)
1845{ 1845{
1846 return single_open(file, ab8500_gpadc_acc_detect1_print, 1846 return single_open(file, ab8500_gpadc_acc_detect1_print,
1847 inode->i_private); 1847 inode->i_private);
1848} 1848}
1849 1849
1850static const struct file_operations ab8500_gpadc_acc_detect1_fops = { 1850static const struct file_operations ab8500_gpadc_acc_detect1_fops = {
@@ -1868,14 +1868,14 @@ static int ab8500_gpadc_acc_detect2_print(struct seq_file *s, void *p)
1868 ACC_DETECT2, acc_detect2_raw); 1868 ACC_DETECT2, acc_detect2_raw);
1869 1869
1870 return seq_printf(s, "%d,0x%X\n", 1870 return seq_printf(s, "%d,0x%X\n",
1871 acc_detect2_convert, acc_detect2_raw); 1871 acc_detect2_convert, acc_detect2_raw);
1872} 1872}
1873 1873
1874static int ab8500_gpadc_acc_detect2_open(struct inode *inode, 1874static int ab8500_gpadc_acc_detect2_open(struct inode *inode,
1875 struct file *file) 1875 struct file *file)
1876{ 1876{
1877 return single_open(file, ab8500_gpadc_acc_detect2_print, 1877 return single_open(file, ab8500_gpadc_acc_detect2_print,
1878 inode->i_private); 1878 inode->i_private);
1879} 1879}
1880 1880
1881static const struct file_operations ab8500_gpadc_acc_detect2_fops = { 1881static const struct file_operations ab8500_gpadc_acc_detect2_fops = {
@@ -1899,7 +1899,7 @@ static int ab8500_gpadc_aux1_print(struct seq_file *s, void *p)
1899 aux1_raw); 1899 aux1_raw);
1900 1900
1901 return seq_printf(s, "%d,0x%X\n", 1901 return seq_printf(s, "%d,0x%X\n",
1902 aux1_convert, aux1_raw); 1902 aux1_convert, aux1_raw);
1903} 1903}
1904 1904
1905static int ab8500_gpadc_aux1_open(struct inode *inode, struct file *file) 1905static int ab8500_gpadc_aux1_open(struct inode *inode, struct file *file)
@@ -1957,11 +1957,11 @@ static int ab8500_gpadc_main_bat_v_print(struct seq_file *s, void *p)
1957 main_bat_v_raw); 1957 main_bat_v_raw);
1958 1958
1959 return seq_printf(s, "%d,0x%X\n", 1959 return seq_printf(s, "%d,0x%X\n",
1960 main_bat_v_convert, main_bat_v_raw); 1960 main_bat_v_convert, main_bat_v_raw);
1961} 1961}
1962 1962
1963static int ab8500_gpadc_main_bat_v_open(struct inode *inode, 1963static int ab8500_gpadc_main_bat_v_open(struct inode *inode,
1964 struct file *file) 1964 struct file *file)
1965{ 1965{
1966 return single_open(file, ab8500_gpadc_main_bat_v_print, inode->i_private); 1966 return single_open(file, ab8500_gpadc_main_bat_v_print, inode->i_private);
1967} 1967}
@@ -1987,7 +1987,7 @@ static int ab8500_gpadc_vbus_v_print(struct seq_file *s, void *p)
1987 vbus_v_raw); 1987 vbus_v_raw);
1988 1988
1989 return seq_printf(s, "%d,0x%X\n", 1989 return seq_printf(s, "%d,0x%X\n",
1990 vbus_v_convert, vbus_v_raw); 1990 vbus_v_convert, vbus_v_raw);
1991} 1991}
1992 1992
1993static int ab8500_gpadc_vbus_v_open(struct inode *inode, struct file *file) 1993static int ab8500_gpadc_vbus_v_open(struct inode *inode, struct file *file)
@@ -2016,14 +2016,14 @@ static int ab8500_gpadc_main_charger_c_print(struct seq_file *s, void *p)
2016 MAIN_CHARGER_C, main_charger_c_raw); 2016 MAIN_CHARGER_C, main_charger_c_raw);
2017 2017
2018 return seq_printf(s, "%d,0x%X\n", 2018 return seq_printf(s, "%d,0x%X\n",
2019 main_charger_c_convert, main_charger_c_raw); 2019 main_charger_c_convert, main_charger_c_raw);
2020} 2020}
2021 2021
2022static int ab8500_gpadc_main_charger_c_open(struct inode *inode, 2022static int ab8500_gpadc_main_charger_c_open(struct inode *inode,
2023 struct file *file) 2023 struct file *file)
2024{ 2024{
2025 return single_open(file, ab8500_gpadc_main_charger_c_print, 2025 return single_open(file, ab8500_gpadc_main_charger_c_print,
2026 inode->i_private); 2026 inode->i_private);
2027} 2027}
2028 2028
2029static const struct file_operations ab8500_gpadc_main_charger_c_fops = { 2029static const struct file_operations ab8500_gpadc_main_charger_c_fops = {
@@ -2047,14 +2047,14 @@ static int ab8500_gpadc_usb_charger_c_print(struct seq_file *s, void *p)
2047 USB_CHARGER_C, usb_charger_c_raw); 2047 USB_CHARGER_C, usb_charger_c_raw);
2048 2048
2049 return seq_printf(s, "%d,0x%X\n", 2049 return seq_printf(s, "%d,0x%X\n",
2050 usb_charger_c_convert, usb_charger_c_raw); 2050 usb_charger_c_convert, usb_charger_c_raw);
2051} 2051}
2052 2052
2053static int ab8500_gpadc_usb_charger_c_open(struct inode *inode, 2053static int ab8500_gpadc_usb_charger_c_open(struct inode *inode,
2054 struct file *file) 2054 struct file *file)
2055{ 2055{
2056 return single_open(file, ab8500_gpadc_usb_charger_c_print, 2056 return single_open(file, ab8500_gpadc_usb_charger_c_print,
2057 inode->i_private); 2057 inode->i_private);
2058} 2058}
2059 2059
2060static const struct file_operations ab8500_gpadc_usb_charger_c_fops = { 2060static const struct file_operations ab8500_gpadc_usb_charger_c_fops = {
@@ -2078,7 +2078,7 @@ static int ab8500_gpadc_bk_bat_v_print(struct seq_file *s, void *p)
2078 BK_BAT_V, bk_bat_v_raw); 2078 BK_BAT_V, bk_bat_v_raw);
2079 2079
2080 return seq_printf(s, "%d,0x%X\n", 2080 return seq_printf(s, "%d,0x%X\n",
2081 bk_bat_v_convert, bk_bat_v_raw); 2081 bk_bat_v_convert, bk_bat_v_raw);
2082} 2082}
2083 2083
2084static int ab8500_gpadc_bk_bat_v_open(struct inode *inode, struct file *file) 2084static int ab8500_gpadc_bk_bat_v_open(struct inode *inode, struct file *file)
@@ -2107,7 +2107,7 @@ static int ab8500_gpadc_die_temp_print(struct seq_file *s, void *p)
2107 die_temp_raw); 2107 die_temp_raw);
2108 2108
2109 return seq_printf(s, "%d,0x%X\n", 2109 return seq_printf(s, "%d,0x%X\n",
2110 die_temp_convert, die_temp_raw); 2110 die_temp_convert, die_temp_raw);
2111} 2111}
2112 2112
2113static int ab8500_gpadc_die_temp_open(struct inode *inode, struct file *file) 2113static int ab8500_gpadc_die_temp_open(struct inode *inode, struct file *file)
@@ -2136,7 +2136,7 @@ static int ab8500_gpadc_usb_id_print(struct seq_file *s, void *p)
2136 usb_id_raw); 2136 usb_id_raw);
2137 2137
2138 return seq_printf(s, "%d,0x%X\n", 2138 return seq_printf(s, "%d,0x%X\n",
2139 usb_id_convert, usb_id_raw); 2139 usb_id_convert, usb_id_raw);
2140} 2140}
2141 2141
2142static int ab8500_gpadc_usb_id_open(struct inode *inode, struct file *file) 2142static int ab8500_gpadc_usb_id_open(struct inode *inode, struct file *file)
@@ -2165,13 +2165,13 @@ static int ab8540_gpadc_xtal_temp_print(struct seq_file *s, void *p)
2165 xtal_temp_raw); 2165 xtal_temp_raw);
2166 2166
2167 return seq_printf(s, "%d,0x%X\n", 2167 return seq_printf(s, "%d,0x%X\n",
2168 xtal_temp_convert, xtal_temp_raw); 2168 xtal_temp_convert, xtal_temp_raw);
2169} 2169}
2170 2170
2171static int ab8540_gpadc_xtal_temp_open(struct inode *inode, struct file *file) 2171static int ab8540_gpadc_xtal_temp_open(struct inode *inode, struct file *file)
2172{ 2172{
2173 return single_open(file, ab8540_gpadc_xtal_temp_print, 2173 return single_open(file, ab8540_gpadc_xtal_temp_print,
2174 inode->i_private); 2174 inode->i_private);
2175} 2175}
2176 2176
2177static const struct file_operations ab8540_gpadc_xtal_temp_fops = { 2177static const struct file_operations ab8540_gpadc_xtal_temp_fops = {
@@ -2195,14 +2195,14 @@ static int ab8540_gpadc_vbat_true_meas_print(struct seq_file *s, void *p)
2195 vbat_true_meas_raw); 2195 vbat_true_meas_raw);
2196 2196
2197 return seq_printf(s, "%d,0x%X\n", 2197 return seq_printf(s, "%d,0x%X\n",
2198 vbat_true_meas_convert, vbat_true_meas_raw); 2198 vbat_true_meas_convert, vbat_true_meas_raw);
2199} 2199}
2200 2200
2201static int ab8540_gpadc_vbat_true_meas_open(struct inode *inode, 2201static int ab8540_gpadc_vbat_true_meas_open(struct inode *inode,
2202 struct file *file) 2202 struct file *file)
2203{ 2203{
2204 return single_open(file, ab8540_gpadc_vbat_true_meas_print, 2204 return single_open(file, ab8540_gpadc_vbat_true_meas_print,
2205 inode->i_private); 2205 inode->i_private);
2206} 2206}
2207 2207
2208static const struct file_operations ab8540_gpadc_vbat_true_meas_fops = { 2208static const struct file_operations ab8540_gpadc_vbat_true_meas_fops = {
@@ -2231,15 +2231,15 @@ static int ab8540_gpadc_bat_ctrl_and_ibat_print(struct seq_file *s, void *p)
2231 ibat_raw); 2231 ibat_raw);
2232 2232
2233 return seq_printf(s, "%d,0x%X\n" "%d,0x%X\n", 2233 return seq_printf(s, "%d,0x%X\n" "%d,0x%X\n",
2234 bat_ctrl_convert, bat_ctrl_raw, 2234 bat_ctrl_convert, bat_ctrl_raw,
2235 ibat_convert, ibat_raw); 2235 ibat_convert, ibat_raw);
2236} 2236}
2237 2237
2238static int ab8540_gpadc_bat_ctrl_and_ibat_open(struct inode *inode, 2238static int ab8540_gpadc_bat_ctrl_and_ibat_open(struct inode *inode,
2239 struct file *file) 2239 struct file *file)
2240{ 2240{
2241 return single_open(file, ab8540_gpadc_bat_ctrl_and_ibat_print, 2241 return single_open(file, ab8540_gpadc_bat_ctrl_and_ibat_print,
2242 inode->i_private); 2242 inode->i_private);
2243} 2243}
2244 2244
2245static const struct file_operations ab8540_gpadc_bat_ctrl_and_ibat_fops = { 2245static const struct file_operations ab8540_gpadc_bat_ctrl_and_ibat_fops = {
@@ -2267,15 +2267,15 @@ static int ab8540_gpadc_vbat_meas_and_ibat_print(struct seq_file *s, void *p)
2267 ibat_raw); 2267 ibat_raw);
2268 2268
2269 return seq_printf(s, "%d,0x%X\n" "%d,0x%X\n", 2269 return seq_printf(s, "%d,0x%X\n" "%d,0x%X\n",
2270 vbat_meas_convert, vbat_meas_raw, 2270 vbat_meas_convert, vbat_meas_raw,
2271 ibat_convert, ibat_raw); 2271 ibat_convert, ibat_raw);
2272} 2272}
2273 2273
2274static int ab8540_gpadc_vbat_meas_and_ibat_open(struct inode *inode, 2274static int ab8540_gpadc_vbat_meas_and_ibat_open(struct inode *inode,
2275 struct file *file) 2275 struct file *file)
2276{ 2276{
2277 return single_open(file, ab8540_gpadc_vbat_meas_and_ibat_print, 2277 return single_open(file, ab8540_gpadc_vbat_meas_and_ibat_print,
2278 inode->i_private); 2278 inode->i_private);
2279} 2279}
2280 2280
2281static const struct file_operations ab8540_gpadc_vbat_meas_and_ibat_fops = { 2281static const struct file_operations ab8540_gpadc_vbat_meas_and_ibat_fops = {
@@ -2304,15 +2304,15 @@ static int ab8540_gpadc_vbat_true_meas_and_ibat_print(struct seq_file *s, void *
2304 ibat_raw); 2304 ibat_raw);
2305 2305
2306 return seq_printf(s, "%d,0x%X\n" "%d,0x%X\n", 2306 return seq_printf(s, "%d,0x%X\n" "%d,0x%X\n",
2307 vbat_true_meas_convert, vbat_true_meas_raw, 2307 vbat_true_meas_convert, vbat_true_meas_raw,
2308 ibat_convert, ibat_raw); 2308 ibat_convert, ibat_raw);
2309} 2309}
2310 2310
2311static int ab8540_gpadc_vbat_true_meas_and_ibat_open(struct inode *inode, 2311static int ab8540_gpadc_vbat_true_meas_and_ibat_open(struct inode *inode,
2312 struct file *file) 2312 struct file *file)
2313{ 2313{
2314 return single_open(file, ab8540_gpadc_vbat_true_meas_and_ibat_print, 2314 return single_open(file, ab8540_gpadc_vbat_true_meas_and_ibat_print,
2315 inode->i_private); 2315 inode->i_private);
2316} 2316}
2317 2317
2318static const struct file_operations ab8540_gpadc_vbat_true_meas_and_ibat_fops = { 2318static const struct file_operations ab8540_gpadc_vbat_true_meas_and_ibat_fops = {
@@ -2340,15 +2340,15 @@ static int ab8540_gpadc_bat_temp_and_ibat_print(struct seq_file *s, void *p)
2340 ibat_raw); 2340 ibat_raw);
2341 2341
2342 return seq_printf(s, "%d,0x%X\n" "%d,0x%X\n", 2342 return seq_printf(s, "%d,0x%X\n" "%d,0x%X\n",
2343 bat_temp_convert, bat_temp_raw, 2343 bat_temp_convert, bat_temp_raw,
2344 ibat_convert, ibat_raw); 2344 ibat_convert, ibat_raw);
2345} 2345}
2346 2346
2347static int ab8540_gpadc_bat_temp_and_ibat_open(struct inode *inode, 2347static int ab8540_gpadc_bat_temp_and_ibat_open(struct inode *inode,
2348 struct file *file) 2348 struct file *file)
2349{ 2349{
2350 return single_open(file, ab8540_gpadc_bat_temp_and_ibat_print, 2350 return single_open(file, ab8540_gpadc_bat_temp_and_ibat_print,
2351 inode->i_private); 2351 inode->i_private);
2352} 2352}
2353 2353
2354static const struct file_operations ab8540_gpadc_bat_temp_and_ibat_fops = { 2354static const struct file_operations ab8540_gpadc_bat_temp_and_ibat_fops = {
@@ -2369,22 +2369,14 @@ static int ab8540_gpadc_otp_cal_print(struct seq_file *s, void *p)
2369 ab8540_gpadc_get_otp(gpadc, &vmain_l, &vmain_h, &btemp_l, &btemp_h, 2369 ab8540_gpadc_get_otp(gpadc, &vmain_l, &vmain_h, &btemp_l, &btemp_h,
2370 &vbat_l, &vbat_h, &ibat_l, &ibat_h); 2370 &vbat_l, &vbat_h, &ibat_l, &ibat_h);
2371 return seq_printf(s, "VMAIN_L:0x%X\n" 2371 return seq_printf(s, "VMAIN_L:0x%X\n"
2372 "VMAIN_H:0x%X\n" 2372 "VMAIN_H:0x%X\n"
2373 "BTEMP_L:0x%X\n" 2373 "BTEMP_L:0x%X\n"
2374 "BTEMP_H:0x%X\n" 2374 "BTEMP_H:0x%X\n"
2375 "VBAT_L:0x%X\n" 2375 "VBAT_L:0x%X\n"
2376 "VBAT_H:0x%X\n" 2376 "VBAT_H:0x%X\n"
2377 "IBAT_L:0x%X\n" 2377 "IBAT_L:0x%X\n"
2378 "IBAT_H:0x%X\n" 2378 "IBAT_H:0x%X\n",
2379 , 2379 vmain_l, vmain_h, btemp_l, btemp_h, vbat_l, vbat_h, ibat_l, ibat_h);
2380 vmain_l,
2381 vmain_h,
2382 btemp_l,
2383 btemp_h,
2384 vbat_l,
2385 vbat_h,
2386 ibat_l,
2387 ibat_h);
2388} 2380}
2389 2381
2390static int ab8540_gpadc_otp_cal_open(struct inode *inode, struct file *file) 2382static int ab8540_gpadc_otp_cal_open(struct inode *inode, struct file *file)
@@ -2408,7 +2400,7 @@ static int ab8500_gpadc_avg_sample_print(struct seq_file *s, void *p)
2408static int ab8500_gpadc_avg_sample_open(struct inode *inode, struct file *file) 2400static int ab8500_gpadc_avg_sample_open(struct inode *inode, struct file *file)
2409{ 2401{
2410 return single_open(file, ab8500_gpadc_avg_sample_print, 2402 return single_open(file, ab8500_gpadc_avg_sample_print,
2411 inode->i_private); 2403 inode->i_private);
2412} 2404}
2413 2405
2414static ssize_t ab8500_gpadc_avg_sample_write(struct file *file, 2406static ssize_t ab8500_gpadc_avg_sample_write(struct file *file,
@@ -2453,7 +2445,7 @@ static int ab8500_gpadc_trig_edge_print(struct seq_file *s, void *p)
2453static int ab8500_gpadc_trig_edge_open(struct inode *inode, struct file *file) 2445static int ab8500_gpadc_trig_edge_open(struct inode *inode, struct file *file)
2454{ 2446{
2455 return single_open(file, ab8500_gpadc_trig_edge_print, 2447 return single_open(file, ab8500_gpadc_trig_edge_print,
2456 inode->i_private); 2448 inode->i_private);
2457} 2449}
2458 2450
2459static ssize_t ab8500_gpadc_trig_edge_write(struct file *file, 2451static ssize_t ab8500_gpadc_trig_edge_write(struct file *file,
@@ -2498,7 +2490,7 @@ static int ab8500_gpadc_trig_timer_print(struct seq_file *s, void *p)
2498static int ab8500_gpadc_trig_timer_open(struct inode *inode, struct file *file) 2490static int ab8500_gpadc_trig_timer_open(struct inode *inode, struct file *file)
2499{ 2491{
2500 return single_open(file, ab8500_gpadc_trig_timer_print, 2492 return single_open(file, ab8500_gpadc_trig_timer_print,
2501 inode->i_private); 2493 inode->i_private);
2502} 2494}
2503 2495
2504static ssize_t ab8500_gpadc_trig_timer_write(struct file *file, 2496static ssize_t ab8500_gpadc_trig_timer_write(struct file *file,
@@ -2541,7 +2533,7 @@ static int ab8500_gpadc_conv_type_print(struct seq_file *s, void *p)
2541static int ab8500_gpadc_conv_type_open(struct inode *inode, struct file *file) 2533static int ab8500_gpadc_conv_type_open(struct inode *inode, struct file *file)
2542{ 2534{
2543 return single_open(file, ab8500_gpadc_conv_type_print, 2535 return single_open(file, ab8500_gpadc_conv_type_print,
2544 inode->i_private); 2536 inode->i_private);
2545} 2537}
2546 2538
2547static ssize_t ab8500_gpadc_conv_type_write(struct file *file, 2539static ssize_t ab8500_gpadc_conv_type_write(struct file *file,
@@ -2753,7 +2745,7 @@ static int ab8500_subscribe_unsubscribe_open(struct inode *inode,
2753 struct file *file) 2745 struct file *file)
2754{ 2746{
2755 return single_open(file, ab8500_subscribe_unsubscribe_print, 2747 return single_open(file, ab8500_subscribe_unsubscribe_print,
2756 inode->i_private); 2748 inode->i_private);
2757} 2749}
2758 2750
2759/* 2751/*
@@ -2970,7 +2962,7 @@ static int ab8500_debug_probe(struct platform_device *plf)
2970 irq_first = platform_get_irq_byname(plf, "IRQ_FIRST"); 2962 irq_first = platform_get_irq_byname(plf, "IRQ_FIRST");
2971 if (irq_first < 0) { 2963 if (irq_first < 0) {
2972 dev_err(&plf->dev, "First irq not found, err %d\n", 2964 dev_err(&plf->dev, "First irq not found, err %d\n",
2973 irq_first); 2965 irq_first);
2974 ret = irq_first; 2966 ret = irq_first;
2975 goto out_freeevent_name; 2967 goto out_freeevent_name;
2976 } 2968 }
@@ -2978,7 +2970,7 @@ static int ab8500_debug_probe(struct platform_device *plf)
2978 irq_last = platform_get_irq_byname(plf, "IRQ_LAST"); 2970 irq_last = platform_get_irq_byname(plf, "IRQ_LAST");
2979 if (irq_last < 0) { 2971 if (irq_last < 0) {
2980 dev_err(&plf->dev, "Last irq not found, err %d\n", 2972 dev_err(&plf->dev, "Last irq not found, err %d\n",
2981 irq_last); 2973 irq_last);
2982 ret = irq_last; 2974 ret = irq_last;
2983 goto out_freeevent_name; 2975 goto out_freeevent_name;
2984 } 2976 }
@@ -2988,37 +2980,37 @@ static int ab8500_debug_probe(struct platform_device *plf)
2988 goto err; 2980 goto err;
2989 2981
2990 ab8500_gpadc_dir = debugfs_create_dir(AB8500_ADC_NAME_STRING, 2982 ab8500_gpadc_dir = debugfs_create_dir(AB8500_ADC_NAME_STRING,
2991 ab8500_dir); 2983 ab8500_dir);
2992 if (!ab8500_gpadc_dir) 2984 if (!ab8500_gpadc_dir)
2993 goto err; 2985 goto err;
2994 2986
2995 file = debugfs_create_file("all-bank-registers", S_IRUGO, 2987 file = debugfs_create_file("all-bank-registers", S_IRUGO,
2996 ab8500_dir, &plf->dev, &ab8500_registers_fops); 2988 ab8500_dir, &plf->dev, &ab8500_registers_fops);
2997 if (!file) 2989 if (!file)
2998 goto err; 2990 goto err;
2999 2991
3000 file = debugfs_create_file("all-banks", S_IRUGO, 2992 file = debugfs_create_file("all-banks", S_IRUGO,
3001 ab8500_dir, &plf->dev, &ab8500_all_banks_fops); 2993 ab8500_dir, &plf->dev, &ab8500_all_banks_fops);
3002 if (!file) 2994 if (!file)
3003 goto err; 2995 goto err;
3004 2996
3005 file = debugfs_create_file("register-bank", (S_IRUGO | S_IWUSR | S_IWGRP), 2997 file = debugfs_create_file("register-bank", (S_IRUGO | S_IWUSR | S_IWGRP),
3006 ab8500_dir, &plf->dev, &ab8500_bank_fops); 2998 ab8500_dir, &plf->dev, &ab8500_bank_fops);
3007 if (!file) 2999 if (!file)
3008 goto err; 3000 goto err;
3009 3001
3010 file = debugfs_create_file("register-address", (S_IRUGO | S_IWUSR | S_IWGRP), 3002 file = debugfs_create_file("register-address", (S_IRUGO | S_IWUSR | S_IWGRP),
3011 ab8500_dir, &plf->dev, &ab8500_address_fops); 3003 ab8500_dir, &plf->dev, &ab8500_address_fops);
3012 if (!file) 3004 if (!file)
3013 goto err; 3005 goto err;
3014 3006
3015 file = debugfs_create_file("register-value", (S_IRUGO | S_IWUSR | S_IWGRP), 3007 file = debugfs_create_file("register-value", (S_IRUGO | S_IWUSR | S_IWGRP),
3016 ab8500_dir, &plf->dev, &ab8500_val_fops); 3008 ab8500_dir, &plf->dev, &ab8500_val_fops);
3017 if (!file) 3009 if (!file)
3018 goto err; 3010 goto err;
3019 3011
3020 file = debugfs_create_file("irq-subscribe", (S_IRUGO | S_IWUSR | S_IWGRP), 3012 file = debugfs_create_file("irq-subscribe", (S_IRUGO | S_IWUSR | S_IWGRP),
3021 ab8500_dir, &plf->dev, &ab8500_subscribe_fops); 3013 ab8500_dir, &plf->dev, &ab8500_subscribe_fops);
3022 if (!file) 3014 if (!file)
3023 goto err; 3015 goto err;
3024 3016
@@ -3037,17 +3029,17 @@ static int ab8500_debug_probe(struct platform_device *plf)
3037 } 3029 }
3038 3030
3039 file = debugfs_create_file("interrupts", (S_IRUGO), 3031 file = debugfs_create_file("interrupts", (S_IRUGO),
3040 ab8500_dir, &plf->dev, &ab8500_interrupts_fops); 3032 ab8500_dir, &plf->dev, &ab8500_interrupts_fops);
3041 if (!file) 3033 if (!file)
3042 goto err; 3034 goto err;
3043 3035
3044 file = debugfs_create_file("irq-unsubscribe", (S_IRUGO | S_IWUSR | S_IWGRP), 3036 file = debugfs_create_file("irq-unsubscribe", (S_IRUGO | S_IWUSR | S_IWGRP),
3045 ab8500_dir, &plf->dev, &ab8500_unsubscribe_fops); 3037 ab8500_dir, &plf->dev, &ab8500_unsubscribe_fops);
3046 if (!file) 3038 if (!file)
3047 goto err; 3039 goto err;
3048 3040
3049 file = debugfs_create_file("hwreg", (S_IRUGO | S_IWUSR | S_IWGRP), 3041 file = debugfs_create_file("hwreg", (S_IRUGO | S_IWUSR | S_IWGRP),
3050 ab8500_dir, &plf->dev, &ab8500_hwreg_fops); 3042 ab8500_dir, &plf->dev, &ab8500_hwreg_fops);
3051 if (!file) 3043 if (!file)
3052 goto err; 3044 goto err;
3053 3045
@@ -3057,67 +3049,67 @@ static int ab8500_debug_probe(struct platform_device *plf)
3057 goto err; 3049 goto err;
3058 3050
3059 file = debugfs_create_file("bat_ctrl", (S_IRUGO | S_IWUSR | S_IWGRP), 3051 file = debugfs_create_file("bat_ctrl", (S_IRUGO | S_IWUSR | S_IWGRP),
3060 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_bat_ctrl_fops); 3052 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_bat_ctrl_fops);
3061 if (!file) 3053 if (!file)
3062 goto err; 3054 goto err;
3063 3055
3064 file = debugfs_create_file("btemp_ball", (S_IRUGO | S_IWUSR | S_IWGRP), 3056 file = debugfs_create_file("btemp_ball", (S_IRUGO | S_IWUSR | S_IWGRP),
3065 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_btemp_ball_fops); 3057 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_btemp_ball_fops);
3066 if (!file) 3058 if (!file)
3067 goto err; 3059 goto err;
3068 3060
3069 file = debugfs_create_file("main_charger_v", (S_IRUGO | S_IWUSR | S_IWGRP), 3061 file = debugfs_create_file("main_charger_v", (S_IRUGO | S_IWUSR | S_IWGRP),
3070 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_main_charger_v_fops); 3062 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_main_charger_v_fops);
3071 if (!file) 3063 if (!file)
3072 goto err; 3064 goto err;
3073 3065
3074 file = debugfs_create_file("acc_detect1", (S_IRUGO | S_IWUSR | S_IWGRP), 3066 file = debugfs_create_file("acc_detect1", (S_IRUGO | S_IWUSR | S_IWGRP),
3075 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_acc_detect1_fops); 3067 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_acc_detect1_fops);
3076 if (!file) 3068 if (!file)
3077 goto err; 3069 goto err;
3078 3070
3079 file = debugfs_create_file("acc_detect2", (S_IRUGO | S_IWUSR | S_IWGRP), 3071 file = debugfs_create_file("acc_detect2", (S_IRUGO | S_IWUSR | S_IWGRP),
3080 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_acc_detect2_fops); 3072 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_acc_detect2_fops);
3081 if (!file) 3073 if (!file)
3082 goto err; 3074 goto err;
3083 3075
3084 file = debugfs_create_file("adc_aux1", (S_IRUGO | S_IWUSR | S_IWGRP), 3076 file = debugfs_create_file("adc_aux1", (S_IRUGO | S_IWUSR | S_IWGRP),
3085 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_aux1_fops); 3077 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_aux1_fops);
3086 if (!file) 3078 if (!file)
3087 goto err; 3079 goto err;
3088 3080
3089 file = debugfs_create_file("adc_aux2", (S_IRUGO | S_IWUSR | S_IWGRP), 3081 file = debugfs_create_file("adc_aux2", (S_IRUGO | S_IWUSR | S_IWGRP),
3090 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_aux2_fops); 3082 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_aux2_fops);
3091 if (!file) 3083 if (!file)
3092 goto err; 3084 goto err;
3093 3085
3094 file = debugfs_create_file("main_bat_v", (S_IRUGO | S_IWUSR | S_IWGRP), 3086 file = debugfs_create_file("main_bat_v", (S_IRUGO | S_IWUSR | S_IWGRP),
3095 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_main_bat_v_fops); 3087 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_main_bat_v_fops);
3096 if (!file) 3088 if (!file)
3097 goto err; 3089 goto err;
3098 3090
3099 file = debugfs_create_file("vbus_v", (S_IRUGO | S_IWUSR | S_IWGRP), 3091 file = debugfs_create_file("vbus_v", (S_IRUGO | S_IWUSR | S_IWGRP),
3100 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_vbus_v_fops); 3092 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_vbus_v_fops);
3101 if (!file) 3093 if (!file)
3102 goto err; 3094 goto err;
3103 3095
3104 file = debugfs_create_file("main_charger_c", (S_IRUGO | S_IWUSR | S_IWGRP), 3096 file = debugfs_create_file("main_charger_c", (S_IRUGO | S_IWUSR | S_IWGRP),
3105 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_main_charger_c_fops); 3097 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_main_charger_c_fops);
3106 if (!file) 3098 if (!file)
3107 goto err; 3099 goto err;
3108 3100
3109 file = debugfs_create_file("usb_charger_c", (S_IRUGO | S_IWUSR | S_IWGRP), 3101 file = debugfs_create_file("usb_charger_c", (S_IRUGO | S_IWUSR | S_IWGRP),
3110 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_usb_charger_c_fops); 3102 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_usb_charger_c_fops);
3111 if (!file) 3103 if (!file)
3112 goto err; 3104 goto err;
3113 3105
3114 file = debugfs_create_file("bk_bat_v", (S_IRUGO | S_IWUSR | S_IWGRP), 3106 file = debugfs_create_file("bk_bat_v", (S_IRUGO | S_IWUSR | S_IWGRP),
3115 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_bk_bat_v_fops); 3107 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_bk_bat_v_fops);
3116 if (!file) 3108 if (!file)
3117 goto err; 3109 goto err;
3118 3110
3119 file = debugfs_create_file("die_temp", (S_IRUGO | S_IWUSR | S_IWGRP), 3111 file = debugfs_create_file("die_temp", (S_IRUGO | S_IWUSR | S_IWGRP),
3120 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_die_temp_fops); 3112 ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_die_temp_fops);
3121 if (!file) 3113 if (!file)
3122 goto err; 3114 goto err;
3123 3115
@@ -3137,25 +3129,25 @@ static int ab8500_debug_probe(struct platform_device *plf)
3137 if (!file) 3129 if (!file)
3138 goto err; 3130 goto err;
3139 file = debugfs_create_file("batctrl_and_ibat", 3131 file = debugfs_create_file("batctrl_and_ibat",
3140 (S_IRUGO | S_IWUGO), ab8500_gpadc_dir, 3132 (S_IRUGO | S_IWUGO), ab8500_gpadc_dir,
3141 &plf->dev, &ab8540_gpadc_bat_ctrl_and_ibat_fops); 3133 &plf->dev, &ab8540_gpadc_bat_ctrl_and_ibat_fops);
3142 if (!file) 3134 if (!file)
3143 goto err; 3135 goto err;
3144 file = debugfs_create_file("vbatmeas_and_ibat", 3136 file = debugfs_create_file("vbatmeas_and_ibat",
3145 (S_IRUGO | S_IWUGO), ab8500_gpadc_dir, 3137 (S_IRUGO | S_IWUGO), ab8500_gpadc_dir,
3146 &plf->dev, 3138 &plf->dev,
3147 &ab8540_gpadc_vbat_meas_and_ibat_fops); 3139 &ab8540_gpadc_vbat_meas_and_ibat_fops);
3148 if (!file) 3140 if (!file)
3149 goto err; 3141 goto err;
3150 file = debugfs_create_file("vbattruemeas_and_ibat", 3142 file = debugfs_create_file("vbattruemeas_and_ibat",
3151 (S_IRUGO | S_IWUGO), ab8500_gpadc_dir, 3143 (S_IRUGO | S_IWUGO), ab8500_gpadc_dir,
3152 &plf->dev, 3144 &plf->dev,
3153 &ab8540_gpadc_vbat_true_meas_and_ibat_fops); 3145 &ab8540_gpadc_vbat_true_meas_and_ibat_fops);
3154 if (!file) 3146 if (!file)
3155 goto err; 3147 goto err;
3156 file = debugfs_create_file("battemp_and_ibat", 3148 file = debugfs_create_file("battemp_and_ibat",
3157 (S_IRUGO | S_IWUGO), ab8500_gpadc_dir, 3149 (S_IRUGO | S_IWUGO), ab8500_gpadc_dir,
3158 &plf->dev, &ab8540_gpadc_bat_temp_and_ibat_fops); 3150 &plf->dev, &ab8540_gpadc_bat_temp_and_ibat_fops);
3159 if (!file) 3151 if (!file)
3160 goto err; 3152 goto err;
3161 file = debugfs_create_file("otp_calib", (S_IRUGO | S_IWUSR | S_IWGRP), 3153 file = debugfs_create_file("otp_calib", (S_IRUGO | S_IWUSR | S_IWGRP),