mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Álvaro Fernández Rojas" <noltari@gmail.com>
To: Michael Walle <michael@walle.cc>
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, 2 Mar 2021 20:52:24 +0100	[thread overview]
Message-ID: <835b06b1-7a63-b6ff-9004-03f504f8fb63@gmail.com> (raw)
In-Reply-To: <8f703cfde0245a280340f2c9c8a5359a@walle.cc>

Hi Michael,

El 02/03/2021 a las 20:24, Michael Walle escribió:
> 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?

Sure, I'm OK with any way of doing it, so it's up to you and Linus :)

> 
> I don't know how many sense (1) make and how reusable that code would
> be for other drivers, though. Linus?
> 
> -michael

Best regards,
Álvaro.

  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
2021-03-02 19:52       ` Álvaro Fernández Rojas [this message]
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=835b06b1-7a63-b6ff-9004-03f504f8fb63@gmail.com \
    --to=noltari@gmail.com \
    --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=michael@walle.cc \
    /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®