return 0;
}
-int arche_apb_ctrl_probe(struct platform_device *pdev)
+static int arche_apb_ctrl_probe(struct platform_device *pdev)
{
int ret;
struct arche_apb_ctrl_drvdata *apb;
return 0;
}
-int arche_apb_ctrl_remove(struct platform_device *pdev)
+static int arche_apb_ctrl_remove(struct platform_device *pdev)
{
device_remove_file(&pdev->dev, &dev_attr_state);
poweroff_seq(pdev);
return 0;
}
-SIMPLE_DEV_PM_OPS(arche_apb_ctrl_pm_ops,
- arche_apb_ctrl_suspend,
- arche_apb_ctrl_resume);
+static SIMPLE_DEV_PM_OPS(arche_apb_ctrl_pm_ops, arche_apb_ctrl_suspend,
+ arche_apb_ctrl_resume);
+
+static struct of_device_id arche_apb_ctrl_of_match[] = {
+ { .compatible = "usbffff,2", },
+ { },
+};
+
+static struct platform_driver arche_apb_ctrl_device_driver = {
+ .probe = arche_apb_ctrl_probe,
+ .remove = arche_apb_ctrl_remove,
+ .driver = {
+ .name = "arche-apb-ctrl",
+ .pm = &arche_apb_ctrl_pm_ops,
+ .of_match_table = arche_apb_ctrl_of_match,
+ }
+};
+
+int __init arche_apb_init(void)
+{
+ return platform_driver_register(&arche_apb_ctrl_device_driver);
+}
+
+void __exit arche_apb_exit(void)
+{
+ platform_driver_unregister(&arche_apb_ctrl_device_driver);
+}
{ },
};
-static struct of_device_id arche_apb_ctrl_of_match[] = {
- { .compatible = "usbffff,2", },
- { },
-};
-
static struct of_device_id arche_combined_id[] = {
{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
{ .compatible = "usbffff,2", },
}
};
-static struct platform_driver arche_apb_ctrl_device_driver = {
- .probe = arche_apb_ctrl_probe,
- .remove = arche_apb_ctrl_remove,
- .driver = {
- .name = "arche-apb-ctrl",
- .pm = &arche_apb_ctrl_pm_ops,
- .of_match_table = arche_apb_ctrl_of_match,
- }
-};
-
static int __init arche_init(void)
{
int retval;
if (retval)
return retval;
- retval = platform_driver_register(&arche_apb_ctrl_device_driver);
+ retval = arche_apb_init();
if (retval)
platform_driver_unregister(&arche_platform_device_driver);
static void __exit arche_exit(void)
{
- platform_driver_unregister(&arche_apb_ctrl_device_driver);
+ arche_apb_exit();
platform_driver_unregister(&arche_platform_device_driver);
}
module_exit(arche_exit);
};
-int arche_apb_ctrl_probe(struct platform_device *pdev);
-int arche_apb_ctrl_remove(struct platform_device *pdev);
+int __init arche_apb_init(void);
+void __exit arche_apb_exit(void);
/* Operational states for the APB device */
int apb_ctrl_coldboot(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 */