summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/arche-apb-ctrl.c
diff options
context:
space:
mode:
authorVaibhav Hiremath <vaibhav.hiremath@linaro.org>2016-02-13 02:04:15 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-02-15 13:18:40 -0800
commit80a057aa6c170403261f8d1d2ce435d3668848f6 (patch)
tree380d072cc5f43608cbb03ffc131cbf348ab5c1a4 /drivers/staging/greybus/arche-apb-ctrl.c
parentaf3aae10f16f05acba27294bc1ae234f3cb61a61 (diff)
greybus: arche-apb-ctrl: Rename internal operational state fns
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>
Diffstat (limited to 'drivers/staging/greybus/arche-apb-ctrl.c')
-rw-r--r--drivers/staging/greybus/arche-apb-ctrl.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c
index 04ba8365f7bf..50d27a626ec6 100644
--- a/drivers/staging/greybus/arche-apb-ctrl.c
+++ b/drivers/staging/greybus/arche-apb-ctrl.c
@@ -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);