mbox series

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

Message ID 20240130095656.3712469-1-wenst@chromium.org (mailing list archive)
Headers show
Series soc: mediatek: mtk-socinfo: Fixes and cleanup | expand

Message

Chen-Yu Tsai Jan. 30, 2024, 9:56 a.m. UTC
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(-)

Comments

AngeloGioacchino Del Regno Jan. 31, 2024, 8:44 a.m. UTC | #1
On Tue, 30 Jan 2024 17:56:50 +0800, Chen-Yu Tsai wrote:
 > 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.
 >
 > [...]

Applied to v6.8-next/soc, thanks!

[1/3] soc: mediatek: mtk-socinfo: Clean up NVMEM cell read
       commit: 82e5d7d793e8aef1275dae266427cf048a7459d6
[2/3] soc: mediatek: mtk-socinfo: Add extra entry for MT8183
       commit: 54d21dea6a6c117f3cab4caa1f9c3ffafb515dd6

Cheers,
Angelo
Srinivas Kandagatla Feb. 13, 2024, 2:36 p.m. UTC | #2
On Tue, 30 Jan 2024 17:56:50 +0800, Chen-Yu Tsai wrote:
> 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.
> 
> [...]

Applied, thanks!

[3/3] nvmem: mtk-efuse: Drop NVMEM device name
      commit: eadaa6f9aaf682b1840bf08a8320907de4e32d50

Best regards,