WIP FPC-III support
[linux/fpc-iii.git] / arch / x86 / platform / intel-mid / device_libs / platform_mpu3050.c
blob28a1827139340f72b342c609befb0eb47533a1da
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * platform_mpu3050.c: mpu3050 platform data initialization file
5 * (C) Copyright 2013 Intel Corporation
6 * Author: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>
7 */
9 #include <linux/gpio.h>
10 #include <linux/i2c.h>
11 #include <asm/intel-mid.h>
13 static void *mpu3050_platform_data(void *info)
15 struct i2c_board_info *i2c_info = info;
16 int intr = get_gpio_by_name("mpu3050_int");
18 if (intr < 0)
19 return NULL;
21 i2c_info->irq = intr + INTEL_MID_IRQ_OFFSET;
22 return NULL;
25 static const struct devs_id mpu3050_dev_id __initconst = {
26 .name = "mpu3050",
27 .type = SFI_DEV_TYPE_I2C,
28 .delay = 1,
29 .get_platform_data = &mpu3050_platform_data,
32 sfi_device(mpu3050_dev_id);