gpio: mc33880: use dev_err() instead of printk()

dev_err() is more preferred than printk().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: 74x164: use spi_get_drvdata() and spi_set_drvdata()

Use the wrapper functions for getting and setting the driver data
using spi_device instead of using dev_{get|set}_drvdata with
&spi->dev, so we can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: mc33880: use spi_get_drvdata() and spi_set_drvdata()

Use the wrapper functions for getting and setting the driver data
using spi_device instead of using dev_{get|set}_drvdata with
&spi->dev, so we can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: gpiolib-of.c: fix checkpatch error

Fix :
 gpio/gpiolib-of.c:64: ERROR: code indent should use tabs where possible

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: gpio-mvebu.c: fix checkpatch errors

Fix :
 gpio/gpio-mvebu.c:120: ERROR: space required before the open parenthesis '('
 gpio/gpio-mvebu.c:136: ERROR: space required before the open parenthesis '('
 gpio/gpio-mvebu.c:154: ERROR: space required before the open parenthesis '('
 gpio/gpio-mvebu.c:404: ERROR: space required before the open parenthesis '('
 gpio/gpio-mvebu.c:476: ERROR: "(foo*)" should be "(foo *)"
 gpio/gpio-mvebu.c:480: ERROR: "(foo*)" should be "(foo *)"
 gpio/gpio-mvebu.c:484: ERROR: "(foo*)" should be "(foo *)"
 gpio/gpio-mvebu.c:512: ERROR: space prohibited after that '!' (ctx:BxW)
 gpio/gpio-mvebu.c:518: ERROR: space prohibited after that '!' (ctx:BxW)
 gpio/gpio-mvebu.c:518: ERROR: space required before the open brace '{'
 gpio/gpio-mvebu.c:563: ERROR: space prohibited after that '!' (ctx:BxW)
 gpio/gpio-mvebu.c:570: ERROR: trailing whitespace
 gpio/gpio-mvebu.c:577: ERROR: space required before the open parenthesis '('
 gpio/gpio-mvebu.c:635: ERROR: space prohibited after that '!' (ctx:BxW)

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: gpio-omap.c: fix checkpatch error

Fix :
 gpio/gpio-omap.c:697: ERROR: space required before the open parenthesis '('

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: gpio-pca953x.c: fix checkpatch error

Fix :
 gpio/gpio-pca953x.c:150: ERROR: else should follow close brace '}'

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: gpio-pxa.c: fix checkpatch errors

Fix :
 gpio/gpio-pxa.c:605: ERROR: space required after that ',' (ctx:VxV)
 gpio/gpio-pxa.c:672: ERROR: space prohibited after that open parenthesis '('

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: gpio-sch.c: fix checkpatch error

Fix :
 gpio/gpio-sch.c:206: ERROR: switch and case should be at the same indent

Also remove blank lines

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: gpio-stp-xway.c: fix checkpatch error

Fix :
 gpio/gpio-stp-xway.c:220: ERROR: trailing whitespace

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: gpio-tc3589x.c: fix checkpatch errors

Fix :
 gpio/gpio-tc3589x.c:285: ERROR: code indent should use tabs where possible
 gpio/gpio-tc3589x.c:286: ERROR: code indent should use tabs where possible
 gpio/gpio-tc3589x.c:287: ERROR: code indent should use tabs where possible
 gpio/gpio-tc3589x.c:347: ERROR: code indent should use tabs where possible

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: gpio-timberdale.c: fix checkpatch error

Fix :
 gpio/gpio-timberdale.c:171: ERROR: else should follow close brace '}'

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: gpio-tps65910.c: fix checkpatch error

Fix :
 gpio/gpio-tps65910.c:136: ERROR: space required before the open parenthesis '('

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
MAX7301 GPIO: Do not force SPI speed when using OF Platform

The bit_per_word can be set in the OF Device tree, so no need to force it as with
the platform_data when using OF Platform

Signed-off-by: Patrick Vasseur <patrick.vasseur@c-s.fr>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: mvebu: add dbg_show function

This patch adds a dedicated dbg_show function to the gpio-mvebu driver.
In addition to the generic gpiolib informations, this function displays
informations related with the specific Marvell registers (blink enable,
data in polarity, interrupt masks and cause).

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: samsung: Add terminating entry for exynos_pinctrl_ids

The of_device_id table is supposed to be zero-terminated.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
bus: introduce an Marvell EBU MBus driver

The Marvell EBU SoCs have a configurable physical address space
layout: the physical ranges of memory used to address PCI(e)
interfaces, NOR flashes, SRAM and various other types of memory are
configurable by software, through a mechanism of so-called 'address
decoding windows'.

This new driver mvebu-mbus consolidates the existing code to address
the configuration of these memory ranges, which is spread into
mach-mvebu, mach-orion5x, mach-mv78xx0, mach-dove and mach-kirkwood.

Following patches convert each Marvell EBU SoC family to use this
driver, therefore removing the old code that was configuring the
address decoding windows.

It is worth mentioning that the MVEBU_MBUS Kconfig option is
intentionally added as a blind option. The new driver implements and
exports the mv_mbus_dram_info() function, which is used by various
Marvell drivers throughout the tree to get access to window
configuration parameters that they require. This function is also
implemented in arch/arm/plat-orion/addr-map.c, which ultimately gets
removed at the end of this patch series. So, in order to preserve
bisectability, we want to ensure that *either* this new driver, *or*
the legacy code in plat-orion/addr-map.c gets compiled in.

By making MVEBU_MBUS a blind option, we are sure that only a platform
that does 'select MVEBU_MBUS' will get this new driver compiled
in. Therefore, throughout the next patches that convert the Marvell
sub-architectures one after the other to this new driver, we add the
'select MVEBU_MBUS' and also ensure to remove plat-orion/addr-map.c
from the build for this specific sub-architecture. This ensures that
bisectability is preserved.

Ealier versions of this driver had a DT binding, but since those were
not yet agreed upon, they were removed. The driver still uses
of_device_id to find the SoC specific details according to the string
passed to mvebu_mbus_init(). The plan is to re-introduce a proper DT
binding as a followup set of patches.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
ARM: Orion: add dbg_show function to gpio-orion driver

This patch adds a dedicated dbg_show function to the gpio-mvebu driver.
In addition to the generic gpiolib informations, this function displays
informations related with the specific Marvell registers (blink enable,
data in polarity, interrupt masks and cause).

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
bus: mvebu-mbus: Restore checking for coherency fabric hardware

The new mvebu-mbus driver was not checking the device tree for
coherency fabric hardware and hence was not setting the hw_io_coherency
flag in mbus_state. This prevented the mvsdio driver from operating
correctly. This patch restores the check.

Signed-off-by: Neil Greatorex <neil@fatboyfat.co.uk>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Merge tag 'tags/cleanup_for_v3.10' into mvebu/soc

mvebu cleanup for v3.10

 - plat-orion: prep for mvebu-mbus driver