本文整理汇总了C++中TEGRA_GPIO_TO_IRQ函数的典型用法代码示例。如果您正苦于以下问题:C++ TEGRA_GPIO_TO_IRQ函数的具体用法?C++ TEGRA_GPIO_TO_IRQ怎么用?C++ TEGRA_GPIO_TO_IRQ使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TEGRA_GPIO_TO_IRQ函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pr_info
{
if (atomic_dec_return(&shuttle_touch_powered) == 0) {
pr_info("Disabling touchscreen\n");
gpio_direction_output(SHUTTLE_TS_DISABLE, 1); // Power down
}
}
struct it7260_platform_data it7260_pdata = {
.disable_tp = shuttle_touch_disable, /* function to disable the touchpad */
.enable_tp = shuttle_touch_enable, /* function to enable the touchpad */
};
static struct i2c_board_info __initdata shuttle_i2c_bus4_touch_info_it[] = {
{
I2C_BOARD_INFO("it7260", 0x46),
.irq = TEGRA_GPIO_TO_IRQ(SHUTTLE_TS_IRQ),
.platform_data = &it7260_pdata,
},
};
struct egalax_platform_data egalax_pdata = {
.disable_tp = shuttle_touch_disable, /* function to disable the touchpad */
.enable_tp = shuttle_touch_enable, /* function to enable the touchpad */
};
static struct i2c_board_info __initdata shuttle_i2c_bus4_touch_info_egalax[] = {
{
I2C_BOARD_INFO("egalax", 0x04),
.irq = TEGRA_GPIO_TO_IRQ(SHUTTLE_TS_IRQ),
.platform_data = &egalax_pdata,
示例2: I2C_BOARD_INFO
.ps1_thd_set = 0x3,
.ps1_thd_no_cal = 0x3,
.ps1_thd_with_cal = 0x3,
.ps_conf1_val = CM3629_PS_DR_1_320 | CM3629_PS_IT_1_3T |
CM3629_PS1_PERS_4,
.ps_conf2_val = CM3629_PS_ITB_1 | CM3629_PS_ITR_1 |
CM3629_PS2_INT_DIS | CM3629_PS1_INT_DIS,
.ps_conf3_val = CM3629_PS2_PROL_32,
.dark_level = 3,
};
static struct i2c_board_info i2c_CM3628_devices[] = {
{
I2C_BOARD_INFO("cm3628", 0xc0 >> 1),
.platform_data = &cm3628_pdata,
.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PK2),
}
};
static struct i2c_board_info i2c_CM3629_devices[] = {
{
I2C_BOARD_INFO(CM3629_I2C_NAME, 0xC0 >> 1),
.platform_data = &cm3629_pdata,
.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PK2),
},
};
static void psensor_init(void)
{
if(ps_type) {
i2c_register_board_info(0,
示例3: I2C_BOARD_INFO
.orientation = MPU_ACCEL_ORIENTATION, /* Located in board_[platformname].h */
};
#endif
static struct ext_slave_platform_data mpu_compass_data = {
.address = MPU_COMPASS_ADDR,
.irq = 0,
.adapt_num = MPU_COMPASS_BUS_NUM,
.bus = EXT_SLAVE_BUS_PRIMARY,
.orientation = MPU_COMPASS_ORIENTATION, /* Located in board_[platformname].h */
};
static struct i2c_board_info __initdata inv_mpu_i2c2_board_info[] = {
{
I2C_BOARD_INFO(MPU_GYRO_NAME, MPU_GYRO_ADDR),
.irq = TEGRA_GPIO_TO_IRQ(MPU_GYRO_IRQ_GPIO),
.platform_data = &mpu_gyro_data,
},
#if (MPU_GYRO_TYPE == MPU_TYPE_MPU3050)
{
I2C_BOARD_INFO(MPU_ACCEL_NAME, MPU_ACCEL_ADDR),
#if MPU_ACCEL_IRQ_GPIO
.irq = TEGRA_GPIO_TO_IRQ(MPU_ACCEL_IRQ_GPIO),
#endif
.platform_data = &mpu_accel_data,
},
#endif
{
I2C_BOARD_INFO(MPU_COMPASS_NAME, MPU_COMPASS_ADDR),
#if MPU_COMPASS_IRQ_GPIO
.irq = TEGRA_GPIO_TO_IRQ(MPU_COMPASS_IRQ_GPIO),
示例4: TEGRA_GPIO_TO_IRQ
static struct resource enterprise_bluesleep_resources[] = {
[0] = {
.name = "gpio_host_wake",
.start = TEGRA_GPIO_PS2,
.end = TEGRA_GPIO_PS2,
.flags = IORESOURCE_IO,
},
[1] = {
.name = "gpio_ext_wake",
.start = TEGRA_GPIO_PE7,
.end = TEGRA_GPIO_PE7,
.flags = IORESOURCE_IO,
},
[2] = {
.name = "host_wake",
.start = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PS2),
.end = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PS2),
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
},
};
static struct platform_device enterprise_bluesleep_device = {
.name = "bluesleep",
.id = -1,
.num_resources = ARRAY_SIZE(enterprise_bluesleep_resources),
.resource = enterprise_bluesleep_resources,
};
static void __init enterprise_setup_bluesleep(void)
{
platform_device_register(&enterprise_bluesleep_device);
示例5: pr_info
pr_info("kai_bt_st");
platform_device_register(&wl128x_device);
platform_device_register(&btwilink_device);
}
static struct resource kai_bluesleep_resources[] = {
[0] = {
.name = "gpio_host_wake",
.start = TEGRA_GPIO_PU6,
.end = TEGRA_GPIO_PU6,
.flags = IORESOURCE_IO,
},
[1] = {
.name = "host_wake",
.start = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6),
.end = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6),
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
},
};
static struct platform_device kai_bluesleep_device = {
.name = "bluesleep",
.id = 0,
.num_resources = ARRAY_SIZE(kai_bluesleep_resources),
.resource = kai_bluesleep_resources,
};
static noinline void __init kai_tegra_setup_tibluesleep(void)
{
platform_device_register(&kai_bluesleep_device);
示例6: cardhu_wifi_status_register
static int cardhu_wifi_status_register(void (*callback)(int , void *), void *);
static int cardhu_wifi_reset(int on);
static int cardhu_wifi_power(int on);
static int cardhu_wifi_set_carddetect(int val);
static struct wifi_platform_data cardhu_wifi_control = {
.set_power = cardhu_wifi_power,
.set_reset = cardhu_wifi_reset,
.set_carddetect = cardhu_wifi_set_carddetect,
};
static struct resource wifi_resource[] = {
[0] = {
.name = "bcmdhd_wlan_irq",
.start = TEGRA_GPIO_TO_IRQ(CARDHU_WLAN_WOW),
.end = TEGRA_GPIO_TO_IRQ(CARDHU_WLAN_WOW),
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | IORESOURCE_IRQ_SHAREABLE,
},
};
static struct platform_device cardhu_wifi_device = {
.name = "bcmdhd_wlan",
.id = 1,
.num_resources = 1,
.resource = wifi_resource,
.dev = {
.platform_data = &cardhu_wifi_control,
},
};
示例7: I2C_BOARD_INFO
&tegra_spdif_device,
&tegra_avp_device,
&tegra_camera,
&tegra_das_device,
};
#ifdef CONFIG_TOUCHSCREEN_PANJIT_I2C
static struct panjit_i2c_ts_platform_data panjit_data = {
.gpio_reset = TEGRA_GPIO_PQ7,
};
static const struct i2c_board_info ventana_i2c_bus1_touch_info[] = {
{
I2C_BOARD_INFO("panjit_touch", 0x3),
.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PV6),
.platform_data = &panjit_data,
},
};
static int __init ventana_touch_init_panjit(void)
{
tegra_gpio_enable(TEGRA_GPIO_PV6);
tegra_gpio_enable(TEGRA_GPIO_PQ7);
i2c_register_board_info(0, ventana_i2c_bus1_touch_info, 1);
return 0;
}
#endif
示例8: lx_wifi_reset
//
static int lx_wifi_reset(int on);
static int lx_wifi_power(int on);
static int lx_wifi_set_carddetect(int val);
static struct wifi_platform_data lx_wifi_control = {
.set_power = lx_wifi_power,
.set_reset = lx_wifi_reset,
.set_carddetect = lx_wifi_set_carddetect,
};
static struct resource wifi_resource[] = {
[0] = {
.name = "bcmdhd_wlan_irq",
.start = TEGRA_GPIO_TO_IRQ(LX_WLAN_WOW),
.end = TEGRA_GPIO_TO_IRQ(LX_WLAN_WOW),
//for HW_OOB .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_SHAREABLE,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | IORESOURCE_IRQ_SHAREABLE,
},
};
static struct platform_device lx_wifi_device = {
.name = "bcmdhd_wlan",
.id = 1,
.num_resources = 1,
.resource = wifi_resource,
.dev = {
.platform_data = &lx_wifi_control,
},
};
示例9: I2C_BOARD_INFO
#include <asm/mach-types.h>
#include <mach/irqs.h>
#include <mach/iomap.h>
#include <mach/pinmux.h>
#include <linux/interrupt.h>
#include <linux/input.h>
#include "board-adam.h"
#include "gpio-names.h"
struct at168_i2c_ts_platform_data at168_pdata = {
.gpio_reset = ADAM_TS_RESET,
.gpio_power = ADAM_TS_POWER,
};
static struct i2c_board_info __initdata adam_i2c_bus0_touch_info_at168[] = {
{
I2C_BOARD_INFO("at168_touch", 0x5c),
.irq = TEGRA_GPIO_TO_IRQ(ADAM_TS_IRQ),
.platform_data = &at168_pdata,
},
};
int __init adam_touch_register_devices(void)
{
i2c_register_board_info(0, adam_i2c_bus0_touch_info_at168, 1);
return 0;
}
示例10: I2C_BOARD_INFO
static struct nct1008_platform_data enterprise_nct1008_pdata = {
.supported_hwrev = true,
.ext_range = true,
.conv_rate = 0x08,
.hysteresis = 5,
.offset = 8, /* 4 * 2C. Bug 844025 - 1C for device accuracies */
.shutdown_ext_limit = 90,
.shutdown_local_limit = 90,
.throttling_ext_limit = 85,
.alarm_fn = tegra_throttling_enable,
};
static struct i2c_board_info enterprise_i2c4_nct1008_board_info[] = {
{
I2C_BOARD_INFO("nct1008", 0x4C),
.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PH7),
.platform_data = &enterprise_nct1008_pdata,
}
};
static void enterprise_nct1008_init(void)
{
int ret;
#ifdef CONFIG_TEGRA_EDP_LIMITS
const struct tegra_edp_limits *z;
int zones_sz;
int i;
bool throttle_ok = false;
#endif
tegra_gpio_enable(TEGRA_GPIO_PH7);
示例11: TEGRA_GPIO_TO_IRQ
* more details.
*/
#include <linux/kernel.h>
#include <linux/gpio.h>
#include <linux/init.h>
#include <linux/io.h>
#include <mach/iomap.h>
#include <mach/irqs.h>
#include <mach/gpio.h>
#include "gpio-names.h"
static int tegra_wake_event_irq[] = {
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PO5), /* wake0 */
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PV1), /* wake1 */
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PL1), /* wake2 */
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PB6), /* wake3 */
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PN7), /* wake4 */
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PBB6), /* wake5 */
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU5), /* wake6 */
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6), /* wake7 */
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PC7), /* wake8 */
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PS2), /* wake9 */
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PAA1), /* wake10 */
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PW3), /* wake11 */
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PW2), /* wake12 */
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PY6), /* wake13 */
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PDD3), /* wake14 */
TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PJ2), /* wake15 */
示例12: I2C_BOARD_INFO
static struct nct1008_platform_data ventana_nct1008_pdata = {
.supported_hwrev = true,
.ext_range = false,
.conv_rate = 0x08,
.offset = 0,
.hysteresis = 0,
.shutdown_ext_limit = 115,
.shutdown_local_limit = 120,
.throttling_ext_limit = 90,
.alarm_fn = tegra_throttling_enable,
};
static const struct i2c_board_info ventana_i2c0_board_info[] = {
{
I2C_BOARD_INFO("isl29018", 0x44),
.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PZ2),
},
{
I2C_BOARD_INFO("ami304", 0x0E),
.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PN5),
},
{
I2C_BOARD_INFO("kxtf9", 0x0F),
.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PN4),
},
};
static const struct i2c_board_info ventana_i2c2_board_info[] = {
{
I2C_BOARD_INFO("bq20z45-battery", 0x0B),
//.irq = TEGRA_GPIO_TO_IRQ(AC_PRESENT_GPIO),
示例13: I2C_BOARD_INFO
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include "board-smba1002.h"
#include "gpio-names.h"
static struct i2c_board_info __initdata smba1002_i2c_bus0_sensor_info[] = {
{
I2C_BOARD_INFO("bq20z75-battery", 0x0B),
.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PH2),
},
{
I2C_BOARD_INFO("so340010_kbd", 0x2c),
.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PV6),
},
{
I2C_BOARD_INFO("isl29023", 0x44),
.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PV5),
},
{
I2C_BOARD_INFO("lis3lv02d", 0x1C),
.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PJ0),
},
{
示例14: TEGRA_GPIO_TO_IRQ
static struct resource ventana_bluesleep_resources[] = {
[0] = {
.name = "gpio_host_wake",
.start = TEGRA_GPIO_PU6,
.end = TEGRA_GPIO_PU6,
.flags = IORESOURCE_IO,
},
[1] = {
.name = "gpio_ext_wake",
.start = TEGRA_GPIO_PU1,
.end = TEGRA_GPIO_PU1,
.flags = IORESOURCE_IO,
},
[2] = {
.name = "host_wake",
.start = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6),
.end = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6),
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
},
};
static struct platform_device ventana_bluesleep_device = {
.name = "bluesleep",
.id = -1,
.num_resources = ARRAY_SIZE(ventana_bluesleep_resources),
.resource = ventana_bluesleep_resources,
};
extern void bluesleep_setup_uart_port(struct platform_device *uart_dev);
static void __init ventana_setup_bluesleep(void)
{
示例15: void
#define VENTANA_WLAN_IRQ TEGRA_GPIO_PS0
static void (*wifi_status_cb)(int card_present, void *dev_id);
static void *wifi_status_cb_devid;
static int ventana_wifi_status_register(void (*callback)(int , void *), void *);
static struct clk *wifi_32k_clk;
static int ventana_wifi_reset(int on);
static int ventana_wifi_power(int on);
static int ventana_wifi_set_carddetect(int val);
#if defined(CONFIG_BCM4329_HW_OOB) || defined(CONFIG_BCM4329_OOB_INTR_ONLY)
static struct resource ventana_wifi_wakeup_resources[] = {
{
.name = "bcm4329_wlan_irq",
.start = TEGRA_GPIO_TO_IRQ(VENTANA_WLAN_IRQ),
.end = TEGRA_GPIO_TO_IRQ(VENTANA_WLAN_IRQ),
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | IORESOURCE_IRQ_SHAREABLE,
},
};
#endif //CONFIG_BCM4329_HW_OOB || CONFIG_BCM4329_OOB_INTR_ONLY
static struct wifi_platform_data ventana_wifi_control = {
.set_power = ventana_wifi_power,
.set_reset = ventana_wifi_reset,
.set_carddetect = ventana_wifi_set_carddetect,
};
static struct platform_device ventana_wifi_device = {
.name = "bcm4329_wlan",
.id = 1,