05 Aug, 2019
1 commit
-
There is issue that system can't enter suspend while the si476x is
working.The reason is that with the workqueue thread is still working after
i2c enter suspend, then cause the cpu_suspend function failed.This patch is to use the system_freezable_wq instead of the system_wq,
that the workqueue will be freeze before system enter suspend.Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman
26 Jul, 2019
1 commit
-
export symbols to fix build error as a module:
ERROR: "max17135_reg_read" [drivers/hwmon/max17135-hwmon.ko] undefined!
Signed-off-by: Julien Olivain
Acked-by: Robby Cai
20 May, 2019
1 commit
-
The reset button on imx8mm-evk is tied to PWRON_B pin of bd71847 and the
long press duration is set to zero from OTP. The linux driver overrides
those values and breaks reset from button.Overwriting OTP or bootloader configuration with some hardcoded defaults
is not desirable, keep already programmed values instead.Signed-off-by: Leonard Crestez
Acked-By: Matti Vaittinen
18 Apr, 2019
20 commits
-
Casting address to unsigned int causes a warning on some 64 bit
architectures. Fix the cast.Signed-off-by: Matti Vaittinen
Reported-by: Stephen Rothwell
Signed-off-by: Mark Brown
(cherry picked from commit eb108c3611dd21d5d058cee25fec1c29baf5b0c9) -
Rename parts of code that support both BD71837 and BD71847 to BD718XX.
Signed-off-by: Matti Vaittinen
Acked-by: Lee Jones
Signed-off-by: Mark Brown
(cherry picked from commit dd2be639f4a918b335818bf22a937956e552b957) -
BD71847 is reduced version of BD71837. DVS bucks 3 and 4 are
removed as is LDO7. Voltage ranges of some regulators are
expanded.Add initial support for BD71847 with BD71837 driver.
Signed-off-by: Matti Vaittinen
Acked-by: Lee Jones
Signed-off-by: Mark Brown
(cherry picked from commit 494edd266b945f36908184433dd36eda1719cdb0) -
When remove sound card build config, there will be error
drivers/built-in.o: In function `mxc_hdmi_register_audio':
vf610_adc.c:(.text+0xd64f8): undefined reference to `_snd_pcm_stream_lock_irqsave'
vf610_adc.c:(.text+0xd6518): undefined reference to `snd_pcm_stream_unlock_irqrestore'
drivers/built-in.o: In function `mxc_hdmi_abort_stream':
vf610_adc.c:(.text+0xd65a4): undefined reference to `_snd_pcm_stream_lock_irqsave'
vf610_adc.c:(.text+0xd65d0): undefined reference to `snd_pcm_stream_unlock_irqrestore'
make: *** [vmlinux] Error 1Signed-off-by: Shengjiu Wang
Signed-off-by: Vipul Kumar -
Charger interrupt can't be caught anymore after plug in DC 5V in/out
dozens of times, that caused by VBUS_I or CHG_I pending interrupt not
cleared in time. The root cause is VBUS_I and CHG_I will be triggered in
very narrow window, and VBUS_I/CHG_I act as the sub-interrupt of charger
and share the same interrupt handler. Thus if CHG_I interrupt status is
coming while VBUS_I handler is running, CHG_I interrupt status will never
be cleared, since interrupt has been disabled in ISR. The unclear CHG_I
interrupt status make pf1550 never trigger next interrupt again. So clear
all charger interrupt status in ISR to workaround instead of ack for every
sub-interrupt.Signed-off-by: Robin Gong
Signed-off-by: Vipul Kumar -
That's pf1550's internal interrupt, useless for charger.
Signed-off-by: Robin Gong
Signed-off-by: Vipul Kumar -
check OTP_SW2_DVS_ENB bit for the different voltage list while SW2
regulator registered.Signed-off-by: Robin Gong
Signed-off-by: Vipul Kumar -
add ".use_ack" ..etc for pf1550 irq, since we have to clear irq status in
pf1550, else no any more interrupt trigged.Signed-off-by: Robin Gong
Signed-off-by: Vipul Kumar -
Correct num_regs of regmap_irq_chip structure, otherwise request irq
failed.Signed-off-by: Robin Gong
Signed-off-by: Vipul Kumar -
Add basic pf1550 mfd driver.
Signed-off-by: Robin Gong
Signed-off-by: Vipul Kumar -
null check substream before using it. Reported by coverity.
Signed-off-by: Zidan Wang
(cherry picked from commit fad2b9c1285a34eab0dec9f90edc06ec94e70a61)
Signed-off-by: Vipul Kumar -
i2c device client shouldn't be freed by i2c device driver, there have
problems in below cases:
- one device match to different drivers, the second matched driver will
cannot access i2c device client if it is freed by the first matched
driver.
- one module driver insmod: the first insmod fail free client due to system
low memory, after kswapd system free pages and has enough free pages, the
second insmod will cause match failed.Signed-off-by: Fugang Duan
Signed-off-by: Vipul Kumar -
Add PMIC 'MAX17135' module drivers to 4.1.y kernel. These are necessary
to supply power for E-ink panel display functions.Signed-off-by: Robby Cai
Signed-off-by: Vipul Kumar -
The si476x_core_get_revision_info will send i2c command to FM module, if it
return error, there is no FM modules attached, so we need't to register the
sound card. otherwise, the pulseaudio will access this sound card, but
return a lot of i2c error.Signed-off-by: Shengjiu Wang
(cherry picked from commit 4c8e9916128f05f9b4115e1ee1af4a1e7d800c4a)
Signed-off-by: Vipul Kumar -
Currently, si476x-rev1.0 and si476x-rev4.0 board just support A10
compatible command set. For si476x-rev1.0 board, its firmware revision is
unsupported and will revert to A10 compatible function. For si476x-rev4.0
board, its firmware revision is two and will use A30 function, but A30
command set function can't work for the rev4.0 board.
So make the command set configurable in dts. If "revision-a10" is present,
set the revision to SI476X_REVISION_A10 to use A10 compatible commit set.
Otherwise, get the revision from si476x register.Signed-off-by: Zidan Wang
(cherry picked from commit b648714c3b71ee084188ae04b1e6a6f2554fe2cb)
Signed-off-by: Vipul Kumar -
Add of_compatible for si476x-codec, then si476x-codec driver will have
codec_of_node, So machine driver can use the codec_of_node.Signed-off-by: Shengjiu Wang
(cherry picked from commit e2ec44f91a21b127e155e8317d06e8ead7fd2678)
(cherry picked from commit ac6decaf5414e784ae81a524edc2f32060061b59)
Signed-off-by: Vipul Kumar -
In commit e856a0ebc23dcd2c933e3f902317652cc50f0067, we disabled
wait_event_timeout for CMD_POWER_DOWN, which will cause power down
failed sometimes, then FM will fail to reopen.
In this patch enable the wait_event_timeout for power down.Signed-off-by: Shengjiu Wang
(cherry picked from commit 30aa7f1a3580d0a5bc866c624d1da441fd5502c1)
(cherry picked from commit 2b1990fee264d805fcdc0005dcf8b5b63b261d51)
Signed-off-by: Vipul Kumar -
cherry-pick below patch from imx_3.14.y
ENGR00276567-6 mfd: si476x: Use default configuration when no platform dataThis would allow the driver to work normally without specific platform
data, when using devicetree for example.Signed-off-by: Nicolin Chen
(cherry picked from commit 23e369b88b546d7b699ca9ec46e195a05c61b717)
(cherry picked from commit a2449e1d303e341f32556fb7f4ebc7dcbdd9ead1)
Signed-off-by: Vipul Kumar -
cherry-pick below patch from imx_3.14.y
ENGR00276567-4 mfd: si476x: Fix power up failureThis's some logical error in power-up code, thus fix it.
Signed-off-by: Nicolin Chen
(cherry picked from commit 77d97ad1bb77c0e3c60b9781a06b61d4b4667de1)
(cherry picked from commit b656522da2685ef9a4da2229b6786d5cd0c12189)
Signed-off-by: Vipul Kumar -
Forward imx_3.14.y IPU and display drivers to 4.1 kernel.
This includes IPU core driver, display driver, LDB and HDMI driver.Signed-off-by: Sandor Yu
(Vipul: Fixed merge conflicts)
TODO: checkpatch warnings
Signed-off-by: Vipul Kumar
24 Mar, 2019
1 commit
-
commit ae7b8eda27b33b1f688dfdebe4d46f690a8f9162 upstream.
There is a potential NULL pointer dereference in case devm_kzalloc()
fails and returns NULL.Fix this by adding a NULL check on *lookup*
This bug was detected with the help of Coccinelle.
Fixes: b2e63555592f ("i2c: gpio: Convert to use descriptors")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva
Signed-off-by: Lee Jones
Signed-off-by: Greg Kroah-Hartman
27 Feb, 2019
14 commits
-
[ Upstream commit 9e28989d41c0eab57ec0bb156617a8757406ff8a ]
When mc13xxx_reg_read() fails, "old_adc0" is uninitialized and will
contain random value. Further execution uses "old_adc0" even when
mc13xxx_reg_read() fails.
The fix checks the return value of mc13xxx_reg_read(), and exits
the execution when it fails.Signed-off-by: Kangjie Lu
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin -
[ Upstream commit 75d4c5e03c2ae9902ab521024b10291f6fc9515b ]
Use devm_regmap_add_irq_chip and clean up error path in probe
and also the remove function.Reported-by: Christian Hohnstaedt
Signed-off-by: Keerthy
Reviewed-by: Sebastian Reichel
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin -
[ Upstream commit 18e294ddafaeb80a1e2e10c9bd750a6cb8388d5b ]
The driver adds different MFD child devices via mfd_add_devices() and
hence it is required to call mfd_remove_devices() to remove MFD child
devices.Fixes: 5e0115581bbc ("cros_ec: Move cros_ec_dev module to drivers/mfd")
Signed-off-by: Enric Balletbo i Serra
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin -
[ Upstream commit ea90e7b47f0a8bd2fe14e9a88f523de7c67db90a ]
Parts of the AXP803 are compatible with their counterparts on the AXP813.
These include the GPIO, ADC, AC and battery power supplies.Signed-off-by: Oskari Lemmela
Reviewed-by: Chen-Yu Tsai
Tested-by: Vasily Khoruzhick
Signed-off-by: Chen-Yu Tsai
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin -
[ Upstream commit 753a8d083e085c6f552c7982749de4cc7c40e2ac ]
In the axp20x driver, the various mfd_cell lists had varying amounts
of indentation, sometimes even within the same list. For the axp288,
there's no alignment at all.Re-align the right hand side of the assignments with the least amount
of tabs possible. Also collapse the closing bracket and the opening
bracket of the next entry onto the same line for the axp288, to be
consistent with all the other mfd_cell lists.This patch is whitespace change only. No functionality is modified.
Signed-off-by: Chen-Yu Tsai
Signed-off-by: Oskari Lemmela
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin -
[ Upstream commit 4a19f9a65375ca9781b3ca9e810ece92edfc3e78 ]
As axp20x-ac-power-supply now supports AXP813, add a cell for it.
Signed-off-by: Oskari Lemmela
Reviewed-by: Quentin Schulz
Reviewed-by: Chen-Yu Tsai
Tested-by: Vasily Khoruzhick
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin -
[ Upstream commit 04c801c18ded421845324255e660147a6f58dcd6 ]
Signed-off-by: Charles Keepax
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin -
[ Upstream commit 504e4175829c44328773b96ad9c538e4783a8d22 ]
This is required as part of the initialization sequence on certain SoCs.
If these registers are not initialized, the hardware can be unresponsive.
This fixes the driver on apq8060 (HP TouchPad device).Signed-off-by: Jonathan Marek
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin -
[ Upstream commit b0aff01e7aa6ad2d6998ef1323843212d1db8b04 ]
Because BD9571MWV_DVFS_MONIVDAC is not defined in the volatile table,
the physical register value is not updated by regmap and DVFS doesn't
work as expected. Fix it!Fixes: d3ea21272094 ("mfd: Add ROHM BD9571MWV-M MFD PMIC driver")
Signed-off-by: Dien Pham
[wsa: rebase, add 'Fixes', reword commit message]
Signed-off-by: Wolfram Sang
Reviewed-by: Marek Vasut
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin -
[ Upstream commit 10628e3ecf544fa2e4e24f8e112d95c37884dc98 ]
This function is supposed to return zero on success or negative error
codes on error. Unfortunately, there is a bug so it sometimes returns
non-zero, positive numbers on success.I noticed this bug during review and I can't test it. It does appear
that the return is sometimes propogated back to _regmap_read() where all
non-zero returns are treated as failure so this may affect run time.Fixes: 47c1697508f2 ("mfd: Align ab8500 with the abx500 interface")
Signed-off-by: Dan Carpenter
Reviewed-by: Linus Walleij
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin -
[ Upstream commit a177276aa098aa47a100d51a13eaaef029604b6d ]
If the PMIC ID is unknown, the current code would call
irq_domain_remove and panic, as pmic->irq_domain is only
initialized by mt6397_irq_init.Return immediately with an error, if the chip ID is unsupported.
Signed-off-by: Nicolas Boichat
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin -
[ Upstream commit a3888f62fe66429fad3be7f2ba962e1e08c26fd6 ]
When building the kernel with Clang, the following section mismatch
warnings appear:WARNING: vmlinux.o(.text+0x7239cc): Section mismatch in reference from
the function db8500_prcmu_probe() to the function
.init.text:init_prcm_registers()
The function db8500_prcmu_probe() references
the function __init init_prcm_registers().
This is often because db8500_prcmu_probe lacks a __init
annotation or the annotation of init_prcm_registers is wrong.WARNING: vmlinux.o(.text+0x723e28): Section mismatch in reference from
the function db8500_prcmu_probe() to the function
.init.text:fw_project_name()
The function db8500_prcmu_probe() references
the function __init fw_project_name().
This is often because db8500_prcmu_probe lacks a __init
annotation or the annotation of fw_project_name is wrong.db8500_prcmu_probe should not be marked as __init so remove the __init
annotation from fw_project_name and init_prcm_registers.Signed-off-by: Nathan Chancellor
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin -
[ Upstream commit 8838555089f0345b87f4277fe5a8dd647dc65589 ]
When building the kernel with Clang, the following section mismatch
warning appears:WARNING: vmlinux.o(.text+0x3d84a3b): Section mismatch in reference from
the function twl_probe() to the function
.init.text:unprotect_pm_master()
The function twl_probe() references
the function __init unprotect_pm_master().
This is often because twl_probe lacks a __init
annotation or the annotation of unprotect_pm_master is wrong.Remove the __init annotation on the *protect_pm_master functions so
there is no more mismatch.Signed-off-by: Nathan Chancellor
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin -
[ Upstream commit b40ee006fe6a8a25093434e5d394128c356a48f3 ]
Use PLATFORM_DEVID_AUTO to number mfd cells while registering, so that
different instances are uniquely identified. This is required in order
to support registering of multiple instances of same ti_am335x_tscadc IP.Signed-off-by: Vignesh R
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin
23 Jan, 2019
1 commit
-
commit ac4ca4b9f4623ba5e1ea7a582f286567c611e027 upstream.
The tps6586x driver creates an irqchip that is used by its various child
devices for managing interrupts. The tps6586x-rtc device is one of its
children that uses the tps6586x irqchip. When using the tps6586x-rtc as
a wake-up device from suspend, the following is seen:PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
OOM killer disabled.
Freezing remaining freezable tasks ... (elapsed 0.000 seconds) done.
Disabling non-boot CPUs ...
Entering suspend state LP1
Enabling non-boot CPUs ...
CPU1 is up
tps6586x 3-0034: failed to read interrupt status
tps6586x 3-0034: failed to read interrupt statusThe reason why the tps6586x interrupt status cannot be read is because
the tps6586x interrupt is not masked during suspend and when the
tps6586x-rtc interrupt occurs, to wake-up the device, the interrupt is
seen before the i2c controller has been resumed in order to read the
tps6586x interrupt status.The tps6586x-rtc driver sets it's interrupt as a wake-up source during
suspend, which gets propagated to the parent tps6586x interrupt.
However, the tps6586x-rtc driver cannot disable it's interrupt during
suspend otherwise we would never be woken up and so the tps6586x must
disable it's interrupt instead.Prevent the tps6586x interrupt handler from executing on exiting suspend
before the i2c controller has been resumed by disabling the tps6586x
interrupt on entering suspend and re-enabling it on resuming from
suspend.Cc: stable@vger.kernel.org
Signed-off-by: Jon Hunter
Reviewed-by: Dmitry Osipenko
Tested-by: Dmitry Osipenko
Acked-by: Thierry Reding
Signed-off-by: Lee Jones
Signed-off-by: Greg Kroah-Hartman
13 Dec, 2018
1 commit
-
commit 48a2ca0ee3994df53da230c7079a18a70ec914f9 upstream.
This reverts commit 3aa2177e47878f7e7616da8a2050c44f22301b6e.
That commit triggered a new WARN when unloading the module (see at the
end of the commit message). When a class_dev is embedded in a structure
then that class_dev is the thing that controls the lifetime of that
structure, for that reason device managed allocations can't be used here.
See Documentation/kobject.txt.Revert the above patch, so the struct is allocated using kzalloc and we
have a release function for it that frees the allocated memory, otherwise
it is broken.------------[ cut here ]------------
Device 'cros_ec' does not have a release() function, it is broken and must be fixed.
WARNING: CPU: 3 PID: 3675 at drivers/base/core.c:895 device_release+0x80/0x90
Modules linked in: btusb btrtl btintel btbcm bluetooth ...
CPU: 3 PID: 3675 Comm: rmmod Not tainted 4.20.0-rc4 #76
Hardware name: Google Kevin (DT)
pstate: 40000005 (nZcv daif -PAN -UAO)
pc : device_release+0x80/0x90
lr : device_release+0x80/0x90
sp : ffff00000c47bc70
x29: ffff00000c47bc70 x28: ffff8000e86b0d40
x27: 0000000000000000 x26: 0000000000000000
x25: 0000000056000000 x24: 0000000000000015
x23: ffff8000f0bbf860 x22: ffff000000d320a0
x21: ffff8000ee93e100 x20: ffff8000ed931428
x19: ffff8000ed931418 x18: 0000000000000020
x17: 0000000000000000 x16: 0000000000000000
x15: 0000000000000400 x14: 0000000000000143
x13: 0000000000000000 x12: 0000000000000400
x11: 0000000000000157 x10: 0000000000000960
x9 : ffff00000c47b9b0 x8 : ffff8000e86b1700
x7 : 0000000000000000 x6 : ffff8000f7d520b8
x5 : ffff8000f7d520b8 x4 : 0000000000000000
x3 : ffff8000f7d58e68 x2 : ffff8000e86b0d40
x1 : 37d859939c964800 x0 : 0000000000000000
Call trace:
device_release+0x80/0x90
kobject_put+0x74/0xe8
device_unregister+0x20/0x30
ec_device_remove+0x34/0x48 [cros_ec_dev]
platform_drv_remove+0x28/0x48
device_release_driver_internal+0x1a8/0x240
driver_detach+0x40/0x80
bus_remove_driver+0x54/0xa8
driver_unregister+0x2c/0x58
platform_driver_unregister+0x10/0x18
cros_ec_dev_exit+0x1c/0x2d8 [cros_ec_dev]
__arm64_sys_delete_module+0x16c/0x1f8
el0_svc_common+0x84/0xd8
el0_svc_handler+0x2c/0x80
el0_svc+0x8/0xc
---[ end trace a57c4625f3c60ae8 ]---Cc: stable@vger.kernel.org
Fixes: 3aa2177e4787 ("mfd: cros_ec: Use devm_kzalloc for private data")
Signed-off-by: Enric Balletbo i Serra
Reviewed-by: Guenter Roeck
Reviewed-by: Dmitry Torokhov
Signed-off-by: Lee Jones
Signed-off-by: Greg Kroah-Hartman