Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2017874rdb; Sun, 4 Feb 2024 10:59:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHLqs9NSJJn7k0jkGio/q/2bGmmVYL4+RWwNa7SkFSzuxSW5kmCodzLXwnV6NWM5uEXKpHS X-Received: by 2002:a05:6a20:8921:b0:19c:9ce0:6d87 with SMTP id i33-20020a056a20892100b0019c9ce06d87mr11112663pzg.0.1707073164205; Sun, 04 Feb 2024 10:59:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707073164; cv=pass; d=google.com; s=arc-20160816; b=WEJ+97FlH28xRQcu7ADY2t0VE9YqG0RRVvZlA6UlKhc9leQBRrGobbSLKjjSPhHOXq oub+wnja20n4RRLvnPKMAeCAaJkE5mg10f53lPBGzKKAxO1LLBX17uAtLP9/XViib/cg rrYG4/8MKFTanMCY4LSr6B3V97Y6KUXX/1ROmbB2/ya+PaaaMWpPnjN209Wowd8uvtfP fWDAmW3rrI/SIDFlqbwC2NHq6N061fYHArOUxQiBH74kQUlQL8YlogXwfRJHk3HEymdK Zhwhl1Pf8aVd1i3iVWOJt1dGbKKchg7Djyqk+T+SRC6BFX7jaORML2XN+o/vfWH08W9f 1B3Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=ThwihqpEmkYEH6ts2ZleGCKVjv2HQKJYQcUmGXzJeKU=; fh=Qx0UNi6D5Q712A7rZfxM1FdiQck60nHBmOvOvdahWDU=; b=ejdy/1ATt8u0EDrhSngmHPyD+vBKx9AX4Psv+L3R0QbLts8rkBqWN/vwLAtQSIbqwb sYI/7RhfAypp4FJCqyHiaHPVu7x8/142eT4jEmib+Z/ngjjpnnitO/qkde4cfvERTeA0 JLMRIFdeFphmkpHy2kND8rNO4rcyjYvif20+l0atsI1rrrNxyVZyViHg1vcGRsBrgE3c y+gug2bm7o6/gXeGNM/TwP8RoJRU+truB4Oax3cXQb2dT17YeZcQ9EBCquI3L632wsTl 6V2ebG++HvztTo8TmN6FYaeFvtLE6BFymw7xBJz6uAaHOJy/v3qGuNVMWJvXm5mGEs9z Zvaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TcLobck9; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-51850-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51850-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCXAWjoFS9BRcoheiUj++BUDbdKIj8XvNHIqy2LmaEWHVWnDwx3SS86F3kZ81ayzGQ7JNvW2O1VVpmhM0Rk5+4YgBYaTAeCk/C3MR37gaw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f18-20020a056a0022d200b006e038a0c3c1si1525130pfj.3.2024.02.04.10.59.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 10:59:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51850-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TcLobck9; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-51850-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51850-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D60D828360C for ; Sun, 4 Feb 2024 18:59:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E4D5E24A04; Sun, 4 Feb 2024 18:59:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="TcLobck9" Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51]) (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 68B0824A0E for ; Sun, 4 Feb 2024 18:59:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707073154; cv=none; b=eDipUs7aMcvf4nTpNQ5dsW//SxZ04Cr5qzusp9XVdmHOUhiN38QRQdKBC8HAPbCCafW1vz/4pyJyFsmO2f2u3xW6TwsQXJa2CGul1GSXTFdCaB4ijD5LV8GoGRFjrF/3Y78p3Hj3y77xO+NFjX69yFcIsLqHQBnUAkPl0ZZzoAk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707073154; c=relaxed/simple; bh=ThwihqpEmkYEH6ts2ZleGCKVjv2HQKJYQcUmGXzJeKU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=MxLoWy+n2WfkNM03sk4q3C4DUz5xHzwRbLIh2+o/pgvOXTGzJhqzzRdxyb2Rm/5BnqpvdjxqSAipcgxylRnTfN459z7NQvn8KTv6EL2zYyif36L7jB++sWa2ascz17tFBpfIdXizb5wxHh0jFIntl6gqjdx7H4miWr8ZbLRhiVI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=TcLobck9; arc=none smtp.client-ip=209.85.161.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oo1-f51.google.com with SMTP id 006d021491bc7-59a27fbe832so1772439eaf.3 for ; Sun, 04 Feb 2024 10:59:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707073151; x=1707677951; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ThwihqpEmkYEH6ts2ZleGCKVjv2HQKJYQcUmGXzJeKU=; b=TcLobck9QO/BvL2gm5h3mjwqRpAcvsmJjYvzB3ui89q8mfqyjR52mOTr8ZKRAWM2Gm Rr4eOfRZU/O72Iyy7HYhlvQIQJQydpIa+63hfkVz0Cjs0NFNkbgYCRzcepGark2tdyvh 544jwxfia2h8svJ7DRT3gD91jyJmePhMeLrADdooEXfNKqEvMza5JtgXnt5ONdK6+FQ4 z7rAHQWNKm+FoYlR5r6Q3AanTssXeErJKMEiB5Ygc6/vUu/1d137LtVgWGzLVncs2NSi p2R6fQeD37cDQHHsvu4iqgCCVH4+Xf1r53mG8ZkRbU1pmft1QWMwG4Rt53WaFxKxxvMo 3odg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707073151; x=1707677951; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ThwihqpEmkYEH6ts2ZleGCKVjv2HQKJYQcUmGXzJeKU=; b=VjzivtpnkAqqwsaS0mrC8eunbuDVKpG8fKwvRZkl5kt8KOIkhvxEP6FBMwpLssmmFl yAHNxEcmrrrZEO24+1NICZXQg4LAmQnjVGdCuoF/mD9e316UNhd1VZCQth2o5S9o5Avi NWygwiXOleg9jRV7xZwXtBio9a7fCQCXlRUpyJFbgZIzJWK7sLG11t1IA4N0cItOilT/ k+KJoROG/ANsVDwtGlUoEYcpA5myHOv8WYftTzcZRHNYAzSO7OlSRhNy2/ZsOWKx/BO7 tEZBVLAXSmdPhEI5CARsG19acM0Nlg2PNDrPDE5vnWTlwiMJeTM3/n4iTbJR1G9OV724 RddA== X-Gm-Message-State: AOJu0YzEMW6HVz5tAaJDW7otaxbhbAmHSKEdL8bmwaTf3INGkcyrrRH7 GY1y9l7Kd8Sf4KyDlrc/O+Vkn5ycou/GsX+f0uaR9gT5mR05IFJ7SgUCW2OANIKMb0TqJD0Qt/u QhuRwCCuhX2FfgDJ+8MUeq5tb4pS8Q0U/nt/G1A== X-Received: by 2002:a05:6358:721:b0:178:8cc8:4c7b with SMTP id e33-20020a056358072100b001788cc84c7bmr10710494rwj.24.1707073151246; Sun, 04 Feb 2024 10:59:11 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240121-pinctrl-scmi-v3-0-8d94ba79dca8@nxp.com> In-Reply-To: From: Linus Walleij Date: Sun, 4 Feb 2024 19:58:59 +0100 Message-ID: Subject: Re: [PATCH v3 0/6] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support To: Peng Fan Cc: Cristian Marussi , Sudeep Holla , "Peng Fan (OSS)" , "souvik.chakravarty@arm.com" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Oleksii Moisieiev , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , dl-linux-imx , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-gpio@vger.kernel.org" , AKASHI Takahiro , Rob Herring Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Feb 4, 2024 at 10:29=E2=80=AFAM Peng Fan wrote: > Using generic pinconf means the firmware needs exporting groups/functions= /pins > and etc, the firmware design will be complicated and code size enlarged. This is very much to the core of the problem isn't it? So the argument is to save code effort and size in the firmware. This reflects some of the reasoning behind the device tree bindings that encode "magic numbers" in the DT nodes to mux and configure pins. Often the argument is that it saves space and effort. When the i.MX driver was first discussed it used the standard scheme actual= ly. Look at i.MX 53 for example: https://lore.kernel.org/linux-kernel/1322999384-7886-2-git-send-email-b2939= 6@freescale.com/ Groups and functions! As strings! Then the DT bindings were discussed back and forth between Dong Aisheng (the original driver author), Sasha Hauer and Shawn Guo before arriving at the fsl,pins scheme. Back in the day I was pretty much clueless about device tree and relied on others to review the bindings, which ended up like this: Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt This was in 2011/2012 so many things were not considered. It is clear that this scheme with a number of integers that get poked into registers is convenient for some DT authors, also pinctrl-single uses this as well as I think Mediatek and maybe a few others. Over the years I have come to regret it a bit, I think insisting on groups and functions as strings is better for abstraction. And the point of firmware is to abstract things so they work the same on all systems. Yours, Linus Walleij