.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * platform_tc35876x.c: tc35876x platform data initialization file |
---|
3 | 4 | * |
---|
4 | 5 | * (C) Copyright 2013 Intel Corporation |
---|
5 | 6 | * 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 | 7 | */ |
---|
12 | 8 | |
---|
13 | | -#include <linux/gpio.h> |
---|
14 | | -#include <linux/platform_data/tc35876x.h> |
---|
| 9 | +#include <linux/gpio/machine.h> |
---|
15 | 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 | +}; |
---|
16 | 21 | |
---|
17 | 22 | /*tc35876x DSI_LVDS bridge chip and panel platform data*/ |
---|
18 | 23 | static void *tc35876x_platform_data(void *data) |
---|
19 | 24 | { |
---|
20 | | - static struct tc35876x_platform_data pdata; |
---|
| 25 | + struct gpiod_lookup_table *table = &tc35876x_gpio_table; |
---|
| 26 | + struct gpiod_lookup *lookup = table->table; |
---|
21 | 27 | |
---|
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"); |
---|
| 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); |
---|
26 | 32 | |
---|
27 | | - return &pdata; |
---|
| 33 | + return NULL; |
---|
28 | 34 | } |
---|
29 | 35 | |
---|
30 | 36 | static const struct devs_id tc35876x_dev_id __initconst = { |
---|