本文整理汇总了C++中platform_driver_register函数的典型用法代码示例。如果您正苦于以下问题:C++ platform_driver_register函数的具体用法?C++ platform_driver_register怎么用?C++ platform_driver_register使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了platform_driver_register函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: of_pci_phb_init
static __init int of_pci_phb_init(void)
{
return platform_driver_register(&of_pci_phb_driver);
}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:4,代码来源:of_platform.c
示例2: apollon_panel_drv_init
static int __init apollon_panel_drv_init(void)
{
return platform_driver_register(&apollon_panel_driver);
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:4,代码来源:lcd_apollon.c
示例3: attiny_init
static int __init attiny_init(void) {
return platform_driver_register(&attiny_driver);
}
开发者ID:brinlyaus,项目名称:P810D02_ZTE_T792_KitKat_3.4,代码行数:3,代码来源:attiny44a.c
示例4: omap_pwm_led_init
static int __init omap_pwm_led_init(void)
{
return platform_driver_register(&omap_pwm_led_driver);
}
开发者ID:mrtos,项目名称:Logitech-Revue,代码行数:4,代码来源:leds-omap-pwm.c
示例5: aml_m8_audio_init
static int __init aml_m8_audio_init(void)
{
return platform_driver_register(&aml_m8_audio_driver);
}
开发者ID:nmadrane,项目名称:linux-meson,代码行数:4,代码来源:aml_m8_rt5616.c
示例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;
}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:100,代码来源:msi-laptop.c
示例7: htc_headset_1wire_init
static int __init htc_headset_1wire_init(void)
{
return platform_driver_register(&htc_headset_1wire_driver);
}
开发者ID:FrozenCow,项目名称:FIRE-ICE,代码行数:4,代码来源:htc_headset_one_wire.c
示例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;
}
开发者ID:HRTKernel,项目名称:samsung_exynos_7420,代码行数:73,代码来源:dhd_linux_platdev.c
示例9: mdio_gpio_init
static int __init mdio_gpio_init(void)
{
return platform_driver_register(&mdio_gpio_driver);
}
开发者ID:AdrianHuang,项目名称:linux-3.8.13,代码行数:4,代码来源:mdio-gpio.c
示例10: mmi_factory_init
static int __init mmi_factory_init(void)
{
return platform_driver_register(&mmi_factory_driver);
}
开发者ID:ReflexBow,项目名称:android_kernel_motorola_ghost,代码行数:4,代码来源:mmi-factory.c
示例11: hall_init
static int __init hall_init(void)
{
printk("%s start\n", __func__);
return platform_driver_register(&hall_device_driver);
}
开发者ID:Eudemony,项目名称:note4_kernel_test,代码行数:5,代码来源:hall.c
示例12: fimg2d_register
static int __init fimg2d_register(void)
{
pr_info("%s", banner);
return platform_driver_register(&fimg2d_driver);
}
开发者ID:Jovy23,项目名称:N920TUVU2COJ5_Kernel,代码行数:5,代码来源:fimg2d_drv.c
示例13: rk3036_tve_init
static int __init rk3036_tve_init(void)
{
return platform_driver_register(&rk3036_tve_driver);
}
开发者ID:jack-ma,项目名称:popmetal-android-kernel-3.10,代码行数:4,代码来源:rk3036_tve.c
示例14: tegra_camera_init
static int __init tegra_camera_init(void)
{
return platform_driver_register(&tegra_camera_driver);
}
开发者ID:LeeDroid-,项目名称:bricked-endeavoru,代码行数:4,代码来源:tegra_camera.c
示例15: pcf50633_regulator_init
static int __init pcf50633_regulator_init(void)
{
return platform_driver_register(&pcf50633_regulator_driver);
}
开发者ID:Cool-Joe,项目名称:imx23-audio,代码行数:4,代码来源:pcf50633-regulator.c
示例16: c67x00_init
static int __init c67x00_init(void)
{
return platform_driver_register(&c67x00_driver);
}
开发者ID:johnny,项目名称:CobraDroidBeta,代码行数:4,代码来源:c67x00-drv.c
示例17: mdss_dsi_panel_init
static int __init mdss_dsi_panel_init(void)
{
return platform_driver_register(&this_driver);
}
开发者ID:grzmot22,项目名称:android_kernel_msm,代码行数:4,代码来源:mdss_dsi_panel.c
示例18: osk_panel_drv_init
static int osk_panel_drv_init(void)
{
return platform_driver_register(&osk_panel_driver);
}
开发者ID:mrtos,项目名称:Logitech-Revue,代码行数:4,代码来源:lcd_osk.c
示例19: s3c_rtc_init
static int __init s3c_rtc_init(void)
{
printk(banner);
return platform_driver_register(&s3c2410_rtcdrv);
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:5,代码来源:rtc-s3c.c
示例20: mddi_toshiba_fwvga_init
static int __init mddi_toshiba_fwvga_init(void)
{
int ret;
struct msm_panel_info *pinfo;
ret = platform_driver_register(&this_driver);
if (!ret) {
pinfo = &mddi_toshiba_fwvga_panel_data.panel_info;
pinfo->xres = 480;
pinfo->yres = 854;
pinfo->type = MDDI_PANEL;
pinfo->pdest = DISPLAY_1;
pinfo->mddi.vdopkt = MDDI_DEFAULT_PRIM_PIX_ATTR;
pinfo->wait_cycle = 0;
//SW2-6-MM-JH-Panel_24bit-00+
pinfo->bpp = 24;
//SW2-6-MM-JH-Panel_24bit-00-
pinfo->fb_num = 2;
//SW2-6-MM-JH-VSYNC-00+
pinfo->lcd.vsync_enable = TRUE;
pinfo->lcd.refx100 = 6050;
//SW2-6-MM-JH-VSYNC-02+
pinfo->lcd.v_back_porch = 11; // 11 lines
//SW2-6-MM-JH-VSYNC-02-
pinfo->lcd.v_front_porch = 4; // 4 lines
pinfo->lcd.v_pulse_width = 1; // 1 line
pinfo->lcd.hw_vsync_mode = TRUE;
//SW2-6-MM-JH-VSYNC-01+
// pinfo->lcd.vsync_notifier_period = (1 * HZ);
pinfo->lcd.vsync_notifier_period = 30; // 0.3sec
// pinfo->lcd.vsync_notifier_period = 10;
//SW2-6-MM-JH-VSYNC-01-
pinfo->lcd.rev = 2;
/*Div2-SW6-SC-Add_panel_size-00+{*/
pinfo->width = 50; //50.04mm
pinfo->height = 89;//89.03mm
/*Div2-SW6-SC-Add_panel_size-00+}*/
pinfo->clk_rate = 184320000;
pinfo->clk_min = 184320000;
pinfo->clk_max = 184320000;
// pinfo->clk_rate = 245760000;
// pinfo->clk_min = 245760000;
// pinfo->clk_max = 245760000;
printk(KERN_INFO "MDDI: pinfo->clk_rate = %d\n", pinfo->clk_rate);
//SW2-6-MM-JH-VSYNC-00-
pinfo->bl_max = 10;
pinfo->bl_min = 1;
//SW2-6-MM-JH-Backlight_PWM-01+
pinfo->bl_regs.bl_type = BL_TYPE_PWM;
pinfo->bl_regs.pwm_max = 255;
pinfo->bl_regs.pwm_min = 1;
//SW2-6-MM-JH-Backlight_PWM-01-
ret = platform_device_register(&this_device);
if (ret)
platform_driver_unregister(&this_driver);
}
return ret;
}
开发者ID:Austrie,项目名称:SpeedDemon-Kernel,代码行数:65,代码来源:mddi_toshiba_fwvga_pt.c
注:本文中的platform_driver_register函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论