The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/3] soc: mediatek: mtk-socinfo: Fixes and cleanup
@ 2024-01-30  9:56 Chen-Yu Tsai
  2024-01-30  9:56 ` [PATCH 1/3] soc: mediatek: mtk-socinfo: Clean up NVMEM cell read Chen-Yu Tsai
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Chen-Yu Tsai @ 2024-01-30  9:56 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno, Srinivas Kandagatla
  Cc: Chen-Yu Tsai, linux-kernel, linux-arm-kernel, linux-mediatek,
	William-tw Lin

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-02-13 14:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-30  9:56 [PATCH 0/3] soc: mediatek: mtk-socinfo: Fixes and cleanup Chen-Yu Tsai
2024-01-30  9:56 ` [PATCH 1/3] soc: mediatek: mtk-socinfo: Clean up NVMEM cell read Chen-Yu Tsai
2024-01-30 11:20   ` AngeloGioacchino Del Regno
2024-01-30  9:56 ` [PATCH 2/3] soc: mediatek: mtk-socinfo: Add extra entry for MT8183 Chen-Yu Tsai
2024-01-30 11:19   ` AngeloGioacchino Del Regno
2024-01-31  7:19   ` William-tw Lin (林鼎崴)
2024-01-30  9:56 ` [PATCH 3/3] nvmem: mtk-efuse: Drop NVMEM device name Chen-Yu Tsai
2024-01-30 11:15   ` AngeloGioacchino Del Regno
2024-02-06 16:14   ` Nícolas F. R. A. Prado
2024-02-13 13:07   ` Srinivas Kandagatla
2024-02-13 14:13     ` Chen-Yu Tsai
2024-01-31  8:44 ` [PATCH 0/3] soc: mediatek: mtk-socinfo: Fixes and cleanup AngeloGioacchino Del Regno
2024-02-13 14:36 ` (subset) " Srinivas Kandagatla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox