video: ARM CLCD: support DT signal inversion flags
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 16 Jun 2016 09:36:14 +0000 (11:36 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 11 Aug 2016 14:54:53 +0000 (17:54 +0300)
commitaf29897f1046d7c1ab86b57506fbfdcfba569de8
tree090626d261fe1245353b7e1673ab9018693504ae
parentc38162be301d59278f568e0b34be31915b6fe3bb
video: ARM CLCD: support DT signal inversion flags

The device tree bindings from display-timing.txt allows us to
specify if data enable, hsync, vsync or the pixed clock should be
inverted on the way to the display. The driver does not currently
handle this so add support for those flags as it is needed for
the Versatile Sanyo LCD display.

Note that the previous behaviour was to invert the pixel clock
for all displays, so unless the pixel clock polarity is
explicitly defined in the device tree (i.e. the timings node
has the "pixelclk-active" property) we fall back to inverting
the pixel clock. This needs some extra compatibility code.

Since the timing flags have to be set up inside the struct
clcd_panel, we need to refactor the code a bit to pass around
the panel rather than just the mode.

Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/amba-clcd.c