Message ID | 20240130095656.3712469-1-wenst@chromium.org |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-44332-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1110639dyb; Tue, 30 Jan 2024 02:02:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IEtkExA6sTdtkOGKWA92EUoyu0MiYxqS3TqvbbUmFSacZfNNOxwWk5i9Xv2+1p6fqfSkn5U X-Received: by 2002:a05:6402:1763:b0:55e:f31c:378 with SMTP id da3-20020a056402176300b0055ef31c0378mr3729933edb.13.1706608957705; Tue, 30 Jan 2024 02:02:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706608957; cv=pass; d=google.com; s=arc-20160816; b=acJv33jbVHZzGehpXTu4BiYsPYkKgEeM54z2ctjTzQjgPMlHWRWR+ARi0PudqyUqC2 RhARNpnQEKkHFhZOggnirKP5uv3ewX9ALevxGWZlEWOHgyBUcm0Kgyvy4tB6Qnxh1vw2 mlS/JI4qi+pljKteQ82VC6VeCBwexoLtQFfYPXKa/f4zQiCdYog0nRxHOtdMJN3xYQ+l XfCX21G8DUr8LMaTmuyY2vyM8EsvRSPROFw+7kYvIJJ6rWZa2Vnr5nxcdnM+dDLtBrEm iG4qyG7WFBxmZuCUxbspSOak/BReB1DvKwD3s7I395dDI5Xw2f4eybPDZt3gEEuVw8lc rqOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=1E8FaeEXOaFC0eCzbjnFP8K081LnYEvpyUI9em1l5vI=; fh=T29NK0a2UgpyPMJNdRdxOwtTMCeLNbJCj+OzYaaxEOg=; b=l8V+/c0fukARGB8EjebXNOkcWsYyBvkNnTudJt3FUoF4foKWZ8uGwHoPgsdughWnIq g8+n5DoN246WP1z5J/EFbKeiXEx/JHgRYsuxA82BPvkd+4sVCfHx3gL2DwMOtm2xIZSe Sp4kiceaWmdrHtcUrVW1OVo4k27LpUroh1EhuUO6U/COP4H4w0wPMxdDFkyejr+iVPq/ gknyljt8nuKaRA+ulyF+wEraL3IOr3E3LqM+CKR3yDHsgRCRdD9gX4qqrbKckxeQdc/x bglUBz7TXQ0zLUIG6isPoJRTXZ88aQUzP4twNoPAN/nObSwvkLqcOoSqN0k2jk26Vnal eUBg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="nIMEjC0/"; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-44332-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44332-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m13-20020a056402430d00b0055eee2850b9si2182233edc.68.2024.01.30.02.02.37 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 02:02:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44332-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="nIMEjC0/"; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-44332-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44332-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6B1881F267DC for <ouuuleilei@gmail.com>; Tue, 30 Jan 2024 10:01:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9CEA966B3C; Tue, 30 Jan 2024 09:57:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="nIMEjC0/" Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E04960864 for <linux-kernel@vger.kernel.org>; Tue, 30 Jan 2024 09:57:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706608622; cv=none; b=Yet2L5PdL/zy54E015SLZDtzCGEsVWvqkg8AQ6lDhCX8GD9CZ71YirpOGRpi78WWNHJSPEJK7jZHFFV7mvbzaRm70uV9dm7btrOgUNh2r5OzeaXWlu0vHMUmqxoKqoU6mZ8DuO6VADEJO/Yd7nMvx/z5pnd04bPjwBgoYs13usA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706608622; c=relaxed/simple; bh=vbI813naE0KfjH2XtPSzIzbimxv0FRdKAx6o32QdIqU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ocvsU6VHGaNwxV9N6GQz6baEIDbwB1xhdLhI2uVLKuq/waB7ARFl7fbHt6UI6e40C0q97ILPe0q3kf3bELVGSiCIebW9ZRW2LxKWEuoTuOmNZgRgxi6D7E1V1o6zsDBQHPmmJG6E9bLYNNw1aS9zjWX2s0mQlWrtteeD0xPwhx8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=nIMEjC0/; arc=none smtp.client-ip=209.85.216.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-290b37bb7deso3092619a91.0 for <linux-kernel@vger.kernel.org>; Tue, 30 Jan 2024 01:57:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706608621; x=1707213421; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1E8FaeEXOaFC0eCzbjnFP8K081LnYEvpyUI9em1l5vI=; b=nIMEjC0/cwtqXVX+ERGx3L8ckgsZ6ls5Byo9mia0c+FGDiQzN/7S5vpRy0P+/BByIM 4Iu4AyBJ7ZxCn2Yjtq4/H2IMwL5nB9bBqKvGuuaH1XRjvGfSGAoF1Y2ZQ3sps6SGx215 SlHXdwOuxLLZbv28fLVlbXazPM5ZPvSHtYI9k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706608621; x=1707213421; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1E8FaeEXOaFC0eCzbjnFP8K081LnYEvpyUI9em1l5vI=; b=qbRyNdU4POlRKEYliKP9TA1A8IDvmTEEgHOv5kdjYTtOI0fzd+PWTTIoEm6i5l7Rwm GzvlAabezYkbfcCKCmF5A4iDq36ErGFvbgrNzMOvDLAEivGh8ZnYKrKoyFlZ6aAdIw/9 6DLNnJuLEPqr23M7tORqxrflo88gUb4z+Q4H32FHk7j5kdWcj9x5j3Aqe8ZNzJsWzFv5 xpx/bryO9CiSVYw7SDVBOR13t2RKSBgQN79QILDHYtw/ta8OFz+SEM8Gu8bZVsqtoKUq rPrQ6ArS59dYtMCANyq6YF2NaLpRoSDwnDCoHauRDa7NcYhPqXc6inbrnaboXZkvhRM2 IfYg== X-Gm-Message-State: AOJu0YxyeXucyk55LCpdgeYTtz20xnkDQasmQ6tDTVpzBKTq/Pt3iv/d 6BMmMUiYEwXJBXWwYk7C1K0xlLYFb7FSi+WYrp2vrFohZolMERG0OP1MbHQokw== X-Received: by 2002:a17:90a:6303:b0:28d:74eb:97c7 with SMTP id e3-20020a17090a630300b0028d74eb97c7mr5294648pjj.34.1706608620693; Tue, 30 Jan 2024 01:57:00 -0800 (PST) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:469:110f:d748:6896]) by smtp.gmail.com with ESMTPSA id sm5-20020a17090b2e4500b0028ffea988a2sm8069810pjb.37.2024.01.30.01.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 01:57:00 -0800 (PST) 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 Message-ID: <20240130095656.3712469-1-wenst@chromium.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789509194595768290 X-GMAIL-MSGID: 1789509194595768290 |
Series |
soc: mediatek: mtk-socinfo: Fixes and cleanup
|
|
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
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
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,