From: Michael Walle <michael@walle.cc>
To: Matt Ranostay <mranostay@ti.com>
Cc: vigneshr@ti.com, robh@kernel.org, krzysztof.kozlowski@linaro.org,
a.zummo@towertech.it, linus.walleij@linaro.org, lee@kernel.org,
brgl@bgdev.pl, linux-arm-kernel@lists.infradead.org,
devicetree@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-rtc@vger.kernel.org
Subject: Re: [PATCH v5 4/4] gpio: gpio-tps6594: add GPIO support for TPS6594 PMIC
Date: Wed, 23 Nov 2022 09:40:19 +0100 [thread overview]
Message-ID: <c5be254ecac34e13bbe6dda3506a7aff@walle.cc> (raw)
In-Reply-To: <20221123053512.1195309-5-mranostay@ti.com>
Am 2022-11-23 06:35, schrieb Matt Ranostay:
> +static int tps6594_regmap_xlate(struct gpio_regmap *gpio,
> + unsigned int base, unsigned int offset,
> + unsigned int *reg, unsigned int *mask)
> +{
> + if (base == TPS6594_GPIO_CONF) {
> + *reg = base + offset;
> + *mask = GPIO_CFG_MASK;
> + } else {
> + unsigned int line = offset % GPIO_BANK_SIZE;
> + unsigned int stride = offset / GPIO_BANK_SIZE;
> +
> + *reg = base + stride;
> + *mask = BIT(line);
> + }
This looks like a duplcate from gpio_regmap_simple_xlate(). Maybe
we can export it and do
if (base == TPS6594_GPIO_CONF) {
*reg = base + offset;
*mask = GPIO_CFG_MASK;
} else {
return gpio_regmap_simple_xlate(gpio, base, offset, reg, mask);
}
Apart from that
Reviewed-by: Michael Walle <michael@walle.cc>
-michael
next prev parent reply other threads:[~2022-11-23 8:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 5:35 [PATCH v5 0/4] mfd: add tps6594 support for Jacinto platforms Matt Ranostay
2022-11-23 5:35 ` [PATCH v5 1/4] dt-bindings: mfd: ti,tps6594: add TPS6594 PMIC support Matt Ranostay
2022-11-23 7:08 ` Tony Lindgren
2022-11-24 14:05 ` Krzysztof Kozlowski
2022-11-30 20:42 ` Rob Herring
2022-11-23 5:35 ` [PATCH v5 2/4] mfd: tps6594: Add support for TPS6594 PMIC devices Matt Ranostay
2022-11-23 7:09 ` Tony Lindgren
2023-01-04 17:06 ` Lee Jones
2022-11-23 5:35 ` [PATCH v5 3/4] rtc: rtc-tps6594: Add support for TPS6594 PMIC RTC Matt Ranostay
2022-11-23 7:10 ` Tony Lindgren
2022-12-11 20:05 ` Alexandre Belloni
2022-11-23 5:35 ` [PATCH v5 4/4] gpio: gpio-tps6594: add GPIO support for TPS6594 PMIC Matt Ranostay
2022-11-23 7:11 ` Tony Lindgren
2022-11-23 8:40 ` Michael Walle [this message]
2022-12-01 9:10 ` Bartosz Golaszewski
2022-11-28 19:25 ` [PATCH v5 0/4] mfd: add tps6594 support for Jacinto platforms J, KEERTHY
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=c5be254ecac34e13bbe6dda3506a7aff@walle.cc \
--to=michael@walle.cc \
--cc=a.zummo@towertech.it \
--cc=brgl@bgdev.pl \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=mranostay@ti.com \
--cc=robh@kernel.org \
--cc=vigneshr@ti.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).