From: Michael Walle <michael@walle.cc>
To: "Álvaro Fernández Rojas" <noltari@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: regmap: move struct gpio_regmap definition
Date: Tue, 02 Mar 2021 20:24:38 +0100 [thread overview]
Message-ID: <8f703cfde0245a280340f2c9c8a5359a@walle.cc> (raw)
In-Reply-To: <4af4b519-84eb-3cb4-bb0e-9c5ac6204348@gmail.com>
Hi,
Am 2021-03-02 19:14, schrieb Álvaro Fernández Rojas:
> El 02/03/2021 a las 19:10, Michael Walle escribió:
>> Am 2021-03-02 19:06, schrieb Álvaro Fernández Rojas:
>>> struct gpio_regmap should be declared in gpio/regmap.h.
>>> This way other drivers can access the structure data when registering
>>> a gpio
>>> regmap controller.
>>
>> The intention was really to keep this private to the gpio-regmap
>> driver. Why do you need to access to the properties?
>
> I'm trying to add support for bcm63xx pin controllers, and Linus
> suggested that I could use gpio regmap instead of adding duplicated
> code.
nice!
> However, I need to access gpio_chip inside gpio_regmap to call
> pinctrl_add_gpio_range() with gpio_chip.base.
Can't we add something to gpio-regmap.c which will (1) either call
pinctrl_add_gpio_range(), just (2) return the struct gpio_chip* or
(3) even only gpio_chip.base?
I don't know how many sense (1) make and how reusable that code would
be for other drivers, though. Linus?
-michael
next prev parent reply other threads:[~2021-03-02 22:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 18:06 Álvaro Fernández Rojas
2021-03-02 18:10 ` Michael Walle
2021-03-02 18:14 ` Álvaro Fernández Rojas
2021-03-02 19:24 ` Michael Walle [this message]
2021-03-02 19:52 ` Álvaro Fernández Rojas
2021-03-02 22:39 ` Linus Walleij
2021-03-03 7:05 ` Álvaro Fernández Rojas
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=8f703cfde0245a280340f2c9c8a5359a@walle.cc \
--to=michael@walle.cc \
--cc=andy.shevchenko@gmail.com \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noltari@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
all inboxes | Powered by JetHome®