greybus: arche-apb-ctrl: Export operational fns from driver
authorVaibhav Hiremath <vaibhav.hiremath@linaro.org>
Fri, 12 Feb 2016 20:34:16 +0000 (02:04 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 15 Feb 2016 21:18:40 +0000 (13:18 -0800)
In order to use single wake/detect line for both APB's we need to have
access to APB operational functions to parent/SVC driver.
So export coldboot, standby_boot, fw_flashing and poweroff operation
functions from the driver.

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
drivers/staging/greybus/arche_platform.h

index 50d27a6..e1df998 100644 (file)
@@ -193,6 +193,26 @@ static void poweroff_seq(struct platform_device *pdev)
        /* TODO: May have to send an event to SVC about this exit */
 }
 
+int apb_ctrl_coldboot(struct device *dev)
+{
+       return coldboot_seq(to_platform_device(dev));
+}
+
+int apb_ctrl_fw_flashing(struct device *dev)
+{
+       return fw_flashing_seq(to_platform_device(dev));
+}
+
+int apb_ctrl_standby_boot(struct device *dev)
+{
+       return standby_boot_seq(to_platform_device(dev));
+}
+
+void apb_ctrl_poweroff(struct device *dev)
+{
+       poweroff_seq(to_platform_device(dev));
+}
+
 static ssize_t state_store(struct device *dev,
                struct device_attribute *attr, const char *buf, size_t count)
 {
index 27deeb7..700c548 100644 (file)
@@ -17,8 +17,17 @@ enum arche_platform_state {
        ARCHE_PLATFORM_STATE_FW_FLASHING,
 };
 
+
 int arche_apb_ctrl_probe(struct platform_device *pdev);
 int arche_apb_ctrl_remove(struct platform_device *pdev);
+
+/* Operational states for the APB device */
+int apb_ctrl_coldboot(struct device *dev);
+int apb_ctrl_fw_flashing(struct device *dev);
+int apb_ctrl_standby_boot(struct device *dev);
+void apb_ctrl_poweroff(struct device *dev);
+
+
 extern const struct dev_pm_ops arche_apb_ctrl_pm_ops;
 
 #endif /* __ARCHE_PLATFORM_H */