/*release pll3clk*/ clk_put(i2s1_pllclk); } #endif snd_soc_unregister_dai(&pdev->dev); platform_set_drvdata(pdev, NULL); return 0; } static struct platform_device sunxi_hdmiaudio_device = { .name = "sunxi-hdmiaudio", }; static struct platform_driver sunxi_hdmiaudio_driver = { .probe = sunxi_hdmiaudio_dev_probe, .remove = __exit_p(sunxi_hdmiaudio_dev_remove), .driver = { .name = "sunxi-hdmiaudio", .owner = THIS_MODULE, }, }; static int __init sunxi_hdmiaudio_init(void) { int err = 0; if ((err = platform_device_register(&sunxi_hdmiaudio_device))<0) { return err; } if ((err = platform_driver_register(&sunxi_hdmiaudio_driver)) < 0) {
static int __exit hdmic_remove(struct platform_device *pdev) { struct panel_drv_data *ddata = platform_get_drvdata(pdev); struct omap_dss_device *dssdev = &ddata->dssdev; struct omap_dss_device *in = ddata->in; omapdss_unregister_display(&ddata->dssdev); hdmic_disable(dssdev); hdmic_disconnect(dssdev); omap_dss_put_device(in); return 0; } static struct platform_driver hdmi_connector_driver = { .probe = hdmic_probe, .remove = __exit_p(hdmic_remove), .driver = { .name = "connector-hdmi", .owner = THIS_MODULE, }, }; module_platform_driver(hdmi_connector_driver); MODULE_AUTHOR("Tomi Valkeinen <*****@*****.**>"); MODULE_DESCRIPTION("HDMI Connector driver"); MODULE_LICENSE("GPL");
{"mma7660fc", 0}, {}, }; MODULE_DEVICE_TABLE(i2c, mma7660fc_id); static struct i2c_driver mma7660fc_driver = { .driver = { .owner = THIS_MODULE, .name = "mma7660fc", }, .probe = mma7660fc_probe, .suspend = mma7660fc_suspend, .resume = mma7660fc_resume, .remove = __exit_p(mma7660fc_remove), .id_table = mma7660fc_id, }; static int __init mma7660fc_init(void) { int res; if ((res = i2c_add_driver(&mma7660fc_driver))) { printk("mma7660fc: Driver registration failed, module not inserted.\n"); return res; } printk("MMA7660FC driver version %s (%s)\n", MMA7660FC_VERSION, MMA7660FC_DATE); return 0;
{ int r; r = sharp_ls_power_on(dssdev); dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; return r; } static void sharp_ls_panel_disable(struct omap_dss_device *dssdev) { sharp_ls_power_off(dssdev); dssdev->state = OMAP_DSS_DISPLAY_DISABLED; } static struct omap_dss_driver sharp_ls_driver = { .probe = sharp_ls_panel_probe, .remove = __exit_p(sharp_ls_panel_remove), .enable = sharp_ls_panel_enable, .disable = sharp_ls_panel_disable, .driver = { .name = "sharp_ls_panel", .owner = THIS_MODULE, }, }; static int __init sharp_ls_panel_drv_init(void) { return omap_dss_register_driver(&sharp_ls_driver); }
rc = msm_camera_i2c_write(&(imx175_act_t.i2c_client), 0x0001, 0x01, MSM_CAMERA_I2C_BYTE_DATA); if (rc < 0) { pr_err("%s i2c write failed\n", __func__); return (int) rc; } return (int) rc; } static struct i2c_driver imx175_act_i2c_driver = { .id_table = imx175_act_i2c_id, .probe = msm_actuator_i2c_probe, .remove = __exit_p(imx175_act_i2c_remove), .driver = { .name = "imx175_act", }, }; static int __init imx175_i2c_add_driver( void) { LINFO("%s called\n", __func__); return i2c_add_driver(imx175_act_t.i2c_driver); } static struct v4l2_subdev_core_ops imx175_act_subdev_core_ops; static struct v4l2_subdev_ops imx175_act_subdev_ops = {
static int __exit multi_unbind(struct usb_composite_dev *cdev) { gserial_cleanup(); gether_cleanup(); return 0; } /****************************** Some noise ******************************/ static struct usb_composite_driver multi_driver = { .name = "g_multi", .dev = &device_desc, .strings = dev_strings, .unbind = __exit_p(multi_unbind), .iProduct = DRIVER_DESC, .needs_serial = 1, }; static int __init multi_init(void) { return usb_composite_probe(&multi_driver, multi_bind); } module_init(multi_init); static void __exit multi_exit(void) { usb_composite_unregister(&multi_driver); }
} static int __exit dram_remove(struct platform_device *pdev) { device_unregister(&pdev->dev); return 0; } static struct platform_device dram_device = { .name = "dram_sysfs", }; static struct platform_driver dram_driver = { .probe = dram_probe, .remove = __exit_p(dram_remove), .driver = { .name = "dram_sysfs", .owner = THIS_MODULE, }, }; static int __init dram_sys_init(void) { dram_class = class_create(THIS_MODULE, "dram"); if (IS_ERR(dram_class)) { DRAM_DBG("%s: couldn't create dram class\n", __FILE__); return PTR_ERR(dram_class); } dram_class->dev_attrs = dram_attrs;
dev_vdbg(rdev_get_dev(info->rdev), "regulator-%s-remove\n", info->desc.name); regulator_unregister(info->rdev); } return 0; } static struct platform_driver db8500_regulator_driver = { .driver = { .name = "db8500-prcmu-regulators", .owner = THIS_MODULE, }, .probe = db8500_regulator_probe, .remove = __exit_p(db8500_regulator_remove), }; static int __init db8500_regulator_init(void) { return platform_driver_register(&db8500_regulator_driver); } static void __exit db8500_regulator_exit(void) { platform_driver_unregister(&db8500_regulator_driver); } arch_initcall(db8500_regulator_init); module_exit(db8500_regulator_exit);
if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE | I2C_FUNC_I2C)) return -ENODEV; blk_pwm_client = client; return rc; } static struct i2c_driver pwm_i2c_driver = { .driver = { .name = "pwm_i2c", .owner = THIS_MODULE, }, .probe = pwm_i2c_probe, .remove = __exit_p( pwm_i2c_remove), .id_table = pwm_i2c_id, }; static void __exit pwm_i2c_remove(void) { i2c_del_driver(&pwm_i2c_driver); } void __init dlxp_ul_init_fb(void) { platform_device_register(&msm_fb_device); if(panel_type != PANEL_ID_NONE) { if ((board_mfg_mode() == 4) || ((board_mfg_mode() == 5) && !(htc_battery_get_zcharge_mode() & 0x1)))
} static int __exit vic03_remove(struct platform_device *dev) { #ifdef CONFIG_PM_RUNTIME pm_runtime_put(&dev->dev); pm_runtime_disable(&dev->dev); #else nvhost_module_disable_clk(&dev->dev); #endif return 0; } static struct platform_driver vic03_driver = { .probe = vic03_probe, .remove = __exit_p(vic03_remove), .driver = { .owner = THIS_MODULE, .name = "vic03", #ifdef CONFIG_OF .of_match_table = tegra_vic_of_match, #endif #ifdef CONFIG_PM .pm = &nvhost_module_pm_ops, #endif } }; static int __init vic03_init(void) { return platform_driver_register(&vic03_driver);
rc = msm_camera_i2c_write(&(s5k3h2yx_act_t.i2c_client), 0x0001, 0x01, MSM_CAMERA_I2C_BYTE_DATA); if (rc < 0) { pr_err("%s i2c write failed\n", __func__); return (int) rc; } return (int) rc; } static struct i2c_driver s5k3h2yx_act_i2c_driver = { .id_table = s5k3h2yx_act_i2c_id, .probe = msm_actuator_i2c_probe, .remove = __exit_p(s5k3h2yx_act_i2c_remove), .driver = { .name = "s5k3h2yx_act", }, }; static int __init s5k3h2yx_i2c_add_driver( void) { LINFO("%s called\n", __func__); return i2c_add_driver(s5k3h2yx_act_t.i2c_driver); } static struct v4l2_subdev_core_ops s5k3h2yx_act_subdev_core_ops; static struct v4l2_subdev_ops s5k3h2yx_act_subdev_ops = {
if (pdata->irq_enable) enable_irq(pdata->irq); } return 0; } /*! * Contains pointers to the power management callback functions. */ static struct platform_driver mxc_rtc_driver = { .driver = { .name = "mxc_rtc", }, .probe = mxc_rtc_probe, .remove = __exit_p(mxc_rtc_remove), .suspend = mxc_rtc_suspend, .resume = mxc_rtc_resume, }; /*! * This function creates the /proc/driver/rtc file and registers the device RTC * in the /dev/misc directory. It also reads the RTC value from external source * and setup the internal RTC properly. * * @return -1 if RTC is failed to initialize; 0 is successful. */ static int __init mxc_rtc_init(void) { return platform_driver_register(&mxc_rtc_driver); }
} static const struct dev_pm_ops tegra_otg_pm_ops = { .complete = tegra_otg_resume, .suspend = tegra_otg_suspend, }; #endif static struct platform_driver tegra_otg_driver = { .driver = { .name = "tegra-otg", #ifdef CONFIG_PM .pm = &tegra_otg_pm_ops, #endif }, .remove = __exit_p(tegra_otg_remove), .probe = tegra_otg_probe, }; static int __init tegra_otg_init(void) { return platform_driver_register(&tegra_otg_driver); } subsys_initcall(tegra_otg_init); static void __exit tegra_otg_exit(void) { platform_driver_unregister(&tegra_otg_driver); } module_exit(tegra_otg_exit);
return 0; } static const struct dev_pm_ops at91_rtc_pm = { .suspend = at91_rtc_suspend, .resume = at91_rtc_resume, }; #define at91_rtc_pm_ptr &at91_rtc_pm #else #define at91_rtc_pm_ptr NULL #endif static struct platform_driver at91_rtc_driver = { .remove = __exit_p(at91_rtc_remove), .driver = { .name = "at91_rtc", .owner = THIS_MODULE, .pm = at91_rtc_pm_ptr, }, }; static int __init at91_rtc_init(void) { return platform_driver_probe(&at91_rtc_driver, at91_rtc_probe); } static void __exit at91_rtc_exit(void) { platform_driver_unregister(&at91_rtc_driver);
return status; } static int __exit cdc_unbind(struct usb_composite_dev *cdev) { gserial_cleanup(); gether_cleanup(); return 0; } static struct usb_composite_driver cdc_driver = { .name = "g_cdc", .dev = &device_desc, .strings = dev_strings, .max_speed = USB_SPEED_HIGH, .unbind = __exit_p(cdc_unbind), }; MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR("David Brownell"); MODULE_LICENSE("GPL"); static int __init init(void) { return usb_composite_probe(&cdc_driver, cdc_bind); } module_init(init); static void __exit cleanup(void) { usb_composite_unregister(&cdc_driver);
static int msm_flash_sky81296_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { pr_info("%s entry\n", __func__); if (!id) { pr_err("msm_flash_sky81296_i2c_probe: id is NULL"); id = sky81296_i2c_id; } return msm_flash_i2c_probe(client, id); } static struct i2c_driver sky81296_i2c_driver = { .id_table = sky81296_i2c_id, .probe = msm_flash_sky81296_i2c_probe, .remove = __exit_p(msm_flash_sky81296_i2c_remove), .driver = { .name = FLASH_NAME, .owner = THIS_MODULE, .of_match_table = sky81296_trigger_dt_match, }, }; static int msm_flash_sky81296_platform_probe(struct platform_device *pdev) { const struct of_device_id *match; pr_info("%s entry\n", __func__); match = of_match_device(sky81296_trigger_dt_match, &pdev->dev); if (!match) return -EFAULT; return msm_flash_probe(pdev, match->data);
{ struct ds1216_priv *priv = platform_get_drvdata(pdev); rtc_device_unregister(priv->rtc); iounmap(priv->ioaddr); release_mem_region(priv->baseaddr, priv->size); kfree(priv); return 0; } static struct platform_driver ds1216_rtc_platform_driver = { .driver = { .name = "rtc-ds1216", .owner = THIS_MODULE, }, .remove = __exit_p(ds1216_rtc_remove), }; static int __init ds1216_rtc_init(void) { return platform_driver_probe(&ds1216_rtc_platform_driver, ds1216_rtc_probe); } static void __exit ds1216_rtc_exit(void) { platform_driver_unregister(&ds1216_rtc_platform_driver); } MODULE_AUTHOR("Thomas Bogendoerfer <*****@*****.**>"); MODULE_DESCRIPTION("DS1216 RTC driver"); MODULE_LICENSE("GPL");
return 0; } static const struct i2c_device_id adp1653_id_table[] = { { ADP1653_NAME, 0 }, { } }; MODULE_DEVICE_TABLE(i2c, adp1653_id_table); static struct i2c_driver adp1653_i2c_driver = { .driver = { .name = ADP1653_NAME, }, .probe = adp1653_probe, .remove = __exit_p(adp1653_remove), .suspend = adp1653_suspend, .resume = adp1653_resume, .id_table = adp1653_id_table, }; static int __init adp1653_init(void) { int rval; rval = i2c_add_driver(&adp1653_i2c_driver); if (rval) printk(KERN_ALERT "%s: failed at i2c_add_driver\n", __func__); return rval; }
{ return 0; } static const struct i2c_device_id pcf8574_lcd_id[] = { { PCF8574_LCD_DRV_NAME, 0 }, { } }; MODULE_DEVICE_TABLE(i2c, pcf8574_lcd_id); static struct i2c_driver pcf8574_lcd_driver = { .driver = { .name = PCF8574_LCD_DRV_NAME, }, .probe = pcf8574_lcd_probe, .remove = __exit_p(pcf8574_lcd_remove), .id_table = pcf8574_lcd_id, }; static int lcd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { switch (cmd) { case LCD_Contr: break; case LCD_On: udelay(T_EXEC); BusyCheck();
} sc628a_client = client; CDBG("sc628a_probe success rc = %d\n", rc); return 0; probe_failure: pr_err("sc628a_probe failed! rc = %d\n", rc); return rc; } static struct i2c_driver sc628a_i2c_driver = { .id_table = sc628a_i2c_id, .probe = sc628a_i2c_probe, .remove = __exit_p(sc628a_i2c_remove), .driver = { .name = "sc628a", }, }; static struct i2c_client *tps61310_client; static const struct i2c_device_id tps61310_i2c_id[] = { {"tps61310", 0}, { } }; static int tps61310_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) {
{ struct mmc_host *mmc = platform_get_drvdata(pdev); int ret = 0; if (mmc) ret = mmc_resume_host(mmc); return ret; } #else #define at91_mci_suspend NULL #define at91_mci_resume NULL #endif static struct platform_driver at91_mci_driver = { .remove = __exit_p(at91_mci_remove), .suspend = at91_mci_suspend, .resume = at91_mci_resume, .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, }, }; static int __init at91_mci_init(void) { return platform_driver_probe(&at91_mci_driver, at91_mci_probe); } static void __exit at91_mci_exit(void) {
} static const struct dev_pm_ops hdmi_pm_ops = { .runtime_suspend = hdmi_runtime_suspend, .runtime_resume = hdmi_runtime_resume, }; static const struct of_device_id hdmi_of_match[] = { { .compatible = "ti,omap5-hdmi", }, { .compatible = "ti,dra7-hdmi", }, {}, }; static struct platform_driver omapdss_hdmihw_driver = { .probe = omapdss_hdmihw_probe, .remove = __exit_p(omapdss_hdmihw_remove), .driver = { .name = "omapdss_hdmi5", .pm = &hdmi_pm_ops, .of_match_table = hdmi_of_match, .suppress_bind_attrs = true, }, }; int __init hdmi5_init_platform_driver(void) { return platform_driver_register(&omapdss_hdmihw_driver); } void __exit hdmi5_uninit_platform_driver(void) {
twl6030_interrupt_mask(TWL6030_USBOTG_INT_MASK, REG_INT_MSK_STS_C); free_irq(twl->irq1, twl); free_irq(twl->irq2, twl); regulator_put(twl->usb3v3); pdata->phy_exit(twl->dev); device_remove_file(twl->dev, &dev_attr_vbus); cancel_work_sync(&twl->set_vbus_work); kfree(twl); return 0; } static struct platform_driver twl6030_usb_driver = { .probe = twl6030_usb_probe, .remove = __exit_p(twl6030_usb_remove), .driver = { .name = "twl6030_usb", .owner = THIS_MODULE, }, }; static int __init twl6030_usb_init(void) { return platform_driver_register(&twl6030_usb_driver); } subsys_initcall(twl6030_usb_init); static void __exit twl6030_usb_exit(void) { platform_driver_unregister(&twl6030_usb_driver);
return 0; } #else #define mxc_wdt_suspend NULL #define mxc_wdt_resume NULL #endif static struct platform_driver mxc_wdt_driver = { .driver = { .owner = THIS_MODULE, .name = "mxc_wdt", }, .probe = mxc_wdt_probe, .shutdown = mxc_wdt_shutdown, .remove = __exit_p(mxc_wdt_remove), .suspend = mxc_wdt_suspend, .resume = mxc_wdt_resume, }; static int __init mxc_wdt_init(void) { pr_info("MXC WatchDog Driver %s\n", DVR_VER); if ((timer_margin < TIMER_MARGIN_MIN) || (timer_margin > TIMER_MARGIN_MAX)) { pr_info("MXC watchdog error. wrong timer_margin %d\n", timer_margin); pr_info(" Range: %d to %d seconds\n", TIMER_MARGIN_MIN, TIMER_MARGIN_MAX); return -EINVAL;
clk_put(priv->usbclk); if (priv->ahbclk) { clk_disable(priv->ahbclk); clk_put(priv->ahbclk); } kfree(priv); return 0; } static void ehci_mxc_drv_shutdown(struct platform_device *pdev) { struct ehci_mxc_priv *priv = platform_get_drvdata(pdev); struct usb_hcd *hcd = priv->hcd; if (hcd->driver->shutdown) hcd->driver->shutdown(hcd); } MODULE_ALIAS("platform:mxc-ehci"); static struct platform_driver ehci_mxc_driver = { .probe = ehci_mxc_drv_probe, .remove = __exit_p(ehci_mxc_drv_remove), .shutdown = ehci_mxc_drv_shutdown, .driver = { .name = "mxc-ehci", }, };
return 0; } static const struct i2c_device_id bd2802_id[] = { { "BD2802", 0 }, { } }; MODULE_DEVICE_TABLE(i2c, bd2802_id); static struct i2c_driver bd2802_i2c_driver = { .driver = { .name = "BD2802", }, .probe = bd2802_probe, .remove = __exit_p(bd2802_remove), .suspend = bd2802_suspend, .resume = bd2802_resume, .id_table = bd2802_id, }; static int __init bd2802_init(void) { return i2c_add_driver(&bd2802_i2c_driver); } module_init(bd2802_init); static void __exit bd2802_exit(void) { i2c_del_driver(&bd2802_i2c_driver); }
{ } static int gpio_vsopenrisc_suspend(struct platform_device *pdev, pm_message_t message) { return 0; } static int gpio_vsopenrisc_resume(struct platform_device *pdev) { return 0; } static struct platform_driver gpio_vsopenrisc_driver = { .probe = gpio_vsopenrisc_probe, .remove = __exit_p(gpio_vsopenrisc_remove), .shutdown = gpio_vsopenrisc_shutdown, .suspend = gpio_vsopenrisc_suspend, .resume = gpio_vsopenrisc_resume, .driver = { .name = "gpio_vsopenrisc", // .owner = THIS_MODULE, }, }; static const struct file_operations rst_fops_data = { .read = proc_btn_rst_read, .write = proc_btn_rst_write, .llseek = default_llseek, };
free_irq(dev->irq, pdev); iounmap(dev->regs); clk_disable(dev->pclk); clk_disable(dev->clk); clk_put(dev->pclk); clk_put(dev->clk); wake_lock_destroy(&dev->wlock); msm_otg_debugfs_cleanup(); kfree(dev); if (dev->rpc_connect) dev->rpc_connect(0); return 0; } static struct platform_driver msm_otg_driver = { .remove = __exit_p(msm_otg_remove), .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, }, }; static int __init msm_otg_init(void) { return platform_driver_probe(&msm_otg_driver, msm_otg_probe); } static void __exit msm_otg_exit(void) { platform_driver_unregister(&msm_otg_driver); }
cmos_do_shutdown(); } static const struct pnp_device_id rtc_ids[] = { { .id = "PNP0b00", }, { .id = "PNP0b01", }, { .id = "PNP0b02", }, { }, }; MODULE_DEVICE_TABLE(pnp, rtc_ids); static struct pnp_driver cmos_pnp_driver = { .name = (char *) driver_name, .id_table = rtc_ids, .probe = cmos_pnp_probe, .remove = __exit_p(cmos_pnp_remove), .shutdown = cmos_pnp_shutdown, /* flag ensures resume() gets called, and stops syslog spam */ .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, .suspend = cmos_pnp_suspend, .resume = cmos_pnp_resume, }; #endif /* CONFIG_PNP */ #ifdef CONFIG_OF static const struct of_device_id of_cmos_match[] = { { .compatible = "motorola,mc146818", },
return ret; } ret = nvhost_module_suspend(&host->mod, true); dev_info(&pdev->dev, "suspend status: %d\n", ret); return ret; } static int nvhost_resume(struct platform_device *pdev) { dev_info(&pdev->dev, "resuming\n"); return 0; } static struct platform_driver nvhost_driver = { .remove = __exit_p(nvhost_remove), .suspend = nvhost_suspend, .resume = nvhost_resume, .driver = { .owner = THIS_MODULE, .name = DRIVER_NAME } }; static int __init nvhost_mod_init(void) { register_sets = tegra_gpu_register_sets(); return platform_driver_probe(&nvhost_driver, nvhost_probe); } static void __exit nvhost_mod_exit(void)