From: <alpawi@amazon.com>
Cc: Benjamin Herrenschmidt <benh@amazon.com>,
Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
Gregory Clement <gregory.clement@bootlin.com>,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Linus Walleij <linus.walleij@linaro.org>,
Patrick Williams <alpawi@amazon.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: [PATCH 1/2] pinctrl: armada-37xx: rename reg-offset function
Date: Tue, 18 Jun 2019 11:01:04 -0500 [thread overview]
Message-ID: <20190618160105.26343-2-alpawi@amazon.com> (raw)
In-Reply-To: <20190618160105.26343-1-alpawi@amazon.com>
From: Patrick Williams <alpawi@amazon.com>
The previously named function 'armada_37xx_update_reg'
implies that it updates the hardware register, but it
only calculates a register offset. Rename to match
functionality.
Signed-off-by: Patrick Williams <alpawi@amazon.com>
---
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 6462d3ca7ceb..00598b6f5c2a 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -220,8 +220,8 @@ static const struct armada_37xx_pin_data armada_37xx_pin_sb = {
.ngroups = ARRAY_SIZE(armada_37xx_sb_groups),
};
-static inline void armada_37xx_update_reg(unsigned int *reg,
- unsigned int offset)
+static inline void armada_37xx_calc_reg_offset(unsigned int *reg,
+ unsigned int offset)
{
/* We never have more than 2 registers */
if (offset >= GPIO_PER_REG) {
@@ -376,7 +376,7 @@ static inline void armada_37xx_irq_update_reg(unsigned int *reg,
{
int offset = irqd_to_hwirq(d);
- armada_37xx_update_reg(reg, offset);
+ armada_37xx_calc_reg_offset(reg, offset);
}
static int armada_37xx_gpio_direction_input(struct gpio_chip *chip,
@@ -386,7 +386,7 @@ static int armada_37xx_gpio_direction_input(struct gpio_chip *chip,
unsigned int reg = OUTPUT_EN;
unsigned int mask;
- armada_37xx_update_reg(®, offset);
+ armada_37xx_calc_reg_offset(®, offset);
mask = BIT(offset);
return regmap_update_bits(info->regmap, reg, mask, 0);
@@ -399,7 +399,7 @@ static int armada_37xx_gpio_get_direction(struct gpio_chip *chip,
unsigned int reg = OUTPUT_EN;
unsigned int val, mask;
- armada_37xx_update_reg(®, offset);
+ armada_37xx_calc_reg_offset(®, offset);
mask = BIT(offset);
regmap_read(info->regmap, reg, &val);
@@ -413,7 +413,7 @@ static int armada_37xx_gpio_direction_output(struct gpio_chip *chip,
unsigned int reg = OUTPUT_EN;
unsigned int mask, val, ret;
- armada_37xx_update_reg(®, offset);
+ armada_37xx_calc_reg_offset(®, offset);
mask = BIT(offset);
ret = regmap_update_bits(info->regmap, reg, mask, mask);
@@ -434,7 +434,7 @@ static int armada_37xx_gpio_get(struct gpio_chip *chip, unsigned int offset)
unsigned int reg = INPUT_VAL;
unsigned int val, mask;
- armada_37xx_update_reg(®, offset);
+ armada_37xx_calc_reg_offset(®, offset);
mask = BIT(offset);
regmap_read(info->regmap, reg, &val);
@@ -449,7 +449,7 @@ static void armada_37xx_gpio_set(struct gpio_chip *chip, unsigned int offset,
unsigned int reg = OUTPUT_VAL;
unsigned int mask, val;
- armada_37xx_update_reg(®, offset);
+ armada_37xx_calc_reg_offset(®, offset);
mask = BIT(offset);
val = value ? mask : 0;
--
2.17.2 (Apple Git-113)
_______________________________________________
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:[~2019-06-18 16:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 16:01 [PATCH 0/2] pinctl: armada-37xx: fix for pins 32+ alpawi
2019-06-18 16:01 ` alpawi [this message]
2019-06-18 16:01 ` [PATCH 2/2] pinctrl: armada-37xx: fix control of pins 32 and up alpawi
2019-10-01 15:46 ` [PATCH v2] " Patrick Williams
2019-10-04 21:54 ` Linus Walleij
2019-06-25 12:31 ` [PATCH 0/2] pinctl: armada-37xx: fix for pins 32+ Linus Walleij
2019-06-25 13:38 ` Gregory CLEMENT
2019-06-25 14:25 ` Patrick Williams
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=20190618160105.26343-2-alpawi@amazon.com \
--to=alpawi@amazon.com \
--cc=andrew@lunn.ch \
--cc=benh@amazon.com \
--cc=gregory.clement@bootlin.com \
--cc=jason@lakedaemon.net \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sebastian.hesselbarth@gmail.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).