1 // SPDX-License-Identifier: GPL-2.0-only
3 * platform_lis331.c: lis331 platform data initialization file
5 * (C) Copyright 2013 Intel Corporation
6 * Author: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>
10 #include <linux/gpio.h>
11 #include <asm/intel-mid.h>
13 static void __init
*lis331dl_platform_data(void *info
)
15 static short intr2nd_pdata
;
16 struct i2c_board_info
*i2c_info
= info
;
17 int intr
= get_gpio_by_name("accel_int");
18 int intr2nd
= get_gpio_by_name("accel_2");
25 i2c_info
->irq
= intr
+ INTEL_MID_IRQ_OFFSET
;
26 intr2nd_pdata
= intr2nd
+ INTEL_MID_IRQ_OFFSET
;
28 return &intr2nd_pdata
;
31 static const struct devs_id lis331dl_dev_id __initconst
= {
33 .type
= SFI_DEV_TYPE_I2C
,
34 .get_platform_data
= &lis331dl_platform_data
,
37 sfi_device(lis331dl_dev_id
);