brcm2708: switch to linux 4.4 and update patches
[openwrt.git] / target / linux / brcm2708 / patches-4.1 / 0164-staging-fbtft-Add-reset-to-fbtft_init_display_dt.patch
1 From 26a9afc8fb40ec61cc7b0189e96c5471e72ec83c Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
3 Date: Sat, 11 Jul 2015 18:48:10 +0200
4 Subject: [PATCH 164/222] staging: fbtft: Add reset to fbtft_init_display_dt()
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 When an init sequence is present in the Device Tree,
10 fbtft_init_display_dt() is used to initialize the display.
11 Add missing reset function call and activation of
12 chip select for parallel bus.
13
14 Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
15 ---
16  drivers/staging/fbtft/fbtft-core.c | 5 +++++
17  1 file changed, 5 insertions(+)
18
19 --- a/drivers/staging/fbtft/fbtft-core.c
20 +++ b/drivers/staging/fbtft/fbtft-core.c
21 @@ -1074,6 +1074,11 @@ static int fbtft_init_display_dt(struct
22         p = of_prop_next_u32(prop, NULL, &val);
23         if (!p)
24                 return -EINVAL;
25 +
26 +       par->fbtftops.reset(par);
27 +       if (par->gpio.cs != -1)
28 +               gpio_set_value(par->gpio.cs, 0);  /* Activate chip */
29 +
30         while (p) {
31                 if (val & FBTFT_OF_INIT_CMD) {
32                         val &= 0xFFFF;