staging: fbtft: Add reset to fbtft_init_display_dt()
authorNoralf Trønnes <noralf@tronnes.org>
Sat, 11 Jul 2015 16:57:04 +0000 (18:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Jul 2015 02:16:16 +0000 (19:16 -0700)
When an init sequence is present in the Device Tree,
fbtft_init_display_dt() is used to initialize the display.
Add missing reset function call and activation of
chip select for parallel bus.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft-core.c

index 9cc81412be69b724100c749a25f292cb0a08a9c2..f04128fb0693470fb60dca14dfbb0321f57352db 100644 (file)
@@ -1076,6 +1076,11 @@ static int fbtft_init_display_dt(struct fbtft_par *par)
        p = of_prop_next_u32(prop, NULL, &val);
        if (!p)
                return -EINVAL;
+
+       par->fbtftops.reset(par);
+       if (par->gpio.cs != -1)
+               gpio_set_value(par->gpio.cs, 0);  /* Activate chip */
+
        while (p) {
                if (val & FBTFT_OF_INIT_CMD) {
                        val &= 0xFFFF;