[RFC PATCH] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-02-24 Thread Merlijn Wajer
) from [] (ret_fast_syscall+0x0/0x54) Solution was suggested by Tony Lindgren <t...@atomide.com>. Signed-off-by: Merlijn Wajer <merl...@wizzup.org> --- drivers/usb/musb/musb_core.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb

Re: [PATCH] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-02-26 Thread Merlijn Wajer
Hi, On 26/02/18 16:57, Bin Liu wrote: > Hi, > > On Mon, Feb 26, 2018 at 11:56:08AM +0100, Merlijn Wajer wrote: >> Without pm_runtime_{get,put}_sync calls in place, reading >> vbus status via /sys causes the following error: >> >> Unhandled fault: extern

usb: musb: error when trying to unbind musb-hdrc.0.auto

2018-03-07 Thread Merlijn Wajer
Hi, I am trying to unbind the musb driver on my Nokia N900, but I get the following kernel oops [1]. This is the command that I issued: root@n900devuan:/sys/bus/platform/drivers/musb-hdrc# echo musb-hdrc.0.auto > unbind This might be omap specific. I thought that as with the vbus issue, calls

Re: usb: musb: error when trying to unbind musb-hdrc.0.auto

2018-03-07 Thread Merlijn Wajer
), and now I can unbind successfully. I will try to send a patch for review soon. Cheers, Merlijn On 07/03/18 23:41, Merlijn Wajer wrote: > Hi, > > I am trying to unbind the musb driver on my Nokia N900, but I get the > following kernel oops [1]. > > This is the command that I

[RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Merlijn Wajer
musb_platform_exit before disabling runtime pm. Signed-off-by: Merlijn Wajer <merl...@wizzup.org> --- If I understand commit 0c3aae9bd59978fb8c3557d7883380bef0f2cfa1 correctly, this patch should also be backported to 4.9 (and newer kernels). I have verified that this works on the Nokia N900,

Re: [PATCH v2] usb: musb: Fix external abort in musb_remove on omap2430

2018-03-12 Thread Merlijn Wajer
Hi Bin, On 09/03/18 15:11, Bin Liu wrote: > Hi, > > On Thu, Mar 08, 2018 at 11:19:48PM +0100, Merlijn Wajer wrote: >> This fixes an oops on unbind / module unload (on the musb omap2430 >> platform). >> >> musb_remove function now calls musb_platform_ex

Re: [RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Merlijn Wajer
Hi, On 08/03/18 17:46, Bin Liu wrote: > No need to flush, the work is already cancelled at this point. > >> + >> musb_writeb(musb->mregs, MUSB_DEVCTL, 0); >> +musb_platform_exit(musb); > > This can be move down to out side of holding the spinlock, > >>

[PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Merlijn Wajer
This fixes an oops on unbind / module unload. musb_remove function now calls musb_platform_exit before disabling runtime pm. Signed-off-by: Merlijn Wajer <merl...@wizzup.org> --- drivers/usb/musb/musb_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drive

[PATCH v2] usb: musb: Fix external abort in musb_remove on omap2430

2018-03-08 Thread Merlijn Wajer
This fixes an oops on unbind / module unload (on the musb omap2430 platform). musb_remove function now calls musb_platform_exit before disabling runtime pm. Signed-off-by: Merlijn Wajer <merl...@wizzup.org> --- drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 de

Re: [PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Merlijn Wajer
Hi, On 08/03/18 22:15, Bin Liu wrote: > please add patch version numbers in the subject when necessary. This > helps cross-referencing. Will do. I naively assumed that the first patch would implicitly be number 1. Will send out v2 now. >> >> +musb_writeb(musb->mregs, MUSB_DEVCTL, 0); >

Re: call/normal switch was Re: omap4-droid4: voice call support was

2018-04-06 Thread Merlijn Wajer
Hi, On 06/04/18 14:04, Pavel Machek wrote: > Hi! > >> OK that explains why the speaker keeps working then :) > > Ok, I pushed new version of unicsy_demo. > > It now sends & receives sms and you can call & receive call. Tone from > linphone is used for incoming call. User interface and code is

Re: omap4-droid4: voice call support was Re: [PATCHv5,5/5] ARM: dts: omap4-droid4: add soundcard

2018-03-30 Thread Merlijn Wajer
On 30/03/18 12:37, Pavel Machek wrote: > On Thu 2018-03-29 14:56:13, Tony Lindgren wrote: >> * Pavel Machek [180329 18:41]: >>> Thanks. I got call working including outgoing audio: in capture >>> settings, right->mic 1, Mic1 + Mic2 in alsamixer -> 100%. But I had >>> the other phone

[RFC PATCH] power: supply: bq27xxx: Call power_supply_changed on status change

2018-03-01 Thread Merlijn Wajer
that returns the value directly (as other *_read functions), adds the status to the cache, uses the cache when reporting the values and finally will trigger power_supply_changed when the charging status changes. Signed-off-by: Merlijn Wajer <merl...@wizzup.org> --- drivers/power/

Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)

2018-03-05 Thread Merlijn Wajer
Hi Bin, On 05/03/18 20:28, Bin Liu wrote: > The musb udc driver sets the state to b_idle without checking a > gadget driver, this should be cleaned up. I have add this in my backlog. > But if this issue doesn't bother you much right now, I will make the > action low priority and address it later

Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)

2018-03-02 Thread Merlijn Wajer
Hi, On 02/03/18 16:27, Bin Liu wrote: > Hi, > > On Fri, Mar 02, 2018 at 12:47:07AM +0100, Merlijn Wajer wrote: >> Hi, >> >> I found that the "mode" file in musb sys node will return "(null)" when >> one would expect it show b_idle. >>

usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)

2018-03-01 Thread Merlijn Wajer
Hi, I found that the "mode" file in musb sys node will return "(null)" when one would expect it show b_idle. Wrong /mode file: [Fresh boot, cable not connected yet] root@n900devuan:~# modprobe g_nokia [Insert cable connected to PC] root@n900devuan:~# cat

[PATCH] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-02-26 Thread Merlijn Wajer
) from [] (ret_fast_syscall+0x0/0x54) Solution was suggested by Tony Lindgren <t...@atomide.com>. Signed-off-by: Merlijn Wajer <merl...@wizzup.org> --- drivers/usb/musb/musb_core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb

[PATCH v2 1/1] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-02-27 Thread Merlijn Wajer
) from [] (ret_fast_syscall+0x0/0x54) Solution was suggested by Tony Lindgren <t...@atomide.com>. Signed-off-by: Merlijn Wajer <merl...@wizzup.org> --- drivers/usb/musb/musb_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb

[PATCH v2 0/1] usb: musb: fix vbus_show

2018-02-27 Thread Merlijn Wajer
Hi, This fixes reading vbus status in musb. v2 places the pm_runtime_{get,put}_sync calls outside of the spinlocks, because pm_runtime_{get,put}_sync would otherwise (sometimes, depending on the platform) cause deadlocks. Hopefully this fixes the deadlock issue that Bin Liu ran into. I've tested

[RFC PATCH 0/1] power: supply: bq27xxx: Call power_supply_changed on status change

2018-02-27 Thread Merlijn Wajer
Hi, It seems that bq27xxx_battery_update does not call power_supply_changed when the charging status changes, and instead only when the capacity changes. This can cause considerable delays in reporting charging status changes to userspace. This patch turns the battery status reading function

[RFC PATCH 1/1] power: supply: bq27xxx: Call power_supply_changed on status change

2018-02-27 Thread Merlijn Wajer
Signed-off-by: Merlijn Wajer <merl...@wizzup.org> --- drivers/power/supply/bq27xxx_battery.c | 59 +- include/linux/power/bq27xxx_battery.h | 1 + 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/power/supply/bq27xxx_battery.c b/d

[RFC PATCH] power: supply: bq27xxx: Call power_supply_changed on status change

2018-03-01 Thread Merlijn Wajer
that returns the value directly (as other *_read functions), adds the status to the cache, uses the cache when reporting the values and finally will trigger power_supply_changed when the charging status changes. Signed-off-by: Merlijn Wajer --- drivers/power/supply/bq27xxx_battery.c | 59

usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)

2018-03-01 Thread Merlijn Wajer
Hi, I found that the "mode" file in musb sys node will return "(null)" when one would expect it show b_idle. Wrong /mode file: [Fresh boot, cable not connected yet] root@n900devuan:~# modprobe g_nokia [Insert cable connected to PC] root@n900devuan:~# cat

Re: [PATCH v2] usb: musb: Fix external abort in musb_remove on omap2430

2018-03-12 Thread Merlijn Wajer
Hi Bin, On 09/03/18 15:11, Bin Liu wrote: > Hi, > > On Thu, Mar 08, 2018 at 11:19:48PM +0100, Merlijn Wajer wrote: >> This fixes an oops on unbind / module unload (on the musb omap2430 >> platform). >> >> musb_remove function now calls musb_platform_ex

Re: omap4-droid4: voice call support was Re: [PATCHv5,5/5] ARM: dts: omap4-droid4: add soundcard

2018-03-30 Thread Merlijn Wajer
On 30/03/18 12:37, Pavel Machek wrote: > On Thu 2018-03-29 14:56:13, Tony Lindgren wrote: >> * Pavel Machek [180329 18:41]: >>> Thanks. I got call working including outgoing audio: in capture >>> settings, right->mic 1, Mic1 + Mic2 in alsamixer -> 100%. But I had >>> the other phone muted, so I

[RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Merlijn Wajer
musb_platform_exit before disabling runtime pm. Signed-off-by: Merlijn Wajer --- If I understand commit 0c3aae9bd59978fb8c3557d7883380bef0f2cfa1 correctly, this patch should also be backported to 4.9 (and newer kernels). I have verified that this works on the Nokia N900, RX-51. The problem did not occur

Re: [RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Merlijn Wajer
Hi, On 08/03/18 17:46, Bin Liu wrote: > No need to flush, the work is already cancelled at this point. > >> + >> musb_writeb(musb->mregs, MUSB_DEVCTL, 0); >> +musb_platform_exit(musb); > > This can be move down to out side of holding the spinlock, > >>

[PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Merlijn Wajer
This fixes an oops on unbind / module unload. musb_remove function now calls musb_platform_exit before disabling runtime pm. Signed-off-by: Merlijn Wajer --- drivers/usb/musb/musb_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b

Re: [PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Merlijn Wajer
Hi, On 08/03/18 22:15, Bin Liu wrote: > please add patch version numbers in the subject when necessary. This > helps cross-referencing. Will do. I naively assumed that the first patch would implicitly be number 1. Will send out v2 now. >> >> +musb_writeb(musb->mregs, MUSB_DEVCTL, 0); >

[PATCH v2] usb: musb: Fix external abort in musb_remove on omap2430

2018-03-08 Thread Merlijn Wajer
This fixes an oops on unbind / module unload (on the musb omap2430 platform). musb_remove function now calls musb_platform_exit before disabling runtime pm. Signed-off-by: Merlijn Wajer --- drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

Re: call/normal switch was Re: omap4-droid4: voice call support was

2018-04-06 Thread Merlijn Wajer
Hi, On 06/04/18 14:04, Pavel Machek wrote: > Hi! > >> OK that explains why the speaker keeps working then :) > > Ok, I pushed new version of unicsy_demo. > > It now sends & receives sms and you can call & receive call. Tone from > linphone is used for incoming call. User interface and code is

usb: musb: error when trying to unbind musb-hdrc.0.auto

2018-03-07 Thread Merlijn Wajer
Hi, I am trying to unbind the musb driver on my Nokia N900, but I get the following kernel oops [1]. This is the command that I issued: root@n900devuan:/sys/bus/platform/drivers/musb-hdrc# echo musb-hdrc.0.auto > unbind This might be omap specific. I thought that as with the vbus issue, calls

Re: usb: musb: error when trying to unbind musb-hdrc.0.auto

2018-03-07 Thread Merlijn Wajer
), and now I can unbind successfully. I will try to send a patch for review soon. Cheers, Merlijn On 07/03/18 23:41, Merlijn Wajer wrote: > Hi, > > I am trying to unbind the musb driver on my Nokia N900, but I get the > following kernel oops [1]. > > This is the command that I

[RFC PATCH] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-02-24 Thread Merlijn Wajer
) from [] (ret_fast_syscall+0x0/0x54) Solution was suggested by Tony Lindgren . Signed-off-by: Merlijn Wajer --- drivers/usb/musb/musb_core.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index ea5013aa69e2..182611f76af3

Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)

2018-03-02 Thread Merlijn Wajer
Hi, On 02/03/18 16:27, Bin Liu wrote: > Hi, > > On Fri, Mar 02, 2018 at 12:47:07AM +0100, Merlijn Wajer wrote: >> Hi, >> >> I found that the "mode" file in musb sys node will return "(null)" when >> one would expect it show b_idle. >>

Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)

2018-03-05 Thread Merlijn Wajer
Hi Bin, On 05/03/18 20:28, Bin Liu wrote: > The musb udc driver sets the state to b_idle without checking a > gadget driver, this should be cleaned up. I have add this in my backlog. > But if this issue doesn't bother you much right now, I will make the > action low priority and address it later

[PATCH] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-02-26 Thread Merlijn Wajer
) from [] (ret_fast_syscall+0x0/0x54) Solution was suggested by Tony Lindgren . Signed-off-by: Merlijn Wajer --- drivers/usb/musb/musb_core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index eef4ad578b31..ceaa40ef0e73 100644

Re: [PATCH] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-02-26 Thread Merlijn Wajer
Hi, On 26/02/18 16:57, Bin Liu wrote: > Hi, > > On Mon, Feb 26, 2018 at 11:56:08AM +0100, Merlijn Wajer wrote: >> Without pm_runtime_{get,put}_sync calls in place, reading >> vbus status via /sys causes the following error: >> >> Unhandled fault: extern

[PATCH v2 0/1] usb: musb: fix vbus_show

2018-02-27 Thread Merlijn Wajer
Hi, This fixes reading vbus status in musb. v2 places the pm_runtime_{get,put}_sync calls outside of the spinlocks, because pm_runtime_{get,put}_sync would otherwise (sometimes, depending on the platform) cause deadlocks. Hopefully this fixes the deadlock issue that Bin Liu ran into. I've tested

[PATCH v2 1/1] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-02-27 Thread Merlijn Wajer
) from [] (ret_fast_syscall+0x0/0x54) Solution was suggested by Tony Lindgren . Signed-off-by: Merlijn Wajer --- drivers/usb/musb/musb_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index eef4ad578b31..c344ef4e5355 100644

[RFC PATCH 0/1] power: supply: bq27xxx: Call power_supply_changed on status change

2018-02-27 Thread Merlijn Wajer
Hi, It seems that bq27xxx_battery_update does not call power_supply_changed when the charging status changes, and instead only when the capacity changes. This can cause considerable delays in reporting charging status changes to userspace. This patch turns the battery status reading function

[RFC PATCH 1/1] power: supply: bq27xxx: Call power_supply_changed on status change

2018-02-27 Thread Merlijn Wajer
Signed-off-by: Merlijn Wajer --- drivers/power/supply/bq27xxx_battery.c | 59 +- include/linux/power/bq27xxx_battery.h | 1 + 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply

Re: Lay common foundation to make PVR/SGX work without hacks on OMAP34xx, OMAP36xx, AM335x and potentially OMAP4, OMAP5

2019-08-20 Thread Merlijn Wajer
Hi, On 20/08/2019 08:48, H. Nikolaus Schaller wrote: > >> Am 19.08.2019 um 21:43 schrieb Adam Ford : >> >>> Thanks to the help from the Pyra community, I was able to get a (binary) >>> reference >>> implementation using DRM that works on Pyra/OMAP5. At least the gles1test1. >> >> just a

Re: [PATCH 1/2] Input: add `SW_MACHINE_COVER`

2020-06-29 Thread Merlijn Wajer
Hi, Looks like we're blocking on this input patch. On 16/06/2020 12:50, Pavel Machek wrote: > On Fri 2020-06-12 14:53:58, Merlijn Wajer wrote: >> This event code represents the state of a removable cover of a device. >> Value 0 means that the cover is open or removed

Re: [PATCH] rtc: cpcap: fix range

2020-06-29 Thread Merlijn Wajer
years after 14 bits would have > run out). This seems to work for me, thanks. Please add as you deem appropriate: Tested-by: Merlijn Wajer Acked-by: Merlijn Wajer Cheers, Merlijn

Re: [RFC] Limiting charge current on Droid 4 (and N900)

2020-06-27 Thread Merlijn Wajer
Hi Pavel, On 15/06/2020 16:05, Pavel Machek wrote: > Hi! > > Droid 4 has same problem as N900: it is often neccessary to manually > tweak current draw from USB, for example when using thin charging cable. > > N900 creates unique attribute by hand, but I believe >

[PATCH 2/2] ARM: dts: n900: remove mmc1 card detect gpio

2020-06-12 Thread Merlijn Wajer
-by: Tony Lindgren Signed-off-by: Merlijn Wajer --- arch/arm/boot/dts/omap3-n900.dts | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index 4089d97405c9..3dbcae3d60d2 100644 --- a/arch/arm/boot/dts/omap3

[PATCH 0/2] Add SW_MACHINE_COVER key

2020-06-12 Thread Merlijn Wajer
the cover is open. starting the nokia n900 with the cover removed, putting the cover in place: event: time 1581684523.415296, type 5 (ev_sw), code 16 (?), value 1 removing the cover again, exposing mmc1 and the battery: event: time 1581684529.413706, type 5 (ev_sw), code 16 (?), value

[PATCH 1/2] Input: add `SW_MACHINE_COVER`

2020-06-12 Thread Merlijn Wajer
This event code represents the state of a removable cover of a device. Value 0 means that the cover is open or removed, value 1 means that the cover is closed. Reviewed-by: Sebastian Reichel Acked-by: Tony Lindgren Signed-off-by: Merlijn Wajer --- include/linux/mod_devicetable.h| 2

Re: [PATCH 0/2] Add SW_MACHINE_COVER key

2020-06-08 Thread Merlijn Wajer
Hi, A while later (again) - any thoughts/comments? Should I resend the series? Thanks, Merlijn On 15/04/2020 15:29, Merlijn Wajer wrote: > Hi, > > Any objections or further comments on these two patches? It's been a while. > > Cheers, > Merlijn > > On 15/02/2020 18

Nokia N900: wl1251 spi3.0: EOW timed out on

2019-03-09 Thread Merlijn Wajer
Hi, I just migrated to Linux 5.0 (from 4.15) on my Nokia N900, and I'm getting a lot of messages like this: > wl1251 spi3.0: EOW timed out and it ends with: > [ 29.072174] wl1251: ERROR chip id doesn't match after firmware boot My tree carries some patches, but none are related to SPI or

Re: Nokia N900: wl1251 spi3.0: EOW timed out on

2019-03-09 Thread Merlijn Wajer
Hi, On 10/03/2019 00:22, Merlijn Wajer wrote: > Hi, > > I just migrated to Linux 5.0 (from 4.15) on my Nokia N900, and I'm > getting a lot of messages like this: > >> wl1251 spi3.0: EOW timed out > > and it ends with: > >> [ 29.072174] wl1251: ERROR

Re: Nokia N900: wl1251 spi3.0: EOW timed out on

2019-03-10 Thread Merlijn Wajer
Hi, On 10/03/2019 05:16, Vignesh Raghavendra wrote: > Hi. > > On 10-Mar-19 6:23 AM, Merlijn Wajer wrote: >> >> Hi, >> >> On 10/03/2019 00:22, Merlijn Wajer wrote: >>> Hi, >>> >>> I just migrated to Linux 5.0 (from 4.15)