linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wenst@chromium.org>
To: Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Chen-Yu Tsai <wenst@chromium.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	William-tw Lin <william-tw.lin@mediatek.com>
Subject: [PATCH 0/3] soc: mediatek: mtk-socinfo: Fixes and cleanup
Date: Tue, 30 Jan 2024 17:56:50 +0800	[thread overview]
Message-ID: <20240130095656.3712469-1-wenst@chromium.org> (raw)

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



             reply	other threads:[~2024-01-30  9:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30  9:56 Chen-Yu Tsai [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240130095656.3712469-1-wenst@chromium.org \
    --to=wenst@chromium.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=william-tw.lin@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).