All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: "Matti Vaittinen" <mazziesaccount@gmail.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Bartosz Golaszewski" <bgolaszewski@baylibre.com>,
	"Michael Walle" <michael@walle.cc>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	bcm-kernel-feedback-list <bcm-kernel-feedback-list@broadcom.com>,
	"Jonas Gorski" <jonas.gorski@gmail.com>,
	"Álvaro Fernández Rojas" <noltari@gmail.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	linux-power <linux-power@fi.rohmeurope.com>,
	"linux-arm Mailing List" <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v4 0/3] gpio: gpio-regmap: Support few custom operations
Date: Wed, 26 May 2021 11:42:11 +0300	[thread overview]
Message-ID: <CAHp75VeHZg1DC76sg1F-=49SfVLNhf4pG7ArcXHxjU0nXZOpWw@mail.gmail.com> (raw)
In-Reply-To: <cover.1622008846.git.matti.vaittinen@fi.rohmeurope.com>

On Wed, May 26, 2021 at 9:02 AM Matti Vaittinen
<matti.vaittinen@fi.rohmeurope.com> wrote:
>
> Support providing some IC specific operations at gpio_regmap registration.
>
> Implementation of few GPIO related functionalities are likely to be
> very IC specific. For example the pin-configuration registers and the
> pin validity checks. Allow IC driver to provide IC specific functions
> which gpio-regmap can utilize for these IC specific configurations.
> This should help broaden the gpio-regmap IC coverage without the need
> of exposing the registered gpio_chip or struct gpio_regmap to IC drivers.
>
> The set_config and init_valid_mask are used by ROHM BD71815 GPIO driver.
> Convert the BD71815 GPIO driver to use gpio-regmap and get rid of some
> code. Rest of the ROHM GPIO drivers are to be reworked after the
> mechanism of adding IC specific functions is settled.
>
> Some preliminary discussion can be seen here:
> https://lore.kernel.org/linux-gpio/c4faac648d3e0c7f3dcb50f7e24c8b322e8c6974.camel@fi.rohmeurope.com/
>
> I did also prepare change where the getters for drvdata and regmap
> are used. It can also work - but it does not scale quite as well
> if (when) IC drivers need some register information to do custom
> operations. Interested people can see the:
> https://github.com/M-Vaittinen/linux/commits/gpio-regmap-getters
> for comparison.

Entire series looks good to me,
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Changelog v4:
>  - Convert also the existing users.
>
> Changelog v3:
>  - divide gpio_regmap into private part and part which contains
>    user-visible configurations. This should allow keeping the internal
>    data internal to gpio_regmap - while allowing the IC driver to re-use
>    configurations it has provided to gpio-regmap without a need of
>    storing them to private-data. Furthermore avoid implementing dummy
>    'getter-functions' for regmap, driver-data, register details,
>    firmware node etc.
>  - change devm_add_action() to devm_add_action_or_reset()
>  - the bd71815 GPIO driver, completely drop private-data.
>
> Changelog v2:
>  - Add cover-letter
>  - Drop unnecessary checks for callback function validity
>  - drop driver_data setting function as it is likely to be a
>    race-condition-by-design
>
> ---
>
> Matti Vaittinen (3):
>   gpio: regmap: Support few IC specific operations
>   gpio: gpio-regmap: Use devm_add_action_or_reset()
>   gpio: bd71815: Use gpio-regmap
>
>  drivers/gpio/Kconfig                  |   1 +
>  drivers/gpio/gpio-bd71815.c           | 121 ++++-----------
>  drivers/gpio/gpio-regmap.c            | 212 +++++++++++++++-----------
>  drivers/gpio/gpio-sl28cpld.c          |   3 +-
>  drivers/pinctrl/bcm/pinctrl-bcm63xx.c |   8 +-
>  include/linux/gpio/regmap.h           |  51 +++++--
>  6 files changed, 194 insertions(+), 202 deletions(-)
>
>
> base-commit: c4681547bcce777daf576925a966ffa824edd09d
> --
> 2.25.4
>
>
> --
> Matti Vaittinen, Linux device drivers
> ROHM Semiconductors, Finland SWDC
> Kiviharjunlenkki 1E
> 90220 OULU
> FINLAND
>
> ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
> Simon says - in Latin please.
> ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
> Thanks to Simon Glass for the translation =]



-- 
With Best Regards,
Andy Shevchenko

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: "Matti Vaittinen" <mazziesaccount@gmail.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Bartosz Golaszewski" <bgolaszewski@baylibre.com>,
	"Michael Walle" <michael@walle.cc>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	bcm-kernel-feedback-list <bcm-kernel-feedback-list@broadcom.com>,
	"Jonas Gorski" <jonas.gorski@gmail.com>,
	"Álvaro Fernández Rojas" <noltari@gmail.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	linux-power <linux-power@fi.rohmeurope.com>,
	"linux-arm Mailing List" <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v4 0/3] gpio: gpio-regmap: Support few custom operations
Date: Wed, 26 May 2021 11:42:11 +0300	[thread overview]
Message-ID: <CAHp75VeHZg1DC76sg1F-=49SfVLNhf4pG7ArcXHxjU0nXZOpWw@mail.gmail.com> (raw)
In-Reply-To: <cover.1622008846.git.matti.vaittinen@fi.rohmeurope.com>

On Wed, May 26, 2021 at 9:02 AM Matti Vaittinen
<matti.vaittinen@fi.rohmeurope.com> wrote:
>
> Support providing some IC specific operations at gpio_regmap registration.
>
> Implementation of few GPIO related functionalities are likely to be
> very IC specific. For example the pin-configuration registers and the
> pin validity checks. Allow IC driver to provide IC specific functions
> which gpio-regmap can utilize for these IC specific configurations.
> This should help broaden the gpio-regmap IC coverage without the need
> of exposing the registered gpio_chip or struct gpio_regmap to IC drivers.
>
> The set_config and init_valid_mask are used by ROHM BD71815 GPIO driver.
> Convert the BD71815 GPIO driver to use gpio-regmap and get rid of some
> code. Rest of the ROHM GPIO drivers are to be reworked after the
> mechanism of adding IC specific functions is settled.
>
> Some preliminary discussion can be seen here:
> https://lore.kernel.org/linux-gpio/c4faac648d3e0c7f3dcb50f7e24c8b322e8c6974.camel@fi.rohmeurope.com/
>
> I did also prepare change where the getters for drvdata and regmap
> are used. It can also work - but it does not scale quite as well
> if (when) IC drivers need some register information to do custom
> operations. Interested people can see the:
> https://github.com/M-Vaittinen/linux/commits/gpio-regmap-getters
> for comparison.

Entire series looks good to me,
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Changelog v4:
>  - Convert also the existing users.
>
> Changelog v3:
>  - divide gpio_regmap into private part and part which contains
>    user-visible configurations. This should allow keeping the internal
>    data internal to gpio_regmap - while allowing the IC driver to re-use
>    configurations it has provided to gpio-regmap without a need of
>    storing them to private-data. Furthermore avoid implementing dummy
>    'getter-functions' for regmap, driver-data, register details,
>    firmware node etc.
>  - change devm_add_action() to devm_add_action_or_reset()
>  - the bd71815 GPIO driver, completely drop private-data.
>
> Changelog v2:
>  - Add cover-letter
>  - Drop unnecessary checks for callback function validity
>  - drop driver_data setting function as it is likely to be a
>    race-condition-by-design
>
> ---
>
> Matti Vaittinen (3):
>   gpio: regmap: Support few IC specific operations
>   gpio: gpio-regmap: Use devm_add_action_or_reset()
>   gpio: bd71815: Use gpio-regmap
>
>  drivers/gpio/Kconfig                  |   1 +
>  drivers/gpio/gpio-bd71815.c           | 121 ++++-----------
>  drivers/gpio/gpio-regmap.c            | 212 +++++++++++++++-----------
>  drivers/gpio/gpio-sl28cpld.c          |   3 +-
>  drivers/pinctrl/bcm/pinctrl-bcm63xx.c |   8 +-
>  include/linux/gpio/regmap.h           |  51 +++++--
>  6 files changed, 194 insertions(+), 202 deletions(-)
>
>
> base-commit: c4681547bcce777daf576925a966ffa824edd09d
> --
> 2.25.4
>
>
> --
> Matti Vaittinen, Linux device drivers
> ROHM Semiconductors, Finland SWDC
> Kiviharjunlenkki 1E
> 90220 OULU
> FINLAND
>
> ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
> Simon says - in Latin please.
> ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
> Thanks to Simon Glass for the translation =]



-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-05-26  8:42 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26  6:02 [PATCH v4 0/3] gpio: gpio-regmap: Support few custom operations Matti Vaittinen
2021-05-26  6:02 ` Matti Vaittinen
2021-05-26  6:10 ` [PATCH v4 1/3] gpio: regmap: Support few IC specific operations Matti Vaittinen
2021-05-26  6:10   ` Matti Vaittinen
2021-05-26  6:10 ` [PATCH v4 2/3] gpio: gpio-regmap: Use devm_add_action_or_reset() Matti Vaittinen
2021-05-26  6:10   ` Matti Vaittinen
2021-05-28 17:17   ` Michael Walle
2021-05-28 17:17     ` Michael Walle
2021-06-02 11:54     ` Bartosz Golaszewski
2021-06-02 11:54       ` Bartosz Golaszewski
2021-06-03  4:26       ` Matti Vaittinen
2021-06-03  4:26         ` Matti Vaittinen
2021-06-03  7:40         ` Michael Walle
2021-06-03  7:40           ` Michael Walle
2021-05-26  6:10 ` [PATCH v4 3/3] gpio: bd71815: Use gpio-regmap Matti Vaittinen
2021-05-26  6:10   ` Matti Vaittinen
2021-05-26  8:42 ` Andy Shevchenko [this message]
2021-05-26  8:42   ` [PATCH v4 0/3] gpio: gpio-regmap: Support few custom operations Andy Shevchenko
2021-05-26  9:07   ` Michael Walle
2021-05-26  9:07     ` Michael Walle
2021-05-26  9:44     ` Matti Vaittinen
2021-05-26  9:44       ` Matti Vaittinen
2021-05-26 10:27       ` Michael Walle
2021-05-26 10:27         ` Michael Walle
2021-05-26 11:00         ` Matti Vaittinen
2021-05-26 11:00           ` Matti Vaittinen
2021-05-26 22:46 ` Linus Walleij
2021-05-26 22:46   ` Linus Walleij
2021-05-27  6:32   ` Matti Vaittinen
2021-05-27  6:32     ` Matti Vaittinen
2021-05-28  0:53     ` Linus Walleij
2021-05-28  0:53       ` Linus Walleij
2021-05-28  6:33       ` Vaittinen, Matti
2021-05-28  6:33         ` Vaittinen, Matti
2021-05-28 14:31         ` Bartosz Golaszewski
2021-05-28 14:31           ` Bartosz Golaszewski
2021-05-28 15:42           ` Vaittinen, Matti
2021-05-28 15:42             ` Vaittinen, Matti
2021-05-28 17:23             ` Michael Walle
2021-05-28 17:23               ` Michael Walle
2021-05-31  7:42               ` Vaittinen, Matti
2021-05-31  7:42                 ` Vaittinen, Matti

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='CAHp75VeHZg1DC76sg1F-=49SfVLNhf4pG7ArcXHxjU0nXZOpWw@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=f.fainelli@gmail.com \
    --cc=jonas.gorski@gmail.com \
    --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=linux-power@fi.rohmeurope.com \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=mazziesaccount@gmail.com \
    --cc=michael@walle.cc \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.