2905376559f1608defb7ccebb0f2c5e91ddf4d9e
[sfrench/cifs-2.6.git] / arch / x86 / platform / intel-mid / device_libs / platform_tc35876x.c
1 /*
2  * platform_tc35876x.c: tc35876x platform data initialization file
3  *
4  * (C) Copyright 2013 Intel Corporation
5  * Author: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>
6  *
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.
11  */
12
13 #include <linux/gpio.h>
14 #include <linux/platform_data/tc35876x.h>
15 #include <asm/intel-mid.h>
16
17 /*tc35876x DSI_LVDS bridge chip and panel platform data*/
18 static void *tc35876x_platform_data(void *data)
19 {
20         static struct tc35876x_platform_data pdata;
21
22         /* gpio pins set to -1 will not be used by the driver */
23         pdata.gpio_bridge_reset = get_gpio_by_name("LCMB_RXEN");
24         pdata.gpio_panel_bl_en = get_gpio_by_name("6S6P_BL_EN");
25         pdata.gpio_panel_vadd = get_gpio_by_name("EN_VREG_LCD_V3P3");
26
27         return &pdata;
28 }
29
30 static const struct devs_id tc35876x_dev_id __initconst = {
31         .name = "i2c_disp_brig",
32         .type = SFI_DEV_TYPE_I2C,
33         .get_platform_data = &tc35876x_platform_data,
34 };
35
36 sfi_device(tc35876x_dev_id);