We move all the probe stuff to kthread so that it won't block
the system to go on probing other drivers. But that introduced
a bug that PM calls would not be removed by driver core. As each
platform driver uses the same PM callbacks for all device instances.
So add device_release_driver if it fails to probe devices.
Fixes: 79ac46bdea ("PCI: rockchip: dw: Add kthread to probe PCIe devices")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I9d6ba448a87defa8d924927f1bfcff51c889e1a0
When phy status is none, it mean that the power off
process is already be run. if the phy power off
function is called again before power on, ignore it.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I34c3f2b92076f7c27a1537d3c78000781de61179
when we set mode change flag and the phy is idle, here
will not clear the mode change flag when power on, we
need clear it.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I900d5c37a2e83212eb6461d714a653c93da923c7
Enable lt6911uxc HDMI to MIPI CSI-2 bridge driver for hdmi-in
application. Which found on rk3568-evb2-lp4x-v10.
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I4ce22f3040dbe55c3236ac3d0ac62f7821011c8d
v0.01.01: fix if plugin_gpio was not used
v0.01.02: modify driver init level to late_initcall
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I3b15bed365552aa0dbaf8a8126400597caa96ed6
Add add heap - "system-dma32" to allocate pages with GFP_DMA32, support cache,
and add heap - "system-uncached-dma32" to allocate pages with GFP_DMA32, but
unsupport cache
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I93bb7c17fc038f52940ddc4facf836637c917bea
rkvenc2 encoder need rcb buffer for H.264 above 4K.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic1b9b5fafa3e4488d8e993e21335ca8bd7cd5c6f
To classify errors:
RX/TX error count < 128 is CAN_STATE_ERROR_WARNING,
An error frame is sent, enters the active error state.
RX/TX error count < 256 is CAN_STATE_ERROR_PASSIVE,
An error frame is sent, enter passive error state.
RX/TX error count >= 256 is CAN_STATE_BUS_OFF,
can bus off need to restart.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I4a85af3c86c5dfd14e4274832b0fb55ac09c98f7
1. Fixup timeout when running multi thread,
because fd can not pass on other thread.
2. Tide some code
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: I68b0557138f583ab8bb341bf5bbe2ec145d2884c
This reverts commit 6b7fb9a6c9.
The audio regbank of hdmi-qp is drived by audio interface clk, and had
fixed by commits as follows:
[1] 3a7f369b5c ("arm64: dts: rockchip: rk3588: Add aud clk for hdmi nodes")
[2] e108ff9f6f ("drm/rockchip: dw_hdmi: Handle aud clk for hdmi qp")
OTOH, to make android hal happy, we still allow to access hdmi audio even
hdmi is plugged out.
"hdmi-audio-codec: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19"
Android/Linux should reopen hdmi sound card depends on HPD plug event
to bring back to normal state.
Change-Id: I654fe18a04b750f57c8bd52ef4948a476bc1fa50
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
The separation of pinctrl and gpio drivers created a tiny window where
a pinconfig setting might produce a null-pointer dereference.
The affected device were rk3288-veyron devices in this case.
Pinctrl-hogs are claimed when the pinctrl driver is registered,
at which point their pinconfig settings will be applied.
At this time the now separate gpio devices will not have been created
yet and the matching driver won't have probed yet, making the gpio->foo()
call run into a null-ptr.
As probing is not really guaranteed to have been completed at a specific
time, introduce a queue that can hold the output settings until the gpio
driver has probed and will (in a separate patch) fetch the elements
of the list.
We expect the gpio driver to empty the list, but will nevertheless empty
it ourself on remove if that didn't happen.
Fixes: 9ce9a02039 ("pinctrl/rockchip: drop the gpio related codes")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20210913224926.1260726-4-heiko@sntech.de
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit e7165b1dff)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Id179c7eaacfb41565e2427ad82b55d11c2be8c4d
Some difference made during driver upstream review, this patch sync the
driver with upstream version.
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I0da05d04f54bfc8e83afa28692c658b0b4d2604b
For GPIO0_B4 to GPIO0D7, the pinmux must read two registers.
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ic8d70c0ee56ce8ae8890a708cea84868f3a04228
Crypto only supports DMA32 address addressing and behaves
abnormally on more than 4G DDR.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I5b6b5c9eb5f00698d25e47a778f358380f4121eb
The K will be set 2 in YUV420 output mode, so we
don't need to handle YUV420 for DisplayPort.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I8f42536735e65c82705d58382f1db2b2994d741b