vfs: remove unused wrapper block_page_mkwrite()
[linux/fpc-iii.git] / arch / x86 / platform / intel-mid / device_libs / platform_lis331.c
blob54226de7541a7f43149b068657184e04b10f123f
1 /*
2 * platform_lis331.c: lis331 platform data initilization file
4 * (C) Copyright 2013 Intel Corporation
5 * Author: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; version 2
10 * of the License.
13 #include <linux/i2c.h>
14 #include <linux/gpio.h>
15 #include <asm/intel-mid.h>
17 static void __init *lis331dl_platform_data(void *info)
19 static short intr2nd_pdata;
20 struct i2c_board_info *i2c_info = info;
21 int intr = get_gpio_by_name("accel_int");
22 int intr2nd = get_gpio_by_name("accel_2");
24 if (intr < 0)
25 return NULL;
26 if (intr2nd < 0)
27 return NULL;
29 i2c_info->irq = intr + INTEL_MID_IRQ_OFFSET;
30 intr2nd_pdata = intr2nd + INTEL_MID_IRQ_OFFSET;
32 return &intr2nd_pdata;
35 static const struct devs_id lis331dl_dev_id __initconst = {
36 .name = "i2c_accel",
37 .type = SFI_DEV_TYPE_I2C,
38 .get_platform_data = &lis331dl_platform_data,
41 sfi_device(lis331dl_dev_id);