greybus: arche-apb-ctrl: Rename internal operational state fns
authorVaibhav Hiremath <vaibhav.hiremath@linaro.org>
Fri, 12 Feb 2016 20:34:15 +0000 (02:04 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 15 Feb 2016 21:18:40 +0000 (13:18 -0800)
This is preparation for enabling export set of operational fns
to parent driver.
So it is important to differentiate internal ops function against
externally accessed (from parent).

Testing Done: Tested on EVT1.2 and DB3.5 platform.

Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/arche-apb-ctrl.c

index 04ba8365f7bfd2b95c29c79a67aea110b2a1b28c..50d27a626ec631a66fa02f17a730424eda56e98f 100644 (file)
@@ -72,7 +72,7 @@ static void unexport_gpios(struct arche_apb_ctrl_drvdata *apb)
 /*
  * Note: Please do not modify the below sequence, as it is as per the spec
  */
-static int apb_ctrl_coldboot_seq(struct platform_device *pdev)
+static int coldboot_seq(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
        struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
@@ -117,7 +117,7 @@ static int apb_ctrl_coldboot_seq(struct platform_device *pdev)
        return 0;
 }
 
-static int apb_ctrl_fw_flashing_seq(struct platform_device *pdev)
+static int fw_flashing_seq(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
        struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
@@ -145,7 +145,7 @@ static int apb_ctrl_fw_flashing_seq(struct platform_device *pdev)
        return 0;
 }
 
-static int apb_ctrl_standby_boot_seq(struct platform_device *pdev)
+static int standby_boot_seq(struct platform_device *pdev)
 {
        struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
 
@@ -169,7 +169,7 @@ static int apb_ctrl_standby_boot_seq(struct platform_device *pdev)
        return 0;
 }
 
-static void apb_ctrl_poweroff_seq(struct platform_device *pdev)
+static void poweroff_seq(struct platform_device *pdev)
 {
        struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
 
@@ -205,30 +205,30 @@ static ssize_t state_store(struct device *dev,
                if (apb->state == ARCHE_PLATFORM_STATE_OFF)
                        return count;
 
-               apb_ctrl_poweroff_seq(pdev);
+               poweroff_seq(pdev);
        } else if (sysfs_streq(buf, "active")) {
                if (apb->state == ARCHE_PLATFORM_STATE_ACTIVE)
                        return count;
 
-               apb_ctrl_poweroff_seq(pdev);
+               poweroff_seq(pdev);
                is_disabled = apb->init_disabled;
                apb->init_disabled = false;
-               ret = apb_ctrl_coldboot_seq(pdev);
+               ret = coldboot_seq(pdev);
                if (ret)
                        apb->init_disabled = is_disabled;
        } else if (sysfs_streq(buf, "standby")) {
                if (apb->state == ARCHE_PLATFORM_STATE_STANDBY)
                        return count;
 
-               ret = apb_ctrl_standby_boot_seq(pdev);
+               ret = standby_boot_seq(pdev);
        } else if (sysfs_streq(buf, "fw_flashing")) {
                if (apb->state == ARCHE_PLATFORM_STATE_FW_FLASHING)
                        return count;
 
                /* First we want to make sure we power off everything
                 * and then enter FW flashing state */
-               apb_ctrl_poweroff_seq(pdev);
-               ret = apb_ctrl_fw_flashing_seq(pdev);
+               poweroff_seq(pdev);
+               ret = fw_flashing_seq(pdev);
        } else {
                dev_err(dev, "unknown state\n");
                ret = -EINVAL;
@@ -378,7 +378,7 @@ int arche_apb_ctrl_probe(struct platform_device *pdev)
                return ret;
        }
 
-       ret = apb_ctrl_coldboot_seq(pdev);
+       ret = coldboot_seq(pdev);
        if (ret) {
                dev_err(dev, "failed to set init state of control signal %d\n",
                                ret);
@@ -398,7 +398,7 @@ int arche_apb_ctrl_remove(struct platform_device *pdev)
        struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
 
        device_remove_file(&pdev->dev, &dev_attr_state);
-       apb_ctrl_poweroff_seq(pdev);
+       poweroff_seq(pdev);
        platform_set_drvdata(pdev, NULL);
        unexport_gpios(apb);