ARM: dts: exynos5250: Add trackpad to Spring

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
ASoC: samsung: Add MODULE_DEVICE_TABLE for Snow

This enables the snd_soc_snow module to be auto-loaded.

Signed-off-by: Andreas Färber <afaerber@suse.de>
ASoC: max98088: Document DT bindings

Signed-off-by: Andreas Färber <afaerber@suse.de>
ASoC: max98088: Add DT bindings

"maxim,98089" will be used for the Spring Chromebook.

Signed-off-by: Andreas Färber <afaerber@suse.de>
ARM: dts: Add max98089 to exynos5250-spring

Signed-off-by: Andreas Färber <afaerber@suse.de>
ASoC: samsung: Document binding for max98089 based Snow driver

Signed-off-by: Andreas Färber <afaerber@suse.de>
ASoC: samsung: Extend Snow driver to support max98089

This is needed for Spring.

Signed-off-by: Andreas Färber <afaerber@suse.de>
ARM: dts: Add sound support to exynos5250-spring

Signed-off-by: Andreas Färber <afaerber@suse.de>
TEST_ONLY: Disable dp-controller node

Allows to use simplefb rather than exynos drm.

Signed-off-by: Andreas Färber <afaerber@suse.de>
mmc: dw_mmc: Make sure we don't get stuck when we get an error

If we happened to get a data error at just the wrong time the dw_mmc
driver could get into a state where it would never complete its
request.  That would leave the caller just hanging there.

We fix this two ways and both of the two fixes on their own appear to
fix the problems we've seen:

1. Fix a race in the tasklet where the interrupt setting the data
   error happens _just after_ we check for it, then we get a
   EVENT_XFER_COMPLETE.  We fix this by repeating a bit of code.
2. Fix it so that if we detect that we've got an error in the "data
   busy" state and we're not going to do anything else we end the
   request and unblock anyone waiting.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@gmail.com>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Input: cros_ec_keyb: Optimize ghosting algorithm.

Previous algorithm was a bit conservative and complicating with
respect to identifying key ghosting.  This CL uses the bitops hamming
weight function (hweight8) to count the number of matching rows for
colM & colN.  If that number is > 1 ghosting is present.

Additionally it removes NULL keys and our one virtual keypress
KEY_BATTERY from consideration as these inputs are never physical
keypresses.

Signed-off-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
drm/bridge: Modify drm_bridge core to support driver model

This patch tries to seperate drm_bridge implementation
into 2 parts, a drm part and a non_drm part.

A set of helper functions are defined in this patch to make
bridge driver probe independent of the drm flow.

The bridge devices register themselves on a lookup table
when they get probed by calling "drm_bridge_add_for_lookup".

The parent encoder driver waits till the bridge is available in the
lookup table(by calling "of_drm_find_bridge") and then continues with
its initialization.

The encoder driver should call "drm_bridge_attach_encoder" to pass on
the drm_device and the encoder pointers to the bridge object.

Now that the drm_device pointer is available, the encoder then calls
"bridge->funcs->post_encoder_init" to allow the bridge to continue
registering itself with the drm core.

Also, non driver model based ptn3460 driver is removed in this patch.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
[AF: applied manually]
Signed-off-by: Andreas Färber <afaerber@suse.de>

Conflicts:
	drivers/gpu/drm/Makefile
drm/bridge: Add i2c based driver for ptn3460 bridge

This patch adds ptn3460 as module_i2c_driver.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
drm/bridge: Add i2c based driver for ps8622/ps8625 bridge

This patch adds drm_bridge driver for parade DisplayPort
to LVDS bridge chip.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
ARM: dts: Add DT changes for display on snow

Add DT nodes for ptn3460 bridge chip and panel-simple panel.
Add backlight enable pin and backlight power supply for pwm-backlight.
Also add bridge phandle needed by dp to enable display on snow.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
[AF: Rebased onto Snow cleanup, use symbolic names]
Signed-off-by: Andreas Färber <afaerber@suse.de>
Revert "Disable dp-controller node"
ARM: dts: exynos5250: Add eDP/LVDS bridge to Spring

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
[AF: Redone for v6]
Signed-off-by: Andreas Färber <afaerber@suse.de>
TEST_ONLY: Disable dp-controller, lvds-bridge, panel

Signed-off-by: Andreas Färber <afaerber@suse.de>
pinctrl: exynos: Lock GPIOs as interrupts when used as EINTs

Currently after configuring a GPIO pin as an interrupt related pinmux
registers are changed, but there is no protection from calling
gpio_direction_*() in a badly written driver, which would cause the same
pinmux register to be reconfigured for regular input/output and this
disabling interrupt capability of the pin.

This patch addresses this issue by moving pinmux reconfiguration to
.irq_{request,release}_resources() callback of irq_chip and calling
gpio_lock_as_irq() helper to prevent reconfiguration of pin direction.

Setting up a GPIO interrupt on Samsung SoCs is a two-step operation -
in addition to trigger configuration in a dedicated register, the pinmux
must be also reconfigured to GPIO interrupt, which is a different function
than normal GPIO input, although I/O-wise they both behave in the same way
and gpio_get_value() can be used on a pin configured as IRQ as well.

Such design implies subtleties such as gpio_direction_input() not having
to fail if a pin is already configured as an interrupt nor change the
configuration to normal input. But the FLAG_USED_AS_IRQ set in gpiolib by
gpio_lock_as_irq() is only used to check that gpio_direction_output() is
not called, it's not used to prevent gpio_direction_input() to be called.
So this is not a complete solution for Samsung SoCs but it's definitely a
move in the right direction.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
[javier: use request resources instead of startup and expand commit message]
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>