Commit Graph

2443 Commits

Author SHA1 Message Date
张晴
ef343c530a rk312x:rt5036:support power off when charge 2014-10-23 16:59:08 +08:00
zhangqing
5932cde9e4 rk312x:pmic:rk818:slove irq handle failed 2014-10-15 09:54:00 +08:00
zhangqing
bb24c5d1b9 rk312x:rt5025&rt5036:modify usb irq error 2014-09-24 16:00:09 +08:00
张晴
1142cc6021 rk312x:pmic:rt5036:support pmic rt5036 drivers 2014-09-11 14:28:23 +08:00
张晴
19b284b24e rk32:rk808:modify kconfig for rk808_mfd 2014-08-22 16:32:40 +08:00
张晴
476cbef830 rk312x:rt5025:support pmic rt5025 2014-08-22 10:01:21 +08:00
dkl
4ae0521064 rk818: disable otg and boost when in sleep mode 2014-08-12 11:57:29 +08:00
dkl
e41271d341 pmic: rk818: modify shutdown function and fix compile errors
1. Modify the rk818 shutdown function refering to rk808.
2. Fix some compile errors.
2014-07-25 16:23:54 +08:00
张晴
0cbedcde3c rk3288:pmic:rk808&act8846&ricoh619:fixed msleep to mdelay in shutdown function 2014-06-16 14:39:00 +08:00
黄涛
ee25a425b9 Merge tag 'lsk-android-14.05' into develop-3.10
lsk 14.05 android release

Conflicts:
	arch/arm/common/Kconfig
	arch/arm64/include/asm/arch_timer.h
	drivers/staging/android/fiq_debugger/fiq_debugger.c
	drivers/usb/Kconfig
2014-06-12 21:04:26 +08:00
张晴
61f30b7316 rk3288:pmic:rk808:modify some warnings 2014-06-12 15:35:37 +08:00
张晴
75e9568f06 rk3288:pmic:ricoh619:modify some warnings 2014-06-12 15:33:37 +08:00
黄涛
66bd82550f rk808: fix deadlock when shutown or reboot
When shutdown, rk808 driver shutdown first, so io_lock mutex is locked.
At same time, gpu change freq by runtime pm, will locked on rk808_reg_read.
Finally, gpu device shutdown, call pm_runtime_barrier. Deadlock happens.

Fix this bug by make rk808 shutdown later.

  task                PC stack   pid father
init            D c06e9a14     0     1      0 0x00000000
[<c06e9a14>] (__schedule+0x48c/0x554) from [<c02e281c>] (__pm_runtime_barrier+0x114/0x138)
[<c02e281c>] (__pm_runtime_barrier+0x114/0x138) from [<c02e3cf4>] (pm_runtime_barrier+0x68/0xb8)
[<c02e3cf4>] (pm_runtime_barrier+0x68/0xb8) from [<c02d85ac>] (device_shutdown+0xa0/0x190)
[<c02d85ac>] (device_shutdown+0xa0/0x190) from [<c0042128>] (kernel_restart+0xc/0x50)
[<c0042128>] (kernel_restart+0xc/0x50) from [<c00422c4>] (SyS_reboot+0x150/0x1b0)
[<c00422c4>] (SyS_reboot+0x150/0x1b0) from [<c000da00>] (ret_fast_syscall+0x0/0x30)
kworker/2:1     D c06e9a14     0    32      2 0x00000000
Workqueue: pm pm_runtime_work
[<c06e9a14>] (__schedule+0x48c/0x554) from [<c06e9ec0>] (schedule_preempt_disabled+0x24/0x34)
[<c06e9ec0>] (schedule_preempt_disabled+0x24/0x34) from [<c06e8bf8>] (__mutex_lock_slowpath+0x1c0/0x22c)
[<c06e8bf8>] (__mutex_lock_slowpath+0x1c0/0x22c) from [<c06e8c94>] (mutex_lock+0x30/0x48)
[<c06e8c94>] (mutex_lock+0x30/0x48) from [<c02f0dbc>] (rk808_reg_read+0x24/0x5c)
[<c02f0dbc>] (rk808_reg_read+0x24/0x5c) from [<c02f0fa8>] (rk808_dcdc_is_enabled+0x28/0x38)
[<c02f0fa8>] (rk808_dcdc_is_enabled+0x28/0x38) from [<c02a6acc>] (_regulator_is_enabled+0x34/0x40)
[<c02a6acc>] (_regulator_is_enabled+0x34/0x40) from [<c02a6c50>] (_regulator_do_set_voltage+0xbc/0x3e4)
[<c02a6c50>] (_regulator_do_set_voltage+0xbc/0x3e4) from [<c02a7c1c>] (regulator_set_voltage+0xc0/0xe0)
[<c02a7c1c>] (regulator_set_voltage+0xc0/0xe0) from [<c0027b7c>] (dvfs_regulator_set_voltage_readback.isra.6+0x14/0x8c)
[<c0027b7c>] (dvfs_regulator_set_voltage_readback.isra.6+0x14/0x8c) from [<c0027d5c>] (dvfs_scale_volt_direct+0xa0/0xc4)
[<c0027d5c>] (dvfs_scale_volt_direct+0xa0/0xc4) from [<c0027f24>] (dvfs_target+0x1a4/0x1d4)
[<c0027f24>] (dvfs_target+0x1a4/0x1d4) from [<c00273e8>] (dvfs_clk_set_rate+0x44/0x80)
[<c00273e8>] (dvfs_clk_set_rate+0x44/0x80) from [<c02c1388>] (mali_dvfs_clk_set+0x28/0x48)
[<c02c1388>] (mali_dvfs_clk_set+0x28/0x48) from [<c02c01f4>] (kbase_platform_dvfs_set_level+0x9c/0xe0)
[<c02c01f4>] (kbase_platform_dvfs_set_level+0x9c/0xe0) from [<c02c032c>] (kbase_platform_dvfs_enable+0xf4/0x110)
[<c02c032c>] (kbase_platform_dvfs_enable+0xf4/0x110) from [<c02bf908>] (pm_callback_runtime_off+0x3c/0x58)
[<c02bf908>] (pm_callback_runtime_off+0x3c/0x58) from [<c02d2650>] (kbase_device_runtime_suspend+0x24/0x34)
[<c02d2650>] (kbase_device_runtime_suspend+0x24/0x34) from [<c02de738>] (pm_generic_runtime_suspend+0x2c/0x40)
[<c02de738>] (pm_generic_runtime_suspend+0x2c/0x40) from [<c02e25c4>] (__rpm_callback+0x38/0x68)
[<c02e25c4>] (__rpm_callback+0x38/0x68) from [<c02e2658>] (rpm_callback+0x64/0x7c)
[<c02e2658>] (rpm_callback+0x64/0x7c) from [<c02e3210>] (rpm_suspend+0x2d8/0x534)
[<c02e3210>] (rpm_suspend+0x2d8/0x534) from [<c02e3e60>] (pm_runtime_work+0x7c/0x94)
[<c02e3e60>] (pm_runtime_work+0x7c/0x94) from [<c004773c>] (process_one_work+0x29c/0x458)
[<c004773c>] (process_one_work+0x29c/0x458) from [<c0047a8c>] (worker_thread+0x194/0x2d4)
[<c0047a8c>] (worker_thread+0x194/0x2d4) from [<c004cf74>] (kthread+0xa0/0xac)
[<c004cf74>] (kthread+0xa0/0xac) from [<c000da98>] (ret_from_fork+0x14/0x3c)
2014-06-06 18:52:14 +08:00
张晴
ca5de5f006 rk3288:pmic:ricoh619:modify some warning 2014-06-06 11:09:24 +08:00
张晴
771f732bdb rk3288:pmic:ricoh619:add some lock and modify suspend func 2014-06-06 11:04:37 +08:00
张晴
8421ff1017 rk3288:pmic:act8846:support power off when charger;ricoh619:add protect for i2c error 2014-06-05 16:32:51 +08:00
张晴
ea281355f6 rk3288:pmic:rk808&act8846:slove init suspend and resume when device init failed;modify rk808 shutdown func 2014-05-27 17:02:31 +08:00
张晴
8f8749c359 rk3288:pmic:ricoh619:modify some warning 2014-05-27 09:28:18 +08:00
张晴
50fa88d460 rk3288:pmic:ricoh619:slove reboot i2c error;modify power off;slove fg 100% 2014-05-26 16:32:01 +08:00
张晴
77b2eae948 rk3288:pmic:ricoh619:slove pwrkey missed when wakeup;modify some fg error 2014-05-22 16:53:53 +08:00
张晴
a40cc1f883 rk3288:pmic:ricoh619:slove read id error for first time 2014-05-13 11:25:07 +08:00
张晴
6c434c72bc rk3288:pmic:ricoh619:modify shutdown without lock 2014-05-12 14:04:58 +08:00
张晴
6e7bc37e9c rk3288:pmic:rk808&syr82x:modify lock error 2014-05-09 10:06:40 +08:00
张晴
86e76f233f rk3288:pmic:rk808:modify warning for shutdown 2014-05-08 17:15:58 +08:00
张晴
971b4afb18 rk3288:pmic:rk808:modify power off have lock;add protect for i2c error 2014-05-08 15:29:05 +08:00
Mark Brown
03b1200275 Merge tag 'v3.10.39' into linux-linaro-lsk
This is the 3.10.39 stable release
2014-05-07 09:50:01 +01:00
Krzysztof Kozlowski
81a6cff473 mfd: tps65910: Fix possible invalid pointer dereference on regmap_add_irq_chip fail
commit 483e2dfdbc upstream.

Fixes: 4aab3fadad ("mfd: tps65910: Move interrupt implementation code to mfd file")

tps65910_irq_init() sets 'tps65910->chip_irq' before calling
regmap_add_irq_chip(). If the regmap_add_irq_chip() call fails in
memory allocation of regmap_irq_chip_data members then:

1. The 'tps65910->chip_irq' will still hold some value
2. 'tps65910->irq_data' will be pointing to already freed memory
   (because regmap_add_irq_chip() will free it on error)

This results in invalid memory access during driver remove because the
tps65910_irq_exit() tests whether 'tps65910->chip_irq' is not zero.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06 07:55:28 -07:00
Krzysztof Kozlowski
e2736c784b mfd: max8997: Fix possible NULL pointer dereference on i2c_new_dummy error
commit 97dc4ed3fa upstream.

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 i2c_unregister_device().

If i2c_new_dummy() fails for RTC, haptic or MUIC devices, fail also the
probe for main MFD driver.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06 07:55:28 -07:00
Krzysztof Kozlowski
fe22769b21 mfd: max8998: Fix possible NULL pointer dereference on i2c_new_dummy error
commit ed26f87b9f upstream.

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 i2c_unregister_device().

If i2c_new_dummy() fails for RTC device, fail also the probe for
main MFD driver.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06 07:55:28 -07:00
Krzysztof Kozlowski
64ff251f37 mfd: max8925: Fix possible NULL pointer dereference on i2c_new_dummy error
commit 96cf3dedc4 upstream.

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 i2c_unregister_device().

If i2c_new_dummy() fails for RTC or ADC devices, fail also the probe
for main MFD driver.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06 07:55:28 -07:00
Krzysztof Kozlowski
3d017bfb19 mfd: max77693: Fix possible NULL pointer dereference on i2c_new_dummy error
commit ad09dd6a1f upstream.

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 devm_regmap_init_i2c() and i2c_unregister_device().

If i2c_new_dummy() fails for MUIC or haptic devices, fail also the probe
for main MFD driver.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06 07:55:28 -07:00
Krzysztof Kozlowski
ee2a4e597a mfd: max77686: Fix possible NULL pointer dereference on i2c_new_dummy error
commit b9e183a1d4 upstream.

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 i2c_unregister_device().

If i2c_new_dummy() fails for RTC device, fail also the probe for main
MFD driver.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06 07:55:28 -07:00
Krzysztof Kozlowski
fe293a297e mfd: 88pm860x: Fix I2C device resource leak on regmap init fail
commit a7ab1c8b26 upstream.

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.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06 07:55:28 -07:00
Krzysztof Kozlowski
da0bc89767 mfd: 88pm860x: Fix possible NULL pointer dereference on i2c_new_dummy error
commit 159ce52a6b upstream.

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 regmap_init_i2c().

If i2c_new_dummy() fails for companion device, fail also the probe for
main MFD driver.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06 07:55:27 -07:00
Krzysztof Kozlowski
aea2ad9c61 mfd: sec-core: Fix possible NULL pointer dereference when i2c_new_dummy error
commit 65aba1e049 upstream.

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 i2c_unregister_device().

If i2c_new_dummy() fails for RTC device, fail also the probe for main
MFD driver.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06 07:55:27 -07:00
张晴
89825aecd4 rk3288:pmu:ricoh619:support charger usb connect to adp;enable clkout2 when init 2014-05-06 14:10:32 +08:00
许盛飞
f575a0f312 RK818: add rk818-battery driver 2014-05-06 11:27:03 +08:00
张晴
95495c4c3c rk3288:rk808:get dc1\2 voltage when power off and reboot 2014-05-04 14:24:30 +08:00
张晴
a2f2439493 rk3288:rk808:get dc0\1 voltage when power off 2014-05-04 11:19:40 +08:00
张晴
de0f0d2cbc rk3288:ricoh619:add dc_det function,add ricoh619.txt 2014-04-29 11:15:29 +08:00
张晴
356ca54463 rk3288:pmic:rk818:support rk818 regulator and rtc 2014-04-16 16:23:17 +08:00
张晴
95ead8899f rk3288:pmic:rk808&ricoh619:support low level type irq and high level type irq 2014-04-16 14:02:06 +08:00
张晴
3ee7d75759 rk3288:rk808:slove rk808 auto power on when power off 2014-04-15 09:18:46 +08:00
张晴
d69f6b8301 rk3288:ricoh619&syb827:support pmic ricoh619 and dcdc syb827 2014-04-14 14:39:17 +08:00
张晴
519dd69f1c rk3288:rk808:disable dcdc uv function 2014-04-08 09:24:48 +08:00
张晴
ea8feec5db rk3288:rk808:support two switch enable and disable as ldo 2014-03-31 13:51:48 +08:00
张晴
5351b7e59f rk3288;rk808:support two switch as ldo & enable rk808 irq to wakeup 2014-03-31 10:56:37 +08:00
张晴
378314b243 rk3288:rk808:support rk808 power off 2014-03-27 11:28:44 +08:00
张晴
ebc62c4608 rk3288:rk808:support clkout2 enable when pmic power on 2014-03-24 10:06:53 +08:00
张晴
b38e601508 rk3288:modify rk808 vabt low error, set charger current 2014-03-20 21:21:08 +08:00