本文整理汇总了C++中i2c_register_board_info函数的典型用法代码示例。如果您正苦于以下问题:C++ i2c_register_board_info函数的具体用法?C++ i2c_register_board_info怎么用?C++ i2c_register_board_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了i2c_register_board_info函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: msm7627a_add_io_devices
void __init msm7627a_add_io_devices(void)
{
/* touchscreen */
#ifdef CONFIG_TOUCHSCREEN_ATMEL_MAXTOUCH
if (machine_is_msm7625a_surf() || machine_is_msm7625a_ffa()) {
atmel_ts_pdata.min_x = 0;
atmel_ts_pdata.max_x = 480;
atmel_ts_pdata.min_y = 0;
atmel_ts_pdata.max_y = 320;
}
i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
atmel_ts_i2c_info,
ARRAY_SIZE(atmel_ts_i2c_info));
#endif
//>>MelChang,[Harry] Add ELAN eKTF2040 and ILITEK ILI2013t touch panel IC
#if defined(CONFIG_TOUCHSCREEN_ELAN_EKTF2040) || defined(CONFIG_TOUCHSCREEN_ILITEK_2103T) || defined(CONFIG_TOUCHSCREEN_CYPRESS_CY8CTMA340)
gpio_tlmm_config(GPIO_CFG(CAP_TOUCH_DETECT, 0, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA), GPIO_CFG_ENABLE);
mdelay(10);
if(gpio_get_value(CAP_TOUCH_DETECT))
{
#if defined(CONFIG_TOUCHSCREEN_CYPRESS_CY8CTMA340)
pr_info("-- CAP_TOUCH_DETECT is Cypress IC + Jtouch Panel --\n");
i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
i2c_touch_devices_cypress_tma340, ARRAY_SIZE(i2c_touch_devices_cypress_tma340));
#else
pr_info("-- CAP_TOUCH_DETECT High - Fail --\n");
#endif
}
else
{
#if defined(CONFIG_TOUCHSCREEN_ELAN_EKTF2040)
pr_info("-- CAP_TOUCH_DETECT is ELAN IC --\n");
elan_ktf2k_ts_power(1);
i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID, i2c_touch_devices_harry_elan, ARRAY_SIZE(i2c_touch_devices_harry_elan));
#elif defined(CONFIG_TOUCHSCREEN_CYPRESS_CY8CTMA340)
pr_info("-- CAP_TOUCH_DETECT is Cypress IC + Second Source Panel --\n");
i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
i2c_touch_devices_cypress_tma340,
ARRAY_SIZE(i2c_touch_devices_cypress_tma340));
#else
pr_info("-- CAP_TOUCH_DETECT Low - Fail --\n");
#endif
}
#endif
//>>MelChang,[Harry] Add ELAN eKTF2040 and ILITEK ILI2013t touch panel IC
/*++ Huize - 20110914 Register sensor device ++*/
i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
Sensor_devices_info,
ARRAY_SIZE(Sensor_devices_info));
/*-- Huize - 20110914 Register sensor device --*/
/* keypad */
//Mel, 2012/4/18, Enable Key GPIO. ++
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
platform_device_register(&NanHu_button_device);
#endif
//Mel, 2012/4/18, Enable Key GPIO. --
//Mel, 2012/4/18, Disable Key Matrix. ++
#if 0
platform_device_register(&kp_pdev);
#endif
//Mel, 2012/4/18, Disable Key Matrix. --
/* headset */
platform_device_register(&hs_pdev);
/* LED: configure it as a pdm function */
if (gpio_tlmm_config(GPIO_CFG(LED_GPIO_PDM, 3,
GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL,
GPIO_CFG_8MA), GPIO_CFG_ENABLE))
pr_err("%s: gpio_tlmm_config for %d failed\n",
__func__, LED_GPIO_PDM);
else
platform_device_register(&led_pdev);
/* ++ Edison add led device ++ */
#ifdef CONFIG_LEDS_CHIP_LM3533
led_lm3533_hw_init();
i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
i2c_led_devices_LM3533,
ARRAY_SIZE(i2c_led_devices_LM3533));
#endif
/* -- Edison add led device -- */
/* Vibrator */
//<<Skies, 2011/10/12 enable vibrator function
//if (machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa()
// || machine_is_msm8625_ffa())
//>>Skies, 2011/10/12
msm_init_pmic_vibrator();
}
开发者ID:Zoldyck07,项目名称:android_kernel_sony_msm7x27a,代码行数:94,代码来源:board-nanhu-io.c
示例2: mxc_board_init
/*!
* Board specific initialization.
*/
static void __init mxc_board_init(void)
{
mxc_ipu_data.di_clk[0] = clk_get(NULL, "ipu_di0_clk");
mxc_ipu_data.di_clk[1] = clk_get(NULL, "ipu_di1_clk");
mxc_ipu_data.csi_clk[0] = clk_get(NULL, "ssi_ext1_clk");
mxc_spdif_data.spdif_core_clk = clk_get(NULL, "spdif_xtal_clk");
clk_put(mxc_spdif_data.spdif_core_clk);
mxcsdhc1_device.resource[2].start = gpio_to_irq(MX53_SMD_SD1_CD);
mxcsdhc1_device.resource[2].end = gpio_to_irq(MX53_SMD_SD1_CD);
mxc_cpu_common_init();
mx53_smd_io_init();
/* power off by sending shutdown command to da9053*/
pm_power_off = wm831x_poweroff_system;
mxc_register_device(&mxc_dma_device, NULL);
mxc_register_device(&mxc_wdt_device, NULL);
mxc_register_device(&mxcspi1_device, &mxcspi1_data);
mxc_register_device(&mxci2c_devices[0], &mxci2c_data);
mxc_register_device(&mxci2c_devices[1], &mxci2c_data);
mxc_register_device(&mxci2c_devices[2], &mxci2c_data);
mx53_smd_init_wm8325();
mxc_register_device(&mxc_rtc_device, NULL);
mxc_register_device(&mxc_ipu_device, &mxc_ipu_data);
mxc_register_device(&mxc_ldb_device, &ldb_data);
mxc_register_device(&mxc_tve_device, &tve_data);
mxc_register_device(&mxcvpu_device, &mxc_vpu_data);
mxc_register_device(&gpu_device, &gpu_data);
mxc_register_device(&mxcscc_device, NULL);
mxc_register_device(&mxc_dvfs_core_device, &dvfs_core_data);
mxc_register_device(&busfreq_device, &bus_freq_data);
mxc_register_device(&mxc_iim_device, &iim_data);
mxc_register_device(&mxc_pwm1_device, &mxc_pwm1_platform_data);
mxc_register_device(&mxc_pwm2_device, NULL);
mxc_register_device(&mxc_pwm1_backlight_device, &mxc_pwm_backlight_data);
/* Register mmc3(eMMC) first, make it's device number be 0 to
* avoid device number change by hotplug in SD(mmc1) card */
mxc_register_device(&mxcsdhc3_device, &mmc3_data);
mxc_register_device(&mxcsdhc1_device, &mmc1_data);
mxc_register_device(&mxcsdhc2_device, &mmc2_data);
mxc_register_device(&mxc_ssi1_device, NULL);
mxc_register_device(&mxc_ssi2_device, NULL);
mxc_register_device(&mxc_alsa_spdif_device, &mxc_spdif_data);
mxc_register_device(&mxc_android_pmem_device, &android_pmem_data);
mxc_register_device(&mxc_android_pmem_gpu_device,
&android_pmem_gpu_data);
mxc_register_device(&usb_mass_storage_device, &mass_storage_data);
mxc_register_device(&usb_rndis_device, &rndis_data);
mxc_register_device(&android_usb_device, &android_usb_data);
mxc_register_device(&ahci_fsl_device, &sata_data);
/* AHCI SATA PWR EN(DCDC_5V, DCDC_3V3_BB) on SATA bus */
gpio_request(MX53_SMD_SATA_PWR_EN, "sata-pwr-en");
gpio_direction_output(MX53_SMD_SATA_PWR_EN, 1);
mxc_register_device(&mxc_fec_device, &fec_data);
mxc_register_device(&mxc_ptp_device, NULL);
/* ASRC is only available for MX53 TO2.0 */
if (mx53_revision() >= IMX_CHIP_REVISION_2_0) {
mxc_asrc_data.asrc_core_clk = clk_get(NULL, "asrc_clk");
clk_put(mxc_asrc_data.asrc_core_clk);
mxc_asrc_data.asrc_audio_clk = clk_get(NULL, "asrc_serial_clk");
clk_put(mxc_asrc_data.asrc_audio_clk);
mxc_register_device(&mxc_asrc_device, &mxc_asrc_data);
}
spi_device_init();
i2c_register_board_info(1, mxc_i2c1_board_info,
ARRAY_SIZE(mxc_i2c1_board_info));
i2c_register_board_info(2, mxc_i2c2_board_info,
ARRAY_SIZE(mxc_i2c2_board_info));
mxc_register_device(&mxc_rt5621_device, &rt5621_data);
mxc_register_device(&mxc_spdif_audio_device, &spdif_audio_data);
mx5_set_otghost_vbus_func(mx53_gpio_usbotg_driver_vbus);
mx5_usb_dr_init();
mx5_usbh1_init();
mxc_register_device(&mxc_v4l2_device, NULL);
mxc_register_device(&mxc_v4l2out_device, NULL);
mxc_register_device(&mxc_bt_rfkill, &mxc_bt_rfkill_data);
smd_add_device_buttons();
smd_add_device_battery();
}
开发者ID:onyx-intl,项目名称:t80_android_frameworks,代码行数:89,代码来源:mx53_smd.c
示例3: incrediblec_init
static void __init incrediblec_init(void)
{
int ret;
struct kobject *properties_kobj;
printk("incrediblec_init() revision=%d, engineerid=%d\n", system_rev, engineerid);
msm_hw_reset_hook = incrediblec_reset;
if (0 == engineerid || 0xF == engineerid) {
mdp_pmem_pdata.start = MSM_PMEM_MDP_XA_BASE;
android_pmem_adsp_pdata.start = MSM_PMEM_ADSP_XA_BASE;
msm_kgsl_resources[1].start = MSM_GPU_MEM_XA_BASE;
msm_kgsl_resources[1].end = MSM_GPU_MEM_XA_BASE + MSM_GPU_MEM_SIZE - 1;
} else if (engineerid >= 3) {
mdp_pmem_pdata.start = MSM_PMEM_MDP_BASE + MSM_MEM_128MB_OFFSET;
android_pmem_adsp_pdata.start = MSM_PMEM_ADSP_BASE + MSM_MEM_128MB_OFFSET;
msm_kgsl_resources[1].start = MSM_GPU_MEM_BASE;
msm_kgsl_resources[1].end = msm_kgsl_resources[1].start + MSM_GPU_MEM_SIZE - 1;
}
incrediblec_board_serialno_setup(board_serialno());
OJ_BMA_power();
msm_acpu_clock_init(&incrediblec_clock_data);
perflock_init(&incrediblec_perflock_data);
#if defined(CONFIG_MSM_SERIAL_DEBUGGER)
msm_serial_debug_init(MSM_UART1_PHYS, INT_UART1,
&msm_device_uart1.dev, 1, INT_UART1_RX);
#endif
bcm_bt_lpm_pdata.gpio_wake = INCREDIBLEC_GPIO_BT_CHIP_WAKE;
config_gpio_table(bt_gpio_table_rev_CX, ARRAY_SIZE(bt_gpio_table_rev_CX));
/* set the gpu power rail to manual mode so clk en/dis will not
* turn off gpu power, and hang it on resume */
incrediblec_kgsl_power_rail_mode(0);
incrediblec_kgsl_power(true);
#ifdef CONFIG_SPI_QSD
msm_device_spi.dev.platform_data = &incrediblec_spi_pdata;
#endif
#ifdef CONFIG_SERIAL_MSM_HS
msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
msm_device_uart_dm1.name = "msm_serial_hs"; /* for bcm */
#endif
incrediblec_config_uart_gpios();
config_gpio_table(usb_phy_3v3_table, ARRAY_SIZE(usb_phy_3v3_table));
config_gpio_table(camera_off_gpio_table,
ARRAY_SIZE(camera_off_gpio_table));
/*gpio_direction_output(INCREDIBLEC_GPIO_TP_LS_EN, 0);*/
gpio_direction_output(INCREDIBLEC_GPIO_TP_EN, 0);
incrediblec_audio_init();
#ifdef CONFIG_MICROP_COMMON
incrediblec_microp_init();
#endif
if (system_rev >= 2) {
microp_data.num_functions = ARRAY_SIZE(microp_functions_1);
microp_data.microp_function = microp_functions_1;
}
platform_add_devices(devices, ARRAY_SIZE(devices));
if (!opt_usb_h2w_sw) {
msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata;
}
if (system_rev > 2) {
incrediblec_atmel_ts_data[0].config_T9[7] = 33;
incrediblec_atmel_ts_data[0].object_crc[0] = 0x2E;
incrediblec_atmel_ts_data[0].object_crc[1] = 0x80;
incrediblec_atmel_ts_data[0].object_crc[2] = 0xE0;
}
i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));
ret = incrediblec_init_mmc(system_rev);
if (ret != 0)
pr_crit("%s: Unable to initialize MMC\n", __func__);
properties_kobj = kobject_create_and_add("board_properties", NULL);
if (properties_kobj)
ret = sysfs_create_group(properties_kobj,
&incrediblec_properties_attr_group);
if (!properties_kobj || ret)
pr_err("failed to create board_properties\n");
msm_init_pmic_vibrator();
}
开发者ID:Savaged-Zen,项目名称:Savaged-Zen-Inc,代码行数:96,代码来源:board-incrediblec.c
示例4: qrd7627a_add_io_devices
void __init qrd7627a_add_io_devices(void)
{
int rc;
/* touchscreen */
if (machine_is_msm7627a_qrd1()) {
i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
synaptic_i2c_clearpad3k,
ARRAY_SIZE(synaptic_i2c_clearpad3k));
} else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb() ||
machine_is_msm8625_evt()) {
/* Use configuration data for EVT */
if (machine_is_msm8625_evt()) {
mxt_config_array[0].config = mxt_config_data_evt;
mxt_config_array[0].config_length =
ARRAY_SIZE(mxt_config_data_evt);
mxt_platform_data.panel_maxy = 875;
mxt_platform_data.need_calibration = true;
mxt_vkey_setup();
}
rc = gpio_tlmm_config(GPIO_CFG(MXT_TS_IRQ_GPIO, 0,
GPIO_CFG_INPUT, GPIO_CFG_PULL_UP,
GPIO_CFG_8MA), GPIO_CFG_ENABLE);
if (rc) {
pr_err("%s: gpio_tlmm_config for %d failed\n",
__func__, MXT_TS_IRQ_GPIO);
}
rc = gpio_tlmm_config(GPIO_CFG(MXT_TS_RESET_GPIO, 0,
GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN,
GPIO_CFG_8MA), GPIO_CFG_ENABLE);
if (rc) {
pr_err("%s: gpio_tlmm_config for %d failed\n",
__func__, MXT_TS_RESET_GPIO);
}
i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
mxt_device_info,
ARRAY_SIZE(mxt_device_info));
} else if (machine_is_msm7627a_qrd3() || machine_is_msm8625_qrd7()
|| machine_is_qrd_skud_prime()
|| machine_is_msm8625q_skud()
|| machine_is_msm8625q_evbd()) {
ft5x06_touchpad_setup();
/* evbd+ can support synaptic as well */
if (machine_is_msm8625q_evbd() &&
(socinfo_get_platform_type() == 0x13)) {
/* for QPR EVBD+ with synaptic touch panel */
/* TODO: Add gpio request to the driver
to support proper dynamic touch detection */
gpio_tlmm_config(
GPIO_CFG(CLEARPAD3000_ATTEN_GPIO_EVBD_PLUS, 0,
GPIO_CFG_INPUT, GPIO_CFG_NO_PULL,
GPIO_CFG_8MA), GPIO_CFG_ENABLE);
gpio_tlmm_config(
GPIO_CFG(CLEARPAD3000_RESET_GPIO, 0,
GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN,
GPIO_CFG_8MA), GPIO_CFG_ENABLE);
gpio_set_value(CLEARPAD3000_RESET_GPIO, 0);
usleep(10000);
gpio_set_value(CLEARPAD3000_RESET_GPIO, 1);
usleep(50000);
i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
rmi4_i2c_devices,
ARRAY_SIZE(rmi4_i2c_devices));
}
else {
if (machine_is_msm8625q_evbd()) {
mxt_config_array[0].config = mxt_config_data;
mxt_config_array[0].config_length =
ARRAY_SIZE(mxt_config_data);
mxt_platform_data.panel_maxy = 875;
mxt_platform_data.need_calibration = true;
mxt_platform_data.irq_gpio = MXT_TS_EVBD_IRQ_GPIO;
mxt_vkey_setup();
rc = gpio_tlmm_config(GPIO_CFG(MXT_TS_EVBD_IRQ_GPIO, 0,
GPIO_CFG_INPUT, GPIO_CFG_PULL_UP,
GPIO_CFG_8MA), GPIO_CFG_ENABLE);
if (rc) {
pr_err("%s: gpio_tlmm_config for %d failed\n",
__func__, MXT_TS_EVBD_IRQ_GPIO);
}
rc = gpio_tlmm_config(GPIO_CFG(MXT_TS_RESET_GPIO, 0,
GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN,
GPIO_CFG_8MA), GPIO_CFG_ENABLE);
if (rc) {
pr_err("%s: gpio_tlmm_config for %d failed\n",
__func__, MXT_TS_RESET_GPIO);
}
i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
mxt_device_info,
ARRAY_SIZE(mxt_device_info));
}
//.........这里部分代码省略.........
开发者ID:Astrali,项目名称:kernel_msm8625q_f1,代码行数:101,代码来源:board-msm7627a-io.c
示例5: sffsdr_init_i2c
static void __init sffsdr_init_i2c(void)
{
davinci_init_i2c(&i2c_pdata);
i2c_register_board_info(1, i2c_info, ARRAY_SIZE(i2c_info));
}
开发者ID:1youhun1,项目名称:linux,代码行数:5,代码来源:board-sffsdr.c
示例6: msm7x2x_init
static void __init msm7x2x_init(void)
{
msm7x2x_misc_init();
/* Initialize regulators first so that other devices can use them */
msm7x27a_init_regulators();
/* Common functions for SURF/FFA/RUMI3 */
msm_device_i2c_init();
msm7x27a_init_ebi2();
msm7x27a_cfg_uart2dm_serial();
#ifdef CONFIG_SERIAL_MSM_HS
msm_uart_dm1_pdata.wakeup_irq = gpio_to_irq(UART1DM_RX_GPIO);
msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
#endif
#ifdef CONFIG_USB_MSM_OTG_72K
msm_otg_pdata.swfi_latency =
msm7x27a_pm_data
[MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT].latency;
msm_device_otg.dev.platform_data = &msm_otg_pdata;
#endif
msm_device_gadget_peripheral.dev.platform_data =
&msm_gadget_pdata;
msm7x27a_cfg_smsc911x();
platform_add_devices(msm_footswitch_devices,
msm_num_footswitch_devices);
platform_add_devices(surf_ffa_devices,
ARRAY_SIZE(surf_ffa_devices));
/* Ensure ar6000pm device is registered before MMC/SDC */
msm7x27a_init_ar6000pm();
#ifdef CONFIG_MMC_MSM
msm7627a_init_mmc();
#endif
msm_fb_add_devices();
#ifdef CONFIG_USB_EHCI_MSM_72K
msm7x2x_init_host();
#endif
msm_pm_set_platform_data(msm7x27a_pm_data,
ARRAY_SIZE(msm7x27a_pm_data));
BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata));
#if defined(CONFIG_I2C) && defined(CONFIG_GPIO_SX150X)
register_i2c_devices();
#endif
#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
msm7627a_bt_power_init();
#endif
if (machine_is_msm7625a_surf() || machine_is_msm7625a_ffa()) {
atmel_ts_pdata.min_x = 0;
atmel_ts_pdata.max_x = 480;
atmel_ts_pdata.min_y = 0;
atmel_ts_pdata.max_y = 320;
}
i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
atmel_ts_i2c_info,
ARRAY_SIZE(atmel_ts_i2c_info));
#if defined(CONFIG_MSM_CAMERA)
msm7627a_camera_init();
#endif
platform_device_register(&kp_pdev);
platform_device_register(&hs_pdev);
/* configure it as a pdm function*/
if (gpio_tlmm_config(GPIO_CFG(LED_GPIO_PDM, 3,
GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL,
GPIO_CFG_8MA), GPIO_CFG_ENABLE))
pr_err("%s: gpio_tlmm_config for %d failed\n",
__func__, LED_GPIO_PDM);
else
platform_device_register(&led_pdev);
#ifdef CONFIG_MSM_RPC_VIBRATOR
if (machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa())
msm_init_pmic_vibrator();
#endif
/*7x25a kgsl initializations*/
msm7x25a_kgsl_3d0_init();
}
开发者ID:ddikodroid,项目名称:Finder-Kernel-Source-4.0,代码行数:82,代码来源:board-msm7x27a.c
示例7: ventana_sensors_init
int __init ventana_sensors_init(void)
{
struct board_info BoardInfo;
#ifdef CONFIG_SENSORS_AK8975
ventana_akm8975_init();
#endif
#ifdef CONFIG_MPU_SENSORS_MPU3050
ventana_mpuirq_init();
#endif
ventana_camera_init();
ventana_nct1008_init();
i2c_register_board_info(0, ventana_i2c0_board_info,
ARRAY_SIZE(ventana_i2c0_board_info));
i2c_register_board_info(2, ventana_i2c2_board_info,
ARRAY_SIZE(ventana_i2c2_board_info));
i2c_register_board_info(2, cap_i2c1_board_info,
ARRAY_SIZE(cap_i2c1_board_info));
i2c_register_board_info(2, light_i2c1_board_info,
ARRAY_SIZE(light_i2c1_board_info));
i2c_register_board_info(2, proximity_i2c1_board_info,
ARRAY_SIZE(proximity_i2c1_board_info));
//+ ov5640 rear camera
i2c_register_board_info(3, ventana_i2c3_board_info,
ARRAY_SIZE(ventana_i2c3_board_info));
//-
//+ Front camera
i2c_register_board_info(3, front_sensor_i2c3_board_info,
ARRAY_SIZE(front_sensor_i2c3_board_info));
//-
//+ mi5140 rear camera
i2c_register_board_info(3, rear_sensor2_i2c3_board_info,
ARRAY_SIZE(rear_sensor2_i2c3_board_info));
//-
i2c_register_board_info(4, ventana_i2c4_board_info,
ARRAY_SIZE(ventana_i2c4_board_info));
//ddebug i2c_register_board_info(7, ventana_i2c7_board_info,
//ddebug ARRAY_SIZE(ventana_i2c7_board_info));
i2c_register_board_info(8, ventana_i2c8_board_info,
ARRAY_SIZE(ventana_i2c8_board_info));
#ifdef CONFIG_MPU_SENSORS_MPU3050
i2c_register_board_info(0, mpu3050_i2c0_boardinfo,
ARRAY_SIZE(mpu3050_i2c0_boardinfo));
#endif
return 0;
}
开发者ID:ViViDboarder,项目名称:android_kernel_TF101,代码行数:57,代码来源:board-ventana-sensors.c
示例8: vpac270_pmic_init
static void __init vpac270_pmic_init(void)
{
i2c_register_board_info(1, ARRAY_AND_SIZE(vpac270_pi2c_board_info));
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:4,代码来源:vpac270.c
示例9: income_i2c_init
static void __init income_i2c_init(void)
{
pxa_set_i2c_info(NULL);
pxa27x_set_i2c_power_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(income_i2c_devs));
}
开发者ID:007kumarraja,项目名称:rockchip-rk3188-mk908,代码行数:6,代码来源:colibri-pxa270-income.c
示例10: ap4evb_init
//.........这里部分代码省略.........
gpio_request(GPIO_FN_FSIAILR, NULL);
gpio_request(GPIO_FN_FSIAISLD, NULL);
gpio_request(GPIO_FN_FSIAOSLD, NULL);
gpio_request(GPIO_PORT161, NULL);
gpio_direction_output(GPIO_PORT161, 0); /* slave */
gpio_request(GPIO_PORT9, NULL);
gpio_request(GPIO_PORT10, NULL);
gpio_no_direction(GPIO_PORT9CR); /* FSIAOBT needs no direction */
gpio_no_direction(GPIO_PORT10CR); /* FSIAOLR needs no direction */
/* card detect pin for MMC slot (CN7) */
gpio_request(GPIO_PORT41, NULL);
gpio_direction_input(GPIO_PORT41);
/* setup FSI2 port B (HDMI) */
gpio_request(GPIO_FN_FSIBCK, NULL);
__raw_writew(__raw_readw(USCCR1) & ~(1 << 6), USCCR1); /* use SPDIF */
/* set SPU2 clock to 119.6 MHz */
clk = clk_get(NULL, "spu_clk");
if (!IS_ERR(clk)) {
clk_set_rate(clk, clk_round_rate(clk, 119600000));
clk_put(clk);
}
/*
* set irq priority, to avoid sound chopping
* when NFS rootfs is used
* FSI(3) > SMSC911X(2)
*/
intc_set_priority(IRQ_FSI, 3);
i2c_register_board_info(0, i2c0_devices,
ARRAY_SIZE(i2c0_devices));
i2c_register_board_info(1, i2c1_devices,
ARRAY_SIZE(i2c1_devices));
#ifdef CONFIG_AP4EVB_QHD
/*
* For QHD Panel (MIPI-DSI, CONFIG_AP4EVB_QHD=y) and
* IRQ28 for Touch Panel, set dip switches S3, S43 as OFF, ON.
*/
/* enable KEYSC */
gpio_request(GPIO_FN_KEYOUT0, NULL);
gpio_request(GPIO_FN_KEYOUT1, NULL);
gpio_request(GPIO_FN_KEYOUT2, NULL);
gpio_request(GPIO_FN_KEYOUT3, NULL);
gpio_request(GPIO_FN_KEYOUT4, NULL);
gpio_request(GPIO_FN_KEYIN0_136, NULL);
gpio_request(GPIO_FN_KEYIN1_135, NULL);
gpio_request(GPIO_FN_KEYIN2_134, NULL);
gpio_request(GPIO_FN_KEYIN3_133, NULL);
gpio_request(GPIO_FN_KEYIN4, NULL);
/* enable TouchScreen */
set_irq_type(IRQ28, IRQ_TYPE_LEVEL_LOW);
tsc_device.irq = IRQ28;
i2c_register_board_info(1, &tsc_device, 1);
/* LCDC0 */
lcdc_info.clock_source = LCDC_CLK_PERIPHERAL;
开发者ID:Adjustxx,项目名称:Savaged-Zen,代码行数:67,代码来源:board-ap4evb.c
示例11: vpac270_rtc_init
static void __init vpac270_rtc_init(void)
{
i2c_register_board_info(0, ARRAY_AND_SIZE(vpac270_i2c_devs));
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:4,代码来源:vpac270.c
示例12: mxc_board_init
/*!
* Board specific initialization.
*/
static void __init mxc_board_init(void)
{
mxc_ipu_data.di_clk[0] = clk_get(NULL, "ipu_di0_clk");
mxc_ipu_data.di_clk[1] = clk_get(NULL, "ipu_di1_clk");
mxc_ipu_data.csi_clk[0] = clk_get(NULL, "csi_mclk1");
mxc_ipu_data.csi_clk[1] = clk_get(NULL, "csi_mclk2");
mxc_spdif_data.spdif_core_clk = clk_get(NULL, "spdif_xtal_clk");
clk_put(mxc_spdif_data.spdif_core_clk);
spdif_audio_data.ext_ram_clk = clk_get(NULL, "emi_fast_clk");
clk_put(spdif_audio_data.ext_ram_clk);
sgtl5000_data.ext_ram_clk = clk_get(NULL, "emi_fast_clk");
clk_put(sgtl5000_data.ext_ram_clk);
/* SD card detect irqs */
mxcsdhc2_device.resource[2].start = gpio_to_irq(BABBAGE_SD2_CD_2_5);
mxcsdhc2_device.resource[2].end = gpio_to_irq(BABBAGE_SD2_CD_2_5);
mxcsdhc1_device.resource[2].start = gpio_to_irq(BABBAGE_SD1_CD);
mxcsdhc1_device.resource[2].end = gpio_to_irq(BABBAGE_SD1_CD);
mxc_cpu_common_init();
mx51_babbage_io_init();
mxc_register_device(&mxc_dma_device, NULL);
mxc_register_device(&mxc_wdt_device, NULL);
mxc_register_device(&mxcspi1_device, &mxcspi1_data);
mxc_register_device(&mxci2c_devices[0], &mxci2c_data);
mxc_register_device(&mxci2c_devices[1], &mxci2c_data);
mxc_register_device(&mxci2c_hs_device, &mxci2c_hs_data);
mxc_register_device(&mxc_rtc_device, NULL);
mxc_register_device(&mxc_w1_master_device, &mxc_w1_data);
mxc_register_device(&mxc_ipu_device, &mxc_ipu_data);
mxc_register_device(&mxc_tve_device, &tve_data);
if (!mxc_fuse_get_vpu_status())
mxc_register_device(&mxcvpu_device, &mxc_vpu_data);
if (!mxc_fuse_get_gpu_status())
mxc_register_device(&gpu_device, &gpu_data);
mxc_register_device(&mxcscc_device, NULL);
mxc_register_device(&mx51_lpmode_device, NULL);
mxc_register_device(&busfreq_device, &bus_freq_data);
mxc_register_device(&sdram_autogating_device, NULL);
mxc_register_device(&mxc_dvfs_core_device, &dvfs_core_data);
mxc_register_device(&mxc_dvfs_per_device, &dvfs_per_data);
mxc_register_device(&mxc_iim_device, &iim_data);
mxc_register_device(&mxc_pwm1_device, NULL);
mxc_register_device(&mxc_pwm1_backlight_device,
&mxc_pwm_backlight_data);
mxc_register_device(&mxc_keypad_device, &keypad_plat_data);
mxc_register_device(&mxcsdhc1_device, &mmc1_data);
mxc_register_device(&mxcsdhc2_device, &mmc2_data);
mxc_register_device(&mxc_ssi1_device, NULL);
mxc_register_device(&mxc_ssi2_device, NULL);
mxc_register_device(&mxc_ssi3_device, NULL);
mxc_register_device(&mxc_alsa_spdif_device, &mxc_spdif_data);
mxc_register_device(&mxc_android_pmem_device, &android_pmem_data);
mxc_register_device(&mxc_android_pmem_gpu_device,
&android_pmem_gpu_data);
mxc_register_device(&usb_mass_storage_device, &mass_storage_data);
mxc_register_device(&usb_rndis_device, &rndis_data);
mxc_register_device(&android_usb_device, &android_usb_data);
mxc_register_device(&mxc_fec_device, NULL);
mxc_register_device(&mxc_v4l2_device, NULL);
mxc_register_device(&mxc_v4l2out_device, NULL);
mxc_register_device(&mxc_powerkey_device, &pwrkey_data);
mxc_register_device(&mxc_spdif_audio_device, &spdif_audio_data);
mx51_babbage_init_mc13892();
if (board_is_rev(BOARD_REV_2))
/* BB2.5 */
spi_register_board_info(mxc_dataflash_device,
ARRAY_SIZE(mxc_dataflash_device));
else
/* BB2.0 */
spi_register_board_info(mxc_spi_nor_device,
ARRAY_SIZE(mxc_spi_nor_device));
i2c_register_board_info(0, mxc_i2c0_board_info,
ARRAY_SIZE(mxc_i2c0_board_info));
i2c_register_board_info(1, mxc_i2c1_board_info,
ARRAY_SIZE(mxc_i2c1_board_info));
vga_data.core_reg = NULL;
vga_data.io_reg = NULL;
vga_data.analog_reg = NULL;
i2c_register_board_info(3, mxc_i2c_hs_board_info,
ARRAY_SIZE(mxc_i2c_hs_board_info));
pm_power_off = mxc_power_off;
sgtl5000_data.sysclk = 26000000;
gpio_request(BABBAGE_AUDAMP_STBY, "audioamp-stdby");
//.........这里部分代码省略.........
开发者ID:pocketbook,项目名称:801,代码行数:101,代码来源:mx51_babbage.c
示例13: pcm037_init
static void __init pcm037_init(void)
{
int ret;
imx31_soc_init();
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
mxc_iomux_set_gpr(MUX_PGP_UH2, 1);
mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins),
"pcm037");
#define H2_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS \
| PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU)
mxc_iomux_set_pad(MX31_PIN_USBH2_CLK, H2_PAD_CFG);
mxc_iomux_set_pad(MX31_PIN_USBH2_DIR, H2_PAD_CFG);
mxc_iomux_set_pad(MX31_PIN_USBH2_NXT, H2_PAD_CFG);
mxc_iomux_set_pad(MX31_PIN_USBH2_STP, H2_PAD_CFG);
mxc_iomux_set_pad(MX31_PIN_USBH2_DATA0, H2_PAD_CFG);
mxc_iomux_set_pad(MX31_PIN_USBH2_DATA1, H2_PAD_CFG);
mxc_iomux_set_pad(MX31_PIN_SRXD6, H2_PAD_CFG);
mxc_iomux_set_pad(MX31_PIN_STXD6, H2_PAD_CFG);
mxc_iomux_set_pad(MX31_PIN_SFS3, H2_PAD_CFG);
mxc_iomux_set_pad(MX31_PIN_SCK3, H2_PAD_CFG);
mxc_iomux_set_pad(MX31_PIN_SRXD3, H2_PAD_CFG);
mxc_iomux_set_pad(MX31_PIN_STXD3, H2_PAD_CFG);
if (pcm037_variant() == PCM037_EET)
mxc_iomux_setup_multiple_pins(pcm037_uart1_pins,
ARRAY_SIZE(pcm037_uart1_pins), "pcm037_uart1");
else
mxc_iomux_setup_multiple_pins(pcm037_uart1_handshake_pins,
ARRAY_SIZE(pcm037_uart1_handshake_pins),
"pcm037_uart1");
platform_add_devices(devices, ARRAY_SIZE(devices));
imx31_add_imx2_wdt(NULL);
imx31_add_imx_uart0(&uart_pdata);
imx31_add_imx_uart1(&uart_pdata);
imx31_add_imx_uart2(&uart_pdata);
imx31_add_mxc_w1(NULL);
ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1), "lan9217-irq");
if (ret)
pr_warning("could not get LAN irq gpio\n");
else {
gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1));
platform_device_register(&pcm037_eth);
}
i2c_register_board_info(1, pcm037_i2c_devices,
ARRAY_SIZE(pcm037_i2c_devices));
imx31_add_imx_i2c1(&pcm037_i2c1_data);
imx31_add_imx_i2c2(&pcm037_i2c2_data);
imx31_add_mxc_nand(&pcm037_nand_board_info);
imx31_add_mxc_mmc(0, &sdhc_pdata);
imx31_add_ipu_core(&mx3_ipu_data);
imx31_add_mx3_sdc_fb(&mx3fb_pdata);
ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), "mt9t031-power");
if (!ret)
gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), 1);
else
iclink_mt9t031.power = NULL;
pcm037_init_camera();
platform_device_register(&pcm970_sja1000);
if (otg_mode_host) {
otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS_EXT);
if (otg_pdata.otg)
imx31_add_mxc_ehci_otg(&otg_pdata);
}
usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS_EXT);
if (usbh2_pdata.otg)
imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
if (!otg_mode_host)
imx31_add_fsl_usb2_udc(&otg_device_pdata);
}
开发者ID:Blackburn29,项目名称:PsycoKernel,代码行数:97,代码来源:mach-pcm037.c
示例14: qrd7627a_add_io_devices
void __init qrd7627a_add_io_devices(void)
{
int rc;
/* touchscreen */
if (machine_is_msm7627a_qrd1()) {
//20120507-Added by Jordan , it is no used for msm7627a
#if defined(CONFIG_TOUCHSCREEN_SYNAPTICS_RMI4_I2C) || \
defined(CONFIG_TOUCHSCREEN_SYNAPTICS_RMI4_I2C_MODULE)
i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
synaptic_i2c_clearpad3k,
ARRAY_SIZE(synaptic_i2c_clearpad3k));
#endif
} else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb() ||
machine_is_msm8625_evt()) {
/* Use configuration data for EVT */
if (machine_is_msm8625_evt()) {
mxt_config_array[0].config = mxt_config_data_evt;
mxt_config_array[0].config_length =
ARRAY_SIZE(mxt_config_data_evt);
mxt_platform_data.panel_maxy = 875;
mxt_platform_data.need_calibration = true;
mxt_vkey_setup();
}
rc = gpio_tlmm_config(GPIO_CFG(MXT_TS_IRQ_GPIO, 0,
GPIO_CFG_INPUT, GPIO_CFG_PULL_UP,
GPIO_CFG_8MA), GPIO_CFG_ENABLE);
if (rc) {
pr_err("%s: gpio_tlmm_config for %d failed\n",
__func__, MXT_TS_IRQ_GPIO);
}
rc = gpio_tlmm_config(GPIO_CFG(MXT_TS_RESET_GPIO, 0,
GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN,
GPIO_CFG_8MA), GPIO_CFG_ENABLE);
if (rc) {
pr_err("%s: gpio_tlmm_config for %d failed\n",
__func__, MXT_TS_RESET_GPIO);
}
i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
mxt_device_info,
ARRAY_SIZE(mxt_device_info));
} else if (machine_is_msm7627a_qrd3() || machine_is_msm8625_qrd7()) {
#ifdef CONFIG_TOUCHSCREEN_FT5X06 //20120507-Jordan
ft5x06_touchpad_setup();
#endif
}
/* headset */
platform_device_register(&hs_pdev);
/* vibrator */
#ifdef CONFIG_MSM_RPC_VIBRATOR
msm_init_pmic_vibrator();
#endif
/* keypad */
if (machine_is_msm8625_evt())
kp_matrix_info_8625.keymap = keymap_8625_evt;
if (machine_is_msm7627a_evb() || machine_is_msm8625_evb() ||
machine_is_msm8625_evt())
platform_device_register(&kp_pdev_8625);
else if (machine_is_msm7627a_qrd3() || machine_is_msm8625_qrd7())
platform_device_register(&kp_pdev_sku3);
/* leds */
if (machine_is_msm7627a_evb() || machine_is_msm8625_evb() ||
machine_is_msm8625_evt()) {
platform_device_register(&pmic_mpp_leds_pdev);
platform_device_register(&tricolor_leds_pdev);
}
}
开发者ID:Zoldyck07,项目名称:android_kernel_sony_msm7x27a,代码行数:75,代码来源:board-nanhu-io.c
示例15: axp_board_init
//.........这里部分代码省略.........
ret = script_parser_fetch("target", "dcdc2_vol", &dcdc2_vol, sizeof(int));
if (ret)
{
printk("axp driver uning configuration failed(%d)\n", __LINE__);
dcdc2_vol = 1400;
}
ret = script_parser_fetch("target", "dcdc3_vol", &dcdc3_vol, sizeof(int));
if (ret)
{
printk("axp driver uning configuration failed(%d)\n", __LINE__);
dcdc3_vol = 1250;
}
ret = script_parser_fetch("target", "ldo2_vol", &ldo2_vol, sizeof(int));
if (ret)
{
printk("axp driver uning configuration failed(%d)\n", __LINE__);
ldo2_vol = 3000;
}
ret = script_parser_fetch("target", "ldo3_vol", &ldo3_vol, sizeof(int));
if (ret)
{
printk("axp driver uning configuration failed(%d)\n", __LINE__);
ldo3_vol = 2800;
}
ret = script_parser_fetch("target", "ldo4_vol", &ldo4_vol, sizeof(int));
if (ret)
{
printk("axp driver uning configuration failed(%d)\n", __LINE__);
ldo4_vol = 2800;
}
ret = script_parser_fetch("pmu_para", "pmu_pekoff_time", &pmu_pekoff_time, sizeof(int));
if (ret)
{
printk("axp driver uning configuration failed(%d)\n", __LINE__);
pmu_pekoff_time = 6000;
}
ret = script_parser_fetch("pmu_para", "pmu_pekoff_en", &pmu_pekoff_en, sizeof(int));
if (ret)
{
printk("axp driver uning configuration failed(%d)\n", __LINE__);
pmu_pekoff_en = 1;
}
ret = script_parser_fetch("pmu_para", "pmu_peklong_time", &pmu_peklong_time, sizeof(int));
if (ret)
{
printk("axp driver uning configuration failed(%d)\n", __LINE__);
pmu_peklong_time = 1500;
}
ret = script_parser_fetch("pmu_para", "pmu_pwrok_time", &pmu_pwrok_time, sizeof(int));
if (ret)
{
printk("axp driver uning configuration failed(%d)\n", __LINE__);
pmu_pwrok_time = 64;
}
ret = script_parser_fetch("pmu_para", "pmu_pwrnoe_time", &pmu_pwrnoe_time, sizeof(int));
if (ret)
{
printk("axp driver uning configuration failed(%d)\n", __LINE__);
pmu_pwrnoe_time = 2000;
}
ret = script_parser_fetch("pmu_para", "pmu_intotp_en", &pmu_intotp_en, sizeof(int));
if (ret)
{
printk("axp driver uning configuration failed(%d)\n", __LINE__);
pmu_intotp_en = 1;
}
ret = script_parser_fetch("pmu_para", "pmu_pekon_time", &pmu_pekon_time, sizeof(int));
if (ret)
{
printk("axp driver uning configuration failed(%d)\n", __LINE__);
pmu_pekon_time = 1000;
}
axp_regl_init_data[1].constraints.state_standby.uV = ldo2_vol * 1000;
axp_regl_init_data[2].constraints.state_standby.uV = ldo3_vol * 1000;
axp_regl_init_data[3].constraints.state_standby.uV = ldo4_vol * 1000;
axp_regl_init_data[5].constraints.state_standby.uV = dcdc2_vol * 1000;
axp_regl_init_data[6].constraints.state_standby.uV = dcdc3_vol * 1000;
battery_data.voltage_max_design = pmu_init_chgvol;
battery_data.voltage_min_design = pmu_pwroff_vol;
battery_data.energy_full_design = pmu_battery_cap;
axp_sply_init_data.chgcur = pmu_init_chgcur;
axp_sply_init_data.chgvol = pmu_init_chgvol;
axp_sply_init_data.chgend = pmu_init_chgend_rate;
axp_sply_init_data.chgen = pmu_init_chg_enabled;
axp_sply_init_data.sample_time = pmu_init_adc_freq;
axp_sply_init_data.chgpretime = pmu_init_chg_pretime;
axp_sply_init_data.chgcsttime = pmu_init_chg_csttime;
axp_mfd_i2c_board_info[0].addr = pmu_twi_addr;
axp_mfd_i2c_board_info[0].irq = pmu_irq_id;
return i2c_register_board_info(pmu_twi_id, axp_mfd_i2c_board_info,
ARRAY_SIZE(axp_mfd_i2c_board_info));
}
else
return -1;
}
开发者ID:godark,项目名称:A10-Linux-2.6.36,代码行数:101,代码来源:axp20-board.c
示例16: ap325rxa_devices_setup
static int __init ap325rxa_devices_setup(void)
{
/* LD3 and LD4 LEDs */
gpio_request(GPIO_PTX5, NULL); /* RUN */
gpio_direction_output(GPIO_PTX5, 1);
gpio_export(GPIO_PTX5, 0);
gpio_request(GPIO_PTX4, NULL); /* INDICATOR */
gpio_direction_output(GPIO_PTX4, 0);
gpio_export(GPIO_PTX4, 0);
/* SW1 input */
gpio_request(GPIO_PTF7, NULL); /* MODE */
gpio_direction_input(GPIO_PTF7);
gpio_export(GPIO_PTF7, 0);
/* LCDC */
clk_always_enable("mstp200");
gpio_request(GPIO_FN_LCDD15, NULL);
gpio_request(GPIO_FN_LCDD14, NULL);
gpio_request(GPIO_FN_LCDD13, NULL);
gpio_request(GPIO_FN_LCDD12, NULL);
gpio_request(GPIO_FN_LCDD11, NULL);
gpio_request(GPIO_FN_LCDD10, NULL);
gpio_request(GPIO_FN_LCDD9, NULL);
gpio_request(GPIO_FN_LCDD8, NULL);
gpio_request(GPIO_FN_LCDD7, NULL);
gpio_request(GPIO_FN_LCDD6, NULL);
gpio_request(GPIO_FN_LCDD5, NULL);
gpio_request(GPIO_FN_LCDD4, NULL);
gpio_request(GPIO_FN_LCDD3, NULL);
gpio_request(GPIO_FN_LCDD2, NULL);
gpio_request(GPIO_FN_LCDD1, NULL);
gpio_request(GPIO_FN_LCDD0, NULL);
gpio_request(GPIO_FN_LCDLCLK_PTR, NULL);
gpio_request(GPIO_FN_LCDDCK, NULL);
gpio_request(GPIO_FN_LCDVEPWC, NULL);
gpio_request(GPIO_FN_LCDVCPWC, NULL);
gpio_request(GPIO_FN_LCDVSYN, NULL);
gpio_request(GPIO_FN_LCDHSYN, NULL);
gpio_request(GPIO_FN_LCDDISP, NULL);
gpio_request(GPIO_FN_LCDDON, NULL);
/* LCD backlight */
gpio_request(GPIO_PTS3, NULL);
gpio_direction_output(GPIO_PTS3, 1);
/* CEU */
clk_always_enable("mstp203");
gpio_request(GPIO_FN_VIO_CLK2, NULL);
gpio_request(GPIO_FN_VIO_VD2, NULL);
gpio_request(GPIO_FN_VIO_HD2, NULL);
gpio_request(GPIO_FN_VIO_FLD, NULL);
gpio_request(GPIO_FN_VIO_CKO, NULL);
gpio_request(GPIO_FN_VIO_D15, NULL);
gpio_request(GPIO_FN_VIO_D14, NULL);
gpio_request(GPIO_FN_VIO_D13, NULL);
gpio_request(GPIO_FN_VIO_D12, NULL);
gpio_request(GPIO_FN_VIO_D11, NULL);
gpio_request(GPIO_FN_VIO_D10, NULL);
gpio_request(GPIO_FN_VIO_D9, NULL);
gpio_request(GPIO_FN_VIO_D8, NULL);
gpio_request(GPIO_PTZ7, NULL);
gpio_direction_output(GPIO_PTZ7, 0); /* OE_CAM */
gpio_request(GPIO_PTZ6, NULL);
gpio_direction_output(GPIO_PTZ6, 0); /* STBY_CAM */
gpio_request(GPIO_PTZ5, NULL);
gpio_direction_output(GPIO_PTZ5, 1); /* RST_CAM */
gpio_request(GPIO_PTZ4, NULL);
gpio_direction_output(GPIO_PTZ4, 0); /* SADDR */
ctrl_outw(ctrl_inw(PORT_MSELCRB) & ~0x0001, PORT_MSELCRB);
/* FLCTL */
gpio_request(GPIO_FN_FCE, NULL);
gpio_request(GPIO_FN_NAF7, NULL);
gpio_request(GPIO_FN_NAF6, NULL);
gpio_request(GPIO_FN_NAF5, NULL);
gpio_request(GPIO_FN_NAF4, NULL);
gpio_request(GPIO_FN_NAF3, NULL);
gpio_request(GPIO_FN_NAF2, NULL);
gpio_request(GPIO_FN_NAF1, NULL);
gpio_request(GPIO_FN_NAF0, NULL);
gpio_request(GPIO_FN_FCDE, NULL);
gpio_request(GPIO_FN_FOE, NULL);
gpio_request(GPIO_FN_FSC, NULL);
gpio_request(GPIO_FN_FWE, NULL);
gpio_request(GPIO_FN_FRB, NULL);
ctrl_outw(0, PORT_HIZCRC);
ctrl_outw(0xFFFF, PORT_DRVCRA);
ctrl_outw(0xFFFF, PORT_DRVCRB);
platform_resource_setup_memory(&ceu_device, "ceu", 4 << 20);
i2c_register_board_info(0, ap325rxa_i2c_devices,
ARRAY_SIZE(ap325rxa_i2c_devices));
return platform_add_devices(ap325rxa_devices,
//.........这里部分代码省略.........
开发者ID:E-LLP,项目名称:n900,代码行数:101,代码来源:board-ap325rxa.c
示例17: ip7500av_init
/*
* ip7500av_init
* Called to add the devices which we have on this board
*/
static int __init ip7500av_init(void)
{
struct platform_device *audio_dev;
struct platform_device *audio_dev2;
struct ubi32_cs4384_platform_data *cs4384_pd;
if (ubicom32_flash_single_init()) {
printk(KERN_ERR "%s: could not initialize flash controller\n", __FUNCTION__);
}
board_init();
ubi_gpio_init();
/*
* Start the flash driver
*/
ubicom32_flash_single_init();
vdc_tio_init(NULL);
printk(KERN_INFO "%s: registering device resources\n", __FUNCTION__);
platform_add_devices(ip7500av_devices, ARRAY_SIZE(ip7500av_devices));
/*
* CS4384 DAC
*/
audio_dev = audio_device_alloc("snd-ubi32-cs4384", "audio", "audio-i2sout",
sizeof(struct ubi32_cs4384_platform_data));
if (audio_dev) {
/*
* Attempt to figure out a good divisor. This will only work
* assuming the core frequency is compatible.
*/
int i;
unsigned int freq = processor_frequency();
for (i = 0; i < ARRAY_SIZE(ip7500av_cs4384_mclk_entries); i++) {
unsigned int div;
unsigned int rate = ip7500av_cs4384_mclk_entries[i].rate / 1000;
div = ((freq / rate) + 500) / 1000;
ip7500av_cs4384_mclk_entries[i].div = div;
printk("CS4384 mclk %d rate %u000Hz div %u act %u\n", i, rate, div, freq / div);
}
cs4384_pd = audio_device_priv(audio_dev);
cs4384_pd->mclk_src = UBI32_CS4384_MCLK_PWM_0;
cs4384_pd->n_mclk = ARRAY_SIZE(ip7500av_cs4384_mclk_entries);
cs4384_pd->mclk_entries = ip7500av_cs4384_mclk_entries;
ip7500av_i2c_board_info[0].platform_data = audio_dev;
/*
* Reset the DAC
*/
if (gpio_request(GPIO_RF_4, "DAC Reset") == 0) {
gpio_direction_output(GPIO_RF_4, 0);
udelay(1);
gpio_direction_output(GPIO_RF_4, 1);
} else {
printk("Unable to request DAC reset GPIO\n");
}
}
/*
* SPDIF port
*/
audio_dev2 = audio_device_alloc("snd-ubi32-generic", "audio", "audio-spdifout", 0);
if (audio_dev2) {
platform_device_register(audio_dev2);
}
/*
* Register all of the devices which sit on the I2C bus
*/
printk(KERN_INFO "%s: registering i2c resources\n", __FUNCTION__);
i2c_register_board_info(0, ip7500av_i2c_board_info, ARRAY_SIZE(ip7500av_i2c_board_info));
printk(KERN_INFO "IP7500 Audio/Video Board\n");
return 0;
}
开发者ID:patrick-ken,项目名称:MyNet_N900,代码行数:83,代码来源:board-ip7500av.c
-
六六分期app的软件客服如何联系?不知道吗?加qq群【895510560】即可!标题:六六分期
阅读:19234|2023-10-27
-
今天小编告诉大家如何处理win10系统火狐flash插件总是崩溃的问题,可能很多用户都不知
阅读:10000|2022-11-06
-
今天小编告诉大家如何对win10系统删除桌面回收站图标进行设置,可能很多用户都不知道
阅读:8331|2022-11-06
-
今天小编告诉大家如何对win10系统电脑设置节能降温的设置方法,想必大家都遇到过需要
阅读:8701|2022-11-06
-
我们在使用xp系统的过程中,经常需要对xp系统无线网络安装向导设置进行设置,可能很多
阅读:8646|2022-11-06
-
今天小编告诉大家如何处理win7系统玩cf老是与主机连接不稳定的问题,可能很多用户都不
阅读:9668|2022-11-06
-
电脑对日常生活的重要性小编就不多说了,可是一旦碰到win7系统设置cf烟雾头的问题,很
阅读:8632|2022-11-06
-
我们在日常使用电脑的时候,有的小伙伴们可能在打开应用的时候会遇见提示应用程序无法
阅读:8005|2022-11-06
-
今天小编告诉大家如何对win7系统打开vcf文件进行设置,可能很多用户都不知道怎么对win
阅读:8666|2022-11-06
-
今天小编告诉大家如何对win10系统s4开启USB调试模式进行设置,可能很多用户都不知道怎
阅读:7540|2022-11-06
|
请发表评论