[RESEND PATCH v4 3/3] Bluetooth: hidp: fix possible might sleep error in hidp_session_thread

2017-06-27 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> Tested-by: AL Yu-Ch

[RESEND PATCH v4 3/3] Bluetooth: hidp: fix possible might sleep error in hidp_session_thread

2017-06-27 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen Tested-by: AL Yu-Chen Cho Tested-by: Rohit Vaswani

[RESEND PATCH v4 2/3] Bluetooth: cmtp: fix possible might sleep error in cmtp_session

2017-06-27 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> Reviewed-by: Brian Norris <

[RESEND PATCH v4 2/3] Bluetooth: cmtp: fix possible might sleep error in cmtp_session

2017-06-27 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris Reviewed-by: AL Yu-Chen Cho

[RESEND PATCH v4 1/3] Bluetooth: bnep: fix possible might sleep error in bnep_session

2017-06-27 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> Reviewed-by: Brian Norris <

[RESEND PATCH v4 1/3] Bluetooth: bnep: fix possible might sleep error in bnep_session

2017-06-27 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris Reviewed-by: AL Yu-Chen Cho

[PATCH v2] spi: rockchip: Disable Runtime PM when chip select is asserted

2017-06-26 Thread Jeffy Chen
pm_runtime_put instead of pm_runtime_put_sync. Suggested-by: Doug Anderson <diand...@chromium.org> Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v2: Improve commit message and comments and coding style. drivers/spi/spi-rockchip.c | 23 ++- 1 file

[PATCH v2] spi: rockchip: Disable Runtime PM when chip select is asserted

2017-06-26 Thread Jeffy Chen
pm_runtime_put instead of pm_runtime_put_sync. Suggested-by: Doug Anderson Signed-off-by: Jeffy Chen --- Changes in v2: Improve commit message and comments and coding style. drivers/spi/spi-rockchip.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers

[tip:irq/core] genirq: Avoid unnecessary low level irq function calls

2017-06-26 Thread tip-bot for Jeffy Chen
Commit-ID: bf22ff45bed664aefb5c4e43029057a199b7070c Gitweb: http://git.kernel.org/tip/bf22ff45bed664aefb5c4e43029057a199b7070c Author: Jeffy Chen <jeffy.c...@rock-chips.com> AuthorDate: Mon, 26 Jun 2017 19:33:34 +0800 Committer: Thomas Gleixner <t...@linutronix.de> CommitD

[tip:irq/core] genirq: Avoid unnecessary low level irq function calls

2017-06-26 Thread tip-bot for Jeffy Chen
Commit-ID: bf22ff45bed664aefb5c4e43029057a199b7070c Gitweb: http://git.kernel.org/tip/bf22ff45bed664aefb5c4e43029057a199b7070c Author: Jeffy Chen AuthorDate: Mon, 26 Jun 2017 19:33:34 +0800 Committer: Thomas Gleixner CommitDate: Mon, 26 Jun 2017 15:47:00 +0200 genirq: Avoid

[tip:irq/core] genirq: Set irq masked state when initializing irq_desc

2017-06-26 Thread tip-bot for Jeffy Chen
Commit-ID: d829b8fb2431595422289cfc210f0a955a8bec74 Gitweb: http://git.kernel.org/tip/d829b8fb2431595422289cfc210f0a955a8bec74 Author: Jeffy Chen <jeffy.c...@rock-chips.com> AuthorDate: Mon, 26 Jun 2017 19:33:33 +0800 Committer: Thomas Gleixner <t...@linutronix.de> CommitD

[tip:irq/core] genirq: Set irq masked state when initializing irq_desc

2017-06-26 Thread tip-bot for Jeffy Chen
Commit-ID: d829b8fb2431595422289cfc210f0a955a8bec74 Gitweb: http://git.kernel.org/tip/d829b8fb2431595422289cfc210f0a955a8bec74 Author: Jeffy Chen AuthorDate: Mon, 26 Jun 2017 19:33:33 +0800 Committer: Thomas Gleixner CommitDate: Mon, 26 Jun 2017 14:05:41 +0200 genirq: Set irq masked

[RFC PATCH v2 2/2] genirq: Avoid unnecessary low level irq function calls

2017-06-26 Thread Jeffy Chen
Check irq state in enable/disable/unmask/mask_irq to avoid unnecessary low level irq function calls. Suggested-by: Thomas Gleixner <t...@linutronix.de> Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v2: Remove unnecessary started state check. kernel/irq

[RFC PATCH v2 2/2] genirq: Avoid unnecessary low level irq function calls

2017-06-26 Thread Jeffy Chen
Check irq state in enable/disable/unmask/mask_irq to avoid unnecessary low level irq function calls. Suggested-by: Thomas Gleixner Signed-off-by: Jeffy Chen --- Changes in v2: Remove unnecessary started state check. kernel/irq/chip.c | 53

[RFC PATCH v2 1/2] genirq: Set irq masked state by default

2017-06-26 Thread Jeffy Chen
We are setting irq default state to disabled when allocating irq desc, so set it masked there too. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v2: None kernel/irq/irqdesc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irq

[RFC PATCH v2 1/2] genirq: Set irq masked state by default

2017-06-26 Thread Jeffy Chen
We are setting irq default state to disabled when allocating irq desc, so set it masked there too. Signed-off-by: Jeffy Chen --- Changes in v2: None kernel/irq/irqdesc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index c5bbaed..f1248ee

[RFC PATCH] genirq: Avoid unnecessary low level irq function calls

2017-06-26 Thread Jeffy Chen
Check irq state in enable/disable/unmask/mask_irq to avoid unnecessary low level irq function calls. Suggested-by: Thomas Gleixner <t...@linutronix.de> Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- kernel/irq/chip.c | 55 +++---

[RFC PATCH] genirq: Avoid unnecessary low level irq function calls

2017-06-26 Thread Jeffy Chen
Check irq state in enable/disable/unmask/mask_irq to avoid unnecessary low level irq function calls. Suggested-by: Thomas Gleixner Signed-off-by: Jeffy Chen --- kernel/irq/chip.c | 55 +++ 1 file changed, 35 insertions(+), 20 deletions

[PATCH] spi: rockchip: Keep master alive when CS asserted

2017-06-25 Thread Jeffy Chen
The cros_ec requires CS line to be active after last message. But the CS would be toggled when powering off/on rockchip spi, which breaks ec xfer. Keep spi alive after CS asserted to prevent that. Suggested-by: Doug Anderson <diand...@chromium.org> Signed-off-by: Jeffy Chen <jeffy.

[PATCH] spi: rockchip: Keep master alive when CS asserted

2017-06-25 Thread Jeffy Chen
The cros_ec requires CS line to be active after last message. But the CS would be toggled when powering off/on rockchip spi, which breaks ec xfer. Keep spi alive after CS asserted to prevent that. Suggested-by: Doug Anderson Signed-off-by: Jeffy Chen --- drivers/spi/spi-rockchip.c | 22

[RFC PATCH] pinctrl: rockchip: add irq_shutdown

2017-06-23 Thread Jeffy Chen
+0x54/0x64 [ 37.312138] [] devm_irq_release+0x24/0x30 Add an irq_shutdown callback, and do a sanity check for irq state to prevent that. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- drivers/pinctrl/pinctrl-rockchip.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/d

[RFC PATCH] pinctrl: rockchip: add irq_shutdown

2017-06-23 Thread Jeffy Chen
+0x54/0x64 [ 37.312138] [] devm_irq_release+0x24/0x30 Add an irq_shutdown callback, and do a sanity check for irq state to prevent that. Signed-off-by: Jeffy Chen --- drivers/pinctrl/pinctrl-rockchip.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/pinctrl/pinctrl-rockchip.c

[RFC PATCH] Bluetooth: btusb: Fix memory leak in play_deferred

2017-06-22 Thread Jeffy Chen
. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- drivers/bluetooth/btusb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 278e811..b469f9b 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/b

[RFC PATCH] Bluetooth: btusb: Fix memory leak in play_deferred

2017-06-22 Thread Jeffy Chen
. Signed-off-by: Jeffy Chen --- drivers/bluetooth/btusb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 278e811..b469f9b 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -3254,11 +3254,12

[RFC PATCH v3 4/6] mfd: cros ec: spi: remove unconditionally wakeup enable

2017-06-21 Thread Jeffy Chen
We used to enable wakeup for cros-ec-spi devices unconditionally. Now we are using the more generic wakeup-source property to enable it. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v3: None drivers/mfd/cros_ec_spi.c | 2 -- 1 file changed, 2 deletions(-) diff

[RFC PATCH v3 4/6] mfd: cros ec: spi: remove unconditionally wakeup enable

2017-06-21 Thread Jeffy Chen
We used to enable wakeup for cros-ec-spi devices unconditionally. Now we are using the more generic wakeup-source property to enable it. Signed-off-by: Jeffy Chen --- Changes in v3: None drivers/mfd/cros_ec_spi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/mfd/cros_ec_spi.c b

[RFC PATCH v3 5/6] input: cros_ec_keyb: report wakeup events

2017-06-21 Thread Jeffy Chen
Report wakeup events when process events. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v3: Use wakeup-source property to enable wakeup. Suggested by Dmitry Torokhov <dmitry.torok...@gmail.com>. drivers/input/keyboard/cros_ec_keyb.c | 8 1 fil

[RFC PATCH v3 5/6] input: cros_ec_keyb: report wakeup events

2017-06-21 Thread Jeffy Chen
Report wakeup events when process events. Signed-off-by: Jeffy Chen --- Changes in v3: Use wakeup-source property to enable wakeup. Suggested by Dmitry Torokhov . drivers/input/keyboard/cros_ec_keyb.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/input/keyboard

[RFC PATCH v3 6/6] ARM: dts: cros-ec-keyboard: enable as wakeup source

2017-06-21 Thread Jeffy Chen
Enable cros-ec-keyboard as a wakeup source. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v3: None arch/arm/boot/dts/cros-ec-keyboard.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/cros-ec-keyboard.dtsi b/arch/arm/boot/dts/c

[RFC PATCH v3 6/6] ARM: dts: cros-ec-keyboard: enable as wakeup source

2017-06-21 Thread Jeffy Chen
Enable cros-ec-keyboard as a wakeup source. Signed-off-by: Jeffy Chen --- Changes in v3: None arch/arm/boot/dts/cros-ec-keyboard.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/cros-ec-keyboard.dtsi b/arch/arm/boot/dts/cros-ec-keyboard.dtsi index c0451051..3168a5e

[RFC PATCH v3 2/6] dt-bindings: spi/core: add wakeup-source optional property

2017-06-21 Thread Jeffy Chen
Update document devicetree bindings to support "wakeup-source" property. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v3: None Documentation/devicetree/bindings/spi/spi-bus.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/

[RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices

2017-06-21 Thread Jeffy Chen
We used to enable wakeup for cros-ec-spi devices unconditionally. Now we are using the more generic wakeup-source property to enable it. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v3: None arch/arm/boot/dts/exynos5420-peach-pit.dts | 1 + arch/arm/bo

[RFC PATCH v3 2/6] dt-bindings: spi/core: add wakeup-source optional property

2017-06-21 Thread Jeffy Chen
Update document devicetree bindings to support "wakeup-source" property. Signed-off-by: Jeffy Chen --- Changes in v3: None Documentation/devicetree/bindings/spi/spi-bus.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Doc

[RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices

2017-06-21 Thread Jeffy Chen
We used to enable wakeup for cros-ec-spi devices unconditionally. Now we are using the more generic wakeup-source property to enable it. Signed-off-by: Jeffy Chen --- Changes in v3: None arch/arm/boot/dts/exynos5420-peach-pit.dts | 1 + arch/arm/boot/dts/exynos5800-peach-pi.dts | 1

[RFC PATCH v3 1/6] spi: core: add support for wakeup-source dts property

2017-06-21 Thread Jeffy Chen
Use generic wakeup-source property to enable spi device wakeup. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v3: None drivers/spi/spi.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c

[RFC PATCH v3 1/6] spi: core: add support for wakeup-source dts property

2017-06-21 Thread Jeffy Chen
Use generic wakeup-source property to enable spi device wakeup. Signed-off-by: Jeffy Chen --- Changes in v3: None drivers/spi/spi.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index c3f6b52..a510bba 100644

[RFC PATCH v3 0/6] Report wakeup events in cros_ec_keyb and make cros-ec-spi wakeup optional

2017-06-21 Thread Jeffy Chen
. Suggested by Dmitry Torokhov <dmitry.torok...@gmail.com>. Jeffy Chen (6): spi: core: add support for wakeup-source dts property dt-bindings: spi/core: add wakeup-source optional property ARM/arm64: dts: enable wakeup for cros-ec-spi devices mfd: cros ec: spi: remove unconditionally

[RFC PATCH v3 0/6] Report wakeup events in cros_ec_keyb and make cros-ec-spi wakeup optional

2017-06-21 Thread Jeffy Chen
. Suggested by Dmitry Torokhov . Jeffy Chen (6): spi: core: add support for wakeup-source dts property dt-bindings: spi/core: add wakeup-source optional property ARM/arm64: dts: enable wakeup for cros-ec-spi devices mfd: cros ec: spi: remove unconditionally wakeup enable input

[PATCH v3 2/3] dt-bindings: spi/rockchip: add "cs-gpios" optional property

2017-06-13 Thread Jeffy Chen
Update document devicetree bindings to support "cs-gpios" property. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v3: None Changes in v2: None Documentation/devicetree/bindings/spi/spi-rockchip.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v3 3/3] arm64: dts: rockchip: use cs-gpios for cros_ec_spi

2017-06-13 Thread Jeffy Chen
The cros_ec requires CS line to be active after last message. But the CS would be toggled when powering off/on rockchip spi, which breaks ec xfer. Use GPIO CS to prevent that. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v3: None Changes in v2: Fix wrong p

[PATCH v3 3/3] arm64: dts: rockchip: use cs-gpios for cros_ec_spi

2017-06-13 Thread Jeffy Chen
The cros_ec requires CS line to be active after last message. But the CS would be toggled when powering off/on rockchip spi, which breaks ec xfer. Use GPIO CS to prevent that. Signed-off-by: Jeffy Chen --- Changes in v3: None Changes in v2: Fix wrong pinconf for spi5_cs0. arch/arm64/boot/dts

[PATCH v3 2/3] dt-bindings: spi/rockchip: add "cs-gpios" optional property

2017-06-13 Thread Jeffy Chen
Update document devicetree bindings to support "cs-gpios" property. Signed-off-by: Jeffy Chen --- Changes in v3: None Changes in v2: None Documentation/devicetree/bindings/spi/spi-rockchip.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindin

[PATCH v3 1/3] spi: rockchip: add support for "cs-gpios" dts property

2017-06-13 Thread Jeffy Chen
Support using "cs-gpios" property to specify cs gpios. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v3: include linux/gpio/consumer.h for compile errors on ARCH_X86 (reported by kbuild test robot <l...@intel.com>) Changes in v2: 1/ request cs gpi

[PATCH v3 1/3] spi: rockchip: add support for "cs-gpios" dts property

2017-06-13 Thread Jeffy Chen
Support using "cs-gpios" property to specify cs gpios. Signed-off-by: Jeffy Chen --- Changes in v3: include linux/gpio/consumer.h for compile errors on ARCH_X86 (reported by kbuild test robot ) Changes in v2: 1/ request cs gpios in probe for better error handling 2/ use gpiod

[PATCH v2 4/4] arm64: dts: rockchip: use cs-gpios for cros_ec_spi

2017-06-12 Thread Jeffy Chen
The cros_ec requires CS line to be active after last message. But the CS would be toggled when powering off/on rockchip spi, which breaks ec xfer. Use GPIO CS to prevent that. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v2: Fix wrong pinconf for spi5_cs0. arch

[PATCH v2 4/4] arm64: dts: rockchip: use cs-gpios for cros_ec_spi

2017-06-12 Thread Jeffy Chen
The cros_ec requires CS line to be active after last message. But the CS would be toggled when powering off/on rockchip spi, which breaks ec xfer. Use GPIO CS to prevent that. Signed-off-by: Jeffy Chen --- Changes in v2: Fix wrong pinconf for spi5_cs0. arch/arm64/boot/dts/rockchip/rk3399

[PATCH v2 3/4] dt-bindings: spi/rockchip: add "cs-gpios" optional property

2017-06-12 Thread Jeffy Chen
Update document devicetree bindings to support "cs-gpios" property. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v2: None Documentation/devicetree/bindings/spi/spi-rockchip.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicet

[PATCH v2 2/4] spi: rockchip: add support for "cs-gpios" dts property

2017-06-12 Thread Jeffy Chen
Support using "cs-gpios" property to specify cs gpios. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> 1/ request cs gpios in probe for better error handling 2/ use gpiod* function (suggested by Heiko Stuebner) 3/ split dt-binding changes to new patch (suggested by S

[PATCH v2 3/4] dt-bindings: spi/rockchip: add "cs-gpios" optional property

2017-06-12 Thread Jeffy Chen
Update document devicetree bindings to support "cs-gpios" property. Signed-off-by: Jeffy Chen --- Changes in v2: None Documentation/devicetree/bindings/spi/spi-rockchip.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/spi/spi-rockc

[PATCH v2 2/4] spi: rockchip: add support for "cs-gpios" dts property

2017-06-12 Thread Jeffy Chen
Support using "cs-gpios" property to specify cs gpios. Signed-off-by: Jeffy Chen 1/ request cs gpios in probe for better error handling 2/ use gpiod* function (suggested by Heiko Stuebner) 3/ split dt-binding changes to new patch (suggested by Shawn Lin & Heiko Stuebner) ---

[PATCH v2 1/4] spi: rockchip: fix error handling when probe

2017-06-12 Thread Jeffy Chen
After failed to request dma tx chain, we need to disable pm_runtime. Also cleanup error labels for better readability. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v2: None drivers/spi/spi-rockchip.c | 27 ++- 1 file changed, 14 insertions(

[PATCH v2 1/4] spi: rockchip: fix error handling when probe

2017-06-12 Thread Jeffy Chen
After failed to request dma tx chain, we need to disable pm_runtime. Also cleanup error labels for better readability. Signed-off-by: Jeffy Chen --- Changes in v2: None drivers/spi/spi-rockchip.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git

[PATCH v2] mfd: cros_ec: Free IRQ on exit

2017-06-12 Thread Jeffy Chen
64: error -16 [ 2683.338610] cros-ec-spi spi5.0: cannot register EC [ 2683.338656] cros-ec-spi: probe of spi5.0 failed with error -16 Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v2: Improve the commit message. drivers/mfd/cros_ec.c | 3 +++ 1 file changed, 3 inse

[PATCH v2] mfd: cros_ec: Free IRQ on exit

2017-06-12 Thread Jeffy Chen
64: error -16 [ 2683.338610] cros-ec-spi spi5.0: cannot register EC [ 2683.338656] cros-ec-spi: probe of spi5.0 failed with error -16 Signed-off-by: Jeffy Chen --- Changes in v2: Improve the commit message. drivers/mfd/cros_ec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers

[PATCH 1/2] spi: rockchip: add support for "cs-gpios" dts property

2017-06-12 Thread Jeffy Chen
Support using "cs-gpios" property to specify cs gpios. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- .../devicetree/bindings/spi/spi-rockchip.txt | 2 + drivers/spi/spi-rockchip.c | 52 ++ 2 files changed, 54 ins

[PATCH 2/2] arm64: dts: rockchip: use cs-gpios for cros_ec_spi

2017-06-12 Thread Jeffy Chen
The cros_ec requires CS line to be active after last message. But the CS would be toggled when powering off/on rockchip spi, which breaks ec xfer. Use GPIO CS to prevent that. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 6 +++

[PATCH 1/2] spi: rockchip: add support for "cs-gpios" dts property

2017-06-12 Thread Jeffy Chen
Support using "cs-gpios" property to specify cs gpios. Signed-off-by: Jeffy Chen --- .../devicetree/bindings/spi/spi-rockchip.txt | 2 + drivers/spi/spi-rockchip.c | 52 ++ 2 files changed, 54 insertions(+) diff --git a/Doc

[PATCH 2/2] arm64: dts: rockchip: use cs-gpios for cros_ec_spi

2017-06-12 Thread Jeffy Chen
The cros_ec requires CS line to be active after last message. But the CS would be toggled when powering off/on rockchip spi, which breaks ec xfer. Use GPIO CS to prevent that. Signed-off-by: Jeffy Chen --- arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 6 ++ 1 file changed, 6 insertions

[PATCH] mfd: cros_ec: Add missing free_irq in cros_ec_remove

2017-06-11 Thread Jeffy Chen
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- drivers/mfd/cros_ec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c index e31ac60..dc6ce90 100644 --- a/drivers/mfd/cros_ec.c +++ b/drivers/mfd/cros_ec.c @@ -183,6 +183,9

[PATCH] mfd: cros_ec: Add missing free_irq in cros_ec_remove

2017-06-11 Thread Jeffy Chen
Signed-off-by: Jeffy Chen --- drivers/mfd/cros_ec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c index e31ac60..dc6ce90 100644 --- a/drivers/mfd/cros_ec.c +++ b/drivers/mfd/cros_ec.c @@ -183,6 +183,9 @@ int cros_ec_remove(struct

[PATCH v3] genirq: Check irq disabled & masked states in irq_shutdown

2017-05-27 Thread Jeffy Chen
ome chips which require balanced irq enable and disable, for example pinctrl-rockchip & pinctrl-nomadik. Add a state check before calling irq_disable to prevent that. v2: Rewrite commit message. v3: Rewrite commit message and not skip irq_shutdown. Signed-off-by: Jeffy Chen <jeffy.c...@rock-c

[PATCH v3] genirq: Check irq disabled & masked states in irq_shutdown

2017-05-27 Thread Jeffy Chen
ome chips which require balanced irq enable and disable, for example pinctrl-rockchip & pinctrl-nomadik. Add a state check before calling irq_disable to prevent that. v2: Rewrite commit message. v3: Rewrite commit message and not skip irq_shutdown. Signed-off-by: Jeffy Chen --- Changes in

[PATCH v2] genirq: Check irq disabled & masked states in irq_shutdown

2017-05-26 Thread Jeffy Chen
t;-- try to disable it again This would confuse some pinctrl drivers which would control clk in irq_enable/irq_disable, for example pinctrl-rockchip/pinctrl-nomadik. This patch add a state check in irq_shutdown to prevent that. v2: Rewrite commit message. Signed-off-by: Jeffy Chen <jef

[PATCH v2] genirq: Check irq disabled & masked states in irq_shutdown

2017-05-26 Thread Jeffy Chen
t;-- try to disable it again This would confuse some pinctrl drivers which would control clk in irq_enable/irq_disable, for example pinctrl-rockchip/pinctrl-nomadik. This patch add a state check in irq_shutdown to prevent that. v2: Rewrite commit message. Signed-off-by: Jeffy Chen --- Changes in

[PATCH] genirq: Check irq disabled & masked states in irq_shutdown

2017-05-26 Thread Jeffy Chen
If irq is already disabled and masked, we would hit a unbalanced irq shutdown/disable/mask when freeing it. Add a state check in irq_shutdown to prevent this. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- kernel/irq/chip.c | 8 +++- 1 file changed, 7 insertions(+), 1 de

[PATCH] genirq: Check irq disabled & masked states in irq_shutdown

2017-05-26 Thread Jeffy Chen
If irq is already disabled and masked, we would hit a unbalanced irq shutdown/disable/mask when freeing it. Add a state check in irq_shutdown to prevent this. Signed-off-by: Jeffy Chen --- kernel/irq/chip.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/irq

[PATCH v2] drm/rockchip: Don't allow zero sized gem buffer

2017-05-25 Thread Jeffy Chen
-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v2: Rewrite commit message. drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c index df9e570..8

[PATCH v2] drm/rockchip: Don't allow zero sized gem buffer

2017-05-25 Thread Jeffy Chen
-by: Jeffy Chen --- Changes in v2: Rewrite commit message. drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c index df9e570..8917922 100644 --- a/drivers/gpu/drm

[PATCH] drm/rockchip: Don't allow zero sized gem buffer

2017-05-23 Thread Jeffy Chen
The system would crash when trying to alloc zero sized gem buffer: [6.712435] Unable to handle kernel NULL pointer dereference at virtual address 0010 <--ZERO_SIZE_PTR ... [6.757502] PC is at sg_alloc_table_from_pages+0x170/0x1ec Signed-off-by: Jeffy Chen <jeffy.c...@rock-chi

[PATCH] drm/rockchip: Don't allow zero sized gem buffer

2017-05-23 Thread Jeffy Chen
The system would crash when trying to alloc zero sized gem buffer: [6.712435] Unable to handle kernel NULL pointer dereference at virtual address 0010 <--ZERO_SIZE_PTR ... [6.757502] PC is at sg_alloc_table_from_pages+0x170/0x1ec Signed-off-by: Jeffy Chen --- drivers/gpu/

[PATCH] iommu/rockchip: Remove build dependency on ARM

2017-05-10 Thread Jeffy Chen
This patch removes the build dependency on ARM, so we can build on arm64 as well. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- drivers/iommu/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index 6ee3a25..cb26f45

[PATCH] iommu/rockchip: Remove build dependency on ARM

2017-05-10 Thread Jeffy Chen
This patch removes the build dependency on ARM, so we can build on arm64 as well. Signed-off-by: Jeffy Chen --- drivers/iommu/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index 6ee3a25..cb26f45 100644 --- a/drivers/iommu/Kconfig

[PATCH] drm/rockchip: analogix_dp: Remove unused check and variables

2017-04-29 Thread Jeffy Chen
Remove unused check and variables after: drm/rockchip: Set line flag config register in vop_crtc_enable Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff

[PATCH] drm/rockchip: analogix_dp: Remove unused check and variables

2017-04-29 Thread Jeffy Chen
Remove unused check and variables after: drm/rockchip: Set line flag config register in vop_crtc_enable Signed-off-by: Jeffy Chen --- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/gpu/drm/rockchip

[PATCH v2] drm/rockchip: Set line flag config register in vop_crtc_enable

2017-04-28 Thread Jeffy Chen
We need to set vop config done after update line flag config, it's a new requirement for chips newer than rk3368. Since we would only use line flag irq for vact_end, let's move it to vop_crtc_enable. v2: Remove unused check and variables. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.

[PATCH v2] drm/rockchip: Set line flag config register in vop_crtc_enable

2017-04-28 Thread Jeffy Chen
We need to set vop config done after update line flag config, it's a new requirement for chips newer than rk3368. Since we would only use line flag irq for vact_end, let's move it to vop_crtc_enable. v2: Remove unused check and variables. Signed-off-by: Jeffy Chen --- Changes in v2: Remove

[PATCH] drm/rockchip: Set line flag config register in vop_crtc_enable

2017-04-27 Thread Jeffy Chen
We need to set vop config done after update line flag config, it's a new requirement for chips newer than rk3368. Since we would only use line flag irq for vact_end, let's move it to vop_crtc_enable. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- drivers/gpu/drm/ro

[PATCH] drm/rockchip: Set line flag config register in vop_crtc_enable

2017-04-27 Thread Jeffy Chen
We need to set vop config done after update line flag config, it's a new requirement for chips newer than rk3368. Since we would only use line flag irq for vact_end, let's move it to vop_crtc_enable. Signed-off-by: Jeffy Chen --- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 4

[PATCH v11] drm: Unplug drm device when unregistering it (v8)

2017-04-13 Thread Jeffy Chen
into drm_drv. v7: Add missing drm_dev_unref in udl_drv. v8: Fix compiler errors after enable udl. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- drivers/gpu/drm/drm_drv.c | 26 ++ drivers/gpu/drm/udl/udl_drv.c | 3 ++- include/drm/drmP.h

[PATCH v11] drm: Unplug drm device when unregistering it (v8)

2017-04-13 Thread Jeffy Chen
into drm_drv. v7: Add missing drm_dev_unref in udl_drv. v8: Fix compiler errors after enable udl. Signed-off-by: Jeffy Chen --- drivers/gpu/drm/drm_drv.c | 26 ++ drivers/gpu/drm/udl/udl_drv.c | 3 ++- include/drm/drmP.h| 6 -- include/drm/drm_drv.h

[PATCH v10] drm: Unplug drm device when unregistering it (v7)

2017-04-12 Thread Jeffy Chen
into drm_drv. v7: Add missing drm_dev_unref in udl_drv. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- drivers/gpu/drm/drm_drv.c | 26 ++ drivers/gpu/drm/udl/udl_drv.c | 3 ++- include/drm/drmP.h| 6 -- include/drm/drm_drv.h | 1 - 4

[PATCH v10] drm: Unplug drm device when unregistering it (v7)

2017-04-12 Thread Jeffy Chen
into drm_drv. v7: Add missing drm_dev_unref in udl_drv. Signed-off-by: Jeffy Chen --- drivers/gpu/drm/drm_drv.c | 26 ++ drivers/gpu/drm/udl/udl_drv.c | 3 ++- include/drm/drmP.h| 6 -- include/drm/drm_drv.h | 1 - 4 files changed, 12 insertions

[PATCH v9] drm: Unplug drm device when unregistering it

2017-04-12 Thread Jeffy Chen
After unbinding drm, the user space may still owns the drm dev fd, and may still be able to call drm ioctl. We're using an unplugged state to prevent something like that, so let's reuse it here. Also drop drm_unplug_dev, because it would be unused after other changes. Signed-off-by: Jeffy Chen

[PATCH v9] drm: Unplug drm device when unregistering it

2017-04-12 Thread Jeffy Chen
After unbinding drm, the user space may still owns the drm dev fd, and may still be able to call drm ioctl. We're using an unplugged state to prevent something like that, so let's reuse it here. Also drop drm_unplug_dev, because it would be unused after other changes. Signed-off-by: Jeffy Chen

[PATCH v9 0/1] drm: rockchip: Fix rockchip drm unbind crash error

2017-04-12 Thread Jeffy Chen
drm_device_set_plug_state helper. Changes in v6: Reuse unplug status. Changes in v5: Fix wrong git account. Changes in v2: Fix some commit messages. Jeffy Chen (1): drm: Unplug drm device when unregistering it drivers/gpu/drm/drm_drv.c | 26 ++ drivers/gpu/drm/udl/udl_drv.c

[PATCH v9 0/1] drm: rockchip: Fix rockchip drm unbind crash error

2017-04-12 Thread Jeffy Chen
drm_device_set_plug_state helper. Changes in v6: Reuse unplug status. Changes in v5: Fix wrong git account. Changes in v2: Fix some commit messages. Jeffy Chen (1): drm: Unplug drm device when unregistering it drivers/gpu/drm/drm_drv.c | 26 ++ drivers/gpu/drm/udl/udl_drv.c

[PATCH v8 1/2] drm: Unplug drm device when unregistering it

2017-04-11 Thread Jeffy Chen
After unbinding drm, the user space may still owns the drm dev fd, and may still be able to call drm ioctl. We're using an unplugged state to prevent something like that, so let's reuse it here. Also drop drm_unplug_dev, because it would be unused after other changes. Signed-off-by: Jeffy Chen

[PATCH v8 2/2] drm: Prevent release fb after cleanup drm_mode_config

2017-04-11 Thread Jeffy Chen
that. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v8: None Changes in v7: Update commit message. Changes in v6: None Changes in v5: None Changes in v2: None drivers/gpu/drm/drm_framebuffer.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/g

[PATCH v8 1/2] drm: Unplug drm device when unregistering it

2017-04-11 Thread Jeffy Chen
After unbinding drm, the user space may still owns the drm dev fd, and may still be able to call drm ioctl. We're using an unplugged state to prevent something like that, so let's reuse it here. Also drop drm_unplug_dev, because it would be unused after other changes. Signed-off-by: Jeffy Chen

[PATCH v8 2/2] drm: Prevent release fb after cleanup drm_mode_config

2017-04-11 Thread Jeffy Chen
that. Signed-off-by: Jeffy Chen --- Changes in v8: None Changes in v7: Update commit message. Changes in v6: None Changes in v5: None Changes in v2: None drivers/gpu/drm/drm_framebuffer.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm

[PATCH v8 0/2] drm: rockchip: Fix rockchip drm unbind crash error

2017-04-11 Thread Jeffy Chen
essage. Changes in v6: Address Daniel Vetter <dan...@ffwll.ch>'s comments. Changes in v5: Fix wrong git account. Changes in v2: Fix some commit messages. Jeffy Chen (2): drm: Unplug drm device when unregistering it drm: Prevent release fb after cleanup drm_mode_config drivers/gpu/d

[PATCH v8 0/2] drm: rockchip: Fix rockchip drm unbind crash error

2017-04-11 Thread Jeffy Chen
Daniel Vetter 's comments. Changes in v5: Fix wrong git account. Changes in v2: Fix some commit messages. Jeffy Chen (2): drm: Unplug drm device when unregistering it drm: Prevent release fb after cleanup drm_mode_config drivers/gpu/drm/drm_drv.c | 19 +++ drivers/gpu/drm

[PATCH] drm: Fixup hang when unregistering drm dev with open_count 0

2017-04-11 Thread Jeffy Chen
directly. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- drivers/gpu/drm/drm_drv.c | 15 +-- include/drm/drm_drv.h | 1 - 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index ad13e20..cc2d018

[PATCH] drm: Fixup hang when unregistering drm dev with open_count 0

2017-04-11 Thread Jeffy Chen
directly. Signed-off-by: Jeffy Chen --- drivers/gpu/drm/drm_drv.c | 15 +-- include/drm/drm_drv.h | 1 - 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index ad13e20..cc2d018 100644 --- a/drivers/gpu/drm/drm_drv.c

[PATCH v7 1/2] drm: Unplug drm device when unregistering it

2017-04-10 Thread Jeffy Chen
After unbinding drm, the user space may still owns the drm dev fd, and may still be able to call drm ioctl. We're using an unplugged state to prevent something like that, so let's reuse it here. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> Reviewed-by: Sean Paul <seanp...@chr

[PATCH v7 1/2] drm: Unplug drm device when unregistering it

2017-04-10 Thread Jeffy Chen
After unbinding drm, the user space may still owns the drm dev fd, and may still be able to call drm ioctl. We're using an unplugged state to prevent something like that, so let's reuse it here. Signed-off-by: Jeffy Chen Reviewed-by: Sean Paul --- Changes in v7: Address Sean Paul 's comments

[PATCH v7 2/2] drm: Prevent release fb after cleanup drm_mode_config

2017-04-10 Thread Jeffy Chen
that. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> --- Changes in v7: Update commit message. Changes in v6: None Changes in v5: None Changes in v2: None drivers/gpu/drm/drm_framebuffer.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_framebuffer.c b/d

[PATCH v7 2/2] drm: Prevent release fb after cleanup drm_mode_config

2017-04-10 Thread Jeffy Chen
that. Signed-off-by: Jeffy Chen --- Changes in v7: Update commit message. Changes in v6: None Changes in v5: None Changes in v2: None drivers/gpu/drm/drm_framebuffer.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c

[PATCH v7 0/2] drm: rockchip: Fix rockchip drm unbind crash error

2017-04-10 Thread Jeffy Chen
ix wrong git account. Changes in v2: Fix some commit messages. Jeffy Chen (2): drm: Unplug drm device when unregistering it drm: Prevent release fb after cleanup drm_mode_config drivers/gpu/drm/drm_drv.c | 8 drivers/gpu/drm/drm_framebuffer.c | 5 + drivers/gpu/drm/udl/udl_d

[PATCH v7 0/2] drm: rockchip: Fix rockchip drm unbind crash error

2017-04-10 Thread Jeffy Chen
messages. Jeffy Chen (2): drm: Unplug drm device when unregistering it drm: Prevent release fb after cleanup drm_mode_config drivers/gpu/drm/drm_drv.c | 8 drivers/gpu/drm/drm_framebuffer.c | 5 + drivers/gpu/drm/udl/udl_drv.c | 2 +- include/drm/drmP.h| 5

<    5   6   7   8   9   10   11   12   13   >