[PATCH v8 09/18] gpiolib: regmap: add gpio_regmap_get_chip()

zl020895 zl020895 at 163.com
Mon Sep 21 05:19:49 PDT 2026


Hi Bart,

Done, sent as a follow-up:
https://lore.kernel.org/all/20260921-gpio-doc-followup-v1-1-618738124f4c@ambarella.com/

Best regards,
Long Zhao

At 2026-09-21 18:35:08, "Bartosz Golaszewski" <brgl at kernel.org> wrote:
>On Mon, 21 Sep 2026 06:23:28 +0200, Long Zhao via B4 Relay
><devnull+longzhao.ambarella.com at kernel.org> said:
>> From: Long Zhao <longzhao at ambarella.com>
>>
>> Let drivers that implement a custom irqchip retrieve the gpio_chip
>> after registration.
>>
>> Signed-off-by: Long Zhao <longzhao at ambarella.com>
>> ---
>>  drivers/gpio/gpio-regmap.c  | 6 ++++++
>>  include/linux/gpio/regmap.h | 1 +
>>  2 files changed, 7 insertions(+)
>>
>> diff --git a/drivers/gpio/gpio-regmap.c b/drivers/gpio/gpio-regmap.c
>> index fbd4c753525a..21e0993b89e2 100644
>> --- a/drivers/gpio/gpio-regmap.c
>> +++ b/drivers/gpio/gpio-regmap.c
>> @@ -295,6 +295,12 @@ void *gpio_regmap_get_drvdata(struct gpio_regmap *gpio)
>>  }
>>  EXPORT_SYMBOL_GPL(gpio_regmap_get_drvdata);
>>
>> +struct gpio_chip *gpio_regmap_get_chip(struct gpio_regmap *gpio)
>> +{
>> +	return &gpio->gpio_chip;
>> +}
>> +EXPORT_SYMBOL_GPL(gpio_regmap_get_chip);
>
>Please provide a kernel doc for all public APIs. It should explain that this
>must not be used outside of a GPIO controller driver context.
>
>Bart


More information about the linux-arm-kernel mailing list