platform/kernel/linux-3.10.git
10 years agoASoC: max98090: change the pclk value and its division factor 89/20689/4
Chen Zhen [Mon, 12 May 2014 05:36:52 +0000 (13:36 +0800)]
ASoC: max98090: change the pclk value and its division factor

when codec work at master mode,its MCLK was supported by CDCLK,so it's necessary
to change pclk and its division factor according to CDCLK.

Change-Id: I9e091b532b523e8788ce1ffe84bc40452bd52a19
Signed-off-by: Chen Zhen <zhen1.chen@samsung.com>
10 years agopackaging: update kernel version to 3.10.39 19/21119/1
Marek Szyprowski [Thu, 15 May 2014 07:59:06 +0000 (09:59 +0200)]
packaging: update kernel version to 3.10.39

Recent rebase updated kernel base from 3.10.33 to 3.10.39, so update kernel version in the spec file too.

Change-Id: Ifc5239ea428e2178aa70ddd3b94364fdbb7ebadc
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
10 years agoARM: odroidx2: Fix initialization failed of WinTV-Aero-M
Changbing Xiong [Mon, 12 May 2014 03:16:22 +0000 (11:16 +0800)]
ARM: odroidx2: Fix initialization failed of WinTV-Aero-M

During the initianlization of the tuner, driver will allocate 360K bytes from
atomic DMA coherent pool, which is bigger than default size of the pool that
kernel used, So we need to expand the pool.

Change-Id: If1f869db25913ce8d5b30f31130a587efbf5b9c9
Signed-off-by: Changbing Xiong <cb.xiong@samsung.com>
10 years agoadd net_cls cgroup
Przemyslaw Kedzierski [Fri, 9 May 2014 10:36:21 +0000 (12:36 +0200)]
add net_cls cgroup

This patch adds net_cls cgroup.
It is needed for resourced.

Change-Id: I78ee6b2dbe34aa6ce9cacc203a0c378524d76bb6
Signed-off-by: Przemyslaw Kedzierski <p.kedzierski@samsung.com>
10 years agotizen: update tizen_defconfig after usb2 phy backport
Marek Szyprowski [Fri, 9 May 2014 07:01:48 +0000 (09:01 +0200)]
tizen: update tizen_defconfig after usb2 phy backport

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I999a3507e29ecfa3a95f3cdd6ec746073da32a3d

10 years agoTizen: update defconfig for Odroid X2 and U3 boards
Marek Szyprowski [Thu, 8 May 2014 08:06:34 +0000 (10:06 +0200)]
Tizen: update defconfig for Odroid X2 and U3 boards

New defconfig supports both Odroid X2 and U3, so renamed it
tizen_odroid_defconfig

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I19c966f05e92292ededd2f910cbf1190b5b2c45f

10 years agoARM: dts: exynos4x12: refactor common Odroid defs and add OdroidU3 support
Marek Szyprowski [Thu, 8 May 2014 07:43:02 +0000 (09:43 +0200)]
ARM: dts: exynos4x12: refactor common Odroid defs and add OdroidU3 support

Moved most of the common definitions to exynos4412-odroid-common.dtsi
and created exynos4412-odroidu3.dts for OdroidU3 board.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I30fcd329aff827e8c0e734ea6047782be03ed242

10 years agousb: usb5303: add support for reference clock specified in device tree
Marek Szyprowski [Wed, 7 May 2014 07:04:14 +0000 (09:04 +0200)]
usb: usb5303: add support for reference clock specified in device tree

USB3503 chip supports 8 values of reference clock. The value is
specified by REF_SEL[1:0] pins and INT_N line. This patch add support
for getting 'refclk' clock, enabling it and setting INT_N line according
to the value of the gathered clock. If no clock has been specified,
driver defaults to the old behaviour (assuming that clock has been
specified by REF_SEL pins from primary reference clock frequencies
table).

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I3453e714f9a793640b8cb6c0b4ccf699661ec934

10 years agoARM: dts: update exynos usb2 phy nodes to match mainline driver
Marek Szyprowski [Thu, 8 May 2014 07:38:38 +0000 (09:38 +0200)]
ARM: dts: update exynos usb2 phy nodes to match mainline driver

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I9ac4bcd37e965b10d0add3030038635ec2d00130

10 years agousb: s5p-ehci: add support for more than one usb phy
Marek Szyprowski [Thu, 8 May 2014 05:45:59 +0000 (07:45 +0200)]
usb: s5p-ehci: add support for more than one usb phy

Based on 'usb: ehci-exynos: Change to use phy provided by the generic
phy framework' patch posted to usb ml.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I5f7574c0659905148f6e7af95ecd197e92e03d16

10 years agodrivers: phy: exynos4x12-phy: fix HSIC1 power on/off sequence
Marek Szyprowski [Wed, 7 May 2014 06:57:36 +0000 (08:57 +0200)]
drivers: phy: exynos4x12-phy: fix HSIC1 power on/off sequence

From experiments with real hardware, it seems that URSTCON bits for
HSIC0 and HSIC1 seems to be swapped, so updated macro definitions for
them. HSIC1 also requires enabling power to device phy to get properly
enabled (similar hack is already implemented for HSIC0).

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Idcbe47f1a55d882394296837b9218e9f843e842c

10 years agophy: exynos: fix building as a module
Arnd Bergmann [Sat, 19 Apr 2014 03:21:41 +0000 (08:51 +0530)]
phy: exynos: fix building as a module

The top-level phy-samsung-usb2 driver may be configured as a
loadable module, which currently causes link errors because
of the dependency on the exynos{5250,4x12,4210}_usb2_phy_config
symbol. Solving this could be achieved by exporting these
symbols, but as the SoC-specific parts of the driver are not
currently built as modules, it seems better to just link
everything into one module and avoid the need for the export.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[backport from upstream commit d1481832f1dbb9d10fab27269631a130fa082f03]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I07f3a7ee523c55fab023b6c03caa6fba31bdec9b

10 years agophy: Add new Exynos USB 2.0 PHY driver
Kamil Debski [Thu, 6 Mar 2014 11:16:48 +0000 (12:16 +0100)]
phy: Add new Exynos USB 2.0 PHY driver

Add a new driver for the Exynos USB 2.0 PHY. The new driver uses the generic
PHY framework. The driver includes support for the Exynos 4x10 and 4x12
SoC families.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
[backport from upstream commit 06fb01373cae0bbf9af3a2b49e29c4341a5ba311]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I1f76ba5ecc23a49eeeec3c9a834a1e7fcc844834

10 years agoRevert "phy: Add new Exynos USB PHY driver"
Marek Szyprowski [Thu, 8 May 2014 05:29:00 +0000 (07:29 +0200)]
Revert "phy: Add new Exynos USB PHY driver"

This reverts commit 9eaa4d2322f94704866fbd0cbce260ba8dcb6de2.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ib0644b766b0174cdec43cc483b5ccc7f9487f411

10 years agoRevert "phy: exynos-usb: Fix referenct counting"
Marek Szyprowski [Thu, 8 May 2014 05:28:14 +0000 (07:28 +0200)]
Revert "phy: exynos-usb: Fix referenct counting"

This reverts commit 58ae84cefb54046335d9581f3d96e8a5b947a08b.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I3adfabef0633bdb8542940a506976afd12856f21

10 years agoRevert "phy: exynos: Change order of initialization of phy in power_on"
Marek Szyprowski [Thu, 8 May 2014 05:28:05 +0000 (07:28 +0200)]
Revert "phy: exynos: Change order of initialization of phy in power_on"

This reverts commit dbd99235197ce37b37f5e0c04fe7465a655f9c47.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I010965a1deb88f01b8a8c07e2c56910f5d73b9d2

10 years agoRevert "phy: exynos-usb: Remove ref counting for additional reset for Exynos4212"
Marek Szyprowski [Thu, 8 May 2014 05:27:55 +0000 (07:27 +0200)]
Revert "phy: exynos-usb: Remove ref counting for additional reset for Exynos4212"

This reverts commit f600e05157a6d3d38f87260f5caa88918cac129e.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Id87eb3479a353d34f58092973e2896bdacaf9c2a

10 years agoRevert "phy: exynos : add delay after reset phy for usb host"
Marek Szyprowski [Thu, 8 May 2014 05:27:43 +0000 (07:27 +0200)]
Revert "phy: exynos : add delay after reset phy for usb host"

This reverts commit 507ba96c49fe6e247dcb5a79e1aca7160def7254.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I57c35ef9ba7e3255562602662a81b3a8aa90461b

10 years agoRevert "phy: exynos4212-usb: Use refcount to power device PHY for HSIC0"
Marek Szyprowski [Thu, 8 May 2014 05:27:26 +0000 (07:27 +0200)]
Revert "phy: exynos4212-usb: Use refcount to power device PHY for HSIC0"

This reverts commit 16b990c41a9f1e31f4c51f66052a1c648a3c0b2e.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I49f69bf27d8226e05a3fb48c70b15f21e3685345

10 years agodrivers: of: add for_each_available_child_of_node() macro
Marek Szyprowski [Wed, 7 May 2014 14:38:43 +0000 (16:38 +0200)]
drivers: of: add for_each_available_child_of_node() macro

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I7713121fa18e780df480c5a5c6ebfa0972424f6f

10 years agophy: core: make NULL a valid phy reference if !CONFIG_GENERIC_PHY
Grygorii Strashko [Sat, 19 Apr 2014 03:21:44 +0000 (08:51 +0530)]
phy: core: make NULL a valid phy reference if !CONFIG_GENERIC_PHY

This fixes a regression on Keystone 2 platforms caused by patch
57303488cd37da58263e842de134dc65f7c626d5
"usb: dwc3: adapt dwc3 core to use Generic PHY Framework" which adds
optional support of generic phy in DWC3 core.

On Keystone 2 platforms the USB is not working now because
CONFIG_GENERIC_PHY isn't set and, as result, Generic PHY APIs stubs
return -ENOSYS always. The log shows:
 dwc3 2690000.dwc3: failed to initialize core
 dwc3: probe of 2690000.dwc3 failed with error -38

Hence, fix it by making NULL a valid phy reference in Generic PHY
APIs stubs in the same way as it was done by the patch
04c2facad8fee66c981a51852806d8923336f362 "drivers: phy: Make NULL
a valid phy reference".

Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[backport from upstream commit 2b97789fa289d531e767d994a77e34ec58f328c4]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Iad7bfec8716de065eb2707a0fe9f123eed691c3f

10 years agophy: fix kernel oops in phy_lookup()
Sergei Shtylyov [Sat, 19 Apr 2014 03:21:43 +0000 (08:51 +0530)]
phy: fix kernel oops in phy_lookup()

The kernel oopses in phy_lookup() due to 'phy->init_data' being NULL if we
register PHYs from a device tree probing driver and then call phy_get() on a
device that has no representation in the device tree (e.g. a PCI device).
Checking the pointer before dereferening it and skipping an interation if
it's NULL prevents this kernel oops.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[backport from upstream commit 743bb387a1edbf1ebbba6cf77c1af3e488886c39]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Iea16343af63965d19960fc8acf89e0a65b806440

10 years agophy: core: Add devm_of_phy_get to phy-core
Kamil Debski [Thu, 6 Mar 2014 11:16:47 +0000 (12:16 +0100)]
phy: core: Add devm_of_phy_get to phy-core

Adding devm_of_phy_get will allow to get phys by supplying a
pointer to the struct device_node instead of struct device.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
[backport from upstream commit b5d682f4eb76c98f2ca5658926df43dd05cf2c37]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ie1d75af85ef1072457074d94ab268c5d570ed930

10 years agophy: core: Add an exported of_phy_get function
Kamil Debski [Thu, 6 Mar 2014 11:16:46 +0000 (12:16 +0100)]
phy: core: Add an exported of_phy_get function

Previously the of_phy_get function took a struct device * and
was declared static. It was impossible to call it from
another driver and thus it was impossible to get phy defined
for a given node. The old function was renamed to _of_phy_get
and was left for internal use. of_phy_get function was added
and it was exported. The function enables to get a phy for
a given device tree node.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
[backport from upstream commit 0b3f3b2c777a2f7d20c9826a190ffd5bbd288f8f]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Id5aef3fdb574ba269f938428375cc4e88e5e59c0

10 years agophy-core: Don't propagate -ENOSUPP from phy_pm_runtime_get_sync to caller
Hans de Goede [Mon, 17 Feb 2014 08:59:23 +0000 (14:29 +0530)]
phy-core: Don't propagate -ENOSUPP from phy_pm_runtime_get_sync to caller

The phy-core allows phy_init and phy_power_on to be called multiple times,
but before this patch -ENOSUPP from phy_pm_runtime_get_sync would be
propagated to the caller for the 2nd and later calls.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[backport from upstream commit 767a1b5d6ec4ac5335dde17100880347ed154ce2]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: If65ef9e8d070b4f3d601e139a28246fab36cb40e

10 years agophy-core: phy_get: Leave error logging to the caller
Hans de Goede [Mon, 17 Feb 2014 08:59:22 +0000 (14:29 +0530)]
phy-core: phy_get: Leave error logging to the caller

In various cases errors may be expected, ie probe-deferral or a call to
phy_get from a driver where the use of a phy is optional.

Rather then adding all sort of complicated checks for this, and/or adding
special functions like devm_phy_get_optional, simply don't log an error,
and let deciding if get_phy returning an error really should result in a
dev_err up to the caller.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[backport from upstream commit f40037fd3677ae240978f469cc4155bf3ca7c076]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Iafe801b4c0a2419abc8f20717a3f441a2d9a2ab1

10 years agodrivers: phy: Add support for optional phys
Andrew Lunn [Tue, 4 Feb 2014 17:33:12 +0000 (18:33 +0100)]
drivers: phy: Add support for optional phys

Add devm_phy_optional_get and phy_optional_get, which should be used
when the phy is optional. They does not return an error when the phy
does not exist, rather they returns NULL, which is considered as a valid
phy, but results in NOPs when used with the consumer API.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
[backport from upstream commit 788a4d56ff378bff0b8e685d03a962b36903a149]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I76c9bb54d4bd11b742522c91c28f48b82ca4aa41

10 years agophy: add phy_get_bus_width()/phy_set_bus_width() calls
Matt Porter [Thu, 19 Dec 2013 14:23:02 +0000 (09:23 -0500)]
phy: add phy_get_bus_width()/phy_set_bus_width() calls

This adds a pair of APIs that allows the generic PHY subsystem to
provide information on the PHY bus width. The PHY provider driver may
use phy_set_bus_width() to set the bus width that the PHY supports.
The controller driver may then use phy_get_bus_width() to fetch the
PHY bus width in order to properly configure the controller.

Signed-off-by: Matt Porter <mporter@linaro.org>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[backport from upstream commit 8feed347d33bb630d426b9f2ed88cbdf9795f624]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I327ac9c7fb50d39e0351c15ea72b3748957ea03d

10 years agodrivers: phy: Make NULL a valid phy reference
Andrew Lunn [Tue, 4 Feb 2014 17:33:11 +0000 (18:33 +0100)]
drivers: phy: Make NULL a valid phy reference

The common clock framework considers NULL a valid clock
reference. This makes handling optional clocks simple, in that if the
optional clock is not available, a NULL reference can be used in the
place of a real clock, simplifying the clock consumer.

Extend this concept to the phy consumer API. A NULL can be passed to
the release calls, the phy_init() and phy_exit() calls, and
phy_power_on() and phy_power_off() and a NOP is performed.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
[backport from upstream commit 04c2facad8fee66c981a51852806d8923336f362]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I387a29962849f50fa8df1ab684babcbbe3227c84

10 years agophy: phy-core.c: remove unnecessary initialization of local variables
Kishon Vijay Abraham I [Thu, 19 Dec 2013 14:31:44 +0000 (20:01 +0530)]
phy: phy-core.c: remove unnecessary initialization of local variables

There were a few places where variables are initialized unncessarily.
Remove those initializations.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
[backport from upstream commit d18c960430ca341e5c12a023c805ff8fd10032a6]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ib80f6930d91c01a1e2c9f70ae4e61519eadd37d1

10 years agophy: phy-core: increment refcounting variables only on 'success'
Kishon Vijay Abraham I [Fri, 20 Dec 2013 05:06:49 +0000 (10:36 +0530)]
phy: phy-core: increment refcounting variables only on 'success'

Increment 'init_count' only if the 'init' callback succeeded and decrement
'init_count' only if the 'exit' callback succeded. Increment 'power_count'
only if 'power_on' callback succeded and if it failed disable the clocks using
phy_pm_runtime_put_sync(). Also decrement 'power_count' only if 'power_off'
callback succeded and if it failed do not disable the clocks.

Reported-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
[backport from upstream commit 637d378cea0b463c466a61a6564cdd541d689af5]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I482404787fa520568d365fbc39ab81d812689f20

10 years agophy: core: properly handle failure of pm_runtime_get functions
Felipe Balbi [Fri, 20 Dec 2013 21:00:48 +0000 (15:00 -0600)]
phy: core: properly handle failure of pm_runtime_get functions

In case pm_runtime_get*() fails, it still
increments pm usage counter, so we *must*
make sure to pm_runtime_put() even in those
cases.

This patch fixes that mistake the same way
usbcore treats those possible failures.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
[backport from upstream commit cedb7f89d1e1f631b7e5d920fe1ea7f742d07f79]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I8de0a4c76c5ad3de2d45996504f3f1aa716dc017

10 years agodrivers: phy: tweaks to phy_create()
Dan Carpenter [Fri, 6 Dec 2013 12:21:19 +0000 (17:51 +0530)]
drivers: phy: tweaks to phy_create()

If this was called with a NULL "dev" then it lead to a NULL dereference
when we called dev_WARN().  I have changed it to WARN_ON() so that we
get a stack dump and can fix the caller.

The rest of this patch is just cleanup like returning directly instead
of having do-nothing gotos.  Using descriptive labels instead of
GW-BASIC style "err0" and "err1".  I also flipped the order of
put_device() and ida_remove() so they are a mirror reflection of the
order they were allocated.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[backport from upstream commit 52797d293287f5a98bd686616527b102b077ac39]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I695ba238d040b484d1be1f10f7752a7dac164aab

10 years agodrivers: phy: Fix memory leak
Sachin Kamat [Fri, 6 Dec 2013 12:21:18 +0000 (17:51 +0530)]
drivers: phy: Fix memory leak

'phy' was not being freed upon error in one of the cases.
Adjust the 'goto's to fix this.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[backport from upstream commit c1b1731d2002b93857810aa5da856b43f46bb470]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I170f5d157e97077e50f059dbecdcb0877fd1a680

10 years agodrivers: phy: reset to mainline ff764963479a1b18721ab96e531404c50fefe8b1
Marek Szyprowski [Wed, 7 May 2014 14:45:53 +0000 (16:45 +0200)]
drivers: phy: reset to mainline ff764963479a1b18721ab96e531404c50fefe8b1

Change-Id: Ic98c8f884f28553dd50c91d441e605b4c0283aad
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
10 years agoARM: odroidx2: update defconfig to support Hauppauge WinTV-Aero-M
Changbing Xiong [Sun, 4 May 2014 09:46:16 +0000 (17:46 +0800)]
ARM: odroidx2: update defconfig to support Hauppauge WinTV-Aero-M

This modification will build drivers of WinTV-Aero-M into kernel,
So that odroidx2 target could support this kind of tuner.

Change-Id: I0788bda220e7151249d553274050a2b523a34e41
Signed-off-by: Changbing Xiong <cb.xiong@samsung.com>
10 years agoARM: dts: trats2: remove property from nodes of keys
Beomho Seo [Wed, 7 May 2014 05:30:18 +0000 (14:30 +0900)]
ARM: dts: trats2: remove property from nodes of keys

This patch removed interrupt-parent and interrupts propertoes from
nodes of the keys. Because they are not part of the device tree bindings.

Change-Id: I73af25dde2308769a453a43133cc65f33dd3aef0
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
10 years agommc: dw_mmc-exynos: add the MMC_CAP_ERASE capability
Jaehoon Chung [Wed, 7 May 2014 08:26:40 +0000 (17:26 +0900)]
mmc: dw_mmc-exynos: add the MMC_CAP_ERASE capability

To use the erase command, add the MMC_CAP_ERASE capability by default.

Change-Id: Ia9c600eafb08bebb7a60b3b3147a8c8baf303cd0
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
10 years agodrm/exynos: hdmi: fix dt broken issue
Inki Dae [Wed, 30 Apr 2014 09:20:51 +0000 (18:20 +0900)]
drm/exynos: hdmi: fix dt broken issue

This patch resolves the issue that the use of existing dtb is broken.

This patch gets existing dt nodes directly and checks if existing dtb
should be supported or not.
For this, it adds a soc_ver varable to hdmi_context structure to distinguish
SoC version because it should get dt node corresponding to SoC correctly.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agoRevert "drm/exynos: add mout_hdmi clock in hdmi driver to change parent"
Tomasz Stanislawski [Wed, 30 Apr 2014 08:26:31 +0000 (17:26 +0900)]
Revert "drm/exynos: add mout_hdmi clock in hdmi driver to change parent"

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: release unhandled page flip events at postclose.
Inki Dae [Tue, 1 Oct 2013 05:51:37 +0000 (14:51 +0900)]
drm/exynos: release unhandled page flip events at postclose.

This patch resolves a dead lock issue that could be incurred when
exynos_drm_crtc_dpms function was called.

The exynos_drm_crtc_dpms function waits for the completion of pended
page flip events. However, preclose callback - this releases all unhandled
page flip events - is called prior to the exynos_drm_crtc_dpms function call
when drm is closed. So at this time, this will make the exynos_drm_crtc_dpms
to wait infiniately for the completion of the page flip events.

This patch releases the unhandled page flip events at postclose instead
of preclose so that exynos_drm_crtc_dpms function can be waked up.

Changelog v2:
- fix a memory leak when drm is closed.
  . it has a memory leak when a requeste page flip is handled after
    drm_events_release() is called and before drm_fb_release()
    is called. At this time, a drm_pending_event will not be freed.
    So also this chage releases the drm_pending_event at postclose().
    And it calls drm_vblank_put() for pair if there is any unhandled page
    flip event.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
10 years agoARM: config: tizen: update defconfig
Inki Dae [Mon, 28 Apr 2014 12:32:15 +0000 (21:32 +0900)]
ARM: config: tizen: update defconfig

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: fimd: clear channel before enabling iommu
Akshu Agrawal [Mon, 28 Apr 2014 12:26:39 +0000 (21:26 +0900)]
drm/exynos: fimd: clear channel before enabling iommu

If any fimd channel was already active, initializing iommu will result
in a PAGE FAULT (e.e. u-boot could have turned on the display and
not disabled it before the kernel starts). This patch checks if any
channel is active before initializing iommu and disables it.

Changelog v2:
- consider SoC without SHADOWCON register

Signed-off-by: Akshu Agrawal <akshu.a@samsung.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agoARM: dts: universal: fix display dt bindings
Inki Dae [Mon, 28 Apr 2014 11:24:52 +0000 (20:24 +0900)]
ARM: dts: universal: fix display dt bindings

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agoARM: dts: trats: fix display dt bindings
Inki Dae [Mon, 28 Apr 2014 11:22:51 +0000 (20:22 +0900)]
ARM: dts: trats: fix display dt bindings

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agoARM: dts: trats2: fix display dt bindings
Inki Dae [Mon, 28 Apr 2014 08:43:07 +0000 (17:43 +0900)]
ARM: dts: trats2: fix display dt bindings

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: fimd: update dt bindings
Inki Dae [Mon, 28 Apr 2014 08:42:12 +0000 (17:42 +0900)]
drm/exynos: fimd: update dt bindings

This patch removes wrong dt bindings and adds new ones.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/panel: add S6E8AA0 driver
Andrzej Hajda [Wed, 2 Apr 2014 07:35:27 +0000 (16:35 +0900)]
drm/panel: add S6E8AA0 driver

The patch adds MIPI-DSI based S6E8AA0 AMOLED LCD panel driver.
Driver uses mipi_dsi bus to communicate with panel and exposes drm_panel
interface.

v2
- added bus error handling,
- set maxmimum DSI packet size on init,
- removed unsupported brightness drm_panel callbacks,
- minor improvements

v3
- switched to gpiod framework,
- minor fixes in error handling

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/panel: add ld9040 driver
Andrzej Hajda [Wed, 26 Mar 2014 08:17:18 +0000 (09:17 +0100)]
drm/panel: add ld9040 driver

The patch adds LD9040 parallel RGB panel driver with SPI control interface.
The driver uses drm_panel framework.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: remove MODULE_DEVICE_TABLE definitions
Inki Dae [Fri, 25 Apr 2014 09:43:08 +0000 (18:43 +0900)]
drm/exynos: remove MODULE_DEVICE_TABLE definitions

This patch removes MODULE_DEVICE_TABLE definition to of_device_id
of MIPI-DSI driver.

Eyxnos drm should be built as single module so these definitions
should be removed.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: add DSIM driver
Andrzej Hajda [Fri, 25 Apr 2014 09:41:36 +0000 (18:41 +0900)]
drm/exynos: add DSIM driver

The patch adds driver for Exynos DSI master (DSIM). It is a platform driver
which is registered as exynos_drm_display sub-driver of exynos_drm framework
and implements DRM encoder/connector pair.
It is also MIPI-DSI host driver and provides DSI bus for panels.
It interacts with its panel(s) using drm_panel framework.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm: add MIPI DSI encoder and connector types
Shobhit Kumar [Fri, 25 Apr 2014 09:38:44 +0000 (18:38 +0900)]
drm: add MIPI DSI encoder and connector types

Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Dave Airlie <airlied@gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/mipi_dsi: add flags to DSI messages
Andrzej Hajda [Fri, 28 Mar 2014 11:52:36 +0000 (12:52 +0100)]
drm/mipi_dsi: add flags to DSI messages

This patch adds flags field to mipi_dsi_msg structure and two flags:
- MIPI_DSI_MSG_REQ_ACK - request ACK from peripheral for given message,
- MIPI_DSI_MSG_USE_LPM - use Low Power Mode to transmit message.
The first flag is usually helpful during DSI diagnostic, the second
flag is required by some peripherals during configuration phase.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: disallow fbdev initialization if no device is connected
Andrzej Hajda [Fri, 28 Mar 2014 11:52:38 +0000 (12:52 +0100)]
drm/exynos: disallow fbdev initialization if no device is connected

This patch adds explicit check if there is a connector with
connected status before fbdev initialization. It prevents creation
of default fbdev 1024x768 which is unusable on panels with bigger resolutions.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Replace DRM_LOG_KMS() by DRM_DEBUG_KMS()
Lespiau, Damien [Mon, 24 Mar 2014 15:53:10 +0000 (15:53 +0000)]
drm/exynos: Replace DRM_LOG_KMS() by DRM_DEBUG_KMS()

There are only a few users of the DRM_LOG_KMS() macro. We can simplify
the DRM code a bit by replacing them by DRM_DEBUG_KMS().

Cc: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: fimd: remove unused variable
Andrzej Hajda [Thu, 20 Mar 2014 08:09:00 +0000 (17:09 +0900)]
drm/exynos: fimd: remove unused variable

The patch removes unused vidcon0 field from fimd_context structure.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: restore parallel output interface support
Andrzej Hajda [Fri, 25 Apr 2014 07:47:37 +0000 (16:47 +0900)]
drm/exynos: restore parallel output interface support

The patch adds parallel output interface to FIMD device driver.
It also restores support for panels initialized by boot loader,
but without proper kernel driver.
Driver uses video interface bindings to find connected panel.
It uses drm_panel interface to interact with the panel.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: select DRM_PANEL
Inki Dae [Fri, 25 Apr 2014 09:26:26 +0000 (18:26 +0900)]
drm/exynos: select DRM_PANEL

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/panel: fix build error
Inki Dae [Fri, 25 Apr 2014 09:26:10 +0000 (18:26 +0900)]
drm/panel: fix build error

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/mipi_dsi: create dsi devices only for nodes with reg property
Andrzej Hajda [Fri, 28 Mar 2014 11:52:37 +0000 (12:52 +0100)]
drm/mipi_dsi: create dsi devices only for nodes with reg property

MIPI DSI host node can contain child nodes which are not DSI devices.
Checking for existence of reg property can be used to distinguish such nodes.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm: Add MIPI DSI bus support
Andrzej Hajda [Wed, 4 Dec 2013 15:35:12 +0000 (16:35 +0100)]
drm: Add MIPI DSI bus support

MIPI DSI bus allows to model DSI hosts and DSI peripherals using the
Linux driver model. DSI hosts are registered by the DSI host drivers.
During registration DSI peripherals will be created from the children
of the DSI host's device tree node. Support for registration from
board-setup code will be added later when needed.

DSI hosts expose operations which can be used by DSI peripheral drivers
to access associated devices.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/panel: add support for LG LD070WX3-SL01 panel
Alexandre Courbot [Tue, 21 Jan 2014 09:57:10 +0000 (18:57 +0900)]
drm/panel: add support for LG LD070WX3-SL01 panel

This panel is used by Tegra Note 7 and supported by the simple-panel
driver.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/panel: add support for LG LH500WX1-SD03 panel
Alexandre Courbot [Tue, 21 Jan 2014 09:57:09 +0000 (18:57 +0900)]
drm/panel: add support for LG LH500WX1-SD03 panel

This panel is used by the NVIDIA SHIELD and supported by the
simple-panel driver.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/panel: simple: Allow DSI panels to provide mode flags
Thierry Reding [Fri, 14 Mar 2014 10:24:57 +0000 (11:24 +0100)]
drm/panel: simple: Allow DSI panels to provide mode flags

In order to differentiate between the different video modes (burst vs.
non-burst, sync pulses vs. sync events) supported by peripherals, pass
the flags that specify this mode in the panel description to the DSI
peripheral device when probed.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Inki Ddae <inki.dae@samsung.com>
10 years agodrm/panel: simple: Allow GPIO accesses to sleep
Thierry Reding [Fri, 14 Mar 2014 11:03:47 +0000 (12:03 +0100)]
drm/panel: simple: Allow GPIO accesses to sleep

The enable GPIO for panels may be provided by GPIO expanders on slow
busses (such as I2C), and therefore toggling the GPIO may sleep. Since
these accesses don't happen in interrupt context, use the *_cansleep()
variants of the GPIO API.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/panel: remove redundant regulator_disable()
Alexandre Courbot [Sat, 1 Mar 2014 05:00:59 +0000 (14:00 +0900)]
drm/panel: remove redundant regulator_disable()

regulator_disable() is already performed by panel_simple_disable(),
which is called by panel_simple_remove().

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/panel: use gpiod interface for enable GPIO
Alexandre Courbot [Sat, 1 Mar 2014 05:00:58 +0000 (14:00 +0900)]
drm/panel: use gpiod interface for enable GPIO

Use the new GPIO descriptor interface to handle the panel's enable GPIO.
This considerably simplifies the code.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
[treding@nvidia.com: rework to improve readability]
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/panel: Add LG 12.9" LCD panel
Thierry Reding [Fri, 15 Nov 2013 14:59:32 +0000 (15:59 +0100)]
drm/panel: Add LG 12.9" LCD panel

The LP129QE LCD has an LED backlight and a display resolution of
2560x1700 pixels.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/panel: update EDID BLOB in panel_simple_get_modes()
Stephen Warren [Thu, 9 Jan 2014 18:37:34 +0000 (11:37 -0700)]
drm/panel: update EDID BLOB in panel_simple_get_modes()

This stashes away the EDID data so that the sysfs per-connector file
"edid" can display it. Without this change, the "edid" file is always
empty.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/panel: Add support for Chunghwa CLAA101WA01A panel
Stephen Warren [Tue, 7 Jan 2014 23:46:26 +0000 (16:46 -0700)]
drm/panel: Add support for Chunghwa CLAA101WA01A panel

The Chunghwa CLAA101WA01A is a 10.1" 1366x768 panel, which can be
supported by the simple panel driver.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/panel: Add support for Samsung LTN101NT05 panel
Marc Dietrich [Sat, 21 Dec 2013 20:38:12 +0000 (21:38 +0100)]
drm/panel: Add support for Samsung LTN101NT05 panel

The Samsung LNT101NT05 10.1" WXVGA panel can be supported by the simple panel
driver.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/panel: Add support for Panasonic VVX10F004B0
Thierry Reding [Fri, 22 Nov 2013 18:27:11 +0000 (19:27 +0100)]
drm/panel: Add support for Panasonic VVX10F004B0

The Panasonic VVX10F004B0 is a 10.1" WUXGA TFT LCD panel connected using
four DSI lanes.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/panel: Add simple panel support
Thierry Reding [Fri, 25 Apr 2014 07:53:17 +0000 (16:53 +0900)]
drm/panel: Add simple panel support

Add a driver for simple panels. Such panels can have a regulator that
provides the supply voltage and a separate GPIO to enable the panel.
Optionally the panels can have a backlight associated with them so it
can be enabled or disabled according to the panel's power management
mode.

Support is added for two panels: An AU Optronics 10.1" WSVGA and a
Chunghwa Picture Tubes 10.1" WXGA panel.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm: Add panel support
Thierry Reding [Fri, 25 Apr 2014 07:51:31 +0000 (16:51 +0900)]
drm: Add panel support

Add a very simple framework to register and lookup panels. Panel drivers
can initialize a DRM panel and register it with the framework, allowing
them to be retrieved and used by display drivers. Currently only support
for DPMS and obtaining panel modes is provided. However it should be
sufficient to enable a large number of panels. The framework should also
be easily extensible to support more sophisticated kinds of panels such
as DSI.

The framework hasn't been tied into the DRM core, even though it should
be easily possible to do so if that's what we want. In the current
implementation, display drivers can simple make use of it to retrieve a
panel, obtain its modes and control its DPMS mode.

Note that this is currently only tested on systems that boot from a
device tree. No glue code has been written yet for systems that use
platform data, but it should be easy to add.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: correct timing porch conversion
Andrzej Hajda [Fri, 25 Apr 2014 07:43:55 +0000 (16:43 +0900)]
drm/exynos: correct timing porch conversion

The patch corrects porch calculation. It should
be calculated as a difference between adjacent
respective fields of drm_display_mode.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: init kms poll after creation of connectors
Andrzej Hajda [Mon, 17 Mar 2014 10:27:18 +0000 (11:27 +0100)]
drm/exynos: init kms poll after creation of connectors

KMS poll init helper should be run when connectors are created,
otherwise it will not schedule connection detector.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: delay fbdev initialization until an output is connected
Andrzej Hajda [Fri, 25 Apr 2014 07:41:15 +0000 (16:41 +0900)]
drm/exynos: delay fbdev initialization until an output is connected

In case fbdev is initialized before any output is connected,
fb resolution defaults to 1024x768. After that any output with
bigger resolution is ignored and fbdev is not displayed.
The patch postpones fbdev initialization to avoid such situation.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: call drm_put_dev directly from ->remove
Daniel Vetter [Wed, 11 Dec 2013 10:34:23 +0000 (11:34 +0100)]
drm/exynos: call drm_put_dev directly from ->remove

I didn't find any user of the driver data yet, so store the
drm_device pointer in there.

Cc: Inki Dae <inki.dae@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/exynos: fix unnecessary resource cleanup
Inki Dae [Fri, 28 Feb 2014 09:37:02 +0000 (18:37 +0900)]
drm/exynos: fix unnecessary resource cleanup

This patch removes unnecessary drm_mode_config_cleanup call.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
10 years agodrm/exynos: hdmi: use i2c_adapter instead of i2c_client
Inki Dae [Fri, 25 Apr 2014 07:21:03 +0000 (16:21 +0900)]
drm/exynos: hdmi: use i2c_adapter instead of i2c_client

This patch changes i2c_client for ddc to i2c_adapter
because ddc needs only i2c_adapter.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: fimd: remove unnecessary display relevant codes
Inki Dae [Fri, 25 Apr 2014 07:15:55 +0000 (16:15 +0900)]
drm/exynos: fimd: remove unnecessary display relevant codes

This patch removes unnecessary display relevent codes from fimd driver
because display will be registed by each encoder/connector driver.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: hdmi: consider APB PHY
Inki Dae [Fri, 25 Apr 2014 07:14:15 +0000 (16:14 +0900)]
drm/exynos: hdmi: consider APB PHY

This patch returns error in case of using APB PHY.

Exynos5420 SoC and maybe later would use APB PHY instead of
I2C PHY so such case should be considered.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Remove the exynos_drm_connector shim
Sean Paul [Mon, 24 Feb 2014 10:25:42 +0000 (19:25 +0900)]
drm/exynos: Remove the exynos_drm_connector shim

This path removes the exynos_drm_connector code since it was just
passing hooks through display_ops. The individual device drivers are now
responsible for implementing drm_connector directly.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Implement drm_connector directly in vidi driver
Sean Paul [Fri, 25 Apr 2014 07:10:58 +0000 (16:10 +0900)]
drm/exynos: Implement drm_connector directly in vidi driver

This patch implements drm_connector directly in the vidi
driver, this will allow us to move away from the exynos_drm_connector
layer.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Implement drm_connector in hdmi directly
Sean Paul [Fri, 25 Apr 2014 07:08:58 +0000 (16:08 +0900)]
drm/exynos: Implement drm_connector in hdmi directly

This patch implements drm_connector in the hdmi driver directly, instead
of using exynos_drm_connector.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Add create_connector callback
Sean Paul [Mon, 24 Feb 2014 10:15:38 +0000 (19:15 +0900)]
drm/exynos: Add create_connector callback

This creates a new display hook called create_connector. The purpose is
to allow the display driver to create its own drm_connector instead of
using the exynos_drm_connector. This moves things closer to completely
removing the exynos_drm_connector abstraction.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Consolidate suspend/resume in drm_drv
Sean Paul [Fri, 25 Apr 2014 07:06:10 +0000 (16:06 +0900)]
drm/exynos: Consolidate suspend/resume in drm_drv

This patch removes all of the suspend/resume logic from the individual
drivers and consolidates it in drm_drv. This consolidation reduces the
number of functions which enable/disable the hardware to just one -- the
dpms callback. This ensures that we always power up/down in a consistent
manner.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Clean up FIMD power on/off routines
Sean Paul [Fri, 25 Apr 2014 06:55:07 +0000 (15:55 +0900)]
drm/exynos: Clean up FIMD power on/off routines

This patch separates the fimd_activate function into poweron/poweroff
functions to be more consistent with the other drivers in exynos drm. It
also properly cleans up after failures in poweron. The functions have
also been shuffled around such that they are all in the same
spot in the file and poweron/poweroff can be called from the dpms function.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Remove unused/useless fimd_context members
Sean Paul [Thu, 30 Jan 2014 21:19:21 +0000 (16:19 -0500)]
drm/exynos: Remove unused/useless fimd_context members

This patch removes a few fimd_context members which are either entirely
unused or unneeded.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Use mode_set to configure fimd
Sean Paul [Fri, 25 Apr 2014 06:25:20 +0000 (15:25 +0900)]
drm/exynos: Use mode_set to configure fimd

This patch uses the mode passed into mode_set to configure fimd instead
of directly using the panel from context. This will allow us to move
the exynos_drm_display implementation out of fimd, where it doesn't
belong.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Implement mode_fixup manager operation
Sean Paul [Thu, 30 Jan 2014 21:19:19 +0000 (16:19 -0500)]
drm/exynos: Implement mode_fixup manager operation

This patch adds a new manager callback for mode_fixup and pipes it
through exynos_drm_crtc. This will allow the manager drivers to
alter the mode during modeset.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Add mode_set manager operation
Sean Paul [Fri, 25 Apr 2014 06:19:48 +0000 (15:19 +0900)]
drm/exynos: Add mode_set manager operation

This patch adds a mode_set callback to the manager operations which
sets the crtc's current mode to the manager driver. This will allow the
fimd  driver to set its mode using values from drm, instead of the dt.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Disable unused crtc planes from crtc
Sean Paul [Thu, 30 Jan 2014 21:19:17 +0000 (16:19 -0500)]
drm/exynos: Disable unused crtc planes from crtc

This patch moves the code which disables unused crtc planes from the
encoder to the crtc. Since there is a 1:1 encoder/crtc mapping in
exynos, the only valid crtc change the pre-existing code could catch is
disconnecting an active crtc from the encoder. Thus it is functionally
equivalent to just disable all planes attached to a crtc when the crtc
is disabled.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Use drm_mode_copy to copy modes
Sean Paul [Thu, 30 Jan 2014 21:19:16 +0000 (16:19 -0500)]
drm/exynos: Use drm_mode_copy to copy modes

This patch changes the manual copying of mode to adjusted_mode in
mode_fixup to use drm_mode_copy instead of handling things manually.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Remove exynos_drm_hdmi shim
Sean Paul [Fri, 25 Apr 2014 06:15:50 +0000 (15:15 +0900)]
drm/exynos: Remove exynos_drm_hdmi shim

This patch trims exynos_drm_hdmi out of the driver. The reason it
existed in the first place was to make up for the mixture of
display/overlay/manager ops being spread across hdmi and mixer. With
that code now rationalized, mixer and hdmi map directly to
exynos_drm_crtc and exynos_drm_encoder, respectively. Since there is a
1:1 mapping, we no longer need this layer.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: hdmi: remove the i2c drivers and use
Daniel Kurtz [Fri, 25 Apr 2014 05:59:42 +0000 (14:59 +0900)]
drm/exynos: hdmi: remove the i2c drivers and use

The i2c client was previously being passed into the hdmi driver via a
dedicated i2c driver, and then a global variable. This patch removes all
of that and just uses the device tree to get the i2c_client. This patch
also properly references the client so we don't lose it before we're
done with it.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
[seanpaul changed to phandle lookup instead of using of node name]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Split manager/display/subdrv
Sean Paul [Fri, 25 Apr 2014 05:49:16 +0000 (14:49 +0900)]
drm/exynos: Split manager/display/subdrv

This patch splits display and manager from subdrv. The result is that
crtc functions can directly call into manager callbacks and encoder
functions can directly call into display callbacks. This will allow
us to remove the exynos_drm_hdmi shim and support mixer/hdmi & fimd/dp
with common code.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Use unsigned long for possible_crtcs
Sean Paul [Thu, 30 Jan 2014 21:19:11 +0000 (16:19 -0500)]
drm/exynos: Use unsigned long for possible_crtcs

Change all instances of possible_crtcs in the exynos drm driver to be
unsigned long. This matches the type used in the drm layer.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Don't keep dpms state in encoder
Sean Paul [Thu, 30 Jan 2014 21:19:10 +0000 (16:19 -0500)]
drm/exynos: Don't keep dpms state in encoder

This patch removes the dpms state tracking in encoder. This
state is at best confusing and at worst incorrect since the display
drivers can turn on and off without propagating the value.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Rename display_op power_on to dpms
Sean Paul [Thu, 24 Apr 2014 12:25:39 +0000 (21:25 +0900)]
drm/exynos: Rename display_op power_on to dpms

This patch renames the display_op power_on to dpms to accurately reflect
what the function does.

The side-effect of this patch is that the new hdmi dpms callback is now
invoked twice in the dpms path. This is safe and will be dealt with when
the exynos_drm shim goes away.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>