WIP FPC-III support
[linux/fpc-iii.git] / arch / x86 / platform / intel-mid / device_libs / platform_tc35876x.c
blob139738bbdd36e50ef660ae247aceb2c7a897b904
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * platform_tc35876x.c: tc35876x platform data initialization file
5 * (C) Copyright 2013 Intel Corporation
6 * Author: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>
7 */
9 #include <linux/gpio/machine.h>
10 #include <asm/intel-mid.h>
12 static struct gpiod_lookup_table tc35876x_gpio_table = {
13 .dev_id = "i2c_disp_brig",
14 .table = {
15 GPIO_LOOKUP("0000:00:0c.0", -1, "bridge-reset", GPIO_ACTIVE_HIGH),
16 GPIO_LOOKUP("0000:00:0c.0", -1, "bl-en", GPIO_ACTIVE_HIGH),
17 GPIO_LOOKUP("0000:00:0c.0", -1, "vadd", GPIO_ACTIVE_HIGH),
18 { },
22 /*tc35876x DSI_LVDS bridge chip and panel platform data*/
23 static void *tc35876x_platform_data(void *data)
25 struct gpiod_lookup_table *table = &tc35876x_gpio_table;
26 struct gpiod_lookup *lookup = table->table;
28 lookup[0].chip_hwnum = get_gpio_by_name("LCMB_RXEN");
29 lookup[1].chip_hwnum = get_gpio_by_name("6S6P_BL_EN");
30 lookup[2].chip_hwnum = get_gpio_by_name("EN_VREG_LCD_V3P3");
31 gpiod_add_lookup_table(table);
33 return NULL;
36 static const struct devs_id tc35876x_dev_id __initconst = {
37 .name = "i2c_disp_brig",
38 .type = SFI_DEV_TYPE_I2C,
39 .get_platform_data = &tc35876x_platform_data,
42 sfi_device(tc35876x_dev_id);