本文整理汇总了C++中I2C_BOARD_INFO函数的典型用法代码示例。如果您正苦于以下问题:C++ I2C_BOARD_INFO函数的具体用法?C++ I2C_BOARD_INFO怎么用?C++ I2C_BOARD_INFO使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了I2C_BOARD_INFO函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: I2C_BOARD_INFO
}
static struct mpu3050gyro_platform_data mpu3050_platform_data = {
.irq_flags = (IRQF_TRIGGER_HIGH | IRQF_ONESHOT),
.default_poll_rate = 200,
.slave_i2c_addr = 0x40,
.sample_rate_div = 0x00,
.dlpf_fs_sync = 0x10,
.interrupt_cfg = (MPU3050_INT_CFG_OPEN | MPU3050_INT_CFG_LATCH_INT_EN |
MPU3050_INT_CFG_MPU_RDY_EN | MPU3050_INT_CFG_RAW_RDY_EN),
};
/* MPU3050 Gyro End */
static struct i2c_board_info __initdata blaze_tablet_i2c_bus3_sensor_info[] = {
{
I2C_BOARD_INFO("tmp105", 0x48),
},
};
static struct i2c_board_info __initdata blaze_tablet_i2c_bus4_sensor_info[] = {
{
I2C_BOARD_INFO("bmp085", 0x77),
},
{
I2C_BOARD_INFO("hmc5843", 0x1e),
},
{
I2C_BOARD_INFO("bma180_accel", 0x40),
.platform_data = &bma180accel_platform_data,
},
{
示例2: I2C_BOARD_INFO
#define MX35PDK_BOARD_REV_1 0
#define MX35PDK_BOARD_REV_2 1
static struct fec_platform_data fec_info = {
.xcv_type = MII100,
.phy_addr = 0x1F,
};
struct imx_nand_platform_data nand_info = {
.hw_ecc = 1,
.flash_bbt = 1,
};
static struct i2c_board_info i2c_devices[] = {
{
I2C_BOARD_INFO("mc13xxx-i2c", 0x08),
}, {
I2C_BOARD_INFO("mc9sdz60", 0x69),
},
};
/*
* Generic display, shipped with the PDK
*/
static struct fb_videomode CTP_CLAA070LC0ACW = {
/* 800x480 @ 60 Hz */
.name = "CTP-CLAA070LC0ACW",
.refresh = 60,
.xres = 800,
.yres = 480,
.pixclock = KHZ2PICOS(27000),
示例3: ARRAY_SIZE
.cam_gpio_common_tbl = apq8064_common_cam_gpio,
.cam_gpio_common_tbl_size = ARRAY_SIZE(apq8064_common_cam_gpio),
.cam_gpio_req_tbl = apq8064_front_cam_gpio,
.cam_gpio_req_tbl_size = ARRAY_SIZE(apq8064_front_cam_gpio),
.cam_gpio_set_tbl = apq8064_front_cam_gpio_set_tbl,
.cam_gpio_set_tbl_size = ARRAY_SIZE(apq8064_front_cam_gpio_set_tbl),
};
static struct msm_camera_i2c_conf apq8064_back_cam_i2c_conf = {
.use_i2c_mux = 1,
.mux_dev = &msm8960_device_i2c_mux_gsbi4,
.i2c_mux_mode = MODE_L,
};
static struct i2c_board_info msm_act_main_cam_i2c_info = {
I2C_BOARD_INFO("msm_actuator", 0x11),
};
static struct msm_actuator_info msm_act_main_cam_0_info = {
.board_info = &msm_act_main_cam_i2c_info,
.cam_name = MSM_ACTUATOR_MAIN_CAM_0,
.bus_id = APQ_8064_GSBI4_QUP_I2C_BUS_ID,
.vcm_pwd = 0,
.vcm_enable = 0,
};
static struct i2c_board_info msm_act_main_cam1_i2c_info = {
I2C_BOARD_INFO("msm_actuator", 0x18),
};
static struct msm_actuator_info msm_act_main_cam_1_info = {
示例4: I2C_BOARD_INFO
static struct s6000_snd_platform_data s6105_snd_data __initdata = {
.wide = 0,
.channel_in = 0,
.channel_out = 1,
.lines_in = 1,
.lines_out = 1,
.same_rate = 1,
};
static struct platform_device *s6105_snd_device;
/* temporary i2c device creation until this can be moved into the machine
* support file.
*/
static struct i2c_board_info i2c_device[] = {
{ I2C_BOARD_INFO("tlv320aic33", 0x18), }
};
static int __init s6105_init(void)
{
int ret;
i2c_register_board_info(0, i2c_device, ARRAY_SIZE(i2c_device));
s6105_snd_device = platform_device_alloc("soc-audio", -1);
if (!s6105_snd_device)
return -ENOMEM;
platform_set_drvdata(s6105_snd_device, &snd_soc_card_s6105);
platform_device_add_data(s6105_snd_device, &s6105_snd_data,
sizeof(s6105_snd_data));
示例5: I2C_BOARD_INFO
WM8962_GPIO_FN_OPCLK,
WM8962_GPIO_FN_DMICCLK,
0,
0x8000 | WM8962_GPIO_FN_DMICDAT,
WM8962_GPIO_FN_IRQ,
},
.in4_dc_measure = true,
};
static struct wm9081_pdata wm9081_pdata __initdata = {
.irq_high = false,
.irq_cmos = false,
};
static const struct i2c_board_info wm1254_devs[] = {
{ I2C_BOARD_INFO("wm8996", 0x1a),
.platform_data = &wm8996_pdata,
.irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2,
},
{ I2C_BOARD_INFO("wm9081", 0x6c),
.platform_data = &wm9081_pdata, },
};
static const struct i2c_board_info wm1255_devs[] = {
{ I2C_BOARD_INFO("wm5100", 0x1a),
.platform_data = &wm5100_pdata,
.irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2,
},
{ I2C_BOARD_INFO("wm9081", 0x6c),
.platform_data = &wm9081_pdata, },
};
示例6: I2C_BOARD_INFO
};
static struct rmi_sensordata synaptics_sensordata = {
.perfunctiondata = &synaptics_perfunctiondata,
.rmi_sensor_setup = synaptics_touchpad_setup,
};
static struct rmi_i2c_platformdata synaptics_platformdata = {
.i2c_address = 0x2c,
.irq_type = IORESOURCE_IRQ_LOWLEVEL,
.sensordata = &synaptics_sensordata,
};
static struct i2c_board_info synaptic_i2c_clearpad3k[] = {
{
I2C_BOARD_INFO("rmi4_ts", 0x2c),
.platform_data = &synaptics_platformdata,
},
};
static int synaptics_touchpad_setup(void)
{
int retval = 0;
virtual_key_properties_kobj =
kobject_create_and_add("board_properties", NULL);
if (virtual_key_properties_kobj)
retval = sysfs_create_group(virtual_key_properties_kobj,
&virtual_key_properties_attr_group);
if (!virtual_key_properties_kobj || retval)
pr_err("failed to create ft5202 board_properties\n");
示例7: ARRAY_SIZE
eukrea_mbimxsd_button_data __initconst = {
.buttons = eukrea_mbimxsd_gpio_buttons,
.nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons),
};
static struct platform_device *platform_devices[] __initdata = {
&eukrea_mbimxsd_lcd_powerdev,
};
static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS,
};
static struct i2c_board_info eukrea_mbimxsd_i2c_devices[] = {
{
I2C_BOARD_INFO("tlv320aic23", 0x1a),
},
};
static const
struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata __initconst = {
.flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE,
};
static struct esdhc_platform_data sd1_pdata = {
.cd_gpio = GPIO_SD1CD,
.cd_type = ESDHC_CD_GPIO,
.wp_type = ESDHC_WP_NONE,
};
/*
示例8: I2C_BOARD_INFO
struct adi9889_i2c_platform_data avng_v3_adi9889_i2c_conf ={
.audio_format = I2S_FORMAT,
};
/*****************************************************************************
* I2C devices:
* ALC5630 codec, address 0x
* Battery charger, address 0x??
* G-Sensor, address 0x??
* MCU PIC-16F887, address 0x??
****************************************************************************/
static struct i2c_board_info __initdata dove_d2plug_i2c_bus0_devs[] = {
#if 0
{
I2C_BOARD_INFO("rt5630", 0x1f),
},
{
I2C_BOARD_INFO("rt5623", 0x1a),
},
#endif
{
//I2C_BOARD_INFO("tda19988", 0x70),
I2C_BOARD_INFO("tda998X", 0x70),
},
{
I2C_BOARD_INFO("tda99Xcec", 0x34),
},
};
static struct i2c_board_info __initdata dove_d2plug_i2c_bus1_devs[] = {
示例9: clk_set_rate
/* video1 (= CON1 camera) expect 24MHz */
clk_set_rate(mclk, clk_round_rate(mclk, 24000000));
clk_enable(mclk);
gpio_set_value(158, 1);
} else {
gpio_set_value(158, 0);
clk_disable(mclk);
}
clk_put(mclk);
return 0;
}
static struct i2c_board_info i2c_camera_mt9t111 = {
I2C_BOARD_INFO("mt9t112", 0x3d),
};
static struct mt9t112_camera_info mt9t111_info = {
.divider = { 16, 0, 0, 7, 0, 10, 14, 7, 7 },
};
static struct soc_camera_link mt9t111_link = {
.i2c_adapter_id = 0,
.bus_id = 0,
.board_info = &i2c_camera_mt9t111,
.power = mt9t111_power,
.priv = &mt9t111_info,
};
static struct platform_device camera_device = {
示例10: tps65010_config_vregs1
{
tps65010_config_vregs1(TPS_LDO2_ENABLE | TPS_VLDO2_3_0V |
TPS_LDO1_ENABLE | TPS_VLDO1_3_0V);
return 0;
}
static struct tps65010_board tps_board = {
.base = H2_TPS_GPIO_BASE,
.outmask = 0x0f,
.setup = tps_setup,
};
static struct i2c_board_info __initdata h2_i2c_board_info[] = {
{
I2C_BOARD_INFO("tps65010", 0x48),
.platform_data = &tps_board,
}, {
I2C_BOARD_INFO("isp1301_omap", 0x2d),
},
};
static struct omap_usb_config h2_usb_config __initdata = {
/* usb1 has a Mini-AB port and external isp1301 transceiver */
.otg = 2,
#if IS_ENABLED(CONFIG_USB_OMAP)
.hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */
/* .hmc_mode = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */
#elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
/* needs OTG cable, or NONSTANDARD (B-to-MiniB) */
示例11: I2C_BOARD_INFO
return 0;
}
static struct tvp514x_platform_data tvp5146_pdata = {
.master = "omap34xxcam",
.power_set = tvp5146_power_set,
.priv_data_set = tvp5146_set_prv_data,
.ifparm = tvp5146_ifparm,
/* Some interface dependent params */
.clk_polarity = 0, /* data clocked out on falling edge */
.hs_polarity = 1, /* 0 - Active low, 1- Active high */
.vs_polarity = 1, /* 0 - Active low, 1- Active high */
};
static struct i2c_board_info __initdata tvp5146_i2c_board_info = {
I2C_BOARD_INFO("tvp5146m2", 0),
.platform_data = &tvp5146_pdata,
};
#endif /* #ifdef CONFIG_VIDEO_TVP514X */
/**
* @brief omap3evmdc_mdc_config - GPIO configuration for
* GPIO 134, 54 and 136
*
* @return result of operation - 0 is success
*/
static int omap3evmdc_mdc_config(void)
{
if (is_dec_onboard) {
/* Enable Video Decoder */
示例12: I2C_BOARD_INFO
#define BMU_NFC_I2C_BUS_ID 1
static struct lm3630_platform_data lm3630_bmu_platform_data = {
.max_brt_led1 = 255,
.init_brt_led1 = 128,
.pwm_ctrl = PWM_CTRL_DISABLE,
.pwm_active = PWM_ACTIVE_HIGH,
.bank_a_ctrl = BANK_A_CTRL_LED1,
.bank_b_ctrl = BANK_B_CTRL_DISABLE,
.pwm_period = 0,
};
static struct i2c_board_info __initdata lm3630_i2c_boardinfo[] = {
{
/* Backlight */
I2C_BOARD_INFO("lm3630_bl", 0x36),
.platform_data = &lm3630_bmu_platform_data,
},
};
void __init kivu_add_backlight(void)
{
pr_info("Registering LM3630 BMU with I2C bus #%i\n",
BMU_NFC_I2C_BUS_ID);
i2c_register_board_info(BMU_NFC_I2C_BUS_ID,
lm3630_i2c_boardinfo,
ARRAY_SIZE(lm3630_i2c_boardinfo));
}
示例13: I2C_BOARD_INFO
};
static struct platform_device btwilink_device = {
.name = "btwilink",
.id = -1,
};
// camera
static struct i2c_board_info __initdata board_i2c_2_boardinfo[] = {
// FIXME
};
// accel compas
static struct i2c_board_info __initdata board_i2c_3_boardinfo[] = {
{
I2C_BOARD_INFO("mma8453q", 0x1c),
.flags = I2C_CLIENT_WAKE,
.platform_data = &board_mma8453q_pdata,
},
{
I2C_BOARD_INFO("akm8975", 0x0C),
.flags = I2C_CLIENT_WAKE,
.platform_data = &board_akm8975_pdata,
},
// FIXME
};
static struct cypress_tma340_platform_data board_tma340_pdata = {
.flags = CYPRESS_TMA340_FLAGS_INV_Y,
};
示例14: I2C_BOARD_INFO
.deselect_on_exit = 0,
},
{
.adap_id = 8,
.deselect_on_exit = 0,
},
};
static struct pca954x_platform_data pca954x_i2cmux_adap_data = {
.modes = pca954x_platform_modes,
.num_modes = 8,
};
static struct i2c_board_info __initdata pca954x_i2c_devices[] = {
{
I2C_BOARD_INFO("pca9548", 0x74),
.platform_data = &pca954x_i2cmux_adap_data,
},
};
#if defined(CONFIG_RTC_DRV_PCF8563)
static struct i2c_board_info __initdata rtc8564_board_info[] = {
{
I2C_BOARD_INFO("rtc8564", 0x51),
},
};
#endif /*CONFIG_RTC_DRV_PCF8563 */
#if defined(CONFIG_GPIO_PCA953X)
示例15: dm355leopard_mmcsd_gpios
static void dm355leopard_mmcsd_gpios(unsigned gpio)
{
gpio_request(gpio + 0, "mmc0_ro");
gpio_request(gpio + 1, "mmc0_cd");
gpio_request(gpio + 2, "mmc1_ro");
gpio_request(gpio + 3, "mmc1_cd");
/* we "know" these are input-only so we don't
* need to call gpio_direction_input()
*/
leopard_mmc_gpio = gpio;
}
static struct i2c_board_info dm355leopard_i2c_info[] = {
{ I2C_BOARD_INFO("dm355leopard_msp", 0x25),
.platform_data = dm355leopard_mmcsd_gpios,
/* plus irq */ },
/* { I2C_BOARD_INFO("tlv320aic3x", 0x1b), }, */
/* { I2C_BOARD_INFO("tvp5146", 0x5d), }, */
};
static void __init leopard_init_i2c(void)
{
davinci_init_i2c(&i2c_pdata);
gpio_request(5, "dm355leopard_msp");
gpio_direction_input(5);
dm355leopard_i2c_info[0].irq = gpio_to_irq(5);
i2c_register_board_info(1, dm355leopard_i2c_info,