[PATCH 0/3] soc: mediatek: mtk-socinfo: Fixes and cleanup

From: Chen-Yu Tsai
Date: Tue Jan 30 2024 - 05:01:18 EST


Hi,

The new mtk-socinfo driver has a double put of the nvmem device used to
read the socinfo data. While fixing it, I rewrote the read function to
make better use of the device node and device relationship.

Patch 1 rewrites the cell read function in the mtk-socinfo so that no
resource leaks happen, and device lookup is more efficient.

Sidenote: I think the cell read function could be reworked a bit more
to return different error codes for different failure modes.

Patch 2 adds an extra socinfo entry for MT8183. It seems that some units
have chips that have this one. At least mine does.

Patch 3 drops the custom nvmem device name from the mtk-efuse driver.
This was previously used for nvmem device lookup, but on MT8183 with
two efuses, one would fail to probe due to this. Since after patch 1
this is no longer used, we can just drop it.

Please merge. On the MT8183 ChromeOS devices this currently crashes.


Thanks
ChenYu


Chen-Yu Tsai (3):
soc: mediatek: mtk-socinfo: Clean up NVMEM cell read
soc: mediatek: mtk-socinfo: Add extra entry for MT8183
nvmem: mtk-efuse: Drop NVMEM device name

drivers/nvmem/mtk-efuse.c | 1 -
drivers/soc/mediatek/mtk-socinfo.c | 17 +++++++++++------
2 files changed, 11 insertions(+), 7 deletions(-)

--
2.43.0.429.g432eaa2c6b-goog