1 // SPDX-License-Identifier: GPL-2.0-only
3 * platform_emc1403.c: emc1403 platform data initialization file
5 * (C) Copyright 2013 Intel Corporation
6 * Author: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>
9 #include <linux/init.h>
10 #include <linux/gpio.h>
11 #include <linux/i2c.h>
12 #include <asm/intel-mid.h>
14 static void __init
*emc1403_platform_data(void *info
)
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");
26 i2c_info
->irq
= intr
+ INTEL_MID_IRQ_OFFSET
;
27 intr2nd_pdata
= intr2nd
+ INTEL_MID_IRQ_OFFSET
;
29 return &intr2nd_pdata
;
32 static const struct devs_id emc1403_dev_id __initconst
= {
34 .type
= SFI_DEV_TYPE_I2C
,
36 .get_platform_data
= &emc1403_platform_data
,
39 sfi_device(emc1403_dev_id
);