platform/kernel/linux-3.10.git
9 years ago[media] exynos4-is: Use the generic MIPI CSIS PHY driver
Sylwester Nawrocki [Thu, 4 Apr 2013 12:15:04 +0000 (14:15 +0200)]
[media] exynos4-is: Use the generic MIPI CSIS PHY driver

Use the generic PHY API instead of the platform callback to control
the MIPI CSIS DPHY. The 'phy_label' field is added to the platform
data structure to allow PHY lookup on non-dt platforms

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agovideo: exynos_mipi_dsim: Use the generic PHY driver
Sylwester Nawrocki [Fri, 28 Jun 2013 09:21:25 +0000 (11:21 +0200)]
video: exynos_mipi_dsim: Use the generic PHY driver

Use the generic PHY API instead of the platform callback to control
the MIPI DSIM DPHY. The 'phy_label' field is added to the platform
data structure to allow PHY lookup on non-dt platforms.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Donghwa Lee <dh09.lee@samsung.com>
9 years agophy: Add driver for Exynos MIPI CSIS/DSIM DPHYs
Sylwester Nawrocki [Thu, 13 Jun 2013 09:16:30 +0000 (11:16 +0200)]
phy: Add driver for Exynos MIPI CSIS/DSIM DPHYs

Add a PHY provider driver for the Samsung S5P/Exynos SoC MIPI CSI-2
receiver and MIPI DSI transmitter DPHYs.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Felipe Balbi <balbi@ti.com>
---
Changes since v3:
 - replaced spin_(un)lock_irq_{save,restore} with spin_{lock,unlock}.
 - DT binding file renamed to samsung-phy.txt, so it can be used for
   other PHYs as well,
 - removed <linux/delay.h> inclusion,
 - added missing spin_lock_init().

9 years agodrivers: phy: add generic PHY framework
Kishon Vijay Abraham I [Wed, 26 Jun 2013 09:57:45 +0000 (15:27 +0530)]
drivers: phy: add generic PHY framework

The PHY framework provides a set of APIs for the PHY drivers to
create/destroy a PHY and APIs for the PHY users to obtain a reference to the
PHY with or without using phandle. For dt-boot, the PHY drivers should
also register *PHY provider* with the framework.

PHY drivers should create the PHY by passing id and ops like init, exit,
power_on and power_off. This framework is also pm runtime enabled.

The documentation for the generic PHY framework is added in
Documentation/phy.txt and the documentation for dt binding can be found at
Documentation/devicetree/bindings/phy/phy-bindings.txt

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
9 years agoARM: dts: Add MIPI PHY node to exynos4.dtsi
Sylwester Nawrocki [Thu, 4 Apr 2013 11:23:27 +0000 (13:23 +0200)]
ARM: dts: Add MIPI PHY node to exynos4.dtsi

Add PHY provider node for the MIPI CSIS and MIPI DSIM PHYs.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
9 years agoexynos4-is: Add the FIMC-IS ISP capture DMA driver
Sylwester Nawrocki [Fri, 31 May 2013 11:08:24 +0000 (13:08 +0200)]
exynos4-is: Add the FIMC-IS ISP capture DMA driver

Add a video capture node for the FIMC-IS ISP IP block. The Exynos4x12
FIMC-IS ISP IP block has 2 DMA interfaces that allow to capture raw
Bayer and YUV data to memory.  Currently only the DMA2 output is and
raw Bayer data capture is supported.

exynos4-is: Fix ISP DMA capture start/stop sequence

Ensure we wait until FIMC-IS executes a command, otherwise a division by
zero exception is thrown in the interrupt handler due to buf_count being
set to 0.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com
9 years ago[media] exynos4-is: Correct colorspace handling at FIMC-LITE
Sylwester Nawrocki [Thu, 20 Jun 2013 13:49:09 +0000 (10:49 -0300)]
[media] exynos4-is: Correct colorspace handling at FIMC-LITE

Ensure the colorspace is properly adjusted by the driver for YUV
and Bayer image formats. The subdev try_fmt helper is simplified.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Set valid initial format on FIMC.n subdevs
Sylwester Nawrocki [Tue, 18 Jun 2013 17:56:11 +0000 (14:56 -0300)]
[media] exynos4-is: Set valid initial format on FIMC.n subdevs

Ensure there are valid initial image formats on the FIMC.n subdev pads.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Set valid initial format on FIMC-IS-ISP subdev pads
Sylwester Nawrocki [Tue, 18 Jun 2013 17:50:50 +0000 (14:50 -0300)]
[media] exynos4-is: Set valid initial format on FIMC-IS-ISP subdev pads

Ensure there is a valid initial resolution and pixel format set
at the FIMC-IS-ISP subdev pads.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Fix format propagation on FIMC-IS-ISP subdev
Sylwester Nawrocki [Tue, 18 Jun 2013 16:42:30 +0000 (13:42 -0300)]
[media] exynos4-is: Fix format propagation on FIMC-IS-ISP subdev

Ensure TRY formats are propagated from the sink pad to the source pads
of the FIMC-IS-ISP subdev and the TRY and ACTIVE formats are separated.

[mchehab@redhat.com: Whitespace cleanup]
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Set valid initial format at FIMC-LITE
Sylwester Nawrocki [Tue, 18 Jun 2013 11:00:42 +0000 (08:00 -0300)]
[media] exynos4-is: Set valid initial format at FIMC-LITE

Ensure the image resolution and crop rectangle on the FIMC-LITE.n
subdevs and fimc-lite.n.capture video nodes is properly configured
upon the driver's initialization.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Fix format propagation on FIMC-LITE.n subdevs
Sylwester Nawrocki [Thu, 20 Jun 2013 13:57:47 +0000 (10:57 -0300)]
[media] exynos4-is: Fix format propagation on FIMC-LITE.n subdevs

FIMC-LITE subdevs have one sink pad and two source pads on which the image
formats are always same. This patch implements missing format propagation
from the sink pad to the source pads, to allow user space to negotiate TRY
format on whole media pipeline involving FIMC-LITE.n subdevs. The subdev
try_fmt helper is simplified.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Change fimc-is firmware file names
Sylwester Nawrocki [Fri, 31 May 2013 13:36:19 +0000 (10:36 -0300)]
[media] exynos4-is: Change fimc-is firmware file names

This patch changes the firmware file names of the FIMC-IS subsystem.
It is needed since there are different firmwares used across various
SoC series, e.g. Exynos4 and Exynos5.
Also the sensor specific "setfile" name is changed, to account for
it depends on an image sensor and is also specific to the FIMC-IS
and the SoC.
This is a change for a driver merged in 3.10.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Add support for Exynos5250 MIPI-CSIS
Sylwester Nawrocki [Fri, 31 May 2013 13:38:23 +0000 (10:38 -0300)]
[media] exynos4-is: Add support for Exynos5250 MIPI-CSIS

Add compatible property for the Exynos5250 and enable the frame start
and frame end interrupts. These interrupts are needed for the Exynos5
FIMC-IS firmware. The driver enables those interrupt only where available,
depending on the 'compatible' property. This can be optimized further,
by exposing some API at the subdev driver, so the host driver can enable
extra interrupts only for the image processing chains involving FIMC-IS.

Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Add Exynos5250 SoC support to fimc-lite driver
Sylwester Nawrocki [Fri, 14 Jun 2013 15:38:15 +0000 (12:38 -0300)]
[media] exynos4-is: Add Exynos5250 SoC support to fimc-lite driver

This patch adds support for the Exynos5250 SoC variant of the FIMC-LITE
IP. A 'compatible' string is added for Exynos5250 compatible devices
and the capture DMA handling is reworked to use the FLITE_REG_CIFCNTSEQ
register, masking output DMA buffer address slots. The frame interrupt
is enabled so there are now 2 interrupts per frame. This likely can be
optimized in future by using any status registers that allow to figure
out what the last and the currently written frame buffer is. It would
also be more reliable in cases where there are high interrupt service
latencies.

Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Drop drvdata handling in fimc-lite for non-dt platforms
Sylwester Nawrocki [Tue, 11 Jun 2013 13:44:38 +0000 (10:44 -0300)]
[media] exynos4-is: Drop drvdata handling in fimc-lite for non-dt platforms

The FIMC-LITE IP block is available only on platforms instantiated
from device tree.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agotizen_defconfig update
Lukasz Czerwinski [Tue, 28 May 2013 07:03:43 +0000 (09:03 +0200)]
tizen_defconfig update

This patch enables:
 - NFC subsystem
 - NCI protocol
 - NFC HCI implementation
 - SHDLC link layer for HCI NFC drivers
 - NFC PN544 driver support
 - GP2AP002A00F light/priximity sensor
 - LSM330DLC sensor IIO driver
 - buffer support within IIO

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
9 years agoARM: dts: Add nfc node for PQ board
Lukasz Czerwinski [Thu, 13 Jun 2013 11:23:48 +0000 (13:23 +0200)]
ARM: dts: Add nfc node for PQ board

This patch adds nxp pn544-hci nfc controller node.

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
9 years agonfc: pn544-i2c: Fix pn544_hci_i2c_write() resend cmd
Lukasz Czerwinski [Thu, 13 Jun 2013 13:42:22 +0000 (15:42 +0200)]
nfc: pn544-i2c: Fix pn544_hci_i2c_write() resend cmd

Driver should always try resend cmd after failed i2c_master_send.

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
9 years agonfc: pn544-i2c: Remove unused gpio_irq
Lukasz Czerwinski [Thu, 13 Jun 2013 13:06:33 +0000 (15:06 +0200)]
nfc: pn544-i2c: Remove unused gpio_irq

This patch removes unused gpio irq pin from driver.

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
9 years agonfc: pn544-i2c: Add DT bindings
Lukasz Czerwinski [Tue, 4 Jun 2013 11:24:43 +0000 (13:24 +0200)]
nfc: pn544-i2c: Add DT bindings

This patch adds device tree support for nxp pn544-i2c nfc controller.

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
9 years agoARM: dts: Add gp2ap002a00f device node for PQ/M0 board
Jacek Anaszewski [Fri, 14 Jun 2013 15:23:52 +0000 (17:23 +0200)]
ARM: dts: Add gp2ap002a00f device node for PQ/M0 board

This patch adds gp2ap002a00f device node for PQ/M0 board.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
9 years agoiio: Add driver for the gp2ap002a00f light/proximity sensor
Jacek Anaszewski [Mon, 17 Jun 2013 11:21:21 +0000 (13:21 +0200)]
iio: Add driver for the gp2ap002a00f light/proximity sensor

Add a new driver for the ambient light/proximity sensor
device. The driver exposes three channels: light_clear
light_ir and proximity. It also supports high and low
ambient light threshold event and proximity detection
event.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
9 years agoiio: Add driver for the LPS331AP barometer sensor
Jacek Anaszewski [Fri, 21 Jun 2013 08:52:31 +0000 (10:52 +0200)]
iio: Add driver for the LPS331AP barometer sensor

Add new driver for the barometer device. The driver is
compliant with IIO framework, and exposes two channels
for reading the pressure and the temperature. The output
data can be read either in 'one shot' mode or by exploiting
IIO events.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
9 years agoARM: dts: enable sd-card
Jaehoon Chung [Thu, 20 Jun 2013 04:39:35 +0000 (13:39 +0900)]
ARM: dts: enable sd-card

In oreder to use the SD-card, enabled the sd-card into devicetree.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 years agoARM: dts: exynos-slp_pq.dts: Add lsm330dlc node for slp_pq
Lukasz Czerwinski [Mon, 17 Jun 2013 07:14:23 +0000 (09:14 +0200)]
ARM: dts: exynos-slp_pq.dts: Add lsm330dlc node for slp_pq

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
9 years agoARM: dts: exnos4412-redwood.dts: Add lsm330dlc node for redwood
Lukasz Czerwinski [Mon, 17 Jun 2013 07:09:22 +0000 (09:09 +0200)]
ARM: dts: exnos4412-redwood.dts: Add lsm330dlc node for redwood

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
9 years agoiio: accel Add event subsystem to st_accel driver
Lukasz Czerwinski [Fri, 24 May 2013 12:17:48 +0000 (14:17 +0200)]
iio: accel Add event subsystem to st_accel driver

This patch adds event support for iio st_accel driver.

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
9 years agoiio: st_sensors Add threshold events support
Lukasz Czerwinski [Thu, 23 May 2013 14:02:45 +0000 (16:02 +0200)]
iio: st_sensors Add threshold events support

This patch adds threshold events support for the ST common
library.

9 years agoiio: st_sensors: Add handling of multiple interrupts
Lukasz Czerwinski [Thu, 23 May 2013 11:35:28 +0000 (13:35 +0200)]
iio: st_sensors: Add handling of multiple interrupts

This patch adds handling of multiple interrupts for st_sensors.
Each mapped interrupt can be declared from DT.

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
9 years agoiio: st_gyro: Add DT bindings
Lukasz Czerwinski [Mon, 17 Jun 2013 13:49:49 +0000 (15:49 +0200)]
iio: st_gyro: Add DT bindings

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
9 years agoiio: st_accel: Add DT bindings
Lukasz Czerwinski [Mon, 17 Jun 2013 13:43:30 +0000 (15:43 +0200)]
iio: st_accel: Add DT bindings

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
9 years agoARM: dts: Add camera device nodes for M0 rev 1.1 board
Sylwester Nawrocki [Fri, 14 Jun 2013 16:43:38 +0000 (18:43 +0200)]
ARM: dts: Add camera device nodes for M0 rev 1.1 board

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
9 years agoclk: exynos4: Add CLK_GET_RATE_NOCACHE flag for the Exynos4x12 ISP clocks
Sylwester Nawrocki [Fri, 14 Jun 2013 15:16:18 +0000 (17:16 +0200)]
clk: exynos4: Add CLK_GET_RATE_NOCACHE flag for the Exynos4x12 ISP clocks

The ISP clock registers belong to the ISP power domain and may change
their values if this power domain is switched off/on. Add
CLK_GET_RATE_NOCACHE flags to ensure clk_set_rate() and clk_get_rate()
work properly and do not use invalid cached values.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
9 years agoclk: Prevent potential null pointer dereference in clk_set_rate()
Sylwester Nawrocki [Fri, 14 Jun 2013 15:10:49 +0000 (17:10 +0200)]
clk: Prevent potential null pointer dereference in clk_set_rate()

Ensure the passed clk pointer is not dereferenced if it is invalid.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
9 years agoregulator: max77693: Do code clean.
Jonghwa Lee [Mon, 10 Jun 2013 15:23:40 +0000 (00:23 +0900)]
regulator: max77693: Do code clean.

This patch removes unnecessary dev_info, and changes some of them to dev_dbg.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoregulator: max77693: Pass of_node when regulator is registered.
Jonghwa Lee [Mon, 10 Jun 2013 15:13:39 +0000 (00:13 +0900)]
regulator: max77693: Pass of_node when regulator is registered.

Since of_get_regulator() retrieve regulator's list with of_node pointer,
all regulator is required to hold their device tree node if regulator driver
uses device tree.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoregulator: max77693: Modify platform deivce id according to mfd driver.
Jonghwa Lee [Mon, 10 Jun 2013 15:12:17 +0000 (00:12 +0900)]
regulator: max77693: Modify platform deivce id according to mfd driver.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoARM: configs: Update tizen_defconfig
Sylwester Nawrocki [Mon, 10 Jun 2013 17:07:43 +0000 (19:07 +0200)]
ARM: configs: Update tizen_defconfig

This patch updates tizen_defconfig to:

 - enable suspend/resume.
 - enable support for IIO devices,
 - enable LSM330DLC accelerometer and gyroscope sensor drivers,
 - enable legacy AK8975 magnetometer and LPS331 sensor drivers,
 - enable AK8975 sensor IIO driver, MAX77693 charger, FIMC-IS,
 - add extra gpios for wm8994 GPIO driver (this allows to register
   successfully the wm8994 GPIO chip),
 - enable MALI UMP.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agoARM: dts: usbphy: add SYSREG reg info for exynos4x12
Chanho Park [Mon, 10 Jun 2013 04:58:29 +0000 (13:58 +0900)]
ARM: dts: usbphy: add SYSREG reg info for exynos4x12

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agoARM: dts: enable g2d device for redwood
Chanho Park [Fri, 31 May 2013 11:39:25 +0000 (20:39 +0900)]
ARM: dts: enable g2d device for redwood

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agoARM: dts: Add g2d clock properties
Chanho Park [Fri, 31 May 2013 11:39:07 +0000 (20:39 +0900)]
ARM: dts: Add g2d clock properties

This patch adds g2d's clock properties.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agodrm/exynos: add g2d compatible node for exynos4212
Chanho Park [Fri, 31 May 2013 11:37:02 +0000 (20:37 +0900)]
drm/exynos: add g2d compatible node for exynos4212

This patch adds a g2d node compatible with exynos4212.

Signe-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agodrm/exynos: add dt-binding documentation for rotator
Chanho Park [Fri, 31 May 2013 10:47:57 +0000 (19:47 +0900)]
drm/exynos: add dt-binding documentation for rotator

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agoARM: dts: enable rotator node for redwood
Chanho Park [Fri, 31 May 2013 09:59:03 +0000 (18:59 +0900)]
ARM: dts: enable rotator node for redwood

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agoARM: dts: add a rotator node for exynos4
Chanho Park [Fri, 31 May 2013 09:56:21 +0000 (18:56 +0900)]
ARM: dts: add a rotator node for exynos4

This patch adds a device node of rotator for exynos4 platform. It has proper
register and clock information. It also has limit table to get restrictions of
the image size.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agodrm/exynos: add device tree support for rotator
Chanho Park [Fri, 31 May 2013 09:38:59 +0000 (18:38 +0900)]
drm/exynos: add device tree support for rotator

The exynos4 platform is only dt-based since 3.10, we should convert driver data
and ids to dt-based parsing methods. The rotator driver has a limit table to get
size limit. The minimum size of RGB888 format is 8 x 8 and maximum size is 8K x
8K. The other format, YCbCr420 2-Plane has 32 x 32 min size and 32K x 32K max
size. Each format should be multiple of 'align' value.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agogpu: mali: Remove Exynos PM domain checks in debug code
Sylwester Nawrocki [Mon, 27 May 2013 16:06:38 +0000 (18:06 +0200)]
gpu: mali: Remove Exynos PM domain checks in debug code

This fixes following compilation warning when Mali debug options are enabled:

  CC      drivers/gpu/arm/mali400/mali/linux/mali_osk_low_level_mem.o
drivers/gpu/arm/mali400/mali/linux/mali_osk_low_level_mem.c: In function ‘_mali_osk_mem_iowrite32_relaxed’:
drivers/gpu/arm/mali400/mali/linux/mali_osk_low_level_mem.c:436: error: ‘EXYNOS4_G3D_CONFIGURATION’ undeclared (first use in this function)
drivers/gpu/arm/mali400/mali/linux/mali_osk_low_level_mem.c:436: error: (Each undeclared identifier is reported only once
drivers/gpu/arm/mali400/mali/linux/mali_osk_low_level_mem.c:436: error: for each function it appears in.)
drivers/gpu/arm/mali400/mali/linux/mali_osk_low_level_mem.c: In function ‘_mali_osk_mem_ioread32’:
drivers/gpu/arm/mali400/mali/linux/mali_osk_low_level_mem.c:453: error: ‘EXYNOS4_G3D_CONFIGURATION’ undeclared (first use in this function)
drivers/gpu/arm/mali400/mali/linux/mali_osk_low_level_mem.c: In function ‘_mali_osk_mem_iowrite32’:
drivers/gpu/arm/mali400/mali/linux/mali_osk_low_level_mem.c:469: error: ‘EXYNOS4_G3D_CONFIGURATION’ undeclared (first use in this function)

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
9 years agoARM: dts: Correct aclk400_mcuisp clock index at fimc-is node
Sylwester Nawrocki [Mon, 27 May 2013 13:55:54 +0000 (15:55 +0200)]
ARM: dts: Correct aclk400_mcuisp clock index at fimc-is node

Adjust to the upstream clocks definition differences.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
9 years agoARM: dts: exynos4412-slp_pq: Add aliases for bit-banged I2C buses
Tomasz Figa [Tue, 21 May 2013 16:28:10 +0000 (18:28 +0200)]
ARM: dts: exynos4412-slp_pq: Add aliases for bit-banged I2C buses

This patch adds missing aliases of bit-banged I2C buses required for
numbered I2C bus registration.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
9 years agoARM: dts: exynos4210-trats: Add aliases for bit-banged I2C buses
Tomasz Figa [Tue, 21 May 2013 16:28:10 +0000 (18:28 +0200)]
ARM: dts: exynos4210-trats: Add aliases for bit-banged I2C buses

This patch adds missing aliases of bit-banged I2C buses required for
numbered I2C bus registration.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
9 years agopower: max17042: Fix deadlock caused by deferred initialization
Tomasz Figa [Tue, 21 May 2013 16:04:27 +0000 (18:04 +0200)]
power: max17042: Fix deadlock caused by deferred initialization

There is no need to defer chip initialization from probe. In addition,
current implementation caused a deadlock, which made boot hang from time
to time.

This patch removes deferred initialization and adds chip initialization
to probe, before the power supply is registered.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
9 years agoARM: dts: exynos4210-trats
Andrzej Hajda [Wed, 15 May 2013 11:04:14 +0000 (13:04 +0200)]
ARM: dts: exynos4210-trats

Adjusted front camera configuration to work with s5k5baf driver.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
9 years agos5k5baf: add camera sensor driver
Andrzej Hajda [Fri, 10 May 2013 13:44:15 +0000 (15:44 +0200)]
s5k5baf: add camera sensor driver

Driver for Samsung S5K5BAF UXGA 1/5" 2M CMOS Image Sensor with embedded
SoC ISP. The driver exposes the sensor as two V4L2 subdevices:

- S5K5BAF-CIS - pure CMOS Image Sensor, fixed 1600x1200 format,
  no controls.
- S5K5BAF-ISP - Image Signal Processor, formats up to 1600x1200,
  pre/post ISP cropping, downscaling via selection API, controls.

The private V4L2_CID_{RED/GREEN/BLUE}_GAIN controls will be replaced
with V4L2_CID_{RED/BLUE}_BALANCE controls in subsequent patch.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
v3:
- narrowed state->error usage to i2c and power errors

v2:
- lower-cased driver name,
- removed underscore from regulator names,
- removed platform data code,
- v4l controls grouped in anonymous structs,
- added s5k5baf_clear_error function,
- private controls definitions moved to uapi header file,
- added v4l2-controls.h reservation for private controls,
- corrected subdev registered/unregistered code,
- .log_status sudbev op set to v4l2 helper,
- moved entity link creation to probe routines,
- added cleanup on error to probe function.

9 years agoarm: dts: Update max77686's device tree for M0/PQ.
Jonghwa Lee [Fri, 10 May 2013 08:58:35 +0000 (17:58 +0900)]
arm: dts: Update max77686's device tree for M0/PQ.

- IRQ type update : from 0 to 2 (FALLING_EDGE)
- Remove unnecessary data : consumer supplies, min/max uV..
- Change data of charger ldo from voltage to current.

[s.nawrocki: redundant closing parenthesis removed to fix build break]
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoARM: dts: Modify lps331ap device node for PQ/M0 board
Sylwester Nawrocki [Thu, 9 May 2013 15:50:17 +0000 (17:50 +0200)]
ARM: dts: Modify lps331ap device node for PQ/M0 board

This patch adds interrupt-map support for the lps331ap
device node for PQ/M0 board, so that it facilitates
passing information about device's interrupt sources used.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
9 years agofuelgauge: max1704xx: Fix max17042 driver to work properly.
Jonghwa Lee [Thu, 9 May 2013 11:29:13 +0000 (20:29 +0900)]
fuelgauge: max1704xx: Fix max17042 driver to work properly.

Fixed :
- Read battery capacity from VFG(voltage fuel gauge) for ModelGuage M1.
- Fix error of registering alarm irq to generic irq framework.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoARM: dts: Support device tree of fuel gauge(max77693) in PQ/M0
Jonghwa Lee [Thu, 9 May 2013 11:26:09 +0000 (20:26 +0900)]
ARM: dts: Support device tree of fuel gauge(max77693) in PQ/M0

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoARM: dts: thermal: exynos4: TMU voltage regulator support at REDWOOD
Lukasz Majewski [Fri, 19 Apr 2013 14:50:42 +0000 (16:50 +0200)]
ARM: dts: thermal: exynos4: TMU voltage regulator support at REDWOOD

This regulator must be enabled at REDWOOD target to allow temperature
sensor to work.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
9 years agoARM: dts: thermal: exynos4: Add documentation for Exynos SoC thermal bindings
Lukasz Majewski [Fri, 19 Apr 2013 15:31:16 +0000 (17:31 +0200)]
ARM: dts: thermal: exynos4: Add documentation for Exynos SoC thermal bindings

Proper description for Exynos4 bindings added to Documentation/devicetree/
bindings

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
9 years agoThermal: exynos: Support for TMU regulator defined at device tree
Lukasz Majewski [Fri, 19 Apr 2013 15:09:21 +0000 (17:09 +0200)]
Thermal: exynos: Support for TMU regulator defined at device tree

TMU probe function now checks for a device tree defined regulator.
For compatibility reasons it is allowed to probe driver even without
this regulator defined.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
9 years agoARM: dts: thermal: exynos4: TMU device tree support for Exynos4412 targets
Lukasz Majewski [Fri, 19 Apr 2013 14:45:53 +0000 (16:45 +0200)]
ARM: dts: thermal: exynos4: TMU device tree support for Exynos4412 targets

Device tree support for TMU at Exynos4x12 targets.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
9 years agoclk: exynos4: Add clock entries for TMU
Sachin Kamat [Mon, 22 Apr 2013 02:55:46 +0000 (02:55 +0000)]
clk: exynos4: Add clock entries for TMU

Added clock entries for thermal management unit (TMU) for
Exynos4 SoCs.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Mike Turquette <mturquette@linaro.org>
9 years ago[media] exynos4-is: Extend link_notify handler to support fimc-is/lite pipelines
Sylwester Nawrocki [Fri, 31 May 2013 13:37:27 +0000 (10:37 -0300)]
[media] exynos4-is: Extend link_notify handler to support fimc-is/lite pipelines

This patch corrects the link_notify handler to support more complex
pipelines, including fimc-lite and fimc-is entities.
After the FIMC-IS driver addition the assumptions made in the link_notify
callback are no longer valid, e.g. the link between fimc-lite subdev and
its video node is not immutable any more and there is more subdevs than
just sensor, MIPI-CSIS and FIMC(-LITE).
The graph is now walked and for each video node found a media pipeline
which ends at this node is disabled/enabled (the subdevs are powered
on/off).

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] media: Change media device link_notify behaviour
Sylwester Nawrocki [Fri, 31 May 2013 13:37:26 +0000 (10:37 -0300)]
[media] media: Change media device link_notify behaviour

Currently the media device link_notify callback is invoked before the
actual change of state of a link when the link is being enabled, and
after the actual change of state when the link is being disabled.
This doesn't allow a media device driver to perform any operations
on a full graph before a link is disabled, as well as performing
any tasks on a modified graph right after a link's state is changed.
This patch modifies signature of the link_notify callback. This
callback is now called always before and after a link's state change.
To distinguish the notifications a 'notification' argument is added
to the link_notify callback: MEDIA_DEV_NOTIFY_PRE_LINK_CH indicates
notification before link's state change and
MEDIA_DEV_NOTIFY_POST_LINK_CH corresponds to a notification after
link flags change.

[mchehab@redhat.com: whitespace cleanups]
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Add isp_dbg() macro
Sylwester Nawrocki [Fri, 31 May 2013 16:47:04 +0000 (13:47 -0300)]
[media] exynos4-is: Add isp_dbg() macro

Add a debug trace macro for the FIMC-IS ISP subdev and the ISP video
node drivers which are going to be added in subsequent patches.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Move __fimc_videoc_querycap() function to the common module
Sylwester Nawrocki [Fri, 31 May 2013 16:47:03 +0000 (13:47 -0300)]
[media] exynos4-is: Move __fimc_videoc_querycap() function to the common module

Move __fimc_videoc_querycap() function to the common exynos4-is-common.ko
module so it don't need to be reimplemented in multiple video node drivers
of the exynos4-is.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Refactor vidioc_s_fmt, vidioc_try_fmt handlers
Sylwester Nawrocki [Fri, 31 May 2013 16:47:02 +0000 (13:47 -0300)]
[media] exynos4-is: Refactor vidioc_s_fmt, vidioc_try_fmt handlers

Remove duplicated code in the vidioc_try_fmt and vidioc_s_fmt handlers.
This is a pre-requsite to allow successful fimc.capture video open even
if its corresponding media entities are not linked into a complete
pipeline.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Remove unused code
Sylwester Nawrocki [Fri, 31 May 2013 16:47:01 +0000 (13:47 -0300)]
[media] exynos4-is: Remove unused code

Remove unused macros and fields of struct fimc_is_video.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Simplify bitmask usage
Phil Carmody [Fri, 31 May 2013 16:47:00 +0000 (13:47 -0300)]
[media] exynos4-is: Simplify bitmask usage

Merge the two sets of flags into one array to simplify accessing
arbitrary bits from them.

Signed-off-by: Phil Carmody <phil.carmody@partner.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Remove leftovers of non-dt FIMC-LITE support
Sylwester Nawrocki [Fri, 31 May 2013 16:46:59 +0000 (13:46 -0300)]
[media] exynos4-is: Remove leftovers of non-dt FIMC-LITE support

FIMC-LITE devices are never looked up by iterating over all platform
devices with bus_for_each_device() as these IP blocks are available
only on dt-only Exynos SoC platforms.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Add locking at fimc(-lite) subdev unregistered handler
Sylwester Nawrocki [Fri, 31 May 2013 14:37:25 +0000 (11:37 -0300)]
[media] exynos4-is: Add locking at fimc(-lite) subdev unregistered handler

Protect the fimc/fimc-lite video nodes unregistration with their video
lock. This prevents a kernel crash when e.g. udev opens a video node
right after the driver registers it and then the driver tries to
unregister it and defers its probing. Using video_is_unregistered()
together with the video mutex allows safe unregistration of the video
nodes at any time.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Fix sensor subdev -> FIMC notification setup
Sylwester Nawrocki [Fri, 31 May 2013 14:37:24 +0000 (11:37 -0300)]
[media] exynos4-is: Fix sensor subdev -> FIMC notification setup

Ensure the v4l2_device notifications from sensor subdev works
also after the media links reconfiguration.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Remove WARN_ON() from __fimc_pipeline_close()
Sylwester Nawrocki [Fri, 31 May 2013 14:37:23 +0000 (11:37 -0300)]
[media] exynos4-is: Remove WARN_ON() from __fimc_pipeline_close()

It's not a critical error to call __fimc_pipeline_close() with missing
sensor subdev entity. Replace WARN_ON() with pr_warn() and return 0
instead of -EINVAL to fix control flow in some conditions.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Use common exynos_media_pipeline data structure
Sylwester Nawrocki [Fri, 31 May 2013 14:37:22 +0000 (11:37 -0300)]
[media] exynos4-is: Use common exynos_media_pipeline data structure

This enumeration is now private to exynos4-is and the exynos5 camera
subsystem driver may have the subdevs handling designed differently.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Do not use asynchronous runtime PM in release fop
Sylwester Nawrocki [Fri, 31 May 2013 14:37:21 +0000 (11:37 -0300)]
[media] exynos4-is: Do not use asynchronous runtime PM in release fop

Use pm_runtime_put_sync() instead of pm_runtime_put() to avoid races
in handling the 'state' bit flags when the fimc-capture drivers'
runtime_resume callback is called from the PM workqueue.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Media graph/video device locking rework
Sylwester Nawrocki [Fri, 31 May 2013 14:37:20 +0000 (11:37 -0300)]
[media] exynos4-is: Media graph/video device locking rework

Remove driver private video node reference counters and use entity->use_count
instead. This makes the video pipelines power handling more similar to the
method used in omap3isp driver.
Now the graph mutex is taken always after the video mutex, as it is not
possible to ensure apposite order at the all modules.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Preserve state of controls between /dev/video open/close
Sylwester Nawrocki [Fri, 31 May 2013 14:37:19 +0000 (11:37 -0300)]
[media] exynos4-is: Preserve state of controls between /dev/video open/close

This patch moves the code for inheriting subdev v4l2 controls on the
FIMC video capture nodes from open()/close() fops to the link setup
notification callback. This allows for the state of the FIMC controls
to be always kept, in opposite to the current situation when it is
lost when last process closes video device.
There is no visible change for the original V4L2 compliant interface.
For the MC aware applications (user_subdev_api == true) inheriting
of the controls is dropped, since there can be same controls on the
subdevs withing single pipeline, now when the ISP (FIMC-IS) is also
used.
This patch is a prerequisite to allow /dev/video device to be opened
without errors even if there is no media links connecting it to an
image source (sensor) subdev. This is required for a libv4l2 plugin
to be initialized while a video node is opened and it also should be
possible to always open the device to query the capabilities.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Add struct exynos_video_entity
Sylwester Nawrocki [Fri, 31 May 2013 14:37:18 +0000 (11:37 -0300)]
[media] exynos4-is: Add struct exynos_video_entity

This patch introduces common structure for the video entities
to handle all video nodes and media pipelines associated with
them in more generic way.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Move common functions to a separate module
Sylwester Nawrocki [Mon, 10 Jun 2013 11:51:44 +0000 (08:51 -0300)]
[media] exynos4-is: Move common functions to a separate module

Create a common module (exynos4-is-common.ko) for common functions
used across the exynos4-is video device and subdev drivers.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Staticize local symbols
Sachin Kamat [Tue, 16 Apr 2013 05:02:21 +0000 (02:02 -0300)]
[media] exynos4-is: Staticize local symbols

These symbols are used only in their respective files and hence
should be made static.
[s.nawrocki@samsung.com: dropped the __fimc_is_hw_update_param()
 function change]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Correct querycap ioctl handling at fimc-lite driver
Sylwester Nawrocki [Tue, 30 Apr 2013 12:27:53 +0000 (09:27 -0300)]
[media] exynos4-is: Correct querycap ioctl handling at fimc-lite driver

Fill in properly bus_info and card fields and set device_caps.
The querycap ioctl handler is renamed for consistency with the
other ioctls.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Remove platform_device_id table at fimc-lite driver
Sylwester Nawrocki [Tue, 30 Apr 2013 12:27:08 +0000 (09:27 -0300)]
[media] exynos4-is: Remove platform_device_id table at fimc-lite driver

The driver id_table is unused since all SoCs containing the FIMC-LITE
IP block have been dt-only. Just remove it.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] exynos4-is: Remove redundant NULL check in fimc-lite.c
Sachin Kamat [Tue, 30 Apr 2013 03:51:33 +0000 (00:51 -0300)]
[media] exynos4-is: Remove redundant NULL check in fimc-lite.c

clk_unprepare checks for NULL pointer. Hence convert IS_ERR_OR_NULL
to IS_ERR only.
[s.nawrocki: replaced initialisations to NULL with ERR_PTR() value]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agos5c73m3: Do not ignore errors from regulator_enable()
Sylwester Nawrocki [Fri, 31 May 2013 22:43:35 +0000 (00:43 +0200)]
s5c73m3: Do not ignore errors from regulator_enable()

This fixes following compilation warning:

drivers/media/i2c/s5c73m3/s5c73m3-core.c: In function ‘__s5c73m3_power_off’:
drivers/media/i2c/s5c73m3/s5c73m3-core.c:1389:19: warning: ignoring return value
of ‘regulator_enable’, declared with attribute warn_unused_result

Cc: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
9 years ago[media] V4L: Remove all links of the media entity when unregistering subdev
Sylwester Nawrocki [Thu, 9 May 2013 11:29:33 +0000 (08:29 -0300)]
[media] V4L: Remove all links of the media entity when unregistering subdev

Remove all links of the subdev's media entity after internal_ops
'unregistered' call and right before unregistering the entity from
a media device.
It is assumed here that an unregistered (orphan) media entity cannot
have links to other entities registered to a media device.
It is also assumed the media links should be created/removed with
the media graph's mutex held.
The above implies that the caller of v4l2_device_unregister_subdev()
must not hold the graph's mutex.

Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years ago[media] media: Add a function removing all links of a media entity
Sylwester Nawrocki [Thu, 9 May 2013 11:29:32 +0000 (08:29 -0300)]
[media] media: Add a function removing all links of a media entity

This function allows to remove all media entity's links to other
entities, leaving no references to a media entity's links array
at its remote entities.
Currently, when a driver of some entity is removed it will free its
media entities links[] array, leaving dangling pointers at other
entities that are part of same media graph. This is troublesome when
drivers of a media device entities are in separate kernel modules,
removing only some modules will leave others in an incorrect state.
This function is intended to be used when an entity is being
unregistered from a media device.
With an assumption that normally the media links should be created
between media entities registered to a media device, with the graph
mutex held.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoexynos4-is: Fix example dts in .../bindings/samsung-fimc.txt
Sylwester Nawrocki [Wed, 8 May 2013 17:24:14 +0000 (19:24 +0200)]
exynos4-is: Fix example dts in .../bindings/samsung-fimc.txt

The s5c73m3 sensor node should be off an I2C bus controller node.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
9 years ago[media] media: Rename media_entity_remote_source to media_entity_remote_pad
Andrzej Hajda [Mon, 3 Jun 2013 08:16:13 +0000 (05:16 -0300)]
[media] media: Rename media_entity_remote_source to media_entity_remote_pad

Function media_entity_remote_source actually returns the remote pad to
the given one, regardless if this is the source or the sink pad.
Name media_entity_remote_pad is more adequate for this function.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoexynos4-is: Add csis parent clock setup
Sylwester Nawrocki [Tue, 5 Feb 2013 11:19:19 +0000 (12:19 +0100)]
exynos4-is: Add csis parent clock setup

With this patch the driver will set "parent" clock as a parent
clock of "mux" clock. When the samsung clocks driver is reworked
to use new composite clock type, the "mux" clock can be removed.

"parent" clock should be set in relevant dtsi file and can be
overwritten in a board dts file. This way it is ensured the
SCLK_CSIS has correct parent clock set, and the parent clock
can be selected per each board if required.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
9 years agoexynos4-is: Add fimc parent clock setup
Sylwester Nawrocki [Tue, 5 Feb 2013 10:16:10 +0000 (11:16 +0100)]
exynos4-is: Add fimc parent clock setup

With this patch the driver will set "parent" clock as a parent
clock of "mux" clock. When the samsung clocks driver is reworked
to use new composite clock type, the "mux" clock can be removed.

"parent" clock should be set in related dtsi file and can be
overwritten in a board dts file. This way it is ensured the
SCLK_FIMC clock has correct parent clock set, and the parent
clock can be selected per each board if required.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
9 years agodrm/exynos: Remove MODULE_DEVICE_TABLE table from vidi driver
Sylwester Nawrocki [Fri, 19 Apr 2013 13:38:50 +0000 (15:38 +0200)]
drm/exynos: Remove MODULE_DEVICE_TABLE table from vidi driver

Currently there are multiple OF module_device_tables defined which
prevents building the whole driver as a module. The compiler error
is as below.

LD [M]  drivers/gpu/drm/exynos/exynosdrm.o
drivers/gpu/drm/exynos/exynos_drm_vidi.o: In function `.LANCHOR0':
exynos_drm_vidi.c:(.rodata+0x26c): multiple definition of `__mod_of_device_table'
drivers/gpu/drm/exynos/exynos_drm_fimd.o:exynos_drm_fimd.c:(.rodata+0x170): first defined here
/usr/bin/arm-linux-gnueabi-ld: Warning: size of symbol `__mod_of_device_table' changed from 588
in drivers/gpu/drm/exynos/exynos_drm_fimd.o to 392 in drivers/gpu/drm/exynos/exynos_drm_vidi.o
make[4]: *** [drivers/gpu/drm/exynos/exynosdrm.o] Error 1

Fix this by removing MODULE_DEVICE_TABLE(of,...) entry for the vidi driver,
leaving the one for FIMD driver.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
9 years agovideo: display: panel-s6e8aa0: support others panel version configuration
Donghwa Lee [Thu, 18 Apr 2013 05:30:29 +0000 (14:30 +0900)]
video: display: panel-s6e8aa0: support others panel version configuration

existing driver only supports v32 and v142, but we have to support a large
variety of panel version. This patch is just workaround code.

Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
9 years agoiio:ak8975 Implement data ready interrupt handling
Jacek Anaszewski [Tue, 7 May 2013 10:41:39 +0000 (12:41 +0200)]
iio:ak8975 Implement data ready interrupt handling

Implement "data ready" interrupt handling in addition to the
two existing read modes - DRDY GPIO polling and ST1 register
DRDY bit polling.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
9 years agoiio:ak8975 Add support for gpios DT property
Jacek Anaszewski [Tue, 7 May 2013 10:41:38 +0000 (12:41 +0200)]
iio:ak8975 Add support for gpios DT property

Add support for parsing 'gpios' property when initializing
from oftree.
This patch adds also the binding documentation file.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
9 years agoARM: dts: Update the wm1811 codec node in exynos4412-slp_pq.dts
Sylwester Nawrocki [Thu, 11 Apr 2013 15:32:41 +0000 (17:32 +0200)]
ARM: dts: Update the wm1811 codec node in exynos4412-slp_pq.dts

Add required properties for the wm1811 codec node according
to the DT binding.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
9 years agoARM: dts: Update ISP clocks in exyno4x12.dtsi
Sylwester Nawrocki [Fri, 5 Apr 2013 16:50:54 +0000 (18:50 +0200)]
ARM: dts: Update ISP clocks in exyno4x12.dtsi

Update fimc-is node clock properties to match changed div clocks
base index.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
9 years agoARM:clock:cpufreq: Correct MPLL clock and DTS binding
Lukasz Majewski [Fri, 5 Apr 2013 16:31:42 +0000 (18:31 +0200)]
ARM:clock:cpufreq: Correct MPLL clock and DTS binding

According to specification the mout_mpll_user_c clock shall be used instead
of sclk.

Moreover correct clock number (18) was assigned to mout_mpll_user_c.
It coply with ./Documentation/devicetree/bindings/clock/exynos4-clock.txt

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agopower: max77693: Add kernel configuation of Max77693 charger
Jonghwa Lee [Fri, 5 Apr 2013 09:01:53 +0000 (18:01 +0900)]
power: max77693: Add kernel configuation of Max77693 charger

The patch 'power: max77693: Add max77693 charger driver.'
omitted CHARGER_MAX77693 kerenel configuration.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agomfd: max77686: Fix NULL pointer error of max77686 platform data.
Jonghwa Lee [Fri, 5 Apr 2013 06:55:47 +0000 (15:55 +0900)]
mfd: max77686: Fix NULL pointer error of max77686 platform data.

If max77686 mfd driver gets the initial data from device tree,
dev->plat_data might be NULL. So, when sub devices want to get
parent platform data, it can get only NULL pointer even parent
mfd driver probed completely. So we need to re-initialize
dev->plat_data at end of parsing device tree.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>