From nobody Thu Nov 28 09:47:17 2024 Received: from smtp-bc08.mail.infomaniak.ch (smtp-bc08.mail.infomaniak.ch [45.157.188.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A25391CF5C2 for ; Wed, 2 Oct 2024 12:19:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.157.188.8 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727871588; cv=none; b=GEVEsbPILBRKi6zSqUi7frMtTSsu/fdd+1feBSSqySt9hZyidWsxr6KV7qF6SU+FxcEV/XpYA45kr4PkQKalkrRetFEAzOL5x4ldAK4ziy4Nm6F2Oh2xxefeuliCyP9kWpl0p332mI5Eu7HSLQsCB7bEk03aedBkQci5HZUTuQA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727871588; c=relaxed/simple; bh=UuYqif044rovpAEdEglqzrqBjxvwVUa4V8g6JDfe8lo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=mFIXJiuQi2EpoMBUDTL+UOAFTPQT63LZsfI4600/2C6pGuUArAmGbZtJXyIYcsskn1BM0A68kcnvztnsL88nArxGI18s8sqzSnFr83+gjF69LbiZTRkcy6Hsz6f5jcwzWsVyw/rRs86e/5oucd8e/cAQAk8RRjQCCtA7H6XLl3g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=0leil.net; spf=pass smtp.mailfrom=0leil.net; arc=none smtp.client-ip=45.157.188.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=0leil.net Received: from smtp-3-0000.mail.infomaniak.ch (smtp-3-0000.mail.infomaniak.ch [10.4.36.107]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4XJYNz036VzYJ0; Wed, 2 Oct 2024 14:03:31 +0200 (CEST) Received: from unknown by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4XJYNy27NSzTQ8; Wed, 2 Oct 2024 14:03:30 +0200 (CEST) From: Quentin Schulz Date: Wed, 02 Oct 2024 14:03:03 +0200 Subject: [PATCH] pinctrl: rockchip: improve error message for incorrect rockchip,pins property Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241002-pinctrl-rockchip-error-modulo-4-v1-1-4addb4e5732a@cherry.de> X-B4-Tracking: v=1; b=H4sIAHY2/WYC/x3NwQqDMAyA4VeRnBdoOxnDVxk71JjOoGtKqmMgv vvKjt/l/w+obMIVhu4A449U0dzgLx3QHPOLUaZmCC703rmARTJttqIpLTRLQTZTw7dO+6rY4z2 NPqZE7naN0CrFOMn3f3g8z/MHssiMT3EAAAA= X-Change-ID: 20241002-pinctrl-rockchip-error-modulo-4-8fb1affc063a To: Linus Walleij , Heiko Stuebner Cc: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Quentin Schulz X-Mailer: b4 0.14.2 X-Infomaniak-Routing: alpha From: Quentin Schulz If one improperly writes a rockchip,pins property, the pinctrl driver basically just states that one in the myriad of pinctrl nodes is improper but does not tell you which one. Instead, let's print the full name of the Device Tree node that is improper as well as provide more context on what the expected content is. Note that this should be rather unnecessary if one reads the output of the dtbs_check as it would be highlighted as an error. Signed-off-by: Quentin Schulz --- drivers/pinctrl/pinctrl-rockchip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-r= ockchip.c index 5c1bc4d5b662ed403ea5c8e57a8e1cad913a31a5..04e85a6037c93f415670b286f91= fccada0d38fbf 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -3227,7 +3227,9 @@ static int rockchip_pinctrl_parse_groups(struct devic= e_node *np, /* we do not check return since it's safe node passed down */ size /=3D sizeof(*list); if (!size || size % 4) - return dev_err_probe(dev, -EINVAL, "wrong pins number or pins and config= s should be by 4\n"); + return dev_err_probe(dev, -EINVAL, + "%pOF: rockchip,pins: expected one or more of , got %d args instead\n", + np, size); =20 grp->npins =3D size / 4; =20 --- base-commit: e32cde8d2bd7d251a8f9b434143977ddf13dcec6 change-id: 20241002-pinctrl-rockchip-error-modulo-4-8fb1affc063a Best regards, --=20 Quentin Schulz