mutex_lock(&input_dev->mutex); if (input_dev->users) { ret = clk_prepare_enable(kbd->clk); if (ret) goto err_clk; } err_clk: mutex_unlock(&input_dev->mutex); return ret; } static SIMPLE_DEV_PM_OPS(imx_kbd_pm_ops, imx_kbd_suspend, imx_kbd_resume); static struct platform_driver imx_keypad_driver = { .driver = { .name = "imx-keypad", .pm = &imx_kbd_pm_ops, .of_match_table = of_match_ptr(imx_keypad_of_match), }, .probe = imx_keypad_probe, }; module_platform_driver(imx_keypad_driver); MODULE_AUTHOR("Alberto Panizzo <*****@*****.**>"); MODULE_DESCRIPTION("IMX Keypad Port Driver"); MODULE_LICENSE("GPL v2"); MODULE_ALIAS("platform:imx-keypad");
destroy_workqueue(hdmi_dev->hdcp_wq); kfree(hdmi_dev); dev_info(dev, "remove sucessful\n"); return 0; } static struct platform_driver hdmi_driver __refdata = { .probe = hdmi_probe, .remove = hdmi_remove, .id_table = hdmi_driver_types, .driver = { .name = "s5p-hdmi", .owner = THIS_MODULE, .pm = &hdmi_pm_ops, .of_match_table = of_match_ptr(hdmi_device_table), } }; /* D R I V E R I N I T I A L I Z A T I O N */ static int __init hdmi_init(void) { int ret; static const char banner[] __initdata = KERN_INFO \ "Samsung HDMI output driver, " "(c) 2010-2011 Samsung Electronics Co., Ltd.\n"; printk(banner); ret = platform_driver_register(&hdmi_driver); if (ret)
} static const struct i2c_device_id st_gyro_id_table[] = { { L3G4200D_GYRO_DEV_NAME }, { LSM330D_GYRO_DEV_NAME }, { LSM330DL_GYRO_DEV_NAME }, { LSM330DLC_GYRO_DEV_NAME }, { L3GD20_GYRO_DEV_NAME }, { L3GD20H_GYRO_DEV_NAME }, { L3G4IS_GYRO_DEV_NAME }, { LSM330_GYRO_DEV_NAME }, { LSM9DS0_GYRO_DEV_NAME }, {}, }; MODULE_DEVICE_TABLE(i2c, st_gyro_id_table); static struct i2c_driver st_gyro_driver = { .driver = { .name = "st-gyro-i2c", .of_match_table = of_match_ptr(st_gyro_of_match), }, .probe = st_gyro_i2c_probe, .remove = st_gyro_i2c_remove, .id_table = st_gyro_id_table, }; module_i2c_driver(st_gyro_driver); MODULE_AUTHOR("Denis Ciocca <*****@*****.**>"); MODULE_DESCRIPTION("STMicroelectronics gyroscopes i2c driver"); MODULE_LICENSE("GPL v2");
static struct imx_pinctrl_soc_info imx6ul_pinctrl_info = { .pins = imx6ul_pinctrl_pads, .npins = ARRAY_SIZE(imx6ul_pinctrl_pads), .gpr_compatible = "fsl,imx6ul-iomuxc-gpr", }; static struct of_device_id imx6ul_pinctrl_of_match[] = { { .compatible = "fsl,imx6ul-iomuxc", }, { /* sentinel */ } }; static int imx6ul_pinctrl_probe(struct platform_device *pdev) { return imx_pinctrl_probe(pdev, &imx6ul_pinctrl_info); } static struct platform_driver imx6ul_pinctrl_driver = { .driver = { .name = "imx6ul-pinctrl", .of_match_table = of_match_ptr(imx6ul_pinctrl_of_match), }, .probe = imx6ul_pinctrl_probe, }; static int __init imx6ul_pinctrl_init(void) { return platform_driver_register(&imx6ul_pinctrl_driver); } arch_initcall(imx6ul_pinctrl_init);
.data = NULL, }, { }, }; MODULE_DEVICE_TABLE(of, viacbp82d_power_match_table); static struct platform_driver modem_boot_driver = { .probe = modem_boot_probe, .remove = modem_boot_remove, .shutdown = modem_boot_shutdown, .driver = { .name ="huawei,viacbp82d-power", .owner = THIS_MODULE, .of_match_table = of_match_ptr(viacbp82d_power_match_table), }, }; static const struct file_operations misc_modem_fops = { .owner = THIS_MODULE, .open = misc_modem_open, .release = misc_modem_release, .fasync = misc_modem_fasync, }; static struct miscdevice misc_modem_device = { .minor = MISC_DYNAMIC_MINOR, .name = "vmodem",
if (!dev->of_node) { dev_err(dev, "can't find vop devices\n"); return -ENODEV; } return component_add(dev, &vop_component_ops); } static int vop_remove(struct platform_device *pdev) { component_del(&pdev->dev, &vop_component_ops); return 0; } static struct platform_driver vop_platform_driver = { .probe = vop_probe, .remove = vop_remove, .driver = { .name = "rockchip-vop", .of_match_table = of_match_ptr(vop_driver_dt_match), }, }; module_platform_driver(vop_platform_driver); MODULE_AUTHOR("Mark Yao <*****@*****.**>"); MODULE_DESCRIPTION("ROCKCHIP VOP Driver"); MODULE_LICENSE("GPL v2");
__raw_writel(0, imxdi->ioaddr + DIER); clk_disable_unprepare(imxdi->clk); return 0; } #ifdef CONFIG_OF static const struct of_device_id dryice_dt_ids[] = { { .compatible = "fsl,imx25-rtc" }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, dryice_dt_ids); #endif static struct platform_driver dryice_rtc_driver = { .driver = { .name = "imxdi_rtc", .of_match_table = of_match_ptr(dryice_dt_ids), }, .remove = __exit_p(dryice_rtc_remove), }; module_platform_driver_probe(dryice_rtc_driver, dryice_rtc_probe); MODULE_AUTHOR("Freescale Semiconductor, Inc."); MODULE_AUTHOR("Baruch Siach <*****@*****.**>"); MODULE_DESCRIPTION("IMX DryIce Realtime Clock Driver (RTC)"); MODULE_LICENSE("GPL");
} #endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops dw_dev_pm_ops = { SET_LATE_SYSTEM_SLEEP_PM_OPS(dw_suspend_late, dw_resume_early) }; static struct platform_driver dw_driver = { .probe = dw_probe, .remove = dw_remove, .shutdown = dw_shutdown, .driver = { .name = DRV_NAME, .pm = &dw_dev_pm_ops, .of_match_table = of_match_ptr(dw_dma_of_id_table), .acpi_match_table = ACPI_PTR(dw_dma_acpi_id_table), }, }; static int __init dw_init(void) { return platform_driver_register(&dw_driver); } subsys_initcall(dw_init); static void __exit dw_exit(void) { platform_driver_unregister(&dw_driver); } module_exit(dw_exit);
static __devexit int max14688_remove (struct i2c_client *client) { struct max14688 *me = i2c_get_clientdata(client); i2c_set_clientdata(client, NULL); max14688_destroy(me); wake_lock_destroy(&ear_key_wake_lock); return 0; } static struct i2c_driver max14688_i2c_driver = { .driver.name = DRIVER_NAME, .driver.owner = THIS_MODULE, #ifdef CONFIG_OF .driver.of_match_table = of_match_ptr(max14688_device_ids), #endif /* CONFIG_OF */ .probe = max14688_probe, .remove = __devexit_p(max14688_remove), .id_table = max14688_i2c_ids, }; module_i2c_driver(max14688_i2c_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_VERSION(DRIVER_VERSION); /******************************************************************************/
{ "wm5110", WM5110 }, { "wm8285", WM8285 }, { "wm1840", WM1840 }, { "wm1831", WM1831 }, { "cs47l24", CS47L24 }, { "cs47l35", CS47L35 }, { "cs47l85", WM8285 }, { "cs47l90", CS47L90 }, { "cs47l91", CS47L91 }, { }, }; MODULE_DEVICE_TABLE(spi, arizona_spi_ids); static struct spi_driver arizona_spi_driver = { .driver = { .name = "arizona", .owner = THIS_MODULE, .pm = &arizona_pm_ops, .of_match_table = of_match_ptr(arizona_of_match), }, .probe = arizona_spi_probe, .remove = arizona_spi_remove, .id_table = arizona_spi_ids, }; module_spi_driver(arizona_spi_driver); MODULE_DESCRIPTION("Arizona SPI bus interface"); MODULE_AUTHOR("Mark Brown <*****@*****.**>"); MODULE_LICENSE("GPL");
} #ifdef CONFIG_OF static const struct of_device_id twl6030_usb_id_table[] = { { .compatible = "ti,twl6030-usb" }, {} }; MODULE_DEVICE_TABLE(of, twl6030_usb_id_table); #endif static struct platform_driver twl6030_usb_driver = { .probe = twl6030_usb_probe, .remove = twl6030_usb_remove, .driver = { .name = "twl6030_usb", .of_match_table = of_match_ptr(twl6030_usb_id_table), }, }; 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); } module_exit(twl6030_usb_exit);
#ifdef CONFIG_OF static const struct of_device_id of_dwc3_match[] = { { .compatible = "snps,dwc3" }, { .compatible = "synopsys,dwc3" }, { }, }; MODULE_DEVICE_TABLE(of, of_dwc3_match); #endif static struct platform_driver dwc3_driver = { .probe = dwc3_probe, .remove = dwc3_remove, .driver = { .name = "dwc3", .of_match_table = of_match_ptr(of_dwc3_match), .pm = DWC3_PM_OPS, }, }; module_platform_driver(dwc3_driver); MODULE_ALIAS("platform:dwc3"); MODULE_AUTHOR("Felipe Balbi <*****@*****.**>"); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("DesignWare USB3 DRD Controller Driver");
{ "pfc-sh7757", (kernel_ulong_t)&sh7757_pinmux_info }, #endif #ifdef CONFIG_PINCTRL_PFC_SH7785 { "pfc-sh7785", (kernel_ulong_t)&sh7785_pinmux_info }, #endif #ifdef CONFIG_PINCTRL_PFC_SH7786 { "pfc-sh7786", (kernel_ulong_t)&sh7786_pinmux_info }, #endif #ifdef CONFIG_PINCTRL_PFC_SHX3 { "pfc-shx3", (kernel_ulong_t)&shx3_pinmux_info }, #endif { "sh-pfc", 0 }, { }, }; static struct platform_driver sh_pfc_driver = { .probe = sh_pfc_probe, .remove = sh_pfc_remove, .id_table = sh_pfc_id_table, .driver = { .name = DRV_NAME, .of_match_table = of_match_ptr(sh_pfc_of_table), }, }; static int __init sh_pfc_init(void) { return platform_driver_register(&sh_pfc_driver); } postcore_initcall(sh_pfc_init);
rockchip_pcm_platform_unregister(&pdev->dev); snd_soc_unregister_component(&pdev->dev); return 0; } #ifdef CONFIG_OF static const struct of_device_id exynos_spdif_match[] = { { .compatible = "rockchip-spdif"}, {}, }; MODULE_DEVICE_TABLE(of, exynos_spdif_match); #endif static struct platform_driver rockchip_spdif_driver = { .probe = spdif_probe, .remove = spdif_remove, .driver = { .name = "rockchip-spdif", .owner = THIS_MODULE, .of_match_table = of_match_ptr(exynos_spdif_match), }, }; module_platform_driver(rockchip_spdif_driver); MODULE_AUTHOR("Seungwhan Youn, <*****@*****.**>"); MODULE_DESCRIPTION("rockchip S/PDIF Controller Driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:rockchip-spdif");
#ifdef CONFIG_OF static const struct of_device_id musb_dsps_of_match[] = { { .compatible = "ti,musb-am33xx", .data = (void *) &ti81xx_driver_data, }, { }, }; MODULE_DEVICE_TABLE(of, musb_dsps_of_match); #endif static struct platform_driver dsps_usbss_driver = { .probe = dsps_probe, .remove = dsps_remove, .driver = { .name = "musb-dsps", .pm = &dsps_pm_ops, .of_match_table = of_match_ptr(musb_dsps_of_match), }, .id_table = musb_dsps_id_table, }; MODULE_DESCRIPTION("TI DSPS MUSB Glue Layer"); MODULE_AUTHOR("Ravi B <*****@*****.**>"); MODULE_AUTHOR("Ajay Kumar Gupta <*****@*****.**>"); MODULE_LICENSE("GPL v2"); static int __init dsps_init(void) { return platform_driver_register(&dsps_usbss_driver); } subsys_initcall(dsps_init);
return 0; } #ifdef CONFIG_OF static const struct of_device_id mmp_lg4591_dt_match[] = { { .compatible = "marvell,mmp-lg4591" }, {}, }; #endif static struct platform_driver lg4591_driver = { .driver = { .name = "mmp-lg4591", .owner = THIS_MODULE, .of_match_table = of_match_ptr(mmp_lg4591_dt_match), }, .probe = lg4591_probe, .remove = lg4591_remove, }; static int lg4591_init(void) { return platform_driver_register(&lg4591_driver); } static void lg4591_exit(void) { platform_driver_unregister(&lg4591_driver); } module_init(lg4591_init); module_exit(lg4591_exit);
{ .compatible = "huawei,charging_core", .data = NULL, }, { }, }; static struct platform_driver charge_core_driver = { .probe = charge_core_probe, .remove = charge_core_remove, .driver = { .name = "huawei,charging_core", .owner = THIS_MODULE, .of_match_table = of_match_ptr(charge_core_match_table), }, }; /********************************************************** * Function: charge_core_init * Discription: charge module initialization * Parameters: pdev:platform_device * return value: 0-sucess or others-fail **********************************************************/ int __init charge_core_init(void) { return (platform_driver_register(&charge_core_driver)); } /********************************************************** * Function: charge_core_exit * Discription: charge module exit
} static int hx8357_remove(struct spi_device *spi) { struct lcd_device *lcdev = spi_get_drvdata(spi); lcd_device_unregister(lcdev); return 0; } static const struct of_device_id hx8357_dt_ids[] = { { .compatible = "himax,hx8357" }, {}, }; MODULE_DEVICE_TABLE(of, hx8357_dt_ids); static struct spi_driver hx8357_driver = { .probe = hx8357_probe, .remove = hx8357_remove, .driver = { .name = "hx8357", .of_match_table = of_match_ptr(hx8357_dt_ids), }, }; module_spi_driver(hx8357_driver); MODULE_AUTHOR("Maxime Ripard <*****@*****.**>"); MODULE_DESCRIPTION("Himax HX-8357 LCD Driver"); MODULE_LICENSE("GPL");
#define MODULE_NAME "hisilicon,lowpm_test" static const struct of_device_id lowpm_test_match[] = { { .compatible = MODULE_NAME }, {}, }; static struct platform_driver lowpm_test_drv = { .probe = lowpm_test_probe, .remove = lowpm_test_remove, .suspend = lowpm_test_suspend, .resume = lowpm_test_resume, .driver = { .name = MODULE_NAME, .of_match_table = of_match_ptr(lowpm_test_match), }, }; static int __init lowpmreg_init(void) { return platform_driver_register(&lowpm_test_drv); } static void __exit lowpmreg_exit(void) { platform_driver_unregister(&lowpm_test_drv); } #endif /*CONFIG_DEBUG_FS*/ #else
#endif /* CONFIG_PM */ #ifdef CONFIG_OF static const struct of_device_id usb_xhci_of_match[] = { { .compatible = "xhci-platform" }, { }, }; MODULE_DEVICE_TABLE(of, usb_xhci_of_match); #endif static struct platform_driver usb_xhci_driver = { .probe = xhci_plat_probe, .remove = xhci_plat_remove, .driver = { .name = "xhci-hcd", .pm = DEV_PM_OPS, .of_match_table = of_match_ptr(usb_xhci_of_match), }, }; MODULE_ALIAS("platform:xhci-hcd"); int xhci_register_plat(void) { return platform_driver_register(&usb_xhci_driver); } void xhci_unregister_plat(void) { platform_driver_unregister(&usb_xhci_driver); }
return 0; } #endif const struct dev_pm_ops mmp_panel_backlight_pm_ops = { SET_RUNTIME_PM_OPS(mmp_panel_backlight_runtime_suspend, mmp_panel_backlight_runtime_resume, NULL) }; static struct platform_driver mmp_panel_backlight_driver = { .driver = { .name = "mmp-panel-backlight", .owner = THIS_MODULE, .pm = &mmp_panel_backlight_pm_ops, #ifdef CONFIG_OF .of_match_table = of_match_ptr(mmp_panel_backlight_dt_match), #endif }, .probe = mmp_panel_backlight_probe, .remove = mmp_panel_backlight_remove, .shutdown = mmp_panel_backlight_shutdown, }; static int __init mmp_panel_backlight_init(void) { return platform_driver_register(&mmp_panel_backlight_driver); } module_init(mmp_panel_backlight_init); static void __exit mmp_panel_backlight_exit(void) {
/* Which "compatible" string(s) to search for in the Device Tree */ #ifdef CONFIG_OF static const struct of_device_id vga_led_of_match[] = { { .compatible = "altr,vga_led" }, {}, }; MODULE_DEVICE_TABLE(of, vga_led_of_match); #endif /* Information for registering ourselves as a "platform" driver */ static struct platform_driver vga_led_driver = { .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, .of_match_table = of_match_ptr(vga_led_of_match), }, .remove = __exit_p(vga_led_remove), }; /* Called when the module is loaded: set things up */ static int __init vga_led_init(void) { pr_info(DRIVER_NAME ": init\n"); return platform_driver_probe(&vga_led_driver, vga_led_probe); } /* Called when the module is unloaded: release resources */ static void __exit vga_led_exit(void) { platform_driver_unregister(&vga_led_driver);
return ret; } static const struct i2c_device_id tps65910_i2c_id[] = { { "tps65910", TPS65910 }, { "tps65911", TPS65911 }, { } }; MODULE_DEVICE_TABLE(i2c, tps65910_i2c_id); static struct i2c_driver tps65910_i2c_driver = { .driver = { .name = "tps65910", .of_match_table = of_match_ptr(tps65910_of_match), }, .probe = tps65910_i2c_probe, .id_table = tps65910_i2c_id, }; static int __init tps65910_i2c_init(void) { return i2c_add_driver(&tps65910_i2c_driver); } /* init early so consumer devices can complete system boot */ subsys_initcall(tps65910_i2c_init); static void __exit tps65910_i2c_exit(void) { i2c_del_driver(&tps65910_i2c_driver);
} #endif /* CONFIG_PM */ static SIMPLE_DEV_PM_OPS(tmp102_dev_pm_ops, tmp102_suspend, tmp102_resume); static const struct i2c_device_id tmp102_id[] = { { "tmp102", 0 }, { } }; MODULE_DEVICE_TABLE(i2c, tmp102_id); static const struct of_device_id __maybe_unused tmp102_of_match[] = { { .compatible = "ti,tmp102" }, { }, }; MODULE_DEVICE_TABLE(of, tmp102_of_match); static struct i2c_driver tmp102_driver = { .driver.name = DRIVER_NAME, .driver.of_match_table = of_match_ptr(tmp102_of_match), .driver.pm = &tmp102_dev_pm_ops, .probe = tmp102_probe, .id_table = tmp102_id, }; module_i2c_driver(tmp102_driver); MODULE_AUTHOR("Steven King <*****@*****.**>"); MODULE_DESCRIPTION("Texas Instruments TMP102 temperature sensor driver"); MODULE_LICENSE("GPL");
{ watchdog_unregister_device(&at91wdt_wdd); return 0; } #if defined(CONFIG_OF) static const struct of_device_id at91_wdt_dt_ids[] __initconst = { { .compatible = "atmel,at91sam9260-wdt" }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, at91_wdt_dt_ids); #endif static struct platform_driver at91wdt_driver = { .probe = at91wdt_probe, .remove = __exit_p(at91wdt_remove), .driver = { .name = "at91_wdt", .owner = THIS_MODULE, .of_match_table = of_match_ptr(at91_wdt_dt_ids), }, }; module_platform_driver(at91wdt_driver); MODULE_AUTHOR("Renaud CERRATO <*****@*****.**>"); MODULE_DESCRIPTION("Watchdog driver for Atmel AT91SAM9x processors"); MODULE_LICENSE("GPL");
ret = hall_data->ops->hall_release(hall_data); } cancel_delayed_work(&hall_data->hall_delay_work); kfree(hall_data); platform_set_drvdata(pdev, NULL); return ret; } struct platform_driver hall_driver = { .probe = hall_probe, .remove = hall_remove, .driver = { .name = HALL_SENSOR_NAME, .owner = THIS_MODULE, .of_match_table = of_match_ptr(hall_match_table), }, }; static int __init hall_init(void) { hwlog_info("[hall]hall init!\n"); return platform_driver_register(&hall_driver); } static void __exit hall_exit(void) { hwlog_info("[hall]hall exit!\n"); platform_driver_unregister(&hall_driver); }
static int sdhci_pxav3_probe(struct platform_device *pdev) { struct sdhci_pltfm_host *pltfm_host; struct sdhci_pxa_platdata *pdata = pdev->dev.platform_data; struct device *dev = &pdev->dev; struct sdhci_host *host = NULL; struct sdhci_pxa *pxa = NULL; const struct of_device_id *match; int ret; struct clk *clk; pxa = kzalloc(sizeof(struct sdhci_pxa), GFP_KERNEL); if (!pxa) return -ENOMEM; host = sdhci_pltfm_init(pdev, &sdhci_pxav3_pdata, 0); if (IS_ERR(host)) { kfree(pxa); return PTR_ERR(host); } pltfm_host = sdhci_priv(host); pltfm_host->priv = pxa; clk = clk_get(dev, NULL); if (IS_ERR(clk)) { dev_err(dev, "failed to get io clock\n"); ret = PTR_ERR(clk); goto err_clk_get; } pltfm_host->clk = clk; clk_prepare_enable(clk); /* enable 1/8V DDR capable */ host->mmc->caps |= MMC_CAP_1_8V_DDR; match = of_match_device(of_match_ptr(sdhci_pxav3_of_match), &pdev->dev); if (match) { ret = mmc_of_parse(host->mmc); if (ret) goto err_of_parse; sdhci_get_of_property(pdev); pdata = pxav3_get_mmc_pdata(dev); } else if (pdata) { /* on-chip device */ if (pdata->flags & PXA_FLAG_CARD_PERMANENT) host->mmc->caps |= MMC_CAP_NONREMOVABLE; /* If slot design supports 8 bit data, indicate this to MMC. */ if (pdata->flags & PXA_FLAG_SD_8_BIT_CAPABLE_SLOT) host->mmc->caps |= MMC_CAP_8_BIT_DATA; if (pdata->quirks) host->quirks |= pdata->quirks; if (pdata->quirks2) host->quirks2 |= pdata->quirks2; if (pdata->host_caps) host->mmc->caps |= pdata->host_caps; if (pdata->host_caps2) host->mmc->caps2 |= pdata->host_caps2; if (pdata->pm_caps) host->mmc->pm_caps |= pdata->pm_caps; if (gpio_is_valid(pdata->ext_cd_gpio)) { ret = mmc_gpio_request_cd(host->mmc, pdata->ext_cd_gpio, 0); if (ret) { dev_err(mmc_dev(host->mmc), "failed to allocate card detect gpio\n"); goto err_cd_req; } } } pm_runtime_enable(&pdev->dev); pm_runtime_get_sync(&pdev->dev); pm_runtime_set_autosuspend_delay(&pdev->dev, PXAV3_RPM_DELAY_MS); pm_runtime_use_autosuspend(&pdev->dev); pm_suspend_ignore_children(&pdev->dev, 1); ret = sdhci_add_host(host); if (ret) { dev_err(&pdev->dev, "failed to add host\n"); goto err_add_host; } platform_set_drvdata(pdev, host); if (host->mmc->pm_caps & MMC_PM_KEEP_POWER) { device_init_wakeup(&pdev->dev, 1); host->mmc->pm_flags |= MMC_PM_WAKE_SDIO_IRQ; } else { device_init_wakeup(&pdev->dev, 0); } pm_runtime_put_autosuspend(&pdev->dev); return 0; err_of_parse: err_cd_req: err_add_host: pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); clk_disable_unprepare(clk); clk_put(clk); err_clk_get: sdhci_pltfm_free(pdev); kfree(pxa); return ret; }
#if defined(CONFIG_OF) static const struct of_device_id fixed_of_match[] = { { .compatible = "regulator-fixed", }, {}, }; MODULE_DEVICE_TABLE(of, fixed_of_match); #endif static struct platform_driver regulator_fixed_voltage_driver = { .probe = reg_fixed_voltage_probe, .remove = reg_fixed_voltage_remove, .driver = { .name = "reg-fixed-voltage", .owner = THIS_MODULE, .of_match_table = of_match_ptr(fixed_of_match), }, }; static int __init regulator_fixed_voltage_init(void) { return platform_driver_register(®ulator_fixed_voltage_driver); } fs_initcall_sync(regulator_fixed_voltage_init); static void __exit regulator_fixed_voltage_exit(void) { platform_driver_unregister(®ulator_fixed_voltage_driver); } module_exit(regulator_fixed_voltage_exit);
platform_set_drvdata(pdev, NULL); return 0; } #ifdef CONFIG_OF static const struct of_device_id matrix_keypad_dt_match[] = { { .compatible = "gpio-matrix-keypad" }, { } }; MODULE_DEVICE_TABLE(of, matrix_keypad_dt_match); #endif static struct platform_driver matrix_keypad_driver = { .probe = matrix_keypad_probe, .remove = matrix_keypad_remove, .driver = { .name = "matrix-keypad", .owner = THIS_MODULE, .pm = &matrix_keypad_pm_ops, .of_match_table = of_match_ptr(matrix_keypad_dt_match), }, }; module_platform_driver(matrix_keypad_driver); MODULE_AUTHOR("Marek Vasut <*****@*****.**>"); MODULE_DESCRIPTION("GPIO Driven Matrix Keypad Driver"); MODULE_LICENSE("GPL v2"); MODULE_ALIAS("platform:matrix-keypad");
}; static const struct of_device_id max98925_match[] = { { .compatible = "huawei,max98925", }, {}, }; MODULE_DEVICE_TABLE(of, max98925_of_ids); static const struct i2c_device_id max98925_i2c_id[] = { { "max98925", MAX98925 }, { } }; MODULE_DEVICE_TABLE(i2c, max98925_i2c_id); static struct i2c_driver max98925_i2c_driver = { .driver = { .name = "max98925", .owner = THIS_MODULE, .pm = &max98925_pm_ops, .of_match_table = of_match_ptr(max98925_match), }, .probe = max98925_i2c_probe, .remove = max98925_i2c_remove, .id_table = max98925_i2c_id, }; module_i2c_driver(max98925_i2c_driver); MODULE_DESCRIPTION("MAX98925 misc device driver"); MODULE_AUTHOR("Bo Yang<*****@*****.**>"); MODULE_LICENSE("GPL");