linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: William Breathitt Gray <william.gray@linaro.org>
Cc: linus.walleij@linaro.org, brgl@bgdev.pl, broonie@kernel.org,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	quarium@gmail.com, jhentges@accesio.com, jay.dolan@accesio.com
Subject: Re: [PATCH 2/3] gpio: gpio-regmap: Expose struct gpio_regmap in linux/gpio/regmap.h
Date: Tue, 28 Feb 2023 21:44:02 +0100	[thread overview]
Message-ID: <0e0901de3668baec5ce7cd4836c045a5@walle.cc> (raw)
In-Reply-To: <5c0354c87d4d2a082cf0c331076d5aad18a93169.1677547393.git.william.gray@linaro.org>

Hi,

Am 2023-02-28 02:53, schrieb William Breathitt Gray:
> A struct gpio_regmap is passed as a parameter for reg_mask_xlate(), but
> for callbacks to access its members the declaration must be exposed.

That parameter is only an opaque one to call any gpio_regmap_*().

> Move the struct gpio_regmap declaration from drivers/gpio/gpio-regmap.c
> to include/linux/gpio/regmap.h so callbacks can properly interact with
> struct gpio_regmap members.

That struct should be kept private. It seems you only need the
regmap. Either introduce a gpio_regmap_get_regmap() or add the
regmap to a private struct and use gpio_regmap_get_drvdata().

-michael

  reply	other threads:[~2023-02-28 20:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28  1:53 [PATCH 0/3] Migrate PCIe-IDIO-24 GPIO driver to the regmap API William Breathitt Gray
2023-02-28  1:53 ` [PATCH 1/3] regmap: Pass regmap and irq_drv_data as parameters for set_type_config() William Breathitt Gray
2023-02-28  1:53 ` [PATCH 2/3] gpio: gpio-regmap: Expose struct gpio_regmap in linux/gpio/regmap.h William Breathitt Gray
2023-02-28 20:44   ` Michael Walle [this message]
2023-02-28  3:12     ` William Breathitt Gray
2023-02-28  1:53 ` [PATCH 3/3] gpio: pcie-idio-24: Migrate to the regmap API William Breathitt Gray
2023-03-01  4:11   ` kernel test robot
2023-02-28 19:09 ` [PATCH 0/3] Migrate PCIe-IDIO-24 GPIO driver " Mark Brown
2023-02-28  2:19   ` William Breathitt Gray
2023-02-28 19:28     ` Mark Brown
2023-02-28  2:40       ` William Breathitt Gray

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=0e0901de3668baec5ce7cd4836c045a5@walle.cc \
    --to=michael@walle.cc \
    --cc=brgl@bgdev.pl \
    --cc=broonie@kernel.org \
    --cc=jay.dolan@accesio.com \
    --cc=jhentges@accesio.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quarium@gmail.com \
    --cc=william.gray@linaro.org \
    /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).