lkml.org 
[lkml]   [2021]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] gpio: regmap: move struct gpio_regmap definition
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

\
 
 \ /
  Last update: 2021-03-03 03:41    [W:0.054 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site