]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mfd: ab8500-debugfs: Change AB8500 debug permissions
authorLee Jones <lee.jones@linaro.org>
Tue, 26 Feb 2013 14:09:08 +0000 (14:09 +0000)
committerLee Jones <lee.jones@linaro.org>
Thu, 7 Mar 2013 04:29:05 +0000 (12:29 +0800)
Enable group write permissions for ab8500 debug MFD driver.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/ab8500-debugfs.c

index 44c9bc1f254401796e1c48c1b229114432d67643..4779e2f834b4b7bdde1b79806a206e2a3e88e6b0 100644 (file)
@@ -2623,22 +2623,22 @@ static int ab8500_debug_probe(struct platform_device *plf)
        if (!file)
                goto err;
 
-       file = debugfs_create_file("register-bank", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("register-bank", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_dir, &plf->dev, &ab8500_bank_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("register-address", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("register-address", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_dir, &plf->dev, &ab8500_address_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("register-value", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("register-value", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_dir, &plf->dev, &ab8500_val_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("irq-subscribe", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("irq-subscribe", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_dir, &plf->dev, &ab8500_subscribe_fops);
        if (!file)
                goto err;
@@ -2662,97 +2662,97 @@ static int ab8500_debug_probe(struct platform_device *plf)
        if (!file)
                goto err;
 
-       file = debugfs_create_file("irq-unsubscribe", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("irq-unsubscribe", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_dir, &plf->dev, &ab8500_unsubscribe_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("hwreg", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("hwreg", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_dir, &plf->dev, &ab8500_hwreg_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("all-modem-registers", (S_IRUGO | S_IWUGO),
+       file = debugfs_create_file("all-modem-registers", (S_IRUGO | S_IWUSR | S_IWGRP),
                ab8500_dir, &plf->dev, &ab8500_modem_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("bat_ctrl", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("bat_ctrl", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_bat_ctrl_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("btemp_ball", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("btemp_ball", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_btemp_ball_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("main_charger_v", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("main_charger_v", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_main_charger_v_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("acc_detect1", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("acc_detect1", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_acc_detect1_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("acc_detect2", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("acc_detect2", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_acc_detect2_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("adc_aux1", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("adc_aux1", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_aux1_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("adc_aux2", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("adc_aux2", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_aux2_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("main_bat_v", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("main_bat_v", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_main_bat_v_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("vbus_v", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("vbus_v", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_vbus_v_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("main_charger_c", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("main_charger_c", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_main_charger_c_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("usb_charger_c", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("usb_charger_c", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_usb_charger_c_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("bk_bat_v", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("bk_bat_v", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_bk_bat_v_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("die_temp", (S_IRUGO | S_IWUSR),
+       file = debugfs_create_file("die_temp", (S_IRUGO | S_IWUSR | S_IWGRP),
            ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_die_temp_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("usb_id", (S_IRUGO | S_IWUGO),
+       file = debugfs_create_file("usb_id", (S_IRUGO | S_IWUSR | S_IWGRP),
                ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_usb_id_fops);
        if (!file)
                goto err;
 
        if (is_ab8540(ab8500)) {
-               file = debugfs_create_file("xtal_temp", (S_IRUGO | S_IWUGO),
+               file = debugfs_create_file("xtal_temp", (S_IRUGO | S_IWUSR | S_IWGRP),
                        ab8500_gpadc_dir, &plf->dev, &ab8540_gpadc_xtal_temp_fops);
                if (!file)
                        goto err;
-               file = debugfs_create_file("vbattruemeas", (S_IRUGO | S_IWUGO),
+               file = debugfs_create_file("vbattruemeas", (S_IRUGO | S_IWUSR | S_IWGRP),
                        ab8500_gpadc_dir, &plf->dev,
                        &ab8540_gpadc_vbat_true_meas_fops);
                if (!file)
@@ -2779,27 +2779,27 @@ static int ab8500_debug_probe(struct platform_device *plf)
                                &plf->dev, &ab8540_gpadc_bat_temp_and_ibat_fops);
                if (!file)
                        goto err;
-               file = debugfs_create_file("otp_calib", (S_IRUGO | S_IWUGO),
+               file = debugfs_create_file("otp_calib", (S_IRUGO | S_IWUSR | S_IWGRP),
                        ab8500_gpadc_dir, &plf->dev, &ab8540_gpadc_otp_calib_fops);
                if (!file)
                        goto err;
        }
-       file = debugfs_create_file("avg_sample", (S_IRUGO | S_IWUGO),
+       file = debugfs_create_file("avg_sample", (S_IRUGO | S_IWUSR | S_IWGRP),
                ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_avg_sample_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("trig_edge", (S_IRUGO | S_IWUGO),
+       file = debugfs_create_file("trig_edge", (S_IRUGO | S_IWUSR | S_IWGRP),
                ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_trig_edge_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("trig_timer", (S_IRUGO | S_IWUGO),
+       file = debugfs_create_file("trig_timer", (S_IRUGO | S_IWUSR | S_IWGRP),
                ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_trig_timer_fops);
        if (!file)
                goto err;
 
-       file = debugfs_create_file("conv_type", (S_IRUGO | S_IWUGO),
+       file = debugfs_create_file("conv_type", (S_IRUGO | S_IWUSR | S_IWGRP),
                ab8500_gpadc_dir, &plf->dev, &ab8500_gpadc_conv_type_fops);
        if (!file)
                goto err;