This source file includes following definitions.
- emc1403_platform_data
1
2
3
4
5
6
7
8
9 #include <linux/init.h>
10 #include <linux/gpio.h>
11 #include <linux/i2c.h>
12 #include <asm/intel-mid.h>
13
14 static void __init *emc1403_platform_data(void *info)
15 {
16 static short intr2nd_pdata;
17 struct i2c_board_info *i2c_info = info;
18 int intr = get_gpio_by_name("thermal_int");
19 int intr2nd = get_gpio_by_name("thermal_alert");
20
21 if (intr < 0)
22 return NULL;
23 if (intr2nd < 0)
24 return NULL;
25
26 i2c_info->irq = intr + INTEL_MID_IRQ_OFFSET;
27 intr2nd_pdata = intr2nd + INTEL_MID_IRQ_OFFSET;
28
29 return &intr2nd_pdata;
30 }
31
32 static const struct devs_id emc1403_dev_id __initconst = {
33 .name = "emc1403",
34 .type = SFI_DEV_TYPE_I2C,
35 .delay = 1,
36 .get_platform_data = &emc1403_platform_data,
37 };
38
39 sfi_device(emc1403_dev_id);