[PATCH] mfd: sec-core: Fix possible NULL pointer dereference when i2c_new_dummy error

2014-02-11 Thread Krzysztof Kozlowski
During probe the sec-core driver allocates dummy I2C device for RTC with i2c_new_dummy() but return value is not checked. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later used by devm_regmap_init_i2c() or

Re: [PATCH 00/12] ARM: S3C24XX: convert s3c2410, s3c2440 s3c2442 to common clock framework

2014-02-11 Thread Heiko Stübner
Hi Kukjin, Am Dienstag, 11. Februar 2014, 11:46:13 schrieb Kukjin Kim: 2014-02-10 1:26 GMT+05:30 Tomasz Figa tomasz.f...@gmail.com: For patches 4, 5, 9, 10, 11, 12: Reviewed-by: Tomasz Figa t.f...@samsung.com For patches 6, 7: Acked-by: Tomasz Figa t.f...@samsung.com

Re: [PATCH v1 0/1] Boot all secondary cores on Exynos SoC's

2014-02-11 Thread Sachin Kamat
Hi Tarek, On 11 February 2014 12:56, Tarek Dakhran t.dakh...@samsung.com wrote: Hi Sachin, Current implementation allow to boot only one secondary core. This patch makes possible to boot 4 cores on Exynos5420 and Exynos5410 SoC's I also get 4 cores up with the mainline kernel on SMDK 5420

Re: [PATCH] mfd: sec-core: Fix possible NULL pointer dereference when i2c_new_dummy error

2014-02-11 Thread Lee Jones
During probe the sec-core driver allocates dummy I2C device for RTC with i2c_new_dummy() but return value is not checked. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later used by devm_regmap_init_i2c() or

[PATCH 1/7] mfd: 88pm860x: Fix possible NULL pointer dereference on i2c_new_dummy error

2014-02-11 Thread Krzysztof Kozlowski
During probe the driver allocates dummy I2C device for companion chip with i2c_new_dummy() but it does not check the return value of this call. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later used by

[PATCH 3/7] mfd: max77686: Fix possible NULL pointer dereference on i2c_new_dummy error

2014-02-11 Thread Krzysztof Kozlowski
During probe the driver allocates dummy I2C device for RTC with i2c_new_dummy() but it does not check the return value of this call. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later used by

[PATCH 2/7] mfd: 88pm860x: Fix I2C device resource leak on regmap init fail

2014-02-11 Thread Krzysztof Kozlowski
During probe the driver allocates dummy I2C device for companion chip and then allocates a regmap for it. If regmap_init_i2c() fails then the I2C driver (allocated with i2c_new_dummy()) is not freed and this resource leaks. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Cc:

Re: [PATCH V2 2/3] ARM: dts: add dts files for exynos5260 SoC

2014-02-11 Thread Tomasz Figa
Hi Rahul, On 11.02.2014 06:22, Rahul Sharma wrote: Hi Tomasz, On 6 February 2014 18:51, Tomasz Figa t.f...@samsung.com wrote: Hi Rahul, Pankaj, Arun, [adding linux-arm-kernel, devicetree MLs and DT people on Cc] I think it's good time to stop accepting DTS files like this and force new ones

[PATCH 7/7] mfd: max8998: Fix possible NULL pointer dereference on i2c_new_dummy error

2014-02-11 Thread Krzysztof Kozlowski
During probe the driver allocates dummy I2C device for RTC with i2c_new_dummy() but it does not check the return value of this call. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later used by

[PATCH 4/7] mfd: max77693: Fix possible NULL pointer dereference on i2c_new_dummy error

2014-02-11 Thread Krzysztof Kozlowski
During probe the driver allocates dummy I2C devices for MUIC and haptic with i2c_new_dummy() but it does not check the return value of this calls. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later used by

[PATCH 6/7] mfd: max8997: Fix possible NULL pointer dereference on i2c_new_dummy error

2014-02-11 Thread Krzysztof Kozlowski
During probe the driver allocates dummy I2C devices for RTC, haptic and MUIC with i2c_new_dummy() but it does not check the return value of this calls. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later used by

[PATCH 5/7] mfd: max8925: Fix possible NULL pointer dereference on i2c_new_dummy error

2014-02-11 Thread Krzysztof Kozlowski
During probe the driver allocates dummy I2C devices for RTC and ADC with i2c_new_dummy() but it does not check the return value of this calls. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later used by

Re: [PATCH 1/1] ARM: EXYNOS: Consolidate Kconfig entries

2014-02-11 Thread Tomasz Figa
On 11.02.2014 07:10, Kukjin Kim wrote: 2014-02-10 10:20 GMT+05:30 Sachin Kamat sachin.ka...@linaro.org: On 7 February 2014 22:03, Tomasz Figa t.f...@samsung.com wrote: On 06.02.2014 19:59, Olof Johansson wrote: On Thu, Feb 6, 2014 at 10:43 AM, Bartlomiej Zolnierkiewicz

Re: [PATCH 1/1] ARM: EXYNOS: Consolidate Kconfig entries

2014-02-11 Thread Tomasz Figa
On 11.02.2014 07:30, Olof Johansson wrote: Hi, On Mon, Feb 10, 2014 at 10:10 PM, Kukjin Kim kgene@gmail.com wrote: 2014-02-10 10:20 GMT+05:30 Sachin Kamat sachin.ka...@linaro.org: On 7 February 2014 22:03, Tomasz Figa t.f...@samsung.com wrote: On 06.02.2014 19:59, Olof Johansson

Re: [PATCH 3/7] mfd: max77686: Fix possible NULL pointer dereference on i2c_new_dummy error

2014-02-11 Thread Lee Jones
On Tue, 11 Feb 2014, Krzysztof Kozlowski wrote: During probe the driver allocates dummy I2C device for RTC with i2c_new_dummy() but it does not check the return value of this call. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function

Re: [PATCH 1/7] mfd: 88pm860x: Fix possible NULL pointer dereference on i2c_new_dummy error

2014-02-11 Thread Lee Jones
On Tue, 11 Feb 2014, Krzysztof Kozlowski wrote: During probe the driver allocates dummy I2C device for companion chip with i2c_new_dummy() but it does not check the return value of this call. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this

Re: [PATCH 6/7] mfd: max8997: Fix possible NULL pointer dereference on i2c_new_dummy error

2014-02-11 Thread Lee Jones
On Tue, 11 Feb 2014, Krzysztof Kozlowski wrote: During probe the driver allocates dummy I2C devices for RTC, haptic and MUIC with i2c_new_dummy() but it does not check the return value of this calls. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be

Re: [PATCH 7/7] mfd: max8998: Fix possible NULL pointer dereference on i2c_new_dummy error

2014-02-11 Thread Lee Jones
On Tue, 11 Feb 2014, Krzysztof Kozlowski wrote: During probe the driver allocates dummy I2C device for RTC with i2c_new_dummy() but it does not check the return value of this call. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function

Re: [PATCH 5/7] mfd: max8925: Fix possible NULL pointer dereference on i2c_new_dummy error

2014-02-11 Thread Lee Jones
On Tue, 11 Feb 2014, Krzysztof Kozlowski wrote: During probe the driver allocates dummy I2C devices for RTC and ADC with i2c_new_dummy() but it does not check the return value of this calls. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this

Re: [PATCH 4/7] mfd: max77693: Fix possible NULL pointer dereference on i2c_new_dummy error

2014-02-11 Thread Lee Jones
On Tue, 11 Feb 2014, Krzysztof Kozlowski wrote: During probe the driver allocates dummy I2C devices for MUIC and haptic with i2c_new_dummy() but it does not check the return value of this calls. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used)

Re: [PATCH 2/7] mfd: 88pm860x: Fix I2C device resource leak on regmap init fail

2014-02-11 Thread Lee Jones
On Tue, 11 Feb 2014, Krzysztof Kozlowski wrote: During probe the driver allocates dummy I2C device for companion chip and then allocates a regmap for it. If regmap_init_i2c() fails then the I2C driver (allocated with i2c_new_dummy()) is not freed and this resource leaks. Signed-off-by:

[PATCH 04/14] rtc: s5m: Remove undocumented time init on first boot

2014-02-11 Thread Krzysztof Kozlowski
This patch removes the code for initializing time if this is first boot. The code for detecting first boot uses undocumented field RTC_TCON in RTC_UDR_CON register. According to S5M8767's datasheet this field is reserved. On S2MPS14 it is not documented at all. On device first boot the registers

[PATCH 00/14] mfd/regulator/rtc: sec: Add support for S2MPS14

2014-02-11 Thread Krzysztof Kozlowski
-next: next-20140211 *with* today's patch: mfd: sec-core: Fix possible NULL pointer dereference when i2c_new_dummy error TODO Add support for S2MPS14 to the S2MPS11 clock driver. The patch is actually ready but it is based on the Add support for clocks in S5M8767 http://thread.gmane.org

[PATCH 10/14] Documentation: mfd: s2mps11: Document support for S2MPS14

2014-02-11 Thread Krzysztof Kozlowski
Add bindings documentation for S2MPS14 device to the s2mps11 driver. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Cc: Mark Brown broo...@kernel.org Cc: Liam Girdwood lgirdw...@gmail.com Cc: Tomasz Figa t.f...@samsung.com Cc: devicet...@vger.kernel.org Cc: Rob Herring

[PATCH 07/14] regulator: s2mps11: Choose number of supported regulators during probe

2014-02-11 Thread Krzysztof Kozlowski
During probe choose how many regulators will be supported according to device ID. Allocate array of of_regulator_match() dynamically (based number of regulators) instead of allocation on the stack. This is needed for supporting different devices in s2mps11 driver and actually prepares the

[PATCH 08/14] mfd: sec: Add support for S2MPS14

2014-02-11 Thread Krzysztof Kozlowski
Add support for S2MPS14 PMIC device to the MFD sec-core driver. The S2MPS14 is similar to S2MPS11 but it has fewer regulators, two clocks instead of three and a little different registers layout. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com --- drivers/mfd/sec-core.c |

[PATCH 09/14] regulator: s2mps11: Add support for S2MPS14 regulators

2014-02-11 Thread Krzysztof Kozlowski
Add support for S2MPS14 PMIC regulators to s2mps11 driver. The S2MPS14 has fewer BUCK-s and LDO-s than S2MPS11. It also does not support controlling the BUCK ramp delay. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Cc: Mark Brown broo...@kernel.org Cc: Liam Girdwood

[PATCH 02/14] mfd: sec: Select different RTC regmaps for devices

2014-02-11 Thread Krzysztof Kozlowski
This patch prepares for adding support for S2MPS14 RTC driver by selecting different regmaps for S2MPS1X/S5M876X RTC devices. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com --- drivers/mfd/sec-core.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git

[PATCH 11/14] regulator: s2mps11: Add opmode for S2MPS14 regulators

2014-02-11 Thread Krzysztof Kozlowski
S2MPS11/S2MPS14 regulators support different modes of operation: - Always off; - On/Off controlled by pin/GPIO (PWREN/LDOEN/EMMCEN); - Always on; This is very similar to S5M8767 regulator driver which also supports opmodes (although S5M8767 have also low-power mode). This patch adds parsing

[PATCH 13/14] rtc: s5m: Support different register layout

2014-02-11 Thread Krzysztof Kozlowski
This patch prepares for adding support for S2MPS14 RTC device to the rtc-s5m driver: 1. Adds a map of registers used by the driver which differ between the chipsets (S5M876X and S2MPS14). 2. Moves code of checking for alarm pending to separate function. Signed-off-by: Krzysztof Kozlowski

[PATCH 12/14] Documentation: mfd/regulator: s2mps11: Document the op_mode bindings

2014-02-11 Thread Krzysztof Kozlowski
Document the op_mode properties parsed from DTS by s2mps11 driver. S2MPS11/S2MPS14 regulators support different modes of operation: - Always off; - On/Off controlled by pin/GPIO (PWREN/LDOEN/EMMCEN); - Always on; This is very similar to S5M8767 regulator driver which also supports opmodes

[PATCH 14/14] rtc: s5m: Add support for S2MPS14 RTC

2014-02-11 Thread Krzysztof Kozlowski
Add support for S2MPS14 to the rtc-s5m driver. Differences in S2MPS14 (in comparison to S5M8767): - Layout of registers; - Lack of century support for time and alarms (7 registers used for storing time/alarm); - Two buffer control registers: WUDR and RUDR; - No register for enabling writing

[PATCH 05/14] mfd: sec: Use consistent S2MPS11 RTC alarm interrupt indexes

2014-02-11 Thread Krzysztof Kozlowski
The S2MPS11 RTC has two alarms: alarm0 and alarm1 (corresponding interrupts are named similarly). Use consistent names for interrupts to limit possible errors. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com --- drivers/mfd/sec-irq.c |8

[PATCH 01/14] mfd: sec: Add maximum RTC register for regmap config

2014-02-11 Thread Krzysztof Kozlowski
Add maximum register to the regmap used by rtc-s5m driver. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com --- drivers/mfd/sec-core.c |2 ++ include/linux/mfd/samsung/rtc.h |2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/mfd/sec-core.c

[PATCH 03/14] mfd/rtc: sec/sec: Rename SEC* symbols to S5M

2014-02-11 Thread Krzysztof Kozlowski
This patch prepares for adding support for S2MPS14 RTC device to the rtc-s5m driver: 1. Renames SEC* symbols to S5M. 2. Adds S5M prefix to some of defines which are different between S5M876X and S2MPS14. This is only a rename-like patch, new code is not added. Signed-off-by: Krzysztof Kozlowski

[PATCH 06/14] regulator: s2mps11: Constify regulator_desc array

2014-02-11 Thread Krzysztof Kozlowski
Constify the regulator_desc 'regulators' array. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Cc: Mark Brown broo...@kernel.org Cc: Liam Girdwood lgirdw...@gmail.com --- drivers/regulator/s2mps11.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH V4] max8925_power: Use IS_ENABLED(CONFIG_OF) for DT code.

2014-02-11 Thread Manish Badarkhe
Hi Dmitry, On Tue, Jan 28, 2014 at 10:24 PM, Manish Badarkhe badarkhe.man...@gmail.com wrote: Instead of #ifdef CONFIG_OF use IS_ENABLED(CONFIG_OF) option for DT code to avoid if-deffery in code. Signed-off-by: Manish Badarkhe badarkhe.man...@gmail.com --- Changes since V1: 1.Updated code

Re: [PATCH] ASoC: smdk_wm8994: Fix typo wm8894

2014-02-11 Thread Mark Brown
On Mon, Feb 10, 2014 at 10:25:31PM +0100, Paul Bolle wrote: Signed-off-by: Paul Bolle pebo...@tiscali.nl Applied, thanks. signature.asc Description: Digital signature

[PATCH] ARM: dts: exynos5250-arndale: Keep G3D regulator always on

2014-02-11 Thread Tomasz Figa
Apparently, if G3D regulator is powered off, the SoC cannot enter low power modes and just hangs. This patch fixes this by keeping the regulator always on when the system is running, as suggested by Exynos 4 User's Manual in case of Exynos4210/4x12 SoCs (Exynos5250 UM does not have such note, but

Re: [PATCH v2 00/12] Samsung PM consolidation part 2 (multiplatform)

2014-02-11 Thread Tomasz Figa
On 06.02.2014 20:12, Tomasz Figa wrote: Current Samsung PM code is heavily unprepared for multiplatform systems. The design implies accessing functions and global variables defined in particular mach- subdirectory from common code in plat-, which is not allowed when building ARCH_MULTIPLATFORM.

Re: [PATCH 1/3] arm64: dts: add initial dts for Samsung GH7 SoC and SSDK-GH7 board

2014-02-11 Thread Mark Rutland
On Tue, Feb 11, 2014 at 06:29:41AM +, Kukjin Kim wrote: Signed-off-by: Kukjin Kim kgene@samsung.com Reviewed-by: Thomas Abraham thomas...@samsung.com Cc: Catalin Marinas catalin.mari...@arm.com --- arch/arm64/boot/dts/samsung-gh7.dtsi | 108 ++

Re: [PATCH 1/3] arm64: dts: add initial dts for Samsung GH7 SoC and SSDK-GH7 board

2014-02-11 Thread Olof Johansson
Hi, Besides what Mark Rutland already commented on: On Mon, Feb 10, 2014 at 10:29 PM, Kukjin Kim kgene@samsung.com wrote: +/ { + model = SAMSUNG GH7; + compatible = samsung,gh7; Model and compatible in the dtsi should probably always be overridden by a dts that includes it,

Re: [PATCH 2/3] arm64: Add Kconfig option for Samsung GH7 SoC family

2014-02-11 Thread Olof Johansson
On Mon, Feb 10, 2014 at 10:29 PM, Kukjin Kim kgene@samsung.com wrote: This patch adds support for Samsung GH7 SoC in arm64/Kconfig. Signed-off-by: Kukjin Kim kgene@samsung.com Cc: Catalin Marinas catalin.mari...@arm.com The overhead of building one more device tree isn't very large,

Re: [PATCH] ARM: SAMSUNG: remove unneeded s3c24xx_init_cpu()

2014-02-11 Thread Heiko Stübner
Am Sonntag, 12. Januar 2014, 21:34:29 schrieb Heiko Stübner: The function is nearly empty and samsung_cpu_rev is static so already 0 making the function obsolete, therefore remove it. Signed-off-by: Heiko Stuebner he...@sntech.de ping :-) --- arch/arm/mach-s3c24xx/common.c |

Re: [PATCH] ARM: SAMSUNG: remove obsolete tick.h

2014-02-11 Thread Heiko Stübner
Am Freitag, 10. Januar 2014, 17:17:43 schrieb kg...@kernel.org: Heiko Stübner wrote: Commit 48cf83dc12f2 (ARM: samsung: remove unused tick.h) removed some occurences of tick.h. tick.h itself and s3c24xx_ostimer_pending was only used by the old timer driver and is not used anymore.

Re: [PATCH] ARM: dts: exynos5250-arndale: Keep G3D regulator always on

2014-02-11 Thread Tushar Behera
On 11 February 2014 23:20, Tomasz Figa t.f...@samsung.com wrote: Apparently, if G3D regulator is powered off, the SoC cannot enter low power modes and just hangs. This patch fixes this by keeping the regulator always on when the system is running, as suggested by Exynos 4 User's Manual in case

Re: [RFC PATCHv1] usb: dwc2: Combine the dwc2 and s3c_hsotg into a single USB DRD driver.

2014-02-11 Thread Stephen Warren
On 02/04/2014 02:45 PM, dingu...@altera.com wrote: From: Dinh Nguyen dingu...@altera.com This means that the driver can be in host or peripheral mode when the appropriate connector is used. When an A-cable is plugged in, the driver behaves in host mode, and when a B-cable is used, the

Re: [RFC PATCHv1] usb: dwc2: Combine the dwc2 and s3c_hsotg into a single USB DRD driver.

2014-02-11 Thread Jingoo Han
On Wednesday, February 12, 2014 2:34 PM, Stephen Warren wrote: On 02/04/2014 02:45 PM, dingu...@altera.com wrote: From: Dinh Nguyen dingu...@altera.com This means that the driver can be in host or peripheral mode when the appropriate connector is used. When an A-cable is plugged in,

Re: [RFC PATCHv1] usb: dwc2: Combine the dwc2 and s3c_hsotg into a single USB DRD driver.

2014-02-11 Thread Dinh Nguyen
On 2/11/14 11:56 PM, Jingoo Han wrote: On Wednesday, February 12, 2014 2:34 PM, Stephen Warren wrote: On 02/04/2014 02:45 PM, dingu...@altera.com wrote: From: Dinh Nguyen dingu...@altera.com This means that the driver can be in host or peripheral mode when the appropriate connector is