phy: mapphone-mdm6600: Fix pinctrl_pm handling for sleep pins
authorTony Lindgren <tony@atomide.com>
Wed, 13 Sep 2023 06:04:29 +0000 (09:04 +0300)
committerVinod Koul <vkoul@kernel.org>
Thu, 14 Sep 2023 11:35:27 +0000 (17:05 +0530)
commit3b384cc74b00b5ac21d18e4c1efc3c1da5300971
treefd69fcf84b0d317d2c9c036481b08cdd78690e76
parentb99e0ba9633af51638e5ee1668da2e33620c134f
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 <ivo.g.dimitrov.75@gmail.com>
Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Sebastian Reichel <sre@kernel.org>
Fixes: 2ad2af081622 ("phy: mapphone-mdm6600: Improve phy related runtime PM calls")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230913060433.48373-3-tony@atomide.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/motorola/phy-mapphone-mdm6600.c