]> Git Repo - linux.git/blob - arch/x86/platform/intel-mid/device_libs/platform_tc35876x.c
enetc: Migrate to PHYLINK and PCS_LYNX
[linux.git] / arch / x86 / platform / intel-mid / device_libs / platform_tc35876x.c
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * platform_tc35876x.c: tc35876x platform data initialization file
4  *
5  * (C) Copyright 2013 Intel Corporation
6  * Author: Sathyanarayanan Kuppuswamy <[email protected]>
7  */
8
9 #include <linux/gpio/machine.h>
10 #include <asm/intel-mid.h>
11
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                 { },
19         },
20 };
21
22 /*tc35876x DSI_LVDS bridge chip and panel platform data*/
23 static void *tc35876x_platform_data(void *data)
24 {
25         struct gpiod_lookup_table *table = &tc35876x_gpio_table;
26         struct gpiod_lookup *lookup = table->table;
27
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);
32
33         return NULL;
34 }
35
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,
40 };
41
42 sfi_device(tc35876x_dev_id);
This page took 0.036362 seconds and 4 git commands to generate.