From: Neil Armstrong <narmstrong@baylibre.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Qianggui Song <qianggui.song@amlogic.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Fabien Dessenne <fabien.dessenne@foss.st.com>,
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 <linus.walleij@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Andrew Lunn <andrew@lunn.ch>,
Gregory Clement <gregory.clement@bootlin.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Avi Fishman <avifishman70@gmail.com>,
Tomer Maimon <tmaimon77@gmail.com>,
Tali Perry <tali.perry1@gmail.com>,
Patrick Venture <venture@google.com>,
Nancy Yuen <yuenn@google.com>,
Benjamin Fair <benjaminfair@google.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Tomasz Figa <tomasz.figa@gmail.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Alim Akhtar <alim.akhtar@samsung.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Philipp Zabel <p.zabel@pengutronix.de>
Subject: Re: [PATCH v2 09/13] pinctrl: meson: Rename REG_* to MREG_*
Date: Tue, 29 Mar 2022 18:13:19 +0200 [thread overview]
Message-ID: <94e888fe-d8fc-5379-302f-66d64f2ae10b@baylibre.com> (raw)
In-Reply-To: <20220329152926.50958-10-andriy.shevchenko@linux.intel.com>
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 <andriy.shevchenko@linux.intel.com>
> ---
> 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 }, \
> }, \
> }
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-03-29 16:16 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-29 15:29 [PATCH v2 00/13] gpiolib: Two new helpers and way toward fwnode Andy Shevchenko
2022-03-29 15:29 ` [PATCH v2 01/13] gpiolib: Introduce for_each_gpiochip_node() loop helper Andy Shevchenko
2022-03-30 10:00 ` Geert Uytterhoeven
2022-03-29 15:29 ` [PATCH v2 02/13] gpiolib: Introduce gpiochip_node_count() helper Andy Shevchenko
2022-03-30 10:02 ` Geert Uytterhoeven
2022-03-30 11:35 ` Andy Shevchenko
2022-03-29 15:29 ` [PATCH v2 03/13] pinctrl: stm32: Replace custom code by gpiochip_node_count() call Andy Shevchenko
2022-03-29 15:29 ` [PATCH v2 04/13] pinctrl: stm32: Switch to use for_each_gpiochip_node() helper Andy Shevchenko
2022-03-30 12:32 ` Fabien DESSENNE
2022-03-30 13:01 ` Andy Shevchenko
2022-03-29 15:29 ` [PATCH v2 05/13] pinctrl: samsung: " Andy Shevchenko
2022-03-29 15:29 ` [PATCH v2 06/13] pinctrl: renesas: rza1: Replace custom code by gpiochip_node_count() call Andy Shevchenko
2022-03-30 9:51 ` Geert Uytterhoeven
2022-03-29 15:29 ` [PATCH v2 07/13] pinctrl: renesas: rza1: Switch to use for_each_gpiochip_node() helper Andy Shevchenko
2022-03-30 10:00 ` Geert Uytterhoeven
2022-03-30 12:16 ` Andy Shevchenko
2022-03-30 12:21 ` Geert Uytterhoeven
2022-03-29 15:29 ` [PATCH v2 08/13] pinctrl: npcm7xx: " Andy Shevchenko
2022-03-29 15:29 ` [PATCH v2 09/13] pinctrl: meson: Rename REG_* to MREG_* Andy Shevchenko
2022-03-29 16:13 ` Neil Armstrong [this message]
2022-03-29 16:42 ` Andy Shevchenko
2022-03-30 8:54 ` Geert Uytterhoeven
2022-03-30 9:09 ` Neil Armstrong
2022-03-30 9:18 ` Andy Shevchenko
2022-03-30 15:22 ` Neil Armstrong
2022-03-30 15:51 ` Andy Shevchenko
2022-03-29 15:29 ` [PATCH v2 10/13] pinctrl: meson: Enable COMPILE_TEST Andy Shevchenko
2022-03-29 16:10 ` Neil Armstrong
2022-03-29 15:29 ` [PATCH v2 11/13] pinctrl: meson: Replace custom code by gpiochip_node_count() call Andy Shevchenko
2022-03-29 15:29 ` [PATCH v2 12/13] pinctrl: armada-37xx: Switch to use fwnode instead of of_node Andy Shevchenko
2022-03-29 15:29 ` [PATCH v2 13/13] pinctrl: armada-37xx: Reuse GPIO fwnode in armada_37xx_irqchip_register() Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=94e888fe-d8fc-5379-302f-66d64f2ae10b@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=alexandre.torgue@foss.st.com \
--cc=alim.akhtar@samsung.com \
--cc=andrew@lunn.ch \
--cc=andriy.shevchenko@linux.intel.com \
--cc=avifishman70@gmail.com \
--cc=benjaminfair@google.com \
--cc=brgl@bgdev.pl \
--cc=fabien.dessenne@foss.st.com \
--cc=geert+renesas@glider.be \
--cc=gregory.clement@bootlin.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=krzk@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=openbmc@lists.ozlabs.org \
--cc=p.zabel@pengutronix.de \
--cc=qianggui.song@amlogic.com \
--cc=s.nawrocki@samsung.com \
--cc=sebastian.hesselbarth@gmail.com \
--cc=tali.perry1@gmail.com \
--cc=tmaimon77@gmail.com \
--cc=tomasz.figa@gmail.com \
--cc=venture@google.com \
--cc=yuenn@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).