Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1606913pxb; Thu, 4 Mar 2021 16:10:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwva5R7q6ZRhGFsshxKBHtTBy97ap7/k6ZYk/MKOsNMVVqsF/1KD8N5H8Q2m1ykO6Uiimer X-Received: by 2002:a92:cc49:: with SMTP id t9mr6076880ilq.86.1614903049991; Thu, 04 Mar 2021 16:10:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614903049; cv=none; d=google.com; s=arc-20160816; b=b9NlTLCOynuc+WqYW2gc93OuwINDK2W0/6IrbXuJayjaN1tzSnyR3nXQsqrR3OwRcU vyB6TJI0ddoG65FqBh0S/NcTftqgCG+/SQzynGBFb7WW/LLxBvfrpGyKa1iIxg2rZ8Az TVQ+vQVjZ1HyLi9YqogzpM2XUJggYIfBYC7Me2vvhcRWhmV54y1vbPm7RXwb6urQwocB SJ0FYjfxfEKR8W1WngX0JkllhTFtQCGTVRwmTmUMEv74pVxFSvrkupMRhIR9FFjDkCQe Mlmb/7ykyAAYA9aW2N+bNxB0C/71wzAZ1nFeaTVHI1V0n2tlzfsqVZwPjPg/cBMQcbmZ G5Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=gqQ43NPGzvS91VWTv4uty0yhZhVHqU/N7pIkr8BcRwU=; b=fYUoIbYFF6hezcN8BpQgv4HuJwJ1trK/lC0wZz0/4LOEcbTA718R0rm5S7A6+z07El GlMOtfGtE6wCl+qFg5aSkkfACzFd6wHbwCyXlkkHujPYhmi+v8rjipZemli1dfGVLlLu EsMzujedd56DMvl80wQEtuUppjYYm4K6ADrIFuvPARAHJEk0ClcVxPTp9++1hevI/u1z JC4YLDhQQO5GD/J0X0p9o2odJBWqvHmQ/eFb3LFI54jrYk/FENpSKcpM1nmP2bL1jFN/ iKPBpBqESbSCas0Li/dbahYXDoChNA+/05tBDHTb54wL5BgoklnIArzCfRCLfkSF0l47 9kCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qXLVJOLF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c19si839875iow.0.2021.03.04.16.10.34; Thu, 04 Mar 2021 16:10:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qXLVJOLF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239507AbhCDLOH (ORCPT + 99 others); Thu, 4 Mar 2021 06:14:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239447AbhCDLNr (ORCPT ); Thu, 4 Mar 2021 06:13:47 -0500 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC3D5C061574; Thu, 4 Mar 2021 03:13:06 -0800 (PST) Received: by mail-wm1-x32f.google.com with SMTP id e23so7658356wmh.3; Thu, 04 Mar 2021 03:13:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gqQ43NPGzvS91VWTv4uty0yhZhVHqU/N7pIkr8BcRwU=; b=qXLVJOLFE5UVgPkDr7nB1tGhMLp6m0ZpPtU38/t+iEeEsaApx8hjdUuKKU2heHff2n Y0UKWcMUsYwWpZyA+Yvmr++klU3C2AJ+OQPe/LkQsbeP8/lf8dPwSIXKIcb1+yQev7Yr 1DzalDgxQPIQbatiQknN82vj/suLOFYAXHWvZ55uyBRs6yXxyBA54Qvh+nTTH3FnMOOo AnJU0pMnOQnpj89X8Sh+gwUqOEax+hdMsRawQRp/G38WVoWX9OKzptvv0v/RGFnYvSnd Q6pk9m055WjOjEku8ptSgDJ/LWR37qzuAGWNkVMsT6ZGDfXvXlW3QA8sgiobPh5ePGCY jmmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gqQ43NPGzvS91VWTv4uty0yhZhVHqU/N7pIkr8BcRwU=; b=W2FuMCXzV9kbmPeYPmz09qA26sjKcsVywzKaKmoVnA0NVJhUnq8Yft1TE3c9OhE1UP REI03+/66IZLXIVPLRsVN+k0wFOz73ggmFINIyGvRBTzTSR1EpP4KP6QuOCiYYjio6i3 IT/UV+/0frfel3MyQiO9esMVn4a9YG3X4CE3lV22zOqPh9XcUOzDieVmxlGxGK2SePZ7 yo9ANPFGCSZjjddOCEz851wRmOCJi33E2w0EDen3qfTqG9Rh2FOtHVqc7XCHS2lQ+mjl QXtxiY7mBSp9XG858rPvXmG9mTohg8CvV7Zkq0uvJR1aVrfQWhUFSOUS+6HS+1Lyevip ehGg== X-Gm-Message-State: AOAM530X7JaNOH8dQ9dRVcU4ZdFs6JaJMqXbrrJOGiKAVmu+jYl9J4MH QJgI6ArCqs7haR6GbbMzwVI= X-Received: by 2002:a7b:cc1a:: with SMTP id f26mr3395814wmh.19.1614856385309; Thu, 04 Mar 2021 03:13:05 -0800 (PST) Received: from macbook-pro-alvaro.lan (170.red-88-1-105.dynamicip.rima-tde.net. [88.1.105.170]) by smtp.gmail.com with ESMTPSA id s20sm9079311wmj.36.2021.03.04.03.13.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Mar 2021 03:13:05 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: [PATCH v4 05/15] pinctrl: add a pincontrol driver for BCM6328 From: =?utf-8?Q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= In-Reply-To: Date: Thu, 4 Mar 2021 12:13:04 +0100 Cc: Linus Walleij , Rob Herring , Michael Walle , Bartosz Golaszewski , Florian Fainelli , bcm-kernel-feedback-list , Jonas Gorski , Necip Fazil Yildiran , "open list:GPIO SUBSYSTEM" , devicetree , Linux Kernel Mailing List , linux-arm Mailing List Content-Transfer-Encoding: quoted-printable Message-Id: References: <20210304085710.7128-1-noltari@gmail.com> <20210304085710.7128-6-noltari@gmail.com> To: Andy Shevchenko X-Mailer: Apple Mail (2.3654.60.0.2.21) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, > El 4 mar 2021, a las 11:49, Andy Shevchenko = escribi=C3=B3: >=20 > On Thu, Mar 4, 2021 at 10:57 AM =C3=81lvaro Fern=C3=A1ndez Rojas > wrote: >>=20 >> Add a pincontrol driver for BCM6328. BCM628 supports muxing 32 pins = as >> GPIOs, as LEDs for the integrated LED controller, or various other >> functions. Its pincontrol mux registers also control other aspects, = like >> switching the second USB port between host and device mode. >=20 > ... >=20 >> +static inline unsigned int bcm6328_mux_off(unsigned int pin) >> +{ >> + static const unsigned int bcm6328_mux[] =3D { >> + BCM6328_MUX_LO_REG, >> + BCM6328_MUX_HI_REG, >=20 >> + BCM6328_MUX_OTHER_REG >=20 > When it's not terminator add a comma, otherwise remove a comma. =E2=80=A6 so you want me to add a comma or not? >=20 > Also, why is it inside a function? It's anyway global and constant. Because this is only used by this function and I=E2=80=99m used to doing = this to comply with MISRA C 2004 at work :) >=20 >> + }; >=20 > ... >=20 >> + regmap_update_bits(pc->regs, bcm6328_mux_off(pin), >> + 3UL << ((pin % 16) * 2), >=20 > 3UL =3D> #define BLABLA GENMASK(1, 0) Ok, I will add a define for this. >=20 >> + mux << ((pin % 16) * 2)); >=20 > ... >=20 >> +static const struct of_device_id bcm6328_pinctrl_match[] =3D { >> + { .compatible =3D "brcm,bcm6328-pinctrl", }, >> + { }, >=20 > No comma. Ok, I will remove the comma. >=20 >> +}; >=20 > Above comments to all your patches. Ok, I will try to address all of this comments in v5. >=20 > --=20 > With Best Regards, > Andy Shevchenko