phy: mapphone-mdm6600: Fix write timeouts with shorter GPIO toggle interval
BugLink: https://bugs.launchpad.net/bugs/1867178 commit46b7edf1c7upstream. I've noticed that when writing data to the modem the writes can time out at some point eventually. Looks like kicking the modem idle GPIO every 600 ms instead of once a second fixes the issue. Note that this rate is different from our runtime PM autosuspend rate MDM6600_MODEM_IDLE_DELAY_MS that we still want to keep at 1 second, so let's add a separate define for PHY_MDM6600_IDLE_KICK_MS. Fixes:f7f50b2a7b("phy: mapphone-mdm6600: Add runtime PM support for n_gsm on USB suspend") Cc: Marcel Partap <mpartap@gmx.net> Cc: Merlijn Wajer <merlijn@wizzup.org> Cc: Michael Scott <hashcode0f@gmail.com> Cc: NeKit <nekit1000@gmail.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Sebastian Reichel <sre@kernel.org> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
This commit is contained in:
parent
775a17e99c
commit
d59e109dcc
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#define PHY_MDM6600_PHY_DELAY_MS 4000 /* PHY enable 2.2s to 3.5s */
|
||||
#define PHY_MDM6600_ENABLED_DELAY_MS 8000 /* 8s more total for MDM6600 */
|
||||
#define PHY_MDM6600_WAKE_KICK_MS 600 /* time on after GPIO toggle */
|
||||
#define MDM6600_MODEM_IDLE_DELAY_MS 1000 /* modem after USB suspend */
|
||||
#define MDM6600_MODEM_WAKE_DELAY_MS 200 /* modem response after idle */
|
||||
|
||||
|
|
@ -510,8 +511,14 @@ static void phy_mdm6600_modem_wake(struct work_struct *work)
|
|||
|
||||
ddata = container_of(work, struct phy_mdm6600, modem_wake_work.work);
|
||||
phy_mdm6600_wake_modem(ddata);
|
||||
|
||||
/*
|
||||
* The modem does not always stay awake 1.2 seconds after toggling
|
||||
* the wake GPIO, and sometimes it idles after about some 600 ms
|
||||
* making writes time out.
|
||||
*/
|
||||
schedule_delayed_work(&ddata->modem_wake_work,
|
||||
msecs_to_jiffies(MDM6600_MODEM_IDLE_DELAY_MS));
|
||||
msecs_to_jiffies(PHY_MDM6600_WAKE_KICK_MS));
|
||||
}
|
||||
|
||||
static int __maybe_unused phy_mdm6600_runtime_suspend(struct device *dev)
|
||||
|
|
|
|||
Loading…
Reference in New Issue