本文整理汇总了C++中platform_device_register函数的典型用法代码示例。如果您正苦于以下问题:C++ platform_device_register函数的具体用法?C++ platform_device_register怎么用?C++ platform_device_register使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了platform_device_register函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: mxm_8x10_ac97_init
void __init mxm_8x10_ac97_init(void)
{
platform_device_register(&mxm_8x10_ac97_device);
}
开发者ID:123456798wil,项目名称:kernel_dell_streak7,代码行数:4,代码来源:mxm8x10.c
示例17: dm365_init_rtc
void __init dm365_init_rtc(void)
{
davinci_cfg_reg(DM365_INT_PRTCSS);
platform_device_register(&dm365_rtc_device);
}
开发者ID:12019,项目名称:linux-2.6.34-ts471x,代码行数:5,代码来源:dm365.c
示例18: mxm_8x10_ethernet_init
static void __init mxm_8x10_ethernet_init(void)
{
platform_device_register(&dm9k_device);
}
开发者ID:123456798wil,项目名称:kernel_dell_streak7,代码行数:4,代码来源:mxm8x10.c
示例19: rsz_init
/*
=====================rsz_init===========================
function to register resizer character driver
*/
static __init int rsz_init(void)
{
int result;
/* Register the driver in the kernel */
result = alloc_chrdev_region(&dev, 0, 1, DRIVER_NAME);
if (result < 0) {
printk(KERN_ERR
"DaVinciresizer: could not register character device");
return -ENODEV;
}
/* Initialize of character device */
cdev_init(&c_dev, &rsz_fops);
c_dev.owner = THIS_MODULE;
c_dev.ops = &rsz_fops;
/* addding character device */
result = cdev_add(&c_dev, dev, 1);
if (result) {
printk(KERN_ERR
"DaVinciresizer:Error %d adding"
" Davinciresizer ..error no:",
result);
unregister_chrdev_region(dev, 1);
return result;
}
/* registeration of character device */
register_chrdev(MAJOR(dev), DRIVER_NAME, &rsz_fops);
/* register driver as a platform driver */
if (driver_register(&resizer_driver) != 0) {
unregister_chrdev_region(dev, 1);
cdev_del(&c_dev);
return -EINVAL;
}
/* Register the drive as a platform device */
if (platform_device_register(&resizer_device) != 0) {
driver_unregister(&resizer_driver);
unregister_chrdev_region(dev, 1);
unregister_chrdev(MAJOR(dev), DRIVER_NAME);
cdev_del(&c_dev);
return -EINVAL;
}
rsz_class = class_create(THIS_MODULE, "davinci_resizer");
if (!rsz_class) {
platform_device_unregister(&resizer_device);
cdev_del(&c_dev);
unregister_chrdev(MAJOR(dev), DRIVER_NAME);
return -EIO;
}
device_create(rsz_class, NULL, dev, NULL, "davinci_resizer");
rsz_dev.users = 0;
mutex_init(&rsz_dev.lock);
/* Initialize the serializer */
imp_init_serializer();
imp_hw_if = imp_get_hw_if();
printk(KERN_NOTICE "davinci_resizer initialized\n");
return 0;
} /* End of function resizer_init */
开发者ID:GeorgeIoak,项目名称:linux-davinci,代码行数:75,代码来源:imp_resizer.c
示例20: rx51_init_lirc
static void __init rx51_init_lirc(void)
{
platform_device_register(&rx51_lirc_device);
}
开发者ID:01org,项目名称:KVMGT-kernel,代码行数:4,代码来源:board-rx51-peripherals.c
注:本文中的platform_device_register函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论