Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp760663rdb; Sun, 28 Jan 2024 07:50:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWg3zT2aGUI2XOHuKY89AXCaL8UGrktZFy9X5NY6yHQaH5F+B0DEQyAM8XREbai/acEgWo X-Received: by 2002:ac8:4e42:0:b0:42a:2f4c:2b79 with SMTP id e2-20020ac84e42000000b0042a2f4c2b79mr4037173qtw.37.1706457008477; Sun, 28 Jan 2024 07:50:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706457008; cv=pass; d=google.com; s=arc-20160816; b=bTdZ8aYMKBJqgUc8rXr2iPqJk91a3EKdDp29uTORiB25jUUPc8Qr9Uv6dQIeLLjZdM jgzTfRCdqgkB05JLozk/BvUmrmFnIhEzC5opeJaenkocQ9iJiQYfVBt+1UpTtaFZu77B Mkh/qDrosXC6iyEx0d8bJBoiasT46z1sopqH6QB9vXjcWgNVXmU3N8SdPrY9xCKYpp3C fhkUqcY6x5fQHsC92m+R4Y/0hucaMzvMjDK3hn5vuoCeSMkVbp1zP+vPAxO6iIwQu2Jk B0Mcs13Z29VDiDau8/PkpL0iGzcv6PYbceZ8zhlWDMNXm2HUimmmhYAC1+yW6i2Znjhh oMfA== 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=gi0ytb2PS1JbjjM4o7VAyC0Cey5FRxMI0Z/urzxWn1E=; fh=/u8qc6LQUv2MMoiRivmaGvPlYHsfiWxnSFpwkksWqUY=; b=a+JMzwa8mi84kZHeLunPsZ2TYMsvm4+QI91x3XcC8pA8clmqcZB45EaaZAgDtFZxCQ qkUSoy3frohW1Tq1v276+9e3mhcI3gZSkWTkUGvd1LAxZ5H6FBlyDrtqKcP+EXYhwDdj 70Vtj33jDADEo75x8MQz+wheCHVdfXGYPMnZ0H2XA/p90iiDxDJ8I6hsPADFBwR+zgaQ Q+ko6ZSqx4cKgFW8SyoOYYltgLKgmJzlVc1m6gk8Iy6om8ceMKBaAQrMrTOR8PmeSxDi dQEHv8BY7TYevzHI/z+F7CE049q3WCO21b7sm2QVkx+PuP/ogn6YipyHQVod5NVs4rsu nVKw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YloWInVu; 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-41670-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41670-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t17-20020ac85891000000b0042a88209207si4464462qta.28.2024.01.28.07.50.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 07:50:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41670-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YloWInVu; 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-41670-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41670-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 04FFA1C20A40 for ; Sun, 28 Jan 2024 15:50:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A27A425776; Sun, 28 Jan 2024 15:49:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="YloWInVu" Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com [209.85.219.178]) (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 4BA462D629 for ; Sun, 28 Jan 2024 15:49:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706456996; cv=none; b=Ts8kro72HIqcEvjQC/U6RDff4lu+AkGKEmKmy41i/tmO+TiycNLAEnP5PwOmF0RjKRkq2Cr6Thm+VNeu2x7XoYZggyC0uwxJYtPhoExXOcJrNWoTnTymvaKSkhxJeQBnxq387gzCA3zs6XAjnqVw9qXLAfjA+bNiqCIxcA2tOe4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706456996; c=relaxed/simple; bh=b9YOMazdycLIyx8go7JhQ7ohEA+spjOnKg86jFJ9vGQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=m/W143EbeSA3S9FB0AqObHt1iBFZg86uPqSsDLNZuA9C6POoECXxZpx3E5HaJa+Z3ZauuYheDXauDBMJoWLfHiWPdP9uaKM5goxF1f9/2YdBchOJbP0kKnlRM8Oxw8eI22CKi/wpZoBIVp0WmhhXQnRvioV+HrXl0OYp8ASraW4= 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=YloWInVu; arc=none smtp.client-ip=209.85.219.178 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-yb1-f178.google.com with SMTP id 3f1490d57ef6-dc6432ee799so2232570276.0 for ; Sun, 28 Jan 2024 07:49:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706456994; x=1707061794; 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=gi0ytb2PS1JbjjM4o7VAyC0Cey5FRxMI0Z/urzxWn1E=; b=YloWInVurMqV0uCP9OF2WZNs+Lp9fsWC3kSNTxALfD0J9liZih1XGjw1uPN3XfGg2r xFQMeqtqe+Puv1tMzkLlLCfeTKfo1T55aKnkAPh88YcHXvpuXkEYzdgjfCfQLbfs33E9 oD0EH+NkzXAFJqYp0rZMYUoNUrkXRUfIilxBata0rd0rjZqiJXpelc4lqFtatYawa9vI qXbUCBZxNa2ppRWaQGAm5uGHcA1brGS7SM5lR5+uVl/JWL7noyPB/A6g4QZbtXetk2Xm TtTxO+LnHqHxDBhepxRN4qv1w015fTTmf2TTGOmMgSjatFifay+uD8O/4AreQqxJ8U5q F6hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706456994; x=1707061794; 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=gi0ytb2PS1JbjjM4o7VAyC0Cey5FRxMI0Z/urzxWn1E=; b=nomuaEnJCWQDtgWNjC2VgrTdzxtDPqGi/DwoynH+0fSCpmrLfT5G9F7wBTKffeazKS YbI+wzYLjxrdwL0jvatLumr5KyqVjyw5gg5ZWP4rwV0n70PFO7ecy0ENQwX8kNBQK93H DIsXQrXIEDYqTATrL3X+uJRF7No7mrbPIVz7dIxO5d6oFrc1V18TruAsFh4QggTMrUQf 7i94r6JgSszNKK1PU/bYbFC7Ns9HXJBFiCrLF3+3U8xePLaxWC7iM+jzksN4GoUl38yX RsTS2MY15QqkKTN4l74ln03LobE1XFij3//d+pURa+ZLCttrXPCwelNy0HTwTRpZABb1 4Naw== X-Gm-Message-State: AOJu0Yyq/vtD9d+Yx0A3D5fNUu1fFjCsDzuAB7qkhk1ZMzFpcZeP39Q3 NdREd8rdbLTq9ooIxkrrS/KeZP4EMU6E6bn/+WWUGUAHl3/EFAOQEELPi2EzaV4vwwoixgjMi6R jrQhfmKKoZAekg3DIQJPVb0Lt6zR2ONRcR3Dm00Mx0mOXNcs6/ew= X-Received: by 2002:a05:6902:2808:b0:dbd:ac60:bcd4 with SMTP id ed8-20020a056902280800b00dbdac60bcd4mr3313016ybb.75.1706456994245; Sun, 28 Jan 2024 07:49:54 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240123080637.1902578-1-ychuang570808@gmail.com> <20240123080637.1902578-5-ychuang570808@gmail.com> In-Reply-To: <20240123080637.1902578-5-ychuang570808@gmail.com> From: Linus Walleij Date: Sun, 28 Jan 2024 16:49:42 +0100 Message-ID: Subject: Re: [PATCH v3 4/4] pinctrl: nuvoton: Add ma35d1 pinctrl and GPIO driver To: Jacky Huang Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, j.neuschaefer@gmx.net, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ychuang3@nuvoton.com, schung@nuvoton.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Jacky, thanks for your patch! this caught my eye: On Tue, Jan 23, 2024 at 9:06=E2=80=AFAM Jacky Huang wrote: > From: Jacky Huang > > Add common pinctrl and GPIO driver for Nuvoton MA35 series SoC, and > add support for ma35d1 pinctrl. > > Signed-off-by: Jacky Huang (...) > + if (ma35_pinconf_get_power_source(npctl, pin) =3D=3D MVOLT_1800) = { > + for (i =3D 0; i < sizeof(ds_1800mv_tbl) / sizeof(u32); i+= +) { Isn't this equivalent to: for (i =3D 0; i < ARRAY_SIZE(ds_1800mv_tbl; i++) { > + if (ds_1800mv_tbl[i] =3D=3D strength) > + ds_val =3D i; > + } > + } else { > + for (i =3D 0; i < sizeof(ds_3300mv_tbl) / sizeof(u32); i+= +) { Dito Perhaps more cases, pls check! Yours, Linus Walleij