当前位置: 首页>>代码示例>>C++>>正文


C++ platform_device_register函数代码示例

本文整理汇总了C++中platform_device_register函数的典型用法代码示例。如果您正苦于以下问题:C++ platform_device_register函数的具体用法?C++ platform_device_register怎么用?C++ platform_device_register使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了platform_device_register函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: cm_x300_init_spi

static void __init cm_x300_init_spi(void)
{
	spi_register_board_info(cm_x300_spi_devices,
				ARRAY_SIZE(cm_x300_spi_devices));
	platform_device_register(&cm_x300_spi_gpio);
}
开发者ID:0-t,项目名称:samsung-kernel-msm7x30,代码行数:6,代码来源:cm-x300.c

示例2: am33xx_init_pcm

static void am33xx_init_pcm(void)
{
	platform_device_register(&am33xx_pcm_device);
}
开发者ID:JudeBake,项目名称:linux-am33x,代码行数:4,代码来源:devices.c

示例3: omap_hdq_init

static inline void omap_hdq_init(void)
{
	(void) platform_device_register(&omap_hdq_dev);
}
开发者ID:JudeBake,项目名称:linux-am33x,代码行数:4,代码来源:devices.c

示例4: dove_sdio1_init

void __init dove_sdio1_init(void)
{
	platform_device_register(&dove_sdio1);
}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:4,代码来源:common.c

示例5: exynos5_universal5410_media_init


//.........这里部分代码省略.........
	s3c_set_platdata(&exynos_flite0_default_data,
			sizeof(exynos_flite0_default_data), &exynos_device_flite0);
	s3c_set_platdata(&exynos_flite1_default_data,
			sizeof(exynos_flite1_default_data), &exynos_device_flite1);
	s3c_set_platdata(&exynos_flite2_default_data,
			sizeof(exynos_flite2_default_data), &exynos_device_flite2);
#endif

#if defined(CONFIG_VIDEO_EXYNOS_TV)
	dev_set_name(&s5p_device_hdmi.dev, "exynos5-hdmi");
	mxr_platdata.ip_ver = IP_VER_TV_5A_1;
	hdmi_platdata.ip_ver = IP_VER_TV_5A_1;

	s5p_tv_setup();
/* Below should be enabled after power domain is available */
#if 0
	s5p_device_hdmi.dev.parent = &exynos5_device_pd[PD_DISP1].dev;
	s5p_device_mixer.dev.parent = &exynos5_device_pd[PD_DISP1].dev;
#endif
#ifdef CONFIG_VIDEO_EXYNOS_HDMI_CEC
	s5p_hdmi_cec_set_platdata(&hdmi_cec_data);
#endif
	s3c_set_platdata(&mxr_platdata, sizeof(mxr_platdata), &s5p_device_mixer);
	s5p_hdmi_set_platdata(&hdmi_platdata);
	/*
	 * exynos5_hs_i2c2_set_platdata(NULL);
	 * i2c_register_board_info(6, hs_i2c_devs2, ARRAY_SIZE(hs_i2c_devs2));
	 */

#endif
#ifdef CONFIG_VIDEO_EXYNOS_GSCALER
	exynos5_gsc_set_ip_ver(IP_VER_GSC_5A);

	s3c_set_platdata(&exynos_gsc0_default_data, sizeof(exynos_gsc0_default_data),
			&exynos5_device_gsc0);
	s3c_set_platdata(&exynos_gsc1_default_data, sizeof(exynos_gsc1_default_data),
			&exynos5_device_gsc1);
	s3c_set_platdata(&exynos_gsc2_default_data, sizeof(exynos_gsc2_default_data),
			&exynos5_device_gsc2);
	s3c_set_platdata(&exynos_gsc3_default_data, sizeof(exynos_gsc3_default_data),
			&exynos5_device_gsc3);
#endif
#ifdef CONFIG_VIDEO_EXYNOS5_FIMC_IS
	dev_set_name(&exynos5_device_fimc_is.dev, "s5p-mipi-csis.0");
	clk_add_alias("gscl_wrap0", FIMC_IS_MODULE_NAME, "gscl_wrap0", &exynos5_device_fimc_is.dev);
	dev_set_name(&exynos5_device_fimc_is.dev, "s5p-mipi-csis.1");
	clk_add_alias("gscl_wrap1", FIMC_IS_MODULE_NAME, "gscl_wrap1", &exynos5_device_fimc_is.dev);
	dev_set_name(&exynos5_device_fimc_is.dev, "s5p-mipi-csis.2");
	clk_add_alias("gscl_wrap2", FIMC_IS_MODULE_NAME, "gscl_wrap2", &exynos5_device_fimc_is.dev);

	dev_set_name(&exynos5_device_fimc_is.dev, FIMC_IS_MODULE_NAME);

#if defined(CONFIG_MACH_V1)
	exynos5_fimc_is_data.gpio_info = &gpio_camera_v1;
#else
	exynos5_fimc_is_data.gpio_info = &gpio_universal5410;
#endif

	exynos5_fimc_is_set_platdata(&exynos5_fimc_is_data);

	if (!exynos_spi_cfg_cs(spi3_csi[0].line, 3)) {
		s3c64xx_spi3_set_platdata(&s3c64xx_spi3_pdata,
			EXYNOS_SPI_SRCCLK_SCLK, ARRAY_SIZE(spi3_csi));

		spi_register_board_info(spi3_board_info,
			ARRAY_SIZE(spi3_board_info));
	} else {
		pr_err("%s: Error requesting gpio for SPI-CH1 CS\n", __func__);
	}
#endif
#ifdef CONFIG_VIDEO_EXYNOS_FIMG2D
	s5p_fimg2d_set_platdata(&fimg2d_data);
#endif
#ifdef CONFIG_VIDEO_EXYNOS_JPEG
	exynos5_jpeg_fimp_setup_clock(&s5p_device_jpeg.dev, 166500000);
#endif
#ifdef CONFIG_VIDEO_EXYNOS_JPEG_HX
	exynos5_jpeg_hx_setup_clock(&exynos5_device_jpeg_hx.dev, 300000000);
#endif
#if defined(CONFIG_TDMB) || defined(CONFIG_TDMB_MODULE)
#if defined(CONFIG_TDMB_SPI)
	if (!exynos_spi_cfg_cs(spi1_csi[0].line, 1)) {
		s3c64xx_spi1_set_platdata(&s3c64xx_spi1_pdata,
			EXYNOS_SPI_SRCCLK_SCLK, ARRAY_SIZE(spi1_csi));
	spi_register_board_info(spi1_board_info,
		ARRAY_SIZE(spi1_board_info));
	} else {
		pr_err("%s: Error requesting gpio for TDMB_SPI CS\n", __func__);
	}
#endif
	tdmb_dev_init();
#endif
#ifdef CONFIG_ISDBTMM
    tmm_dev_init();
#endif

#ifdef CONFIG_LEDS_KTD267
	platform_device_register(&s3c_device_ktd267_led);
#endif
}
开发者ID:253627764,项目名称:GT-I9500,代码行数:101,代码来源:board-universal5410-media.c

示例6: simone_register_audio

static void __init simone_register_audio(void)
{
	ep93xx_register_ac97();
	platform_device_register(&simone_audio_device);
}
开发者ID:Jackeagle,项目名称:android_kernel_sony_c2305,代码行数:5,代码来源:simone.c

示例7: mxc_init_extuart

static int __init mxc_init_extuart(void)
{
	return platform_device_register(&serial_device);
}
开发者ID:anewkirk,项目名称:AJK,代码行数:4,代码来源:mach-mx31ads.c

示例8: cmx255_init_nand

static void __init cmx255_init_nand(void)
{
	platform_device_register(&cmx255_nand);
}
开发者ID:0x0f,项目名称:adam-kernel,代码行数:4,代码来源:cm-x255.c

示例9: nas100d_init

static void __init nas100d_init(void)
{
	uint8_t __iomem *f;
	int i;

	ixp4xx_sys_init();

	/* gpio 14 and 15 are _not_ clocks */
	*IXP4XX_GPIO_GPCLKR = 0;

	nas100d_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
	nas100d_flash_resource.end =
		IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;

	i2c_register_board_info(0, nas100d_i2c_board_info,
				ARRAY_SIZE(nas100d_i2c_board_info));

	/*
	 * This is only useful on a modified machine, but it is valuable
	 * to have it first in order to see debug messages, and so that
	 * it does *not* get removed if platform_add_devices fails!
	 */
	(void)platform_device_register(&nas100d_uart);

	platform_add_devices(nas100d_devices, ARRAY_SIZE(nas100d_devices));

	pm_power_off = nas100d_power_off;

	if (request_irq(gpio_to_irq(NAS100D_RB_GPIO), &nas100d_reset_handler,
		IRQF_DISABLED | IRQF_TRIGGER_LOW,
		"NAS100D reset button", NULL) < 0) {

		printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
			gpio_to_irq(NAS100D_RB_GPIO));
	}

	/* The power button on the Iomega NAS100d is on GPIO 14, but
	 * it cannot handle interrupts on that GPIO line.  So we'll
	 * have to poll it with a kernel timer.
	 */

	/* Make sure that the power button GPIO is set up as an input */
	gpio_line_config(NAS100D_PB_GPIO, IXP4XX_GPIO_IN);

	/* Set the initial value for the power button IRQ handler */
	power_button_countdown = PBUTTON_HOLDDOWN_COUNT;

	mod_timer(&nas100d_power_timer, jiffies + msecs_to_jiffies(500));

	/*
	 * Map in a portion of the flash and read the MAC address.
	 * Since it is stored in BE in the flash itself, we need to
	 * byteswap it if we're in LE mode.
	 */
	f = ioremap(IXP4XX_EXP_BUS_BASE(0), 0x1000000);
	if (f) {
		for (i = 0; i < 6; i++)
#ifdef __ARMEB__
			nas100d_plat_eth[0].hwaddr[i] = readb(f + 0xFC0FD8 + i);
#else
			nas100d_plat_eth[0].hwaddr[i] = readb(f + 0xFC0FD8 + (i^3));
#endif
		iounmap(f);
	}
	printk(KERN_INFO "NAS100D: Using MAC address %pM for port 0\n",
	       nas100d_plat_eth[0].hwaddr);

}
开发者ID:007Maximus007,项目名称:htc_kernel_desirec_cfs,代码行数:68,代码来源:nas100d-setup.c

示例10: mxc_init_ipu

static void mxc_init_ipu(void)
{
	platform_device_register(&mxc_ipu_device);
}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:4,代码来源:devices.c

示例11: mxc_init_mu

static inline void mxc_init_mu(void)
{
       (void)platform_device_register(&mxc_mu_device);
}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:4,代码来源:devices.c

示例12: mxc_init_wdt

static void mxc_init_wdt(void)
{
	(void)platform_device_register(&mxc_wdt_device);
}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:4,代码来源:devices.c

示例13: gp_touchpad_drv_init

/**
 * @brief touchpad driver init
 */
static int __init gp_touchpad_drv_init(void)
{
	printk("gp_touchpad_drv_init\n");
	platform_device_register(&gp_touchpad_device);
	return platform_driver_register(&gp_touchpad_driver);
}
开发者ID:WayWingsDev,项目名称:Gplus_2159_0801,代码行数:9,代码来源:tpd_dok_t6740b.c

示例14: cm_x300_init_rtc

static void __init cm_x300_init_rtc(void)
{
	platform_device_register(&cm_x300_rtc_device);
}
开发者ID:0-t,项目名称:samsung-kernel-msm7x30,代码行数:4,代码来源:cm-x300.c

示例15: dm365_init_ks

void __init dm365_init_ks(struct davinci_ks_platform_data *pdata)
{
	dm365_ks_device.dev.platform_data = pdata;
	platform_device_register(&dm365_ks_device);
}
开发者ID:12019,项目名称:linux-2.6.34-ts471x,代码行数:5,代码来源:dm365.c


注:本文中的platform_device_register函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。