ARM: s5pv210: Add support for s5p6442 SoC

This patch adds DeviceTree-only support for Samsung S5P6442 SoC, which
is an S5PV210-like ARM1176JZF-s-based SoC.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
pinctrl: samsung: Add driver data for S5P6442 SoC

This patch adds SoC-specific driver data describing pin controller of
S5P6442 SoC.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
serial/samsung: Check for ARCH_ not CPU_S5PV210

To support other SoCs from the same family as S5PV210, instead of
checking for support for specific SoC model, let's just check for the
whole family.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[HACK] ARM: Work around bootloader bug

On s5p6442-apollo board the bootloader leaves the system in a not fully
sane state and somehow switching domain 0 to client access permissions
causes a hang. Until the issue is fixed, work it around by leaving
manager permissions.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[media] exynos4-is: Request syscon only if ISP writeback is present

On FIMC variants which don't have writeback channel, there is no need to
access system registers. This patch makes the driver request sysreg
regmap conditionally depending on whether writeback is supported.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
drm/exynos: fimd: Add support for S5PV210 FIMD variant

This patch adds support for FIMD variant found on S5PV210 SoC.
Except CLKSEL bit availability, it is identical to Exynos4210.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
phy: Add support for S5PV210 to the Exynos USB 2.0 PHY driver

Add support for the Samsung's S5PV210 SoC to the Exynos USB 2.0 PHY driver.

Signed-off-by: Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
[k.debski@samsung.com: cleanup and commit description]
[k.debski@samsung.com: make changes accordingly to the mailing list
comments]
Signed-off-by: Kamil Debski <k.debski@samsung.com>
[tomasz.figa@gmail.com: fix merge conflicts]
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
extcon: Implement OF-based extcon lookup properly

Platform bus is not the only way to have extcon devices, so current
implementation of of_extcon_get_extcon_dev() is broken. Also using
parent device node only to get device name is quite ugly.

This patch reimplements of_extcon_get_extcon_dev() to do exactly the
same as extcon_get_extcon_dev() but instead of comparing names, compare
node pointers.

Since resulting function is very simple and uses static variables, it is
moved to extcon-class.c and of_extcon.c is removed.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
usb: gadget: udc-core: Add extcon handling to reduce power use

Extcon driver provides information about what kind of cable has been
inserted in the device's USB port. Power use can be reduced if UDC is
switched off while no suitable cable is present.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
[t.figa: Fixed merge conflicts.]
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
extcon: Add fsa9480 extcon driver

This patch adds extcon driver for Fairchild Semiconductor FSA9480
microUSB switch.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
usb: dwc2: Set of_node of gadget device

This is needed for USB extcon look-up using device tree.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
usb: dwc2: Do not disable PHY in udc_stop

This fixes double PHY disable leading to inability to re-enable the
controller after disabling it once.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
usb: dwc2: Fix driver context storing

Before applying this fix calling s3c_hsotg_udc_start, *stop and *start
again resulted in a WARN_ON(hsotg->driver) being triggered in *start.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
[t.figa: Resolved merge conflicts.]
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
usb: dwc2: Fix clock handling

There is no need to keep the clock running when the whole power domain
is turned off. Also fix possible unbalanced clock disable on probe error
path.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
usb: dwc2: Do not disable PHY in remove

This patch removes call to s3c_hsotg_phy_disable() from remove callback,
as the PHY is already disabled after unregistering gadget.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
power: max8998-charger: Fix platform data retrieval

Since the max8998 MFD driver supports instantiation by DT, platform data
retrieval is handled in MFD probe and cell drivers should get use
the pdata field of max8998_dev struct to obtain them.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
video/backlight: Add driver for Samsung S6D04D1 LCD controller

This patch adds driver for Sasung S6D04D1 LCD controller chip that can
be used to drive TFT LCD panels.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
mtd: onenand/samsung: Use managed resource helpers

This patch converts driver probe to use managed resource helpers, which
greatly reduces the line count of remove and error path and makes sure
that correct clean-up is done in case of error.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
mtd: onenand/samsung: Unify resource order for controller variants

Before this patch, the order of memory resources requested by the driver
was controller base as first and OneNAND chip base as second for
S3C64xx/S5PC100 variant and the opposite for S5PC110/S5PV210 variant.

To make this more consistent, this patch swaps the order of resources
for the latter and updates platform code accordingly. As a nice side
effect there is a slight reduction in line count of probe function.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
mtd: onenand/samsung: Make sure that bus clock is enabled

This patch adds basic handling of controller bus clock to make sure that
in device probe it is enabled and device can operate correctly. The
clock is optional and driver behavior is identical as before this patch
if not provided.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>