From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82AC6C433FE for ; Tue, 29 Mar 2022 16:13:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239518AbiC2QPN (ORCPT ); Tue, 29 Mar 2022 12:15:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239507AbiC2QPJ (ORCPT ); Tue, 29 Mar 2022 12:15:09 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 169EE6357 for ; Tue, 29 Mar 2022 09:13:24 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id n63-20020a1c2742000000b0038d0c31db6eso1802483wmn.1 for ; Tue, 29 Mar 2022 09:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=YTxP7HWRQagvLol49w9U8StQxxwKyv5+VjuLHJHzNBc=; b=xaD4Og1Xqqt/c+vuuNvNvPRGz0QjW7LfiuaJLGgqojn5KiEeGmfbb9hX5Iqw9D1QCv cbLo+8LQFk0quq/KXtXrPEZ3Ae+H573+RMGNPXj/dBVwmge/E08j10ZXwiTksoj/nZ1+ JF/PjAU/rYfvs2ZkDWTK2X1iv+I3ioS0ZSNgsWvkOuU2CyY+72Lc3Vw1s81OI/NB+HUQ /NPpwTIKSCqCzIietzPRRCn+3Z3aKCz1jFRKoAiiocpXHH7xZE8iz3yIVpUlukDFpOhl FGU5m1kuJL9YmBczNFSXf6jjtID0BkoU4ys0izSF9lL9NqWPVc0qI7hZicay4HQ6Efvn aGKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=YTxP7HWRQagvLol49w9U8StQxxwKyv5+VjuLHJHzNBc=; b=1K6sve9iTqGmVW4Xm0E8/Mb8VeD9X19eJDaI5G2XzzfEfSAmlJ3ot9XkwmcUDjHUuz 8kCz0QySbX+MVXouOWIcct6eR2GwgPA1epmh+hprsCIgq3OMk7bIQMbKvjQUgNpLSuAs ArutF8jQIw/D389t1KfGw/zPbT9ncHtSGodF4Wv/TfJeLAe2krrHiC+tVC0ZkbFvlsqx kP+3iPwCWwMYG5kq5Q03FjZ+QuyAwDVGDC+MeXqnyEI3lT0/LqZKY2gNO6gZCSPYpf2h F4zVm1jce7sMdJUeXcDIOcWoz8i4qyumn7BY/2XIb2i7LklZO6cE6kCyx15H2Rz7/xRa E1uA== X-Gm-Message-State: AOAM532VjMSoA5WEff5OBPun5+wLtdUarwfyfdVR4q3tFQ7pltlKB71O Pd9VFUZRF25OmUKf7w8m4SiQpQ== X-Google-Smtp-Source: ABdhPJxNC8QU4RkF7zsoVybBcs79idtSW/nKBSrMwv6YVnFFHPw6flf9Pyqw6kxzux0CMOPDesy1PQ== X-Received: by 2002:a05:600c:4e8a:b0:380:e340:bfba with SMTP id f10-20020a05600c4e8a00b00380e340bfbamr542917wmq.80.1648570402437; Tue, 29 Mar 2022 09:13:22 -0700 (PDT) Received: from ?IPV6:2001:861:44c0:66c0:a663:978b:3ffb:7dc3? ([2001:861:44c0:66c0:a663:978b:3ffb:7dc3]) by smtp.gmail.com with ESMTPSA id q16-20020adff950000000b00205aa05fa03sm11025699wrr.58.2022.03.29.09.13.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Mar 2022 09:13:21 -0700 (PDT) Message-ID: <94e888fe-d8fc-5379-302f-66d64f2ae10b@baylibre.com> Date: Tue, 29 Mar 2022 18:13:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v2 09/13] pinctrl: meson: Rename REG_* to MREG_* Content-Language: en-US To: Andy Shevchenko , Qianggui Song , Krzysztof Kozlowski , Fabien Dessenne , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, linux-renesas-soc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Cc: Linus Walleij , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Geert Uytterhoeven , Tomasz Figa , Sylwester Nawrocki , Alim Akhtar , Maxime Coquelin , Alexandre Torgue , Bartosz Golaszewski , Philipp Zabel References: <20220329152926.50958-1-andriy.shevchenko@linux.intel.com> <20220329152926.50958-10-andriy.shevchenko@linux.intel.com> From: Neil Armstrong Organization: Baylibre In-Reply-To: <20220329152926.50958-10-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/03/2022 17:29, Andy Shevchenko wrote: > Rename REG_* to MREG_* as a prerequisite for enabling COMPILE_TEST. What error do you hit ? MREG_ is rather ugly, something like PINCONF_REG_ or more simpler MESON_REG_ would be more appropriate. Neil > > Signed-off-by: Andy Shevchenko > --- > drivers/pinctrl/meson/pinctrl-meson.c | 24 ++++++++++++------------ > drivers/pinctrl/meson/pinctrl-meson.h | 24 ++++++++++++------------ > 2 files changed, 24 insertions(+), 24 deletions(-) > > diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c > index 49851444a6e3..64da61ba2bb9 100644 > --- a/drivers/pinctrl/meson/pinctrl-meson.c > +++ b/drivers/pinctrl/meson/pinctrl-meson.c > @@ -218,13 +218,13 @@ static int meson_pinconf_set_output(struct meson_pinctrl *pc, > unsigned int pin, > bool out) > { > - return meson_pinconf_set_gpio_bit(pc, pin, REG_DIR, !out); > + return meson_pinconf_set_gpio_bit(pc, pin, MREG_DIR, !out); > } > > static int meson_pinconf_get_output(struct meson_pinctrl *pc, > unsigned int pin) > { > - int ret = meson_pinconf_get_gpio_bit(pc, pin, REG_DIR); > + int ret = meson_pinconf_get_gpio_bit(pc, pin, MREG_DIR); > > if (ret < 0) > return ret; > @@ -236,13 +236,13 @@ static int meson_pinconf_set_drive(struct meson_pinctrl *pc, > unsigned int pin, > bool high) > { > - return meson_pinconf_set_gpio_bit(pc, pin, REG_OUT, high); > + return meson_pinconf_set_gpio_bit(pc, pin, MREG_OUT, high); > } > > static int meson_pinconf_get_drive(struct meson_pinctrl *pc, > unsigned int pin) > { > - return meson_pinconf_get_gpio_bit(pc, pin, REG_OUT); > + return meson_pinconf_get_gpio_bit(pc, pin, MREG_OUT); > } > > static int meson_pinconf_set_output_drive(struct meson_pinctrl *pc, > @@ -269,7 +269,7 @@ static int meson_pinconf_disable_bias(struct meson_pinctrl *pc, > if (ret) > return ret; > > - meson_calc_reg_and_bit(bank, pin, REG_PULLEN, ®, &bit); > + meson_calc_reg_and_bit(bank, pin, MREG_PULLEN, ®, &bit); > ret = regmap_update_bits(pc->reg_pullen, reg, BIT(bit), 0); > if (ret) > return ret; > @@ -288,7 +288,7 @@ static int meson_pinconf_enable_bias(struct meson_pinctrl *pc, unsigned int pin, > if (ret) > return ret; > > - meson_calc_reg_and_bit(bank, pin, REG_PULL, ®, &bit); > + meson_calc_reg_and_bit(bank, pin, MREG_PULL, ®, &bit); > if (pull_up) > val = BIT(bit); > > @@ -296,7 +296,7 @@ static int meson_pinconf_enable_bias(struct meson_pinctrl *pc, unsigned int pin, > if (ret) > return ret; > > - meson_calc_reg_and_bit(bank, pin, REG_PULLEN, ®, &bit); > + meson_calc_reg_and_bit(bank, pin, MREG_PULLEN, ®, &bit); > ret = regmap_update_bits(pc->reg_pullen, reg, BIT(bit), BIT(bit)); > if (ret) > return ret; > @@ -321,7 +321,7 @@ static int meson_pinconf_set_drive_strength(struct meson_pinctrl *pc, > if (ret) > return ret; > > - meson_calc_reg_and_bit(bank, pin, REG_DS, ®, &bit); > + meson_calc_reg_and_bit(bank, pin, MREG_DS, ®, &bit); > > if (drive_strength_ua <= 500) { > ds_val = MESON_PINCONF_DRV_500UA; > @@ -407,7 +407,7 @@ static int meson_pinconf_get_pull(struct meson_pinctrl *pc, unsigned int pin) > if (ret) > return ret; > > - meson_calc_reg_and_bit(bank, pin, REG_PULLEN, ®, &bit); > + meson_calc_reg_and_bit(bank, pin, MREG_PULLEN, ®, &bit); > > ret = regmap_read(pc->reg_pullen, reg, &val); > if (ret) > @@ -416,7 +416,7 @@ static int meson_pinconf_get_pull(struct meson_pinctrl *pc, unsigned int pin) > if (!(val & BIT(bit))) { > conf = PIN_CONFIG_BIAS_DISABLE; > } else { > - meson_calc_reg_and_bit(bank, pin, REG_PULL, ®, &bit); > + meson_calc_reg_and_bit(bank, pin, MREG_PULL, ®, &bit); > > ret = regmap_read(pc->reg_pull, reg, &val); > if (ret) > @@ -447,7 +447,7 @@ static int meson_pinconf_get_drive_strength(struct meson_pinctrl *pc, > if (ret) > return ret; > > - meson_calc_reg_and_bit(bank, pin, REG_DS, ®, &bit); > + meson_calc_reg_and_bit(bank, pin, MREG_DS, ®, &bit); > > ret = regmap_read(pc->reg_ds, reg, &val); > if (ret) > @@ -595,7 +595,7 @@ static int meson_gpio_get(struct gpio_chip *chip, unsigned gpio) > if (ret) > return ret; > > - meson_calc_reg_and_bit(bank, gpio, REG_IN, ®, &bit); > + meson_calc_reg_and_bit(bank, gpio, MREG_IN, ®, &bit); > regmap_read(pc->reg_gpio, reg, &val); > > return !!(val & BIT(bit)); > diff --git a/drivers/pinctrl/meson/pinctrl-meson.h b/drivers/pinctrl/meson/pinctrl-meson.h > index ff5372e0a475..c00d9ad27843 100644 > --- a/drivers/pinctrl/meson/pinctrl-meson.h > +++ b/drivers/pinctrl/meson/pinctrl-meson.h > @@ -63,12 +63,12 @@ struct meson_reg_desc { > * enum meson_reg_type - type of registers encoded in @meson_reg_desc > */ > enum meson_reg_type { > - REG_PULLEN, > - REG_PULL, > - REG_DIR, > - REG_OUT, > - REG_IN, > - REG_DS, > + MREG_PULLEN, > + MREG_PULL, > + MREG_DIR, > + MREG_OUT, > + MREG_IN, > + MREG_DS, > NUM_REG, > }; > > @@ -150,12 +150,12 @@ struct meson_pinctrl { > .irq_first = fi, \ > .irq_last = li, \ > .regs = { \ > - [REG_PULLEN] = { per, peb }, \ > - [REG_PULL] = { pr, pb }, \ > - [REG_DIR] = { dr, db }, \ > - [REG_OUT] = { or, ob }, \ > - [REG_IN] = { ir, ib }, \ > - [REG_DS] = { dsr, dsb }, \ > + [MREG_PULLEN] = { per, peb }, \ > + [MREG_PULL] = { pr, pb }, \ > + [MREG_DIR] = { dr, db }, \ > + [MREG_OUT] = { or, ob }, \ > + [MREG_IN] = { ir, ib }, \ > + [MREG_DS] = { dsr, dsb }, \ > }, \ > } >