[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250213195621.3133406-1-andriy.shevchenko@linux.intel.com>
Date: Thu, 13 Feb 2025 21:48:45 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Michael Walle <mwalle@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
athieu Dubois-Briand <mathieu.dubois-briand@...tlin.com>
Subject: [PATCH v1 0/5] gpio: regmap: Make use of 'ngpios' property
It appears that regmap GPIO doesn't take into account 'ngpios' property
and requires hard coded values or duplication of the parsing the same
outside of GPIO library. This miniseries addresses that.
For the record, I have checked all bgpio_init() users and haven't seen
the suspicious code that this series might break, e.g., an equivalent of
something like this:
static int foo_probe(struct device *dev)
{
struct gpio_chip *gc = devm_kzalloc(...);
struct fwnode_handle *fwnode = ...; // NOT dev_fwnode(dev)!
...
gc->parent = dev;
gc->fwnode = fwnode;
ret = bgpio_init(gc, dev, ...);
...
}
Reported-by: Mathieu Dubois-Briand <mathieu.dubois-briand@...tlin.com>
Andy Shevchenko (5):
gpiolib: Extract gpiochip_choose_fwnode() for wider use
gpiolib: Use fwnode instead of device in gpiochip_get_ngpios()
gpio: regmap: Group optional assignments together for better
understanding
gpio: regmap: Move optional assignments down in the code
gpio: regmap: Allow ngpio to be read from the property
drivers/gpio/gpio-regmap.c | 41 +++++++++++++++++++++----------------
drivers/gpio/gpiolib.c | 27 ++++++++++++++++--------
include/linux/gpio/regmap.h | 4 ++--
3 files changed, 43 insertions(+), 29 deletions(-)
--
2.45.1.3035.g276e886db78b
Powered by blists - more mailing lists