ARM: dts: Fix MMC pinctrl for exynos5250-snow

The pinctrl properties should be on the device directly and not on the
slot sub-node.

Reported-by: Doug Anderson <dianders@chromium.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
ARM: dts: Fold exynos5250-cros-common into exynos5250-snow

exynos5250-cros-common.dtsi was meant for sharing common pieces across
ChromeOS devices. This turned out premature, as several devices ended up
in the common file that are not common after all. Since the remaining
common ChromeOS pieces are fairly minor,  exynos5250-cros-common.dtsi
was requested to be merged into the Snow device tree, sharing only the
keyboard controller for now. This may be re-evaluated as both mature.

Suggested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
ARM: dts: Clean up exynos5250-snow

Use the new style of referencing inherited nodes and use symbolic names.
Reorder one pinctrl node in GPIO order.

Goal is the alignment of all exynos5250 based device trees for comparison.

Suggested-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
ARM: dts: Fill in bootargs for exynos5250-snow

exynos5250-cros-common.dtsi had an empty /chosen node.
Fill in exemplary boot arguments.

Signed-off-by: Andreas Färber <afaerber@suse.de>
ARM: dts: Move dp_hpd from exynos5250 into smdk5250 and snow

Spring uses a different GPIO, so this is not a generic SoC piece.

Suggested-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
ARM: dts: Clean up exynos5250-smdk5250

Use the new style for referencing inherited nodes and use symbolic names.

Goal is the alignment of all exynos5250 based device trees for comparison.

Signed-off-by: Andreas Färber <afaerber@suse.de>
ARM: dts: Clean up exynos5250-arndale

Use the new style of referencing inherited nodes, use symbolic names,
tidy indentation and reorder includes.

Goal is the alignment of all exynos5250 based device trees for comparison.

Signed-off-by: Andreas Färber <afaerber@suse.de>
ARM: dts: Fix apparent GPIO typo in exynos5250-arndale

The GPIO flag 2 has no constant assigned, so this was probably active-low.

Signed-off-by: Andreas Färber <afaerber@suse.de>
ARM: dts: Simplify USB3503 on exynos5250-arndale

There's no need for a simple-bus, place the smsc,usb3503a directly into
the root node. That's what we're going to do on exynos5250-spring.

Reported-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
ARM: dts: Add exynos5250-spring device tree

Adds initial support for the HP Chromebook 11.

Cc: Vincent Palatin <vpalatin@chromium.org>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Stephan van Schaik <stephan@synkhronix.com>
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>
mmc: dw_mmc: change to use recommended reset procedure

This patch changes the fifo reset code to follow the reset procedure
outlined in the documentation of Synopsys Mobile storage host databook.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.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: add register and unregister functions for connectors

Introduce generic functions to register and unregister connectors. This
provides a common place to add and remove associated user space
interfaces.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
drm/panel: Add prepare, unprepare and get_modes routines

Most of the panels need an init sequence as mentioned below:
	-- poweron LCD unit/LCD_EN
	-- start video data
	-- poweron LED unit/BACKLIGHT_EN
And, a de-init sequence as mentioned below:
	-- poweroff LED unit/BACKLIGHT_EN
	-- stop video data
	-- poweroff LCD unit/LCD_EN
With existing callbacks for drm panel, we cannot accomodate such panels,
since only two callbacks, i.e "panel_enable" and panel_disable are supported.

This patch adds:
	-- "prepare" callback which can be called before
	the actual video data is on, and then call the "enable"
	callback after the video data is available.

	-- "unprepare" callback which can be called after
	the video data is off, and use "disable" callback
	to do something before switching off the video data.

Now, we can easily map the above scenario as shown below:
	poweron LCD unit/LCD_EN = "prepare" callback
	poweron LED unit/BACKLIGHT_EN = "enable" callback
	poweroff LED unit/BACKLIGHT_EN = "disable" callback
	poweroff LCD unit/LCD_EN = "unprepare" callback

Also, a helper function for get_modes is added.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
drm/panel: Add support for prepare and unprepare routines

Now that we have 2 new callbacks(prepare and unprepare) for drm_panel,
make changes in all the drm drivers which use the drm_panel framework
to support the new callbacks.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
drm/panel: simple: Add support for auo_b133htn01 panel

Add panel_desc structure for auo_b133htn01 eDP panel.

Also, modify the panel_simple routines to support timing_parameter
delays if mentioned in the panel_desc structure.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
drm/exynos: Move DP setup into commit()

This patch moves the DP training and video enable from the hotplug
handler into commit().

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
drm/exynos: dp: Modify driver to support drm_panel

Add drm_panel controls to support powerup/down of the
eDP panel, if one is present at the sink side.

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