:
real 1m7.735s
user 0m0.488s
sys 0m20.040s
With the patch the same test case (many eeprom reads) executes with approx:
real 0m54.241s
user 0m0.440s
sys 0m5.920s
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
Acked-by: Uwe Kleine-König
---
V2:
As Uwe Kleine-König's suggestion, the versi
such case, when i2c_generic_gpio_recovery() is used for bus recovery,
there will be kernel crash because bri->set_scl is NULL.
The solution to this bug is moving i2c_imx_init_recovery_info() before
i2c_register_adapter().
Signed-off-by: Gao Pan
Signed-off-by: Fugang Duan
---
V2:
-base on
such case, when i2c_generic_gpio_recovery() is used for bus recovery,
there will be kernel crash because bri->set_scl is NULL.
The solution to this bug is moving i2c_imx_init_recovery_info() before
i2c_register_adapter().
Signed-off-by: Gao Pan
Signed-off-by: Fugang Duan
---
drivers/i2c/busses/
In i2c_imx_dma_xfer(), when dmaengine_prep_slave_single() returns
NULL, the context goto label err_desc and then return. However,
the memory allocated by dmaengine_prep_slave_single() has not been
freed yet, which leads to resource leak.
(reported by coverity check)
Signed-off-by: Gao Pan
Replace of_get_named_gpio_flags with of_get_named_gpio because
the latter has less parameters, which improves code readability.
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
---
drivers/i2c/busses/i2c-imx.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers
:
real 1m7.735s
user 0m0.488s
sys 0m20.040s
With the patch the same test case (many eeprom reads) executes with approx:
real 0m54.241s
user 0m0.440s
sys 0m5.920s
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
---
V2:
As Uwe Kleine-König's suggestion, the version do below changes:
clock to recover
i2c device. After recovery, set i2c pinctrl to default group setting.
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
Signed-off-by: Sascha Hauer
---
V2:
As Uwe Kleine-König's suggestion, the version do below changes:
-replace of_get_named_gpio() with devm_gpiod_get_opt
clock to recover
i2c device. After recovery, set i2c pinctrl to default group setting.
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
Signed-off-by: Sascha Hauer
---
V2:
As Uwe Kleine-König's suggestion, the version do below changes:
-replace of_get_named_gpio() with devm_gpiod_get_opt
clock to recover
i2c device. After recovery, set i2c pinctrl to default group setting.
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
Signed-off-by: Sascha Hauer
---
V2:
As Uwe Kleine-König's suggestion, the version do below changes:
-replace of_get_named_gpio() with devm_gpiod_get_opt
clock to recover
i2c device. After recovery, set i2c pinctrl to default group setting.
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
---
V2:
As Uwe Kleine-König's suggestion, the version do below changes:
-replace of_get_named_gpio() with devm_gpiod_get_optional()
reads) executes with approx:
real 0m54.241s
user 0m0.440s
sys 0m5.920s
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
---
V2:
As Uwe Kleine-König's suggestion, the version do below changes:
-call clk_prepare_enable in probe to avoid never enabling clock
if CONFIG_PM is disabled
-enable
gpio state.
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
---
arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index 944eb81..6e97018 100644
clock to recover
i2c device. After recovery, set i2c pinctrl to default group setting.
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
---
V2:
As Uwe Kleine-König's suggestion, the version do below changes:
-replace of_get_named_gpio() with devm_gpiod_get_optional()
reads) executes with approx:
real 0m54.241s
user 0m0.440s
sys 0m5.920s
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
---
V2:
As Uwe Kleine-König's suggestion, the version do below changes:
-call clk_prepare_enable in probe to avoid never enabling clock
if CONFIG_PM is disabled
-enable
reads) executes with approx:
real 0m54.241s
user 0m0.440s
sys 0m5.920s
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
[wsa: fixed some indentation]
Signed-off-by: Wolfram Sang
---
V2:
As Uwe Kleine-König's suggestion, the version do below changes:
-call clk_prepare_enable in probe to
reads) executes with approx:
real 0m54.241s
user 0m0.440s
sys 0m5.920s
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
[wsa: fixed some indentation]
Signed-off-by: Wolfram Sang
---
V2:
As Uwe Kleine-König's suggestion, the version do below changes:
-call clk_prepare_enable in probe to
reads) executes with approx:
real 0m54.241s
user 0m0.440s
sys 0m5.920s
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
[wsa: fixed some indentation]
Signed-off-by: Wolfram Sang
---
V2:
As Uwe Kleine-König's suggestion, the version do below changes:
-call clk_prepare_enable in probe to
reads) executes with approx:
real 0m54.241s
user 0m0.440s
sys 0m5.920s
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
[wsa: fixed some indentation]
Signed-off-by: Wolfram Sang
---
V2:
As Uwe Kleine-König's suggestion, the version do below changes:
-call clk_prepare_enable in probe to
clock to recover
i2c device. After recovery, set i2c pinctrl to default group setting.
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
---
V2:
As Uwe Kleine-König's suggestion, the version do below changes:
-replace of_get_named_gpio() with devm_gpiod_get_optional()
clock to recover
i2c device. After recovery, set i2c pinctrl to default group setting.
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
---
V2:
As Uwe Kleine-König's suggestion, the version do below changes:
-replace of_get_named_gpio() with devm_gpiod_get_optional()
- enable clock before request IRQ in probe
- remove the pm staff in i2c_imx_isr
V3:
- pm_runtime_get_sync returns < 0 as error
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
---
drivers/i2c/busses/i2c-imx.c | 76 +---
1 file changed, 65 insert
epare callback
-use 0 and 1 as return value for the get_scl and get_sda callbacks
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
---
Documentation/devicetree/bindings/i2c/i2c-imx.txt | 4 +
drivers/i2c/busses/i2c-imx.c | 104 --
2 files changed
clock to recover
i2c device. After recovery, set i2c pinctrl to default group setting.
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
---
Documentation/devicetree/bindings/i2c/i2c-imx.txt | 4 +
drivers/i2c/busses/i2c-imx.c | 102 +-
2 files changed
- enable clock before request IRQ in probe
- remove the pm staff in i2c_imx_isr
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
---
drivers/i2c/busses/i2c-imx.c | 76 +---
1 file changed, 65 insertions(+), 11 deletions(-)
diff --git a/drivers/i2c/busses/i2c
reads) executes with approx:
real 0m54.241s
user 0m0.440s
sys 0m5.920s
>From the test result, the patch get better performance.
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
---
drivers/i2c/busses/i2c-imx.c | 78 +---
1 file changed, 66 insertions(+),
25 matches
Mail list logo