Conversation
| } | ||
| EXPORT_SYMBOL_GPL(lpi_pinctrl_remove); | ||
|
|
||
| int lpi_pinctrl_runtime_suspend(struct device *dev) |
There was a problem hiding this comment.
There is no device-specific action required in runtime suspend/resume. Runtime PM with PM clocks works correctly without explicit callbacks, so these hooks were removed.
So both runtime_suspend/resume both removed
| pm_runtime_set_autosuspend_delay(dev, 100); | ||
| pm_runtime_use_autosuspend(dev); | ||
| pm_runtime_enable(dev); | ||
|
|
There was a problem hiding this comment.
Why are we addding this here?
| ret = lpi_gpio_read(state, offset, LPI_GPIO_CFG_REG, &ctl_reg); | ||
| if (ret) { | ||
| seq_printf(s, " %-8s: <read error %d>", pindesc.name, ret); | ||
| return; |
There was a problem hiding this comment.
This does not belong to this patch?
There was a problem hiding this comment.
ACK, Made into a seperate patch
| ret = lpi_gpio_read(state, pin, LPI_GPIO_VALUE_REG, &val); | ||
| if (ret) | ||
| return ret; | ||
| return val & LPI_GPIO_VALUE_IN_MASK; |
There was a problem hiding this comment.
Unrelated changes in this patch, please separate such changes.
There was a problem hiding this comment.
ACK, kept as seperate patch
| *val = ioread32(state->tlmm_base + pin_offset + addr); | ||
|
|
||
| pm_runtime_mark_last_busy(state->dev); | ||
| pm_runtime_put_autosuspend(state->dev); |
There was a problem hiding this comment.
Yes, We need the put_autosuspend() to balance pm_runtime_resume_and_get(). Otherwise the runtime PM reference is leaked and the device will remain permanently active, preventing autosuspend and runtime suspend callbacks from running.
…me PM Convert the LPASS WSA macro codec driver to use the PM clock framework for runtime power management. The driver now relies on pm_clk helpers and runtime PM instead of manually enabling and disabling macro, dcodec, mclk, npl, and fsgen clocks. Runtime suspend and resume handling is delegated to the PM core via pm_clk_suspend() and pm_clk_resume(), while existing runtime PM callbacks continue to manage regcache state. This ensures clocks are enabled only when the WSA macro is active, improves power efficiency on LPASS platforms supporting LPI/island modes, and aligns the driver with common ASoC runtime PM patterns used across Qualcomm LPASS codec drivers. Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
…e PM Convert the LPASS VA macro codec driver to use the PM clock framework for runtime power management. The driver now relies on pm_clk helpers and runtime PM instead of manually enabling and disabling macro, dcodec, mclk, and npl clocks. All clock control during runtime suspend and resume is delegated to the PM core via pm_clk_suspend() and pm_clk_resume(). This change ensures clocks are only enabled when the VA macro is active, improves power efficiency on LPASS platforms supporting LPI/island modes, and aligns the driver with common ASoC runtime PM patterns used across Qualcomm LPASS codec drivers. Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Convert the LPASS LPI pinctrl driver to use the PM clock framework for runtime power management. This allows the LPASS LPI pinctrl driver to drop clock votes when idle, improves power efficiency on platforms using LPASS LPI island mode, and aligns the driver with common runtime PM patterns used across Qualcomm LPASS subsystems. Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Refactor the LPI GPIO register access helpers to propagate read/write errors to callers instead of silently returning invalid values. Update all call sites to handle error returns and improve debugfs output by reporting register read failures explicitly. This improves robustness and debuggability without changing intended GPIO functionality. Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
0a5973a to
b38abe2
Compare
This PR introduces runtime PM suspend/resume handling across LPASS pinctrl and ASoC macro codec drivers to ensure clocks are properly gated when devices are idle and re‑enabled in a defined order on resume.
The changes improve power management correctness for platforms using LPASS LPI island mode and prevent unnecessary clock votes during idle periods.