| 3b384cc7 | 13-Sep-2023 |
Tony Lindgren <[email protected]> |
phy: mapphone-mdm6600: Fix pinctrl_pm handling for sleep pins
Looks like the driver sleep pins configuration is unusable. Adding the sleep pins causes the usb phy to not respond. We need to use the
phy: mapphone-mdm6600: Fix pinctrl_pm handling for sleep pins
Looks like the driver sleep pins configuration is unusable. Adding the sleep pins causes the usb phy to not respond. We need to use the default pins in probe, and only set sleep pins at phy_mdm6600_device_power_off().
As the modem can also be booted to a serial port mode for firmware flashing, let's make the pin changes limited to probe and remove. For probe, we get the default pins automatically. We only need to set the sleep pins in phy_mdm6600_device_power_off() to prevent the modem from waking up because the gpio line glitches.
If it turns out that we need a separate state for phy_mdm6600_power_on() and phy_mdm6600_power_off(), we can use the pinctrl idle state.
Cc: Ivaylo Dimitrov <[email protected]> Cc: Merlijn Wajer <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Sebastian Reichel <[email protected]> Fixes: 2ad2af081622 ("phy: mapphone-mdm6600: Improve phy related runtime PM calls") Signed-off-by: Tony Lindgren <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
show more ...
|
| 91537c86 | 07-Mar-2023 |
Uwe Kleine-König <[email protected]> |
phy: motorola: phy-mapphone-mdm6600: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it'
phy: motorola: phy-mapphone-mdm6600: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void.
Trivially convert this driver from always returning zero in the remove callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
show more ...
|
| be4e3c73 | 15-Sep-2019 |
Tony Lindgren <[email protected]> |
phy: mapphone-mdm6600: Fix timeouts by adding wake-up handling
We have an interrupt handler for the wake-up GPIO pin, but we're missing the code to wake-up the system. This can cause timeouts receiv
phy: mapphone-mdm6600: Fix timeouts by adding wake-up handling
We have an interrupt handler for the wake-up GPIO pin, but we're missing the code to wake-up the system. This can cause timeouts receiving data for the UART that shares the wake-up GPIO pin with the USB PHY.
All we need to do is just wake the system and kick the autosuspend timeout to fix the issue.
Fixes: 5d1ebbda0318 ("phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4") Cc: Marcel Partap <[email protected]> Cc: Merlijn Wajer <[email protected]> Cc: Michael Scott <[email protected]> Cc: NeKit <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Sebastian Reichel <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]>
show more ...
|
| 9492535e | 22-Dec-2019 |
Tony Lindgren <[email protected]> |
phy: cpcap-usb: Improve host vs docked mode detection
When docked to a Motorola lapdock or media dock, we're in USB A-host mode with VBUS provided by the dock. When in regular USB A-host mode, we're
phy: cpcap-usb: Improve host vs docked mode detection
When docked to a Motorola lapdock or media dock, we're in USB A-host mode with VBUS provided by the dock. When in regular USB A-host mode, we're providing the VBUS. And in regular USB A-host mode we must also keep kicking the VBUS to keep it active.
Let's wait a bit before configuring the USB PHY to allow some time between the ID and VBUS changes. And let's add vbus_provider flag so we can detect docked mode and regularo USB A-host mode better.
With better USB A-host mode detection, we can now also just kick the VBUS to keep it enabled and leave out the unnecessary line muxing.
We only need to set and clear vbus_provider in the delayed work so no locking is needed for it currently.
Cc: Merlijn Wajer <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Sebastian Reichel <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]>
show more ...
|
| 63078b6b | 22-Dec-2019 |
Tony Lindgren <[email protected]> |
phy: cpcap-usb: Prevent USB line glitches from waking up modem
The micro-USB connector on Motorola Mapphone devices can be muxed between the SoC and the mdm6600 modem. But even when used for the SoC
phy: cpcap-usb: Prevent USB line glitches from waking up modem
The micro-USB connector on Motorola Mapphone devices can be muxed between the SoC and the mdm6600 modem. But even when used for the SoC, configuring the PHY with ID pin grounded will wake up the modem from idle state. Looks like the issue is probably caused by line glitches.
We can prevent the glitches by using a previously unknown mode of the GPIO mux to prevent the USB lines from being connected to the moden while configuring the USB PHY, and enable the USB lines after configuring the PHY.
Note that this only prevents waking up mdm6600 as regular USB A-host mode, and does not help when connected to a lapdock. The lapdock specific issue still needs to be debugged separately.
Cc: Merlijn Wajer <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Sebastian Reichel <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]>
show more ...
|
| af5d44de | 30-Aug-2019 |
Tony Lindgren <[email protected]> |
phy: mapphone-mdm6600: Fix uninitialized status value regression
Only the used bits get cleared with bitmap_zero() when we call gpiod_get_array_value_cansleep(). We must mask only the bits we're usi
phy: mapphone-mdm6600: Fix uninitialized status value regression
Only the used bits get cleared with bitmap_zero() when we call gpiod_get_array_value_cansleep(). We must mask only the bits we're using for ddata->status as the other bits in the bitmap may not be initialized.
And let's also drop useless debug code accidentally left over while at it.
Fixes: b9762bebc633 ("gpiolib: Pass bitmaps, not integer arrays, to get/set array") Cc: Jacopo Mondi <[email protected]> Cc: Janusz Krzysztofik <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Marcel Partap <[email protected]> Cc: Merlijn Wajer <[email protected]> Cc: Michael Scott <[email protected]> Cc: NeKit <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Sebastian Reichel <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]>
show more ...
|
| 049226b9 | 22-Dec-2019 |
Tony Lindgren <[email protected]> |
phy: cpcap-usb: Fix flakey host idling and enumerating of devices
We must let the USB host idle things properly before we switch to debug UART mode. Otherwise the USB host may never idle after disco
phy: cpcap-usb: Fix flakey host idling and enumerating of devices
We must let the USB host idle things properly before we switch to debug UART mode. Otherwise the USB host may never idle after disconnecting devices, and that causes the next enumeration to be flakey.
Cc: Jacopo Mondi <[email protected]> Cc: Marcel Partap <[email protected]> Cc: Merlijn Wajer <[email protected]> Cc: Michael Scott <[email protected]> Cc: NeKit <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Sebastian Reichel <[email protected]> Acked-by: Pavel Machek <[email protected]> Fixes: 6d6ce40f63af ("phy: cpcap-usb: Add CPCAP PMIC USB support") Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]>
show more ...
|