irqchip: vt8500: Convert arch-vt8500 to new irqchip infrastructure

This patch moves the arch-vt8500 irq code to drivers/irqchip and converts
it to use the new IRQCHIP_DECLARE and irqchip_init. This allows the removal
of some more functions from common.h

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
i2c: vt8500: Add support for Wondermedia I2C master-mode

This patch adds support for the I2C controller found on Wondermedia
SoCs.

Due to the lack of pinmux support, GPIO pin alternate functions are
configured by machine's compatible property, as are pullups.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
input: vt8500: Add power button keypad driver

This patch adds support for the Power Button keypad found on
Wondermedia netbooks/tablets.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
input: vt8500: Add binding document for vt8500-power-keypad.

Add a binding document for the power keypad device found on
Wondermedia SoCs.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
input: vt8500: Add support for devicetree to i8042 driver

This patch adds basic devicetree support for the i8042 controller
driver.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
mtd: vt8500: Add support for Wondermedia Serial Flash Controller

This patch adds read-only support of the Wondermedia SFC found
on WM8505, WM8650 and WM8850 SoCs. The driver does not currently
support write or erase operations.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
video: vt8500: Make wmt_ge_rops optional

wmt_ge_rops is a seperate driver to vt8500/wm8505 framebuffer
driver but is currently a required option. This patch makes
accelerated raster ops optional.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
video: vt8500: Remove unused platform_data/video-vt8500lcdfb.h

With the conversion to devicetree only for arch-vt8500, this
header is no longer required. This patch removes the #include
from the two framebuffer drivers that used it, and the header file.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
video: vt8500: Correct descriptions in video/Kconfig

This patch corrects the descriptions for the VIA VT8500 and
Wondermedia WM8xxx-series framebuffer drivers to correctly reflect
which hardware they support.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
drivers/video/wm8505fb.c: use devm_ functions

The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses these functions for data that is allocated in
the probe function of a platform device and is only freed in the remove
function.

The patch makes some other cleanups.  First, the original code used
devm_kzalloc, but kfree.  This would lead to a double free.  The problem
was found using the following semantic match (http://coccinelle.lip6.fr/):

// <smpl>
@@
expression x,e;
@@
x = devm_kzalloc(...)
... when != x = e
?-kfree(x,...);
// </smpl>

The error-handing code of devm_request_and_ioremap does not print any
warning message, because devm_request_and_ioremap does this.

The call to dma_alloc_coherent is converted to its devm equivalent,
dmam_alloc_coherent.  This implicitly introduces a call to
dmam_free_coherent, which was completly missing in the original code.

A semicolon is removed at the end of the error-handling code for the call
to dma_alloc_coherent.

The block of code calling fb_alloc_cmap is moved below the block of code
calling wm8505fb_set_par, so that the error-handing code of the call to
wm8505fb_set_par can just return ret.  This way there is only one block of
error-handling code that needs to call fb_dealloc_cmap, and so this is
moved up to the place where it is needed, eliminating the need for all
gotos and labels in the function.  This was suggested by Tony Prisk.

The initializations of fbi and ret at the beginning of the function are not
necessary and are removed.  The call platform_set_drvdata(pdev, NULL); at
the end of the function is also removed.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
MAINTAINERS: vt8500: Update maintained files list

This patch updates the MAINTAINERS file to show the current list
of files maintained under ARM/VT8500 ARM ARCHITECTURE.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
docs: vt8500: Binding document for i8042 keyboard controller

This patch adds a binding document for the i8042 keyboard controller.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
dts: vt8500: Update dts and dtsi files for arch-vt8500 SoCs.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
pinctrl: gpio: vt8500: Add pincontrol driver for arch-vt8500

This patch adds support for the GPIO/pinmux controller found on the VIA
VT8500 and Wondermedia WM8xxx-series SoCs.

Each pin within the controller is capable of operating as a GPIO or as
an alternate function. The pins are numbered according to their control
bank/bit so that if new pins are added, the existing numbering is maintained.

All currently supported SoCs are included: VT8500, WM8505, WM8650, WM8750 and
WM8850.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
gpio: vt8500: Remove arch-vt8500 gpio driver

With the move to a combined pinctrl/gpio driver, the arch-vt8500
gpio driver is no longer required.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
arm: vt8500: Increase max number of GPIOs

With the inclusion of the pin control driver, more GPIO pins have been
identified on the arch-vt8500 SoCs requiring an increase in the available
GPIOs.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
arm: dts: vt8500: Update Wondermedia SoC dtsi files for pinctrl driver

This patch adds pinctrl nodes to the VIA VT8500 and Wondermedia SoC dtsi
files to support the pinctrl driver.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
arm: vt8500: Remove gpio devicetree nodes

Remove the gpio related devicetree nodes as these are no longer required
with the move to a combined pinctrl/gpio driver.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
arm: dts: vt8500: Add I2C pinctrl nodes to board files

Add the I2C pinctrl configuration nodes to the board files for supported
arch-vt8500 boards.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
i2c: vt8500: Remove unnecessary gpio setup code

With the addition of a pinctrl driver, the gpio setup code in this driver
is no longer required.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>