mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Hawkins, Nick" <nick.hawkins@hpe.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Verdun, Jean-Marie" <verdun@hpe.com>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"brgl@bgdev.pl" <brgl@bgdev.pl>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org" 
	<krzysztof.kozlowski+dt@linaro.org>,
	"jdelvare@suse.com" <jdelvare@suse.com>,
	"linux@roeck-us.net" <linux@roeck-us.net>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>
Subject: Re: [PATCH v3 2/5] gpio: gxp: Add HPE GXP GPIO
Date: Wed, 7 Jun 2023 16:07:31 +0000	[thread overview]
Message-ID: <81CFCEE8-5276-475A-A2AB-A814DEDA04B2@hpe.com> (raw)
In-Reply-To: <CAHp75Vcc9hh6MYPSCJa1vniU=rC4Y+j9pCS4Np-b-Pyh5eUwNg@mail.gmail.com>

> > > Why are you not using gpio-regmap?
> >
> > Is there are good example or previous commit you would recommend
> > looking at that shows how to convert from regmap to gpio-regmap?
> > Later in the code I am using regmap_read and regmap_update_bits
> > with large differences in offset registers, and not so much a
> > contiguous block.


> I don't know how good these are, but that's what we have currently as
> most prominent use of gpio-regmap


> 1) (ongoing) https://lore.kernel.org/linux-gpio/20230606092107.764621-6-jiawenwu@trustnetic.com <mailto:20230606092107.764621-6-jiawenwu@trustnetic.com>/
> 2) (in the repo)
> https://elixir.bootlin.com/linux/v6.4-rc4/source/drivers/gpio/gpio-i8255.c <https://elixir.bootlin.com/linux/v6.4-rc4/source/drivers/gpio/gpio-i8255.c>
> 3) (in the repo)
> https://elixir.bootlin.com/linux/v6.4-rc4/source/drivers/gpio/gpio-104-idi-48.c <https://elixir.bootlin.com/linux/v6.4-rc4/source/drivers/gpio/gpio-104-idi-48.c>


> 2) & 3) were converted, so you may see by executing respective `git
> log -p -- drivers/gpio/...`.

Greetings Andy,

Thank you for those links, I have observed the gpio_regmap code
they have implemented in that case. It appears that the regmap
code is opening the entire range of memory to be read. For my
particular purpose I am not wanting to expose all the 0-0xff byte
range of the GPIOs. In my case is it still necessary to use the
gpio_regmap code?

If gpio_regmap is required, how do I create a direct correlation
between a specific gpio-line and a register offset? For example, in
gpio-gxp-pl.c. Gpio-line at offset 0 (IOPLED) is at register 0x04. The
gpio-line at offset 8 (FAN_INST) is at register 0x27. 

Additionally, is it required to remove gpio_chip if gpio_regmap is
used?

Thank you for the assistance,

-Nick Hawkins


  reply	other threads:[~2023-06-07 16:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06  1:42 [PATCH v3 0/5] ARM: Add GPIO support nick.hawkins
2023-06-06  1:42 ` [PATCH v3 1/5] dt-bindings: gpio: Add HPE GXP GPIO nick.hawkins
2023-06-06  9:30   ` Krzysztof Kozlowski
2023-06-06  1:42 ` [PATCH v3 2/5] gpio: gxp: " nick.hawkins
2023-06-06  9:22   ` andy.shevchenko
2023-06-06 18:51     ` Hawkins, Nick
2023-06-06 21:15       ` Andy Shevchenko
2023-06-07 16:07         ` Hawkins, Nick [this message]
2023-06-07 16:30           ` Andy Shevchenko
2023-06-07 20:45             ` Hawkins, Nick
2023-06-08 10:22               ` Andy Shevchenko
2023-06-08 14:58                 ` Hawkins, Nick
2023-06-08 17:15                   ` Andy Shevchenko
2023-06-06  1:42 ` [PATCH v3 3/5] dt-bindings: hwmon: hpe,gxp-fan-ctrl: remove fn2 and pl registers nick.hawkins
2023-06-06  9:30   ` Krzysztof Kozlowski
2023-06-06  1:42 ` [PATCH v3 4/5] hwmon: (gxp_fan_ctrl) Provide fan info via gpio nick.hawkins
2023-06-06 14:18   ` Guenter Roeck
2023-06-07 16:18     ` Hawkins, Nick
2023-06-06  1:42 ` [PATCH v3 5/5] MAINTAINERS: hpe: Add GPIO nick.hawkins

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=81CFCEE8-5276-475A-A2AB-A814DEDA04B2@hpe.com \
    --to=nick.hawkins@hpe.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh+dt@kernel.org \
    --cc=verdun@hpe.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®