platform/kernel/linux-3.10.git
9 years agoregulator:max77686: Correct GPIOs for BUCK2 DVS setting
Lukasz Majewski [Thu, 31 Oct 2013 15:52:55 +0000 (16:52 +0100)]
regulator:max77686: Correct GPIOs for BUCK2 DVS setting

Before this patch SELB and DVS pins were wrongly defined in the DTS.

As a result MAX77686 always used BUCK2_DVS1 register (the DVS pins were
set all to 0). However the default DVS index (default_dvs_idx) was set to 1.

Therefore, the default value of BUCK2_DVS1 register (1.1V) was always
setup. Wrongly the driver was changing BUCK2_DVS2 register. Due to that
voltage was NOT changed at all.

The problem appeared when BOOST was ported to v3.10-mobile. It requires
around 1.3V, but default voltage is set to 1.1V (0x28). Too small voltage
resulted in OOPs at random places.

As a side note:
The MAX77686 is NOT using DVS with GPIO. It changes the value of current
voltage with I2C utilization.

Tested at: REDWOOD - Exynos4412 - rev1.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agontc_thermistor: Update DT and board configuration to enable NTC thermistors.
Jonghwa Lee [Thu, 31 Oct 2013 15:34:32 +0000 (00:34 +0900)]
ntc_thermistor: Update DT and board configuration to enable NTC thermistors.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoADC: EXYNOS4412: Update DT and board configuration to enable ADC.
Jonghwa Lee [Thu, 31 Oct 2013 15:25:47 +0000 (00:25 +0900)]
ADC: EXYNOS4412: Update DT and board configuration to enable ADC.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agocharger-manager: Fix unit of temperature to deci centigrade.
Jonghwa Lee [Thu, 31 Oct 2013 02:20:56 +0000 (11:20 +0900)]
charger-manager: Fix unit of temperature to deci centigrade.

Fix temperature unit to follow the standard as document describes.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoRevert "battery: max17042/7: Fix temperature unit to milli centigrade."
Jonghwa Lee [Thu, 31 Oct 2013 02:20:27 +0000 (11:20 +0900)]
Revert "battery: max17042/7: Fix temperature unit to milli centigrade."

This reverts commit 79b1d3591b35022b93f2d70c299e74eb54bfec09.

9 years agodisplay: panels: remove duplicated display_entity_set_state() for pm
Donghwa Lee [Wed, 30 Oct 2013 06:46:07 +0000 (15:46 +0900)]
display: panels: remove duplicated display_entity_set_state() for pm

remove duplicated display_entity_set_state() in suspend/resume function

Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
9 years agoexynos: drm_fimd: remove duplicated clock control for fimd_dpms
Donghwa Lee [Tue, 29 Oct 2013 07:46:33 +0000 (16:46 +0900)]
exynos: drm_fimd: remove duplicated clock control for fimd_dpms

Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
9 years agoexynos: drm_fimd: support lcdblk system register control
Donghwa Lee [Tue, 29 Oct 2013 07:40:20 +0000 (16:40 +0900)]
exynos: drm_fimd: support lcdblk system register control

Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
9 years agommc: core: change the clkgate_delay value from 0 to 3.
Jaehoon Chung [Mon, 28 Oct 2013 06:13:22 +0000 (15:13 +0900)]
mmc: core: change the clkgate_delay value from 0 to 3.

When clkgate_delay is set to 0, then clk is gated at every request.
It's inefficient. So, it's changed from 0 to 3.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 years agodrivers: s3c-hsotg: hide some not really needed debug messages
Marek Szyprowski [Tue, 22 Oct 2013 13:23:24 +0000 (15:23 +0200)]
drivers: s3c-hsotg: hide some not really needed debug messages

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
9 years agodrivers: s3c-hsotg: fix incorrect condition for clear_feature request
Marek Szyprowski [Tue, 22 Oct 2013 13:03:59 +0000 (15:03 +0200)]
drivers: s3c-hsotg: fix incorrect condition for clear_feature request

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
9 years agodrivers: s3c-hsotg: fix regulator enable sequence in resume callback
Marek Szyprowski [Fri, 25 Oct 2013 09:24:21 +0000 (11:24 +0200)]
drivers: s3c-hsotg: fix regulator enable sequence in resume callback

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
9 years agoOF: fdt: Add support for parsing system serial number from device tree
Tomasz Figa [Thu, 26 Sep 2013 17:14:37 +0000 (19:14 +0200)]
OF: fdt: Add support for parsing system serial number from device tree

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
9 years agoARM: atags_to_fdt: Add support for passing serial number
Tomasz Figa [Thu, 26 Sep 2013 17:14:12 +0000 (19:14 +0200)]
ARM: atags_to_fdt: Add support for passing serial number

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
9 years agoARM: dts: exynos4412_slp_pq: add the desc_num for mshc
Jaehoon Chung [Thu, 24 Oct 2013 13:36:43 +0000 (22:36 +0900)]
ARM: dts: exynos4412_slp_pq: add the desc_num for mshc

Add the desc_num for mshc. (using 4)

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 years agommc: dw_mmc: add the platdat for descriptor number.
Jaehoon Chung [Thu, 24 Oct 2013 13:35:36 +0000 (22:35 +0900)]
mmc: dw_mmc: add the platdat for descriptor number.

This platdata is related with buffer size.
It's increaed the performance.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 years agoARM: dts: exynos4412-spl_pq: rename the fixed regulator for eMMC
Jaehoon Chung [Thu, 24 Oct 2013 12:40:24 +0000 (21:40 +0900)]
ARM: dts: exynos4412-spl_pq: rename the fixed regulator for eMMC

VMEM_2.8V is already defined for LDO22.
Fixed regulator need to rename the other.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 years agodrm/exynos: fix to calculate offset of each plane for ipp fimc
Seung-Woo Kim [Tue, 22 Oct 2013 07:44:13 +0000 (16:44 +0900)]
drm/exynos: fix to calculate offset of each plane for ipp fimc

NV12 and YUV420 formats are need to calculate offset of each plane
for ipp fimc in a gem buffer. Without proper offset, only Y plane
can be processed, so result shows green frame.
This patch fixes to calculate offset for cbcr planes for NV12 and
YUV420 formats.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 years agodrm/exynos: add support ARGB8888 for ipp fimc
Seung-Woo Kim [Fri, 4 Oct 2013 06:45:37 +0000 (15:45 +0900)]
drm/exynos: add support ARGB8888 for ipp fimc

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 years agocharger-manager: Parse charger_desc from device tree.
Jonghwa Lee [Tue, 22 Oct 2013 07:53:55 +0000 (16:53 +0900)]
charger-manager: Parse charger_desc from device tree.

With this patch, charger-manager can support device tree fully.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agodrivers: s3c-hsotg: add proper suspend/resume support
Marek Szyprowski [Tue, 22 Oct 2013 12:42:14 +0000 (14:42 +0200)]
drivers: s3c-hsotg: add proper suspend/resume support

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
9 years agobattery: max17042/7: Fix temperature unit to milli centigrade.
Jonghwa Lee [Tue, 22 Oct 2013 07:55:52 +0000 (16:55 +0900)]
battery: max17042/7: Fix temperature unit to milli centigrade.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agocharger-manager : Add default battery temperature checking funtion.
Jonghwa Lee [Tue, 22 Oct 2013 08:35:58 +0000 (17:35 +0900)]
charger-manager : Add default battery temperature checking funtion.

During the charger manager driver's probing time, it can't succeed
if there's no pre-defined .temperature_out_of_range callback function.
But if fuel gauge supports battery temperature measurement, we
can use it directly. That's what cm_default_get_temp() function does.

With flag measure_batter_temp ON, we normally use cm_default_get_temp()
for .temperature_out_of_range callback funtion.
The TEMP_AMBIENT property is only used for pre-defined one.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agocharger-manager : Replace kzalloc to devm_kzalloc and remove uneccessary code.
Jonghwa Lee [Mon, 21 Oct 2013 11:03:16 +0000 (20:03 +0900)]
charger-manager : Replace kzalloc to devm_kzalloc and remove uneccessary code.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agocharger-manager: Add cm_chg_add_prorperty() macro.
Jonghwa Lee [Mon, 21 Oct 2013 09:33:48 +0000 (18:33 +0900)]
charger-manager: Add cm_chg_add_prorperty() macro.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoM0 : charging : Make to charge battery fully.
Jonghwa Lee [Wed, 16 Oct 2013 10:42:19 +0000 (19:42 +0900)]
M0 : charging : Make to charge battery fully.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoFuel Guague: MAX17042: Use regmap to interface with internal registers
Jonghwa Lee [Wed, 16 Oct 2013 04:39:11 +0000 (13:39 +0900)]
Fuel Guague: MAX17042: Use regmap to interface with internal registers

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoextcon: Extcon load time modification
Kamil Debski [Tue, 15 Oct 2013 13:30:00 +0000 (15:30 +0200)]
extcon: Extcon load time modification

This modification enables use of extcon by drivers loaded early during the
boot (e.g. udc-core).

Signed-off-by: Kamil Debski <k.debski@samsung.com>
9 years agousb: gadget: udc-core: Add extcon hanling to reduce power use
Kamil Debski [Tue, 15 Oct 2013 11:55:18 +0000 (13:55 +0200)]
usb: gadget: udc-core: Add extcon hanling to reduce power use

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

Signed-off-by: Kamil Debski <k.debski@samsung.com>
9 years agos3c-hsotg: Fix driver context storing
Kamil Debski [Tue, 15 Oct 2013 13:16:05 +0000 (15:16 +0200)]
s3c-hsotg: Fix driver context storing

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

Signed-off-by: Kamil Debski <k.debski@samsung.com>
9 years agos3c-hsotg: Regulator switching fix
Kamil Debski [Tue, 15 Oct 2013 13:26:40 +0000 (15:26 +0200)]
s3c-hsotg: Regulator switching fix

This patch delays switching off regulators in s3c_hsotg_udc_stop after
the critical section has been finished.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
9 years agophy: exynos-usb: Remove ref counting for additional reset for Exynos4212
Kamil Debski [Tue, 15 Oct 2013 13:41:41 +0000 (15:41 +0200)]
phy: exynos-usb: Remove ref counting for additional reset for Exynos4212

Reference counting in this case is not necessary.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
9 years agodts: exynos4412-slp_pq: Remove regulator_always_on for HSIC regulator
Kamil Debski [Tue, 15 Oct 2013 13:41:32 +0000 (15:41 +0200)]
dts: exynos4412-slp_pq: Remove regulator_always_on for HSIC regulator

This regulator should be switched on/off by driver that use it.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
9 years agodts: Add extcon phandle to hsotg node
Lukasz Czerwinski [Fri, 19 Jul 2013 07:01:50 +0000 (09:01 +0200)]
dts: Add extcon phandle to hsotg node

This patch adds extconi device(max77693) phandle for s3c_hsotg node.

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
9 years agomfd: max77693: Add max77693-pmuic compatible
Lukasz Czerwinski [Thu, 18 Jul 2013 11:58:43 +0000 (13:58 +0200)]
mfd: max77693: Add max77693-pmuic compatible

This patch adds of_compatible field for max7763-pmuic - mfd device

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
9 years agoextcon: Add EXPORT_SYMBOL_GPL for exported functions
Kishon Vijay Abraham I [Mon, 3 Jun 2013 16:13:38 +0000 (01:13 +0900)]
extcon: Add EXPORT_SYMBOL_GPL for exported functions

Added EXPORT_SYMBOL_GPL() for extcon_register_interest and
extcon_register_notifier in order to avoid undefined reference
error when building the consumer modules of extcon as _modules_.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoextcon: Add an API to get extcon device from dt node
Kishon Vijay Abraham I [Tue, 11 Jun 2013 11:48:02 +0000 (20:48 +0900)]
extcon: Add an API to get extcon device from dt node

Added an API of_extcon_get_extcon_dev() to be used by drivers to get
extcon device in the case of dt boot (this can be used instead of
extcon_get_extcon_dev()).

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
9 years agocharger-manager : Make charge_now node under batter sysfs directory.
Jonghwa Lee [Fri, 11 Oct 2013 13:25:13 +0000 (22:25 +0900)]
charger-manager : Make charge_now node under batter sysfs directory.

CHARGE_NOW property has beed used in wrong way, it should be fixed
as it is planned initially. But for now, we just leave it for
upper layer (e.g. OAL) for a while.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agocharger: max77693: Fix initial charger configuration properly.
Jonghwa Lee [Fri, 11 Oct 2013 13:15:16 +0000 (22:15 +0900)]
charger: max77693: Fix initial charger configuration properly.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agocharger: max77693: code cleaning
Jonghwa Lee [Fri, 11 Oct 2013 12:49:51 +0000 (21:49 +0900)]
charger: max77693: code cleaning

- Remove duplicated macro data.
- Improve readability.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoexynos_drm_fimc: simplify and rename fimc_dst_get_buf_seq
Andrzej Hajda [Wed, 9 Oct 2013 11:59:43 +0000 (13:59 +0200)]
exynos_drm_fimc: simplify and rename fimc_dst_get_buf_seq

fimc_dst_get_buf_seq returns number of buffers
so the name should be fimc_dst_get_buf_count.
Function body has been simplified.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
9 years agoexynos_drm_fimc: replace mutex by spinlock
Andrzej Hajda [Wed, 9 Oct 2013 11:43:58 +0000 (13:43 +0200)]
exynos_drm_fimc: replace mutex by spinlock

Function fimc_dst_set_buf_seq is called
by irq handler so it should not use mutexes.
This patch fixes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
9 years agoexynos_drm_fimc: replace hw access macros with functions
Andrzej Hajda [Wed, 9 Oct 2013 11:23:21 +0000 (13:23 +0200)]
exynos_drm_fimc: replace hw access macros with functions

HW access macros depended on presence of ctx local variable.
This patch replaces them with proper functions.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
9 years agoexynos_drm_fimc: rename fimc_handle_irq to fimc_mask_irq
Andrzej Hajda [Wed, 9 Oct 2013 09:45:31 +0000 (11:45 +0200)]
exynos_drm_fimc: rename fimc_handle_irq to fimc_mask_irq

fimc_handle_irq suggests it is IRQ handler but it is
irq masking function. Additional small code improvement.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
9 years agoexynos_drm_fimc: simplify pre-scaler ratio calculation
Andrzej Hajda [Wed, 9 Oct 2013 07:22:55 +0000 (09:22 +0200)]
exynos_drm_fimc: simplify pre-scaler ratio calculation

The patch replaces special function for scaling ratio
calculation by simple fls calls.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
9 years agoexynos_drm: replace enums by __u32 in structs used in IOCTLs
Andrzej Hajda [Mon, 7 Oct 2013 13:59:40 +0000 (15:59 +0200)]
exynos_drm: replace enums by __u32 in structs used in IOCTLs

enum type has variable size depending on compiler options,
so it should be avoided in structs passed to userland.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
9 years agoexynos_drm_ipp: fix get property IOCTL
Andrzej Hajda [Mon, 7 Oct 2013 07:22:02 +0000 (09:22 +0200)]
exynos_drm_ipp: fix get property IOCTL

Due to incorrect assignment in EXYNOS_IPP_GET_PROPERTY
IOCTL handler this IOCTL did not work at all.
The patch fixes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
9 years agomedia: s5p-jpeg: fix clock management in suspend/resume path
Marek Szyprowski [Thu, 10 Oct 2013 08:06:24 +0000 (10:06 +0200)]
media: s5p-jpeg: fix clock management in suspend/resume path

Standard suspend/resume path is called after runtime resume of the given
device, so suspend/resume callbacks must do all clock management done also
by runtime pm to allow proper power domain shutdown.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
9 years agomedia: fimc: fix clock management in suspend/resume path
Marek Szyprowski [Thu, 10 Oct 2013 08:05:06 +0000 (10:05 +0200)]
media: fimc: fix clock management in suspend/resume path

Standard suspend/resume path is called after runtime resume of the given
device, so suspend/resume callbacks must do all clock management done also
by runtime pm to allow proper power domain shutdown.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
9 years agodrivers: iommu: add workaround for multiple suspend/resume calls
Marek Szyprowski [Wed, 9 Oct 2013 13:30:13 +0000 (15:30 +0200)]
drivers: iommu: add workaround for multiple suspend/resume calls

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
9 years agoRevert "HACK: usb: gadget: Fix enumeration on boot"
Marek Szyprowski [Tue, 8 Oct 2013 11:03:25 +0000 (13:03 +0200)]
Revert "HACK: usb: gadget: Fix enumeration on boot"

This reverts commit b0c2c319763e2ace63ace30cd5b9e3e0eb0b9b48.

9 years agousb:gadget: Refcount for gadget pullup
Lukasz Majewski [Tue, 19 Jun 2012 13:28:05 +0000 (15:28 +0200)]
usb:gadget: Refcount for gadget pullup

This commit fixes the way gadget's pullup method (wrapped at
usb_gadget_connect/disconnect) is called in the udc-core.

The composite driver allows correct driver registration, even when it calls
the usb_gadget_disconnect method (composite driver configuration is defered
for user space - please look into the description of usb_composite_probe at
composite.c - line: 1623)

One such example is the CCG (Configurable Composite Gadget) driver (at
drivers/staging/ccg), which after its registration has no usb descriptor
(i.e. idProduct, idVendor etc.) and functions registered. Those are configured
after writing to /sys/module/g_ccg/parameters/ or /sys/class/ccg_usb/ccg0/.

Unfortunately, the code at 'usb_gadget_probe_driver' method (some code omitted):

if (udc_is_newstyle(udc)) {
bind(udc->gadget);
usb_gadget_udc_start(udc->gadget, driver);
usb_gadget_connect(udc->gadget);
}

Explicitly calls the usb_gadget_connect method for this driver. It looks like
the udc-core enables pullup for a driver, which has no functions and no
descriptor filled (those values are feed from userspace).

The USB composite driver API allows correct driver registration with calling
usb_gadget_disconnect method, but as it is now, _ALL_ newstyle usb gadgets are
connected by default. Therefore it violates the composite API.

The solution (at least until the udc-core is reworked) is to add atomic
variable, which helps in balancing the number of called usb_gadget_connect/
disconnect functions.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
9 years agodts:exynos4412-redwood: Adjust REDWOOD dts to support changed cpufreq
Lukasz Majewski [Tue, 8 Oct 2013 10:59:16 +0000 (12:59 +0200)]
dts:exynos4412-redwood: Adjust REDWOOD dts to support changed cpufreq

Overriding the freq_table attribute inherited from SLP_PQ (Proxima).
Remove bindings for overlocking (now it is called boost).

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agodts:thermal:exynos4212:pegasusD: Device tree node definition for TMU
Lukasz Majewski [Tue, 8 Oct 2013 10:14:28 +0000 (12:14 +0200)]
dts:thermal:exynos4212:pegasusD: Device tree node definition for TMU

Device tree nodes defined for Exynos4212 based PEGASUS D device.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agodts:cpufreq:exynos4212:pegasusD: Enable support for cpufreq at PEGASUS D via device...
Lukasz Majewski [Tue, 8 Oct 2013 10:13:21 +0000 (12:13 +0200)]
dts:cpufreq:exynos4212:pegasusD: Enable support for cpufreq at PEGASUS D via device tree

Enable cpufreq driver via DTS. Also empty freq_table is defined to override
"default" freq_table defined for PROXIMA PQ.

The volt_table has been defined to reflect MAX8997 based DVS on the PegasusD
device. This volt_table also can be overrided when defined as empty.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agocosmetic: Remove extern from exynos_of_parse_freq_table() declaration
Lukasz Majewski [Tue, 8 Oct 2013 10:07:43 +0000 (12:07 +0200)]
cosmetic: Remove extern from exynos_of_parse_freq_table() declaration

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agocpufreq: exynos4x12: Support the frequency change only with the common clock framework
Lukasz Majewski [Tue, 8 Oct 2013 10:06:59 +0000 (12:06 +0200)]
cpufreq: exynos4x12: Support the frequency change only with the common clock framework

The exynos4x12_pms_change() function has been removed since the PLL's S
parameter change is already preformed at PLL code.

Also the code which changed the S value at exynos4x12_set_frequency() has been
removed.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agoARM:clk:exynos:pll35xx: Extend pll35xx_set_rate to support only S parameter switch
Lukasz Majewski [Tue, 8 Oct 2013 10:02:53 +0000 (12:02 +0200)]
ARM:clk:exynos:pll35xx: Extend pll35xx_set_rate to support only S parameter switch

With PLL35xx device it is possible to switch PLL frequency without waiting
for locking.
This situation happens when P and M for new frequency are equal to
corresponding parameters for old frequency. Then only S needs to be changed.
In this patch support for such a change is provided.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agoARM: cpufreq: Parse CPUFREQ's voltage table passed as device tree node
Lukasz Majewski [Tue, 8 Oct 2013 09:57:13 +0000 (11:57 +0200)]
ARM: cpufreq: Parse CPUFREQ's voltage table passed as device tree node

Now it is possible to parse cpufreq's voltage table information passed as
device tree node. This is handy for various different PMICs.

It is also possible to override this device tree node by defining empty
"volt_table" node. Then default exynos4x12_volt_table[] is used.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agoregulator:dts:slp-PD: MAX8997 device tree nodes definitions for MIDAS (PEGASUS_D)
Lukasz Majewski [Tue, 8 Oct 2013 09:50:35 +0000 (11:50 +0200)]
regulator:dts:slp-PD: MAX8997 device tree nodes definitions for MIDAS (PEGASUS_D)

Adjustment of regulator configuration (max8997) for MIDAS (PEGASUSD) device.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agophy: exynos: Change order of initialization of phy in power_on
Kamil Debski [Mon, 7 Oct 2013 16:23:49 +0000 (18:23 +0200)]
phy: exynos: Change order of initialization of phy in power_on

The order was changed to turn power on first and the disable the physical
isolation.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Phy driver change - order of init - to be squashed

9 years agophy: exynos-usb: Fix referenct counting
Kamil Debski [Tue, 1 Oct 2013 13:48:13 +0000 (15:48 +0200)]
phy: exynos-usb: Fix referenct counting

This patch fixes the reference counting when powerin on/off the phy.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
9 years agodts: arm: Add voltage regulator and additional clock supply to ehci-s5p
Kamil Debski [Tue, 8 Oct 2013 08:53:58 +0000 (10:53 +0200)]
dts: arm: Add voltage regulator and additional clock supply to ehci-s5p

This patch adds voltage regulator and additional clock support to the
ehci-s5p driver.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
9 years agoehci-s5p: Add second clock to the ehci-s5p driver
Kamil Debski [Mon, 7 Oct 2013 10:35:40 +0000 (12:35 +0200)]
ehci-s5p: Add second clock to the ehci-s5p driver

Adding the second clock was necessary for the USB HOST to work. Previously
it was working thanks to the USB DEVICE driver being loaded first.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
9 years agoehci-s5p: Add power regulator support
Kamil Debski [Wed, 2 Oct 2013 09:08:17 +0000 (11:08 +0200)]
ehci-s5p: Add power regulator support

Add rgulator support for the ehci-s5p driver. Before this patch the driver
relied on the regulators being switched on either by bootloader or other
drivers.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
9 years agodts: arm: Add support for new Exynos USB phy driver to origen and universal
Kamil Debski [Tue, 8 Oct 2013 08:50:53 +0000 (10:50 +0200)]
dts: arm: Add support for new Exynos USB phy driver to origen and universal

This patch adds support for the new Exynos USB PHY driver. It also removes
remnants of the old driver's presence in the dts files.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
9 years agodts: arm: Add dts file for the exynos4412-odroidx2 board
Kamil Debski [Mon, 7 Oct 2013 16:21:43 +0000 (18:21 +0200)]
dts: arm: Add dts file for the exynos4412-odroidx2 board

This patch add support for the Exynos4412 based Origen-X2 board.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
9 years agoehci-s5p: Use device tree to get name of desired phy
Kamil Debski [Thu, 26 Sep 2013 08:04:02 +0000 (10:04 +0200)]
ehci-s5p: Use device tree to get name of desired phy

With this patch the name of the phy that should be used is read from
the device tree. This gives more flexibility to use the driver without
recompiling.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
9 years agoregulator: max77686: Support DVS control in max77686 regulator.
Jonghwa Lee [Mon, 7 Oct 2013 08:02:15 +0000 (17:02 +0900)]
regulator: max77686: Support DVS control in max77686 regulator.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoarm: exynos: Fix SFR base address of DMC in EXYNOS4 series.
Jonghwa Lee [Mon, 7 Oct 2013 08:03:32 +0000 (17:03 +0900)]
arm: exynos: Fix SFR base address of DMC in EXYNOS4 series.

This patch fixes DMC's physical SFR address base which is used for
static memory mapping as EXYNOS4210 and EXYNOS4x12 uses different SFR
addresses for them.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoARM: defconfig: enable the mmc clock-gating config
Jaehoon Chung [Mon, 7 Oct 2013 07:14:36 +0000 (16:14 +0900)]
ARM: defconfig: enable the mmc clock-gating config

Enable the MMC_CLK_CATING configuration.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 years agoWORKAROUND: Temporary workaround for Suspend-To-Ram.
Jonghwa Lee [Mon, 7 Oct 2013 06:45:12 +0000 (15:45 +0900)]
WORKAROUND: Temporary workaround for Suspend-To-Ram.

*** Should be purged later.

Current issue :
@m0, When system wakes from suspend-to-ram state, it often
hangs out or shows data abort error due to invalidate PC value
(For more information, please reference 'BSP ISSUES'
on TizenKernel Wiki (http://10.252.81.130/mediawiki/)

Suspect :
Non boot CPUs' hotplugging. Without power-off of non-boot cpus,
it never happens.

Workaround :
Keep VDD_ARM regulator ON, even system's in STR state.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agodts: exynos4x12: Add device tree node for exynos4 busfreq.
Jonghwa Lee [Mon, 7 Oct 2013 06:37:19 +0000 (15:37 +0900)]
dts: exynos4x12: Add device tree node for exynos4 busfreq.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agodevfreq: exynos4: Support DT in exynos4 busfreq driver.
Jonghwa Lee [Mon, 7 Oct 2013 06:25:01 +0000 (15:25 +0900)]
devfreq: exynos4: Support DT in exynos4 busfreq driver.

This patch makes exynos4 busfreq driver to support device tree.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoARM: dts: Correct audio clock number in exynos4412-slp_pq.dts
Marek Szyprowski [Wed, 2 Oct 2013 06:51:25 +0000 (08:51 +0200)]
ARM: dts: Correct audio clock number in exynos4412-slp_pq.dts

Audio block should use mout_clkout (396) as parent clock instead of
incorrect aclk400_mcuisp clokc (395).

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
9 years agoarm: dst: add SLP Pegasus Dual board (for testing Exynos4212)
Marek Szyprowski [Wed, 25 Sep 2013 12:21:57 +0000 (14:21 +0200)]
arm: dst: add SLP Pegasus Dual board (for testing Exynos4212)

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
9 years agovideo: cdf-panel: support lcd class operations for s6d6aa1 panel
Donghwa Lee [Fri, 27 Sep 2013 07:42:08 +0000 (16:42 +0900)]
video: cdf-panel: support lcd class operations for s6d6aa1 panel

Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
9 years agos5p-jpeg: Add support for Exynos4x12
Jacek Anaszewski [Thu, 26 Sep 2013 13:36:07 +0000 (15:36 +0200)]
s5p-jpeg: Add support for Exynos4x12

Added support for Exynos4x12 to the s5p-jpeg driver.
This is work-in-progress - only conversions among formats
compatible with S5P version are currently reliable.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
9 years agos5p-jpeg: Use mem-to-mem ioctl helpers
Sylwester Nawrocki [Sun, 25 Aug 2013 20:16:56 +0000 (22:16 +0200)]
s5p-jpeg: Use mem-to-mem ioctl helpers

Simplify the driver by using the m2m ioctl and vb2 helpers.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
9 years agos5p-jpeg: Initialize vfd_decoder->vfl_dir field
Jacek Anaszewski [Wed, 11 Sep 2013 10:11:48 +0000 (12:11 +0200)]
s5p-jpeg: Initialize vfd_decoder->vfl_dir field

This patch fixes regression introduced in the commit
5c77879ff9ab9e7 and caused by not initializing the
vfl_dir field of the vfd_decoder instance of the struct
video_device, after the field was introduced. It precluded
calling the driver ioctls which require vfl_dir not to be
equal to VFL_DIR_RX which is defined as 0 and uninitialized
vfl_dir field is interpreted as such. In effect the unlikely()
condition in the v4l_s_fmt function failed for the ioctls that
expect is_tx to be false, which prevented the ioctl callbacks
registered by the driver from being called.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
9 years agoV4L: Add mem2mem ioctl and file operation helpers
Sylwester Nawrocki [Sat, 14 Sep 2013 21:39:04 +0000 (23:39 +0200)]
V4L: Add mem2mem ioctl and file operation helpers

This patch adds ioctl helpers to the V4L2 mem-to-mem API, so we can avoid
several ioctl handlers in the mem-to-mem video node drivers that are simply
a pass-through to the v4l2_m2m_* calls. These helpers will only be useful
for drivers that use same mutex for both OUTPUT and CAPTURE queue, which
is the case for all currently in tree v4l2 m2m drivers. In order to use
the helpers the drivers are required to use struct v4l2_fh.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
Changes since v1:
 - added v4l2_m2m_ioctl_create_buf().

9 years agousb: gadget: slp: remove rndis_init
Chanho Park [Thu, 26 Sep 2013 05:35:25 +0000 (14:35 +0900)]
usb: gadget: slp: remove rndis_init

This patch removes rndis_init because it was already enabled during module_init.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agodrm: exynos: support drm backlight dpms on/off
Donghwa Lee [Thu, 26 Sep 2013 05:38:02 +0000 (14:38 +0900)]
drm: exynos: support drm backlight dpms on/off

Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
9 years agodrm: Add drm backlight subsystem support
Donghwa Lee [Thu, 26 Sep 2013 05:31:08 +0000 (14:31 +0900)]
drm: Add drm backlight subsystem support

Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
9 years agoWIP: extcon: do not update cable state if notifier cannot handle it
Chanho Park [Wed, 25 Sep 2013 07:47:33 +0000 (16:47 +0900)]
WIP: extcon: do not update cable state if notifier cannot handle it

During probing a extcon-max77693 driver, extcon-port driver can't receive nb
callback due to initializing sequences.
Thus, if the callback can't be handled, we do not update the cable state.
I'm not sure this patch is good solution :)

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agotizen: Update default configuration to enable extcon-port driver
Chanwoo Choi [Mon, 9 Sep 2013 10:47:21 +0000 (19:47 +0900)]
tizen: Update default configuration to enable extcon-port driver

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
9 years agoextcon: Add extcon-port platform device to update uevent of cable
Chanwoo Choi [Mon, 9 Sep 2013 10:44:31 +0000 (19:44 +0900)]
extcon: Add extcon-port platform device to update uevent of cable

This patch add extcon-port platform device to extcon-port driver
to bring up it. extcon-port driver can update uevent of cable
when cable is attached or detached.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
9 years agoextcon: max77693: Define dock constant to remove compile error
Chanwoo Choi [Mon, 9 Sep 2013 10:43:13 +0000 (19:43 +0900)]
extcon: max77693: Define dock constant to remove compile error

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
9 years agoextcon: Add extcon-port driver to maintain compatibility with old jack driver
Chanwoo Choi [Fri, 30 Aug 2013 08:15:53 +0000 (17:15 +0900)]
extcon: Add extcon-port driver to maintain compatibility with old jack driver

This patch add extcon-port driver which maintain compatibility with old JACK
driver(drivers/misc/jack.c). extcon-port driver send uevent to user-space
when receive notification of cable state from EXTCON.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Conflicts:

drivers/extcon/Kconfig
drivers/extcon/Makefile

9 years agodts: arm: add missing clock properties to MCT for Exynos4212
Marek Szyprowski [Wed, 18 Sep 2013 09:09:38 +0000 (11:09 +0200)]
dts: arm: add missing clock properties to MCT for Exynos4212

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
9 years agodmaengine: pl330: use dma_set_max_seg_size to set the sg limit
Vinod Koul [Mon, 2 Sep 2013 16:24:48 +0000 (21:54 +0530)]
dmaengine: pl330: use dma_set_max_seg_size to set the sg limit

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
9 years agodmaengine: dma_slave_caps: remove sg entries
Vinod Koul [Mon, 2 Sep 2013 12:17:33 +0000 (17:47 +0530)]
dmaengine: dma_slave_caps: remove sg entries

As pointed by Russell in [1], the sg properties are already availble in struct device,
so no need to duplicate here.

[1]: http://marc.info/?l=linux-omap&m=137416733628831

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
9 years agodma: pl330: Fix handling of TERMINATE_ALL while processing completed descriptors
Lars-Peter Clausen [Tue, 27 Aug 2013 18:34:05 +0000 (20:34 +0200)]
dma: pl330: Fix handling of TERMINATE_ALL while processing completed descriptors

The pl330 DMA driver is broken in regard to handling a terminate all request
while it is processing the list of completed descriptors. This is most visible
when calling dmaengine_terminate_all() from within the descriptors callback for
cyclic transfers. In this case the TERMINATE_ALL transfer will clear the
work_list and stop the transfer. But after all callbacks for all completed
descriptors have been handled the descriptors will be re-enqueued into the (now
empty) work_list. So the next time dma_async_issue_pending() is called for the
channel these descriptors will be transferred again which will cause data
corruption. Similar issues can occur if dmaengine_terminate_all() is not called
from within the descriptor callback but runs on a different CPU at the same time
as the completed descriptor list is processed.

This patch introduces a new per channel list which will hold the completed
descriptors. While processing the list the channel's lock will be held to avoid
racing against dmaengine_terminate_all(). The lock will be released when calling
the descriptors callback though. Since the list of completed descriptors might
be modified (e.g. by calling dmaengine_terminate_all() from the callback) we can
not use the normal list iterator macros. Instead we'll need to check for each
loop iteration again if there are still items in the list. The drivers
TERMINATE_ALL implementation is updated to move descriptors from both the
work_list as well the new completed_list back to the descriptor pool. This makes
sure that none of the descripts finds its way back into the work list and also
that we do not call any futher complete callbacks after
dmaengine_terminate_all() has been called.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
9 years agodmaengine: make dma_submit_error() return an error code
Dan Carpenter [Sat, 10 Aug 2013 07:46:50 +0000 (10:46 +0300)]
dmaengine: make dma_submit_error() return an error code

The problem here is that the dma_xfer() functions in
drivers/ata/pata_arasan_cf.c and drivers/mtd/nand/fsmc_nand.c expect
dma_submit_error() to return an error code so they return 1 when they
intended to return a negative.

So far as I can tell, none of the ->tx_submit() functions ever do
return error codes so this patch should have no effect in the current
code.

I also changed it from a define to an inline.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dan Williams <djbw@fb.com>
9 years agodma: pl330: split off common code to give back descriptors
Chanho Park [Fri, 9 Aug 2013 11:11:33 +0000 (20:11 +0900)]
dma: pl330: split off common code to give back descriptors

This patch adds __pl330_giveback_descs which give back descriptors when fails
allocating descriptors. It requires to eliminate duplication for
pl330_prep_dma_sg which will be added later.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Acked-by : Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
9 years agodmaengine: add interface of dma_get_slave_channel
Zhangfei Gao [Fri, 28 Jun 2013 12:39:12 +0000 (20:39 +0800)]
dmaengine: add interface of dma_get_slave_channel

Suggested by Arnd, add dma_get_slave_channel interface
Dma host driver could get specific channel specificied by request line, rather than filter.

host example:
static struct dma_chan *xx_of_dma_simple_xlate(struct of_phandle_args *dma_spec,
struct of_dma *ofdma)
{
struct xx_dma_dev *d = ofdma->of_dma_data;
unsigned int request = dma_spec->args[0];

if (request > d->dma_requests)
return NULL;

return dma_get_slave_channel(&(d->chans[request].vc.chan));
}

probe:
of_dma_controller_register((&op->dev)->of_node, xx_of_dma_simple_xlate, d);

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
9 years agodma: pl330: Implement device_slave_caps
Lars-Peter Clausen [Mon, 15 Jul 2013 15:53:08 +0000 (17:53 +0200)]
dma: pl330: Implement device_slave_caps

Implement the device_slave_caps() callback for the pl330 driver. This allows
dmaengine users like the generic ALSA dmaengine PCM driver to query the
capabilities of the driver. The PL330 supports all buswidths and both
mem-to-dev as well as dev-to-mem transfers. In theory there is no limit on the
number of segments that can be transferred (in practice you'll run out of memory
eventually) and the number of bytes per segment is limited by the size of the
PL330 program buffer. Due to the nature of the PL330 the maximum number of bytes
per segment depends on the burstsize, the driver sets it to the value for a
1-byte burstsize, since it is the smallest.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
9 years agodmaengine: add dma_slave_get_caps api
Vinod Koul [Mon, 8 Jul 2013 08:45:25 +0000 (14:15 +0530)]
dmaengine: add dma_slave_get_caps api

add new device callback .device_slave_caps api which can be used by clients to
query the dma channel capablties before they program the channel. This can help
is removing errors during the channel programming. Also add helper
dma_slave_get_caps API

This patch folds the work done by Matt earlier
https://patchwork.kernel.org/patch/2094891/

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
9 years agoRevert "exynos4-is: Ungate uart clocks on system suspend"
Sylwester Nawrocki [Fri, 13 Sep 2013 17:38:40 +0000 (19:38 +0200)]
Revert "exynos4-is: Ungate uart clocks on system suspend"

This reverts commit 85f406b4269d2c5905c59b7ca59484c7b7e00842.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
9 years agoARM: dts: Assign correct UART gate clock to Exynos4x12 FIMC-IS
Sylwester Nawrocki [Fri, 13 Sep 2013 17:20:21 +0000 (19:20 +0200)]
ARM: dts: Assign correct UART gate clock to Exynos4x12 FIMC-IS

Use gate from CLK_GAT_IP_ISP register rather than MUX clock output gate
from CLK_SRC_MASK_ISP.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>