2 * platform_max3111.c: max3111 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
13 #include <linux/gpio.h>
14 #include <linux/spi/spi.h>
15 #include <asm/intel-mid.h>
17 static void __init
*max3111_platform_data(void *info
)
19 struct spi_board_info
*spi_info
= info
;
20 int intr
= get_gpio_by_name("max3111_int");
22 spi_info
->mode
= SPI_MODE_0
;
25 spi_info
->irq
= intr
+ INTEL_MID_IRQ_OFFSET
;
29 static const struct devs_id max3111_dev_id __initconst
= {
30 .name
= "spi_max3111",
31 .type
= SFI_DEV_TYPE_SPI
,
32 .get_platform_data
= &max3111_platform_data
,
35 sfi_device(max3111_dev_id
);