20 Jan, 2021
1 commit
-
This is the 5.10.8 stable release
* tag 'v5.10.8': (104 commits)
Linux 5.10.8
tools headers UAPI: Sync linux/fscrypt.h with the kernel sources
drm/panfrost: Remove unused variables in panfrost_job_close()
...Signed-off-by: Jason Liu
17 Jan, 2021
3 commits
-
commit 05f6f7271a38c482c5021967433f7b698e102c45 upstream.
With the apdma remove hand-shake signal, it requirs special
operation timing to reset i2c manually, otherwise the interrupt
will not be triggered, i2c transmission will be timeout.Fixes: 8426fe70cfa4("i2c: mediatek: Add apdma sync in i2c driver")
Signed-off-by: Qii Wang
Signed-off-by: Wolfram Sang
Signed-off-by: Greg Kroah-Hartman -
commit 0b3ea2a06de1f52ea30865e227e109a5fd3b6214 upstream.
gpiod_add_lookup_table() expects the gpiod_lookup_table->table passed to
it to be terminated with a zero-ed out entry.So we need to allocate one more entry then we will use.
Fixes: d308dfbf62ef ("i2c: mux/i801: Switch to use descriptor passing")
Signed-off-by: Hans de Goede
Reviewed-by: Mika Westerberg
Acked-by: Jean Delvare
Reviewed-by: Linus Walleij
Signed-off-by: Wolfram Sang
Signed-off-by: Greg Kroah-Hartman -
commit 0b884fe71f9ee6a5df35e677154256ea2099ebb8 upstream.
If the i2c device SCL bus being pulled up due to some exception before
message transfer done, the system cannot receive the completing interrupt
signal any more, it would not exit waiting loop until MAX_SCHEDULE_TIMEOUT
jiffies eclipse, that would make the system seemed hang up. To avoid that
happen, this patch adds a specific timeout for message transfer.Fixes: 8b9ec0719834 ("i2c: Add Spreadtrum I2C controller driver")
Signed-off-by: Linhua Xu
Signed-off-by: Chunyan Zhang
[wsa: changed errno to ETIMEDOUT]
Signed-off-by: Wolfram Sang
Signed-off-by: Greg Kroah-Hartman
04 Jan, 2021
1 commit
-
This is the 5.10.4 stable release
* tag 'v5.10.4': (717 commits)
Linux 5.10.4
x86/CPU/AMD: Save AMD NodeId as cpu_die_id
drm/edid: fix objtool warning in drm_cvt_modes()
...Signed-off-by: Jason Liu
Conflicts:
drivers/gpu/drm/imx/dcss/dcss-plane.c
drivers/media/i2c/ov5640.c
30 Dec, 2020
1 commit
-
[ Upstream commit 9cb4c67d7717135d6f4600a49ab07b470ea4ee2f ]
This reverts commit 02b9aec59243c6240fc42884acc958602146ddf6.
As talked about in the patch ("soc: qcom: geni: More properly switch
to DMA mode"), swapping the order of geni_se_setup_m_cmd() and
geni_se_xx_dma_prep() can sometimes cause corrupted transfers. Thus
we traded one problem for another. Now that we've debugged the
problem further and fixed the geni helper functions to more disable
FIFO interrupts when we move to DMA mode we can revert it and end up
with (hopefully) zero problems!To be explicit, the patch ("soc: qcom: geni: More properly switch
to DMA mode") is a prerequisite for this one.Fixes: 02b9aec59243 ("i2c: i2c-qcom-geni: Fix DMA transfer race")
Signed-off-by: Douglas Anderson
Reviewed-by: Stephen Boyd
Reviewed-by: Akash Asthana
Tested-by: Dmitry Baryshkov
Link: https://lore.kernel.org/r/20201013142448.v2.2.I7b22281453b8a18ab16ef2bfd4c641fb1cc6a92c@changeid
Signed-off-by: Bjorn Andersson
Signed-off-by: Sasha Levin
18 Dec, 2020
2 commits
-
The old API was removed since:
5894048775df ("xen: remove no longer used functions")Signed-off-by: Dong Aisheng
-
* xen/next:
LF-191-3 Documentation: bindings: i2c: add xen,i2c
LF-191-2 i2c: introduce xen i2c paravirtualization driver
LF-191-1 xen: interface: introduce i2cif
14 Dec, 2020
32 commits
-
Add i2c backend frontend support.
The transaction only support one msg each time.
The frontend sends a request to backend, backend use i2c_transfer
to do real transaction to hardware and return the results to frontend.Now i2cdump/get/set works.
In domu cfg file, use
"vi2c = ['backend=0,be-adapter=5a800000.i2c,addr=0x51;0x44']" to
create a dummy controller in frontend and allowed slaves in backend.Currently the slave address check not added, it will be supported in
furture patch.Signed-off-by: Peng Fan
Acked-by: Leonard Crestez -
If add this arbitration check, it will block camera probe on imx7D-sdb.
So remove this check for now to avoid blocking camera function in TC
release.Repreduce step:
1. Write 0x42 to 0x3008 reg
2. Write 0x2 to 0x3008 reg
Then the arbitration lost flag will be set.Reviewed-by: Fugang Duan
Signed-off-by: Clark Wang -
Add the missing pm_runtime_disable() to keep the balance of
power.disable_depth in i2c_imx_xfer function.
Otherwise, after resumed, warning log will be shown:imx-i2c 30a20000.i2c: Unbalanced pm_runtime_enable!
Reviewed-by: Fugang Duan
Signed-off-by: Clark Wang -
Auto switch mode between master and slave
Signed-off-by: Biwen Li
-
Claim clkhi and clklo as integer type to avoid possible calculation
errors caused by data overflow.Reviewed-by: Fugang Duan
Signed-off-by: Clark Wang -
The clkhi and clklo ratio was not very precise before that can make the
time of START/STOP/HIGH LEVEL out of specification.Therefore, the calculation of these times has been modified in this patch.
At the same time, the mode rate definition of i2c is corrected.Reviewed-by: Fugang Duan
Signed-off-by: Clark Wang -
Support I2C_SLAVE_STOP event for the read transactions(master read from slave)
Signed-off-by: Biwen Li
-
Add bus recovery feature for LPI2C.
Need add gpio pinctrl, scl-gpios and sda-gpios configuration in dts.Signed-off-by: Clark Wang
-
Fix warning as follows,
drivers/i2c/busses/i2c-imx.c:1046:7: warning: unused variable ‘enable_runtime_pm’ [-Wunused-variable]
bool enable_runtime_pm = false;Signed-off-by: Biwen Li
-
The patch supports slave mode for imx I2C driver
Reviewed-by: Clark Wang
Signed-off-by: Biwen Li -
Based on the I2C specification, if the data line (SDA) is stuck low,
the master should send nine clock pulses. The I2C slave device that
held the bus low should release it sometime within those nine clocks.Because pinctrl is not supported on Layerscape, current bus recovery
is not avalible for Layerscape. This patch uses an open drain GPIO
pin to connect to the IICx_SCL to drive nine clock pulses to unlock
the I2C bus.Signed-off-by: Zhang Ying-22455
Reviewed-by: Clark Wang
Signed-off-by: Biwen Li -
ERR010027: Attempting a start cycle while the bus is busy may
generate a short clock pulse.Software must ensure that the I2C BUS is idle by checking the
bus busy before switching to master mode and attempting a Start
cycle.Signed-off-by: Zhang Ying-22455
[ Aisheng: fix big conflict due to
3a5ee18d2a32 ("i2c: imx: implement master_xfer_atomic callback") ]
Sign-off-by: Dong Aisheng -
DMA might not be available yet when the i2c device probes.
Properly handle EPROBE_DEFER on dma channel allocation by
passing on this error.Signed-off-by: Peng Ma
-
Switching the clock frequently will affect the data transmission
efficiency, and prolong the timeout to reduce autosuspend times for
i2c-imx.Acked-by: Fugang Duan
Signed-off-by: Clark Wang -
Switching the clock frequently will affect the data transmission
efficiency, and prolong the timeout to reduce autosuspend times for
lpi2c.Acked-by: Fugang Duan
Signed-off-by: Clark Wang -
"i2c_clk_rate / 2" might be zero when the i2c_clk_rate gets the clock is
0 or 1, so add a judgment to avoid the denominator is equal to 0.Signed-off-by: Clark Wang
[Arul: Add support to check return value everywhere in the driver]
Signed-off-by: Arulpandiyan VadivelSigned-off-by: Shrikant Bobade
(cherry picked from commit d382de595bffc0975ab7c0582e08dd4f7afc0c1a)
(cherry picked from commit 456caa9ba270ca8f4f962918a0625d1a8348f316) -
According the e7805 in Errata, the SCK low level period should be less
than 1.3us.The other series platform use this same IP can match the errata, and
ensure the low level period longer than 1.3us when the speed set to
400KHz. However, only at imx7d platform, the low level period is less
than 1.3us in the same situation.Therefore, limit the maximum transfer speed to 384KHz when probe at
imx7d platform.Signed-off-by: Clark Wang
(cherry picked from commit 19f553846e872b5c379b37ed029132b79566cab0)
(cherry picked from commit 5d355407812025e5157f82b7763580e7295a40fd) -
When we do system suspend, the runtime pm will be disabled, but we need
to control the PMIC to power on/off the regulator, if the runtime pm is
disabled, if will failed to request runtime wakeup. So data transfer will
failed.Signed-off-by: Bai Ping
Signed-off-by: Gao Pan
Signed-off-by: Vipul Kumar
(cherry picked from commit 93adab71408f1f162015e77715dd04ce2301d673)
[ Aisheng: fix big conflict due to
3a5ee18d2a32 ("i2c: imx: implement master_xfer_atomic callback") ]
Sign-off-by: Dong Aisheng -
restore pin setting for i2c in suspend/resume
Signed-off-by: Gao Pan
(Vipul: Fixed merge conflicts)
Signed-off-by: Vipul Kumar
(cherry picked from commit 42b5aa1d72c09015d435459c6a59022255e3ef21) -
The i2c irq is masked when pcie starts a i2c transfer process
during noirq suspend stage. As a result, i2c transfer fails.
To solve the problem, IRQF_NO_SUSPEND is added to i2c bus.Signed-off-by: Gao Pan
Signed-off-by: Fugang Duan
Signed-off-by: Vipul Kumar
(cherry picked from commit d21259d913effcad322e30d389323e72a0f9709d) -
use subsys_initcall for i2c driver to improve i2c driver probe priority
Signed-off-by: Gao Pan
(cherry picked from commit 3661eef81a308dab2bfae3790c045ae2d2fd3f49)
(cherry picked from commit 9c867985d2657b9b74813d8143a87e9c9a9a158e) -
During porting commit ede264acf031 ("MLK-14982-1 imx8: lpi2c: add ipg
clk for lpi2c driver") which replaced the single clk
with clk_ipg and clk_per was skipped.Part of the code was later added in commit 96dbdd8c3d0b ("MLK-16713 i2c:
imx-lpi2c: add runtime pm support") except the "clk" field was kept and
clk_get calls were not updated.Fix imx7ulp boot by fetching both clocks.
Fixes: 96dbdd8c3d0b ("MLK-16713 i2c: imx-lpi2c: add runtime pm support")
Signed-off-by: Leonard Crestez
Acked-by: Fugang Duan
(cherry picked from commit 1b9c92f3446307b7b24fe143b19dd388811558e9) -
add debug message when i2c peripheral clk rate is 0, then
directly return -EINVAL.Signed-off-by: Gao Pan
Reviewed-by: Andy Duan
(Vipul: Fixed merge conflicts)
Signed-off-by: Vipul Kumar
(cherry picked from commit 1e6707bb5e0cd0dcf72af71f01792fe4e3721e7f) -
Manage irq resource request/release in runtime pm to save irq domain's
power.Signed-off-by: Frank Li
Signed-off-by: Fugang Duan
Tested-by: Guoniu.Zhou
Reviewed-by: Frank Li
(Vipul: Fixed merge conflicts)
Signed-off-by: Vipul Kumar
(cherry picked from commit e1aa13df4b2e7b3e6114dbbf94dc242278f02916) -
- Add runtime pm support to dynamicly manage the ipg and per clocks.
- Put the suspend to suspend_noirq.
- Call .pm_runtime_force_suspend() to force runtime pm suspended
in .suspend_noirq().BuildInfo:
- SCFW 88456c73, IMX-MKIMAGE 06bc2767, ATF a438801
- U-Boot 2017.03-imx_v2017.03_4.9.51_imx8_beta1+g7953d47Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
Reviewed-by: Anson HuangDuring 4.14 rebase added pm_runtime_get_sync/pm_runtime_put around
the reading of LPI2C_PARAM.Signed-off-by: Leonard Crestez
(Vipul: Fixed merge conflicts)
Signed-off-by: Vipul Kumar
(cherry picked from commit 31cc4be3e80a53d890657a06458e04c1527313a9) -
A NACK flag in ISR means i2c bus error. In such codition,
there is no need to do read/write operation. It's better
to return ISR directly and then stop i2c transfer.Signed-off-by: Gao Pan
(cherry-pick from 839d59e48b6fdbd882776a48a88ce26ff14d8b86)
Signed-off-by: Vipul Kumar
(cherry picked from commit 3d05274613f55f4f6745a7d05a856fbc7cb91e6f) -
Add defer probe when rpbus probe, so if the rpmsg channel is not
created, the rpbus will try to probe later.Signed-off-by: Clark Wang
-
For some chips may need long time to get the response from M4 sometimes,
enlarge timeout to 500ms.Add a judgement to check if the received data is the current transfer
wanted.Signed-off-by: Clark Wang
(cherry picked from commit 222e201b520cbd01b611fc45ae2f6b2f0b9d73a1)
(cherry picked from commit 6cfc8578ccce0e664b5428738090a51322773366) -
I2c_lock_bus function in i2c-core-base will not stop the transfer to
different devices on different buses at the same time.Since the multiple rpmsg i2c buses share one rpmsg channel, so it has to
add mutex to protect rpmsg resource accessing.Signed-off-by: Clark Wang
(cherry picked from commit d592afe9018e193f675b8c710fb1e66e44851ec8)
(cherry picked from commit 44622ff8c847031d65fd75a03459061faf07d0f2) -
The alias ID must be defined in device tree, because
that will be used as BUS ID to Cortex M4. If the alias ID
not defined, linux kernel will automatically allocate one
ID which might not be the same number used in Cortex M4 and
Cortex M4 will not send msg to I2C controller.So let's add BUG_ON to catch issue as earlier as possible to avoid
wasting efforts.Signed-off-by: Peng Fan
Reviewed-by: Clark Wang
(cherry picked from commit b9ff20355040d4bece8357a0af31bc5fca191cee)
(cherry picked from commit 8e509705ddd1658ceaea05a65dc6b58d448d2037) -
Add virtual i2c driver to send SRTM i2c messages to M4.
Each virtual I2C bus has a specal bus id, which is abstracted by M4.
Each SRTM message include a bus id for the bus which the device is on.Virtual i2c rpmsg bus will bind rpbus nodes with compatible string
"fsl,i2c-rpbus". And "rpmsg-i2c-channel" will probe only one rpmsg
channel for all rpbuses.This virtual i2c driver depends on CONFIG_I2C and CONFIG_RPMSG.
Signed-off-by: Clark Wang
(cherry picked from commit 9feeac93a7d91ce67537a8a6c67e624eb7986a01)
(cherry picked from commit 379ab8392ef404dc7eea9a7492231a9d9d250ed5) -
Add i2c bus switch PCA9646 chip support, which 2-wire bus switch
and buffered 4-channel.Signed-off-by: Fugang Duan