本文整理汇总了C++中platform_driver_register函数的典型用法代码示例。如果您正苦于以下问题:C++ platform_driver_register函数的具体用法?C++ platform_driver_register怎么用?C++ platform_driver_register使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了platform_driver_register函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: of_pci_phb_init
static __init int of_pci_phb_init(void)
{
return platform_driver_register(&of_pci_phb_driver);
}
示例2: apollon_panel_drv_init
static int __init apollon_panel_drv_init(void)
{
return platform_driver_register(&apollon_panel_driver);
}
示例3: attiny_init
static int __init attiny_init(void) {
return platform_driver_register(&attiny_driver);
}
示例4: omap_pwm_led_init
static int __init omap_pwm_led_init(void)
{
return platform_driver_register(&omap_pwm_led_driver);
}
示例5: aml_m8_audio_init
static int __init aml_m8_audio_init(void)
{
return platform_driver_register(&aml_m8_audio_driver);
}
示例6: msi_init
static int __init msi_init(void)
{
int ret;
if (acpi_disabled)
return -ENODEV;
if (force || dmi_check_system(msi_dmi_table))
old_ec_model = 1;
if (!old_ec_model)
get_threeg_exists();
if (!old_ec_model && dmi_check_system(msi_load_scm_models_dmi_table))
load_scm_model = 1;
if (auto_brightness < 0 || auto_brightness > 2)
return -EINVAL;
if (acpi_video_backlight_support()) {
pr_info("Brightness ignored, must be controlled by ACPI video driver\n");
} else {
struct backlight_properties props;
memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_PLATFORM;
props.max_brightness = MSI_LCD_LEVEL_MAX - 1;
msibl_device = backlight_device_register("msi-laptop-bl", NULL,
NULL, &msibl_ops,
&props);
if (IS_ERR(msibl_device))
return PTR_ERR(msibl_device);
}
ret = platform_driver_register(&msipf_driver);
if (ret)
goto fail_backlight;
msipf_device = platform_device_alloc("msi-laptop-pf", -1);
if (!msipf_device) {
ret = -ENOMEM;
goto fail_platform_driver;
}
ret = platform_device_add(msipf_device);
if (ret)
goto fail_platform_device1;
if (load_scm_model && (load_scm_model_init(msipf_device) < 0)) {
ret = -EINVAL;
goto fail_platform_device1;
}
ret = sysfs_create_group(&msipf_device->dev.kobj,
&msipf_attribute_group);
if (ret)
goto fail_platform_device2;
if (!old_ec_model) {
if (threeg_exists)
ret = device_create_file(&msipf_device->dev,
&dev_attr_threeg);
if (ret)
goto fail_platform_device2;
}
if (auto_brightness != 2)
set_auto_brightness(auto_brightness);
pr_info("driver " MSI_DRIVER_VERSION " successfully loaded\n");
return 0;
fail_platform_device2:
if (load_scm_model) {
i8042_remove_filter(msi_laptop_i8042_filter);
cancel_delayed_work_sync(&msi_rfkill_work);
rfkill_cleanup();
}
platform_device_del(msipf_device);
fail_platform_device1:
platform_device_put(msipf_device);
fail_platform_driver:
platform_driver_unregister(&msipf_driver);
fail_backlight:
backlight_device_unregister(msibl_device);
return ret;
}
示例7: htc_headset_1wire_init
static int __init htc_headset_1wire_init(void)
{
return platform_driver_register(&htc_headset_1wire_driver);
}
示例8: wifi_ctrlfunc_register_drv
static int wifi_ctrlfunc_register_drv(void)
{
int err = 0;
struct device *dev1, *dev2;
wifi_adapter_info_t *adapter;
dev1 = bus_find_device(&platform_bus_type, NULL, WIFI_PLAT_NAME, wifi_platdev_match);
dev2 = bus_find_device(&platform_bus_type, NULL, WIFI_PLAT_NAME2, wifi_platdev_match);
#if !defined(CONFIG_DTS)
if (!dts_enabled) {
if (dev1 == NULL && dev2 == NULL) {
DHD_ERROR(("no wifi platform data, skip\n"));
return -ENXIO;
}
}
#endif /* !defined(CONFIG_DTS) */
/* multi-chip support not enabled, build one adapter information for
* DHD (either SDIO, USB or PCIe)
*/
adapter = kzalloc(sizeof(wifi_adapter_info_t), GFP_KERNEL);
if (adapter == NULL) {
DHD_ERROR(("%s:adapter alloc failed", __FUNCTION__));
return ENOMEM;
}
adapter->name = "DHD generic adapter";
adapter->bus_type = -1;
adapter->bus_num = -1;
adapter->slot_num = -1;
adapter->irq_num = -1;
is_power_on = FALSE;
wifi_plat_dev_probe_ret = 0;
dhd_wifi_platdata = kzalloc(sizeof(bcmdhd_wifi_platdata_t), GFP_KERNEL);
dhd_wifi_platdata->num_adapters = 1;
dhd_wifi_platdata->adapters = adapter;
if (dev1) {
err = platform_driver_register(&wifi_platform_dev_driver);
if (err) {
DHD_ERROR(("%s: failed to register wifi ctrl func driver\n",
__FUNCTION__));
return err;
}
}
if (dev2) {
err = platform_driver_register(&wifi_platform_dev_driver_legacy);
if (err) {
DHD_ERROR(("%s: failed to register wifi ctrl func legacy driver\n",
__FUNCTION__));
return err;
}
}
#if !defined(CONFIG_DTS)
if (dts_enabled) {
struct resource *resource;
adapter->wifi_plat_data = (void *)&dhd_wlan_control;
resource = &dhd_wlan_resources;
adapter->irq_num = resource->start;
adapter->intr_flags = resource->flags & IRQF_TRIGGER_MASK;
wifi_plat_dev_probe_ret = dhd_wifi_platform_load();
}
#endif /* !defined(CONFIG_DTS) */
#ifdef CONFIG_DTS
wifi_plat_dev_probe_ret = platform_driver_register(&wifi_platform_dev_driver);
#endif /* CONFIG_DTS */
/* return probe function's return value if registeration succeeded */
return wifi_plat_dev_probe_ret;
}
示例9: mdio_gpio_init
static int __init mdio_gpio_init(void)
{
return platform_driver_register(&mdio_gpio_driver);
}
示例10: mmi_factory_init
static int __init mmi_factory_init(void)
{
return platform_driver_register(&mmi_factory_driver);
}
示例11: hall_init
static int __init hall_init(void)
{
printk("%s start\n", __func__);
return platform_driver_register(&hall_device_driver);
}
示例12: fimg2d_register
static int __init fimg2d_register(void)
{
pr_info("%s", banner);
return platform_driver_register(&fimg2d_driver);
}
示例13: rk3036_tve_init
static int __init rk3036_tve_init(void)
{
return platform_driver_register(&rk3036_tve_driver);
}
示例14: tegra_camera_init
static int __init tegra_camera_init(void)
{
return platform_driver_register(&tegra_camera_driver);
}
示例15: pcf50633_regulator_init
static int __init pcf50633_regulator_init(void)
{
return platform_driver_register(&pcf50633_regulator_driver);
}