lkml.org 
[lkml]   [2022]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v2 0/3] MediaTek PMIC Wrap improvements and cleanups
Date
This series is meant to improve the mtk-pmic-wrap driver;
that's done by removing the custom pwrap_wait_for_state() function
and correctly using the readx_poll_timeout macro instead, which is
doing exactly the same as the former.

As also shown in a patch [1] by Zhiyong Tao (MediaTek), performing
a tight loop is not desired: because of the operation timing in the
SPMI PMICs on these platforms, it makes more sense to wait for some
microseconds before trying to read again, reducing CPU busy time
around these state waits. For this purpose, a ~10uS delay was chosen.

While at it, I also took the occasion to tidy up this driver a
little by optimizing its probe() function.

[1]: https://patchwork.kernel.org/project/linux-mediatek/patch/20220329115824.13005-2-zhiyong.tao@mediatek.com/

Changes in v2:
- Fixed a critical typo in patch 1/3. Thanks Nicolas!

AngeloGioacchino Del Regno (3):
soc: mediatek: pwrap: Use readx_poll_timeout() instead of custom
function
soc: mediatek: pwrap: Switch to
devm_platform_ioremap_resource_byname()
soc: mediatek: pwrap: Move and check return value of
platform_get_irq()

drivers/soc/mediatek/mtk-pmic-wrap.c | 73 +++++++++++++++-------------
1 file changed, 39 insertions(+), 34 deletions(-)

--
2.35.1

\
 
 \ /
  Last update: 2022-03-31 09:59    [W:0.040 / U:0.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site