From nobody Mon Feb 9 23:39:35 2026 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4E762D320D; Tue, 29 Apr 2025 14:08:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745935717; cv=none; b=YbRK3CG/ePnXJs+PIodsdvHDoMoQg5BPfJT6BYecIYytw5QGHXbey6wpmxHLvfgOggSzGixaRd/IUzLeaKgba+PNhyprNSYZcfX+ap4uRzwBSQS5skEdnos8ag6F8qCx0VfH88Tp8dyQ9FtMZw5dN4i2Ksx4STi8dzM1v7Ofb+I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745935717; c=relaxed/simple; bh=CPON8ZKknXYWorbKNxM9Y+Ut8Sv1lh61yP77dR82DPM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YvKQqxA1I5FNfFO573XIaYasLmHgwVg5kOi6TfOxX0CZXwWr4nDGmagOhOuDa5EZXR0yJNFtf2VkuRPBRhFzbFtO4UCvVF+aOsKGT+7iWUTbtYOnP5PxHlFrO9bMRUW1UJzzySudV5yzwh2AcZN1D8TZGPMMsuQ1rmur974G0w4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=S8Ywwn6D; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="S8Ywwn6D" Received: by mail.gandi.net (Postfix) with ESMTPSA id 97FEA438CB; Tue, 29 Apr 2025 14:08:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1745935713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O9O7ZqLaXmGendkTEo1CFEkLo5rrjkuCOjbUYkDD5FQ=; b=S8Ywwn6DHwq4p+vIXZExATYeZiPPRl+SN6X4Y0cgeyg4AoUd6kGDyAjanPD0Y6zKL0zmkf YW/UDIywfI2LcowDhEKnYuYCR/2XNIbH071bW5EbGPo4k4nVQTclUJnmVA74DAGj4eQWvt FIw8HmnxtGHzbJPA79Q/pzARqmO16G3VdCU2JXxux27YsscljBm8a6n5GOYmneD4n+rBNY z6agEF+btQrUefinM3g1h6jqWPxD3WcNOMCyY6peX2O0+9DFBBr8vLXjPkK8RhfVqGVIi6 HPV9+NVefHmOemoE3YOB2mAEkE59kk9t1Xys1nIXlrUaSLzBMNcfzQsxDh8SbQ== From: Thomas Richard Date: Tue, 29 Apr 2025 16:08:22 +0200 Subject: [PATCH v4 08/12] gpio: aggregator: export symbols of the GPIO forwarder library Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250429-aaeon-up-board-pinctrl-support-v4-8-b3fffc11417d@bootlin.com> References: <20250429-aaeon-up-board-pinctrl-support-v4-0-b3fffc11417d@bootlin.com> In-Reply-To: <20250429-aaeon-up-board-pinctrl-support-v4-0-b3fffc11417d@bootlin.com> To: Linus Walleij , Andy Shevchenko , Bartosz Golaszewski , Geert Uytterhoeven , Kees Cook , Andy Shevchenko Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, DanieleCleri@aaeon.eu, GaryWang@aaeon.com.tw, linux-hardening@vger.kernel.org, Thomas Richard X-Mailer: b4 0.14.1 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvieegtddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredtjeenucfhrhhomhepvfhhohhmrghsucftihgthhgrrhguuceothhhohhmrghsrdhrihgthhgrrhgusegsohhothhlihhnrdgtohhmqeenucggtffrrghtthgvrhhnpeektdehvdeiteehtdelteffheduveelgeelvdetgedvueejgefhhfekgefgfeduveenucfkphepvdgrtddumegtsgdugeemheehieemjegrtddtmegutgekudemrggrugdtmehfuggtrgemtggtudgrnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdgrtddumegtsgdugeemheehieemjegrtddtmegutgekudemrggrugdtmehfuggtrgemtggtudgrpdhhvghloheplgduvdejrddtrddurddungdpmhgrihhlfhhrohhmpehthhhomhgrshdrrhhitghhrghrugessghoohhtlhhinhdrtghomhdpnhgspghrtghpthhtohepudefpdhrtghpthhtoheplhhinhhugidqhhgrrhguvghnihhnghesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhhsrdifrghllhgvihhjsehlihhnrghrohdrohhrghdprhgtphhtthhopegrnhguhieskhgvrhhnvghlrdhorhhgp dhrtghpthhtohepkhgvvghssehkvghrnhgvlhdrohhrghdprhgtphhtthhopehgvggvrhhtodhrvghnvghsrghssehglhhiuggvrhdrsggvpdhrtghpthhtohepffgrnhhivghlvgevlhgvrhhisegrrggvohhnrdgvuhdprhgtphhtthhopegrnhgurhhihidrshhhvghvtghhvghnkhhosehlihhnuhigrdhinhhtvghlrdgtohhmpdhrtghpthhtohepthhhohhmrghsrdhpvghtrgiiiihonhhisegsohhothhlihhnrdgtohhm X-GND-Sasl: thomas.richard@bootlin.com Export all symbols and create header file for the GPIO forwarder library. Signed-off-by: Thomas Richard --- drivers/gpio/gpio-aggregator.c | 191 +++++++++++++++++++++++++++++++++----= ---- include/linux/gpio/forwarder.h | 45 ++++++++++ 2 files changed, 201 insertions(+), 35 deletions(-) diff --git a/drivers/gpio/gpio-aggregator.c b/drivers/gpio/gpio-aggregator.c index f186572b5c9e..accf4be68238 100644 --- a/drivers/gpio/gpio-aggregator.c +++ b/drivers/gpio/gpio-aggregator.c @@ -25,6 +25,7 @@ =20 #include #include +#include #include =20 #define AGGREGATOR_MAX_GPIOS 512 @@ -275,35 +276,81 @@ struct gpiochip_fwd { =20 #define fwd_tmp_size(ngpios) (BITS_TO_LONGS((ngpios)) + (ngpios)) =20 -static int gpio_fwd_get_direction(struct gpio_chip *chip, unsigned int off= set) +/** + * gpio_fwd_get_gpiochip - Get the GPIO chip for the GPIO forwarder + * @fwd: GPIO forwarder + * + * Returns: The GPIO chip for the GPIO forwarder + */ +struct gpio_chip *gpio_fwd_get_gpiochip(struct gpiochip_fwd *fwd) +{ + return &fwd->chip; +} +EXPORT_SYMBOL_NS_GPL(gpio_fwd_get_gpiochip, "GPIO_FORWARDER"); + +/** + * gpio_fwd_get_direction - Return the current direction of a GPIO forward= er line + * @chip: GPIO chip in the forwarder + * @offset: the offset of the line + * + * Returns: 0 for output, 1 for input, or an error code in case of error. + */ +int gpio_fwd_get_direction(struct gpio_chip *chip, unsigned int offset) { struct gpiochip_fwd *fwd =3D gpiochip_get_data(chip); =20 return gpiod_get_direction(fwd->descs[offset]); } +EXPORT_SYMBOL_NS_GPL(gpio_fwd_get_direction, "GPIO_FORWARDER"); =20 -static int gpio_fwd_direction_input(struct gpio_chip *chip, unsigned int o= ffset) +/** + * gpio_fwd_direction_input - Set a GPIO forwarder line direction to input + * @chip: GPIO chip in the forwarder + * @offset: the offset of the line + * + * Returns: 0 on success, or negative errno on failure. + */ +int gpio_fwd_direction_input(struct gpio_chip *chip, unsigned int offset) { struct gpiochip_fwd *fwd =3D gpiochip_get_data(chip); =20 return gpiod_direction_input(fwd->descs[offset]); } +EXPORT_SYMBOL_NS_GPL(gpio_fwd_direction_input, "GPIO_FORWARDER"); =20 -static int gpio_fwd_direction_output(struct gpio_chip *chip, - unsigned int offset, int value) +/** + * gpio_fwd_direction_output - Set a GPIO forwarder line direction to outp= ut + * @chip: GPIO chip in the forwarder + * @offset: the offset of the line + * @value: value to set + * + * Returns: 0 on success, or negative errno on failure. + */ +int gpio_fwd_direction_output(struct gpio_chip *chip, + unsigned int offset, int value) { struct gpiochip_fwd *fwd =3D gpiochip_get_data(chip); =20 return gpiod_direction_output(fwd->descs[offset], value); } +EXPORT_SYMBOL_NS_GPL(gpio_fwd_direction_output, "GPIO_FORWARDER"); =20 -static int gpio_fwd_get(struct gpio_chip *chip, unsigned int offset) +/** + * gpio_fwd_get - Return a GPIO forwarder line's value + * @chip: GPIO chip in the forwarder + * @offset: the offset of the line + * + * Returns: The GPIO's logical value, i.e. taking the ACTIVE_LOW status in= to + * account, or negative errno on failure. + */ +int gpio_fwd_get(struct gpio_chip *chip, unsigned int offset) { struct gpiochip_fwd *fwd =3D gpiochip_get_data(chip); =20 return chip->can_sleep ? gpiod_get_value_cansleep(fwd->descs[offset]) : gpiod_get_value(fwd->descs[offset]); } +EXPORT_SYMBOL_NS_GPL(gpio_fwd_get, "GPIO_FORWARDER"); =20 static int gpio_fwd_get_multiple(struct gpiochip_fwd *fwd, unsigned long *= mask, unsigned long *bits) @@ -331,8 +378,18 @@ static int gpio_fwd_get_multiple(struct gpiochip_fwd *= fwd, unsigned long *mask, return 0; } =20 -static int gpio_fwd_get_multiple_locked(struct gpio_chip *chip, - unsigned long *mask, unsigned long *bits) +/** + * gpio_fwd_get_multiple_locked - Get values for multiple GPIO forwarder l= ines + * @chip: GPIO chip in the forwarder + * @mask: bit mask array; one bit per line; BITS_PER_LONG bits per word de= fines + * which lines are to be read + * @bits: bit value array; one bit per line; BITS_PER_LONG bits per word w= ill + * contains the read values for the lines specified by mask + * + * Returns: 0 on success, or negative errno on failure. + */ +int gpio_fwd_get_multiple_locked(struct gpio_chip *chip, unsigned long *ma= sk, + unsigned long *bits) { struct gpiochip_fwd *fwd =3D gpiochip_get_data(chip); unsigned long flags; @@ -350,6 +407,7 @@ static int gpio_fwd_get_multiple_locked(struct gpio_chi= p *chip, =20 return error; } +EXPORT_SYMBOL_NS_GPL(gpio_fwd_get_multiple_locked, "GPIO_FORWARDER"); =20 static void gpio_fwd_delay(struct gpio_chip *chip, unsigned int offset, in= t value) { @@ -372,7 +430,15 @@ static void gpio_fwd_delay(struct gpio_chip *chip, uns= igned int offset, int valu udelay(delay_us); } =20 -static int gpio_fwd_set(struct gpio_chip *chip, unsigned int offset, int v= alue) +/** + * gpio_fwd_set - Assign value to a GPIO forwarder line. + * @chip: GPIO chip in the forwarder + * @offset: the offset of the line + * @value: value to set + * + * Returns: 0 on success, or negative errno on failure. + */ +int gpio_fwd_set(struct gpio_chip *chip, unsigned int offset, int value) { struct gpiochip_fwd *fwd =3D gpiochip_get_data(chip); int ret; @@ -389,6 +455,7 @@ static int gpio_fwd_set(struct gpio_chip *chip, unsigne= d int offset, int value) =20 return ret; } +EXPORT_SYMBOL_NS_GPL(gpio_fwd_set, "GPIO_FORWARDER"); =20 static int gpio_fwd_set_multiple(struct gpiochip_fwd *fwd, unsigned long *= mask, unsigned long *bits) @@ -410,8 +477,18 @@ static int gpio_fwd_set_multiple(struct gpiochip_fwd *= fwd, unsigned long *mask, return ret; } =20 -static int gpio_fwd_set_multiple_locked(struct gpio_chip *chip, - unsigned long *mask, unsigned long *bits) +/** + * gpio_fwd_set_multiple_locked - Assign values to multiple GPIO forwarder= lines + * @chip: GPIO chip in the forwarder + * @mask: bit mask array; one bit per output; BITS_PER_LONG bits per word + * defines which outputs are to be changed + * @bits: bit value array; one bit per output; BITS_PER_LONG bits per word + * defines the values the outputs specified by mask are to be set to + * + * Returns: 0 on success, or negative errno on failure. + */ +int gpio_fwd_set_multiple_locked(struct gpio_chip *chip, + unsigned long *mask, unsigned long *bits) { struct gpiochip_fwd *fwd =3D gpiochip_get_data(chip); unsigned long flags; @@ -429,21 +506,41 @@ static int gpio_fwd_set_multiple_locked(struct gpio_c= hip *chip, =20 return ret; } +EXPORT_SYMBOL_NS_GPL(gpio_fwd_set_multiple_locked, "GPIO_FORWARDER"); =20 -static int gpio_fwd_set_config(struct gpio_chip *chip, unsigned int offset, - unsigned long config) +/** + * gpio_fwd_set_config - Set @config for a GPIO forwarder line + * @chip: GPIO chip in the forwarder + * @offset: the offset of the line + * @config: Same packed config format as generic pinconf + * + * Returns: 0 on success, %-ENOTSUPP if the controller doesn't support set= ting + * the configuration. + */ +int gpio_fwd_set_config(struct gpio_chip *chip, unsigned int offset, + unsigned long config) { struct gpiochip_fwd *fwd =3D gpiochip_get_data(chip); =20 return gpiod_set_config(fwd->descs[offset], config); } +EXPORT_SYMBOL_NS_GPL(gpio_fwd_set_config, "GPIO_FORWARDER"); =20 -static int gpio_fwd_to_irq(struct gpio_chip *chip, unsigned int offset) +/** + * gpio_fwd_to_irq - Return the IRQ corresponding to a GPIO forwarder line + * @chip: GPIO chip in the forwarder + * @offset: the offset of the line + * + * Returns: The IRQ corresponding to the passed line, or an error code in = case + * of error. + */ +int gpio_fwd_to_irq(struct gpio_chip *chip, unsigned int offset) { struct gpiochip_fwd *fwd =3D gpiochip_get_data(chip); =20 return gpiod_to_irq(fwd->descs[offset]); } +EXPORT_SYMBOL_NS_GPL(gpio_fwd_to_irq, "GPIO_FORWARDER"); =20 /* * The GPIO delay provides a way to configure platform specific delays @@ -454,9 +551,9 @@ static int gpio_fwd_to_irq(struct gpio_chip *chip, unsi= gned int offset) #define FWD_FEATURE_DELAY BIT(0) =20 #ifdef CONFIG_OF_GPIO -static int gpiochip_fwd_delay_of_xlate(struct gpio_chip *chip, - const struct of_phandle_args *gpiospec, - u32 *flags) +static int gpio_fwd_delay_of_xlate(struct gpio_chip *chip, + const struct of_phandle_args *gpiospec, + u32 *flags) { struct gpiochip_fwd *fwd =3D gpiochip_get_data(chip); struct gpiochip_fwd_timing *timings; @@ -476,7 +573,7 @@ static int gpiochip_fwd_delay_of_xlate(struct gpio_chip= *chip, return line; } =20 -static int gpiochip_fwd_setup_delay_line(struct gpiochip_fwd *fwd) +static int gpio_fwd_setup_delay_line(struct gpiochip_fwd *fwd) { struct gpio_chip *chip =3D &fwd->chip; =20 @@ -486,20 +583,28 @@ static int gpiochip_fwd_setup_delay_line(struct gpioc= hip_fwd *fwd) if (!fwd->delay_timings) return -ENOMEM; =20 - chip->of_xlate =3D gpiochip_fwd_delay_of_xlate; + chip->of_xlate =3D gpio_fwd_delay_of_xlate; chip->of_gpio_n_cells =3D 3; =20 return 0; } #else -static int gpiochip_fwd_setup_delay_line(struct gpiochip_fwd *fwd) +static int gpio_fwd_setup_delay_line(struct gpiochip_fwd *fwd) { return 0; } #endif /* !CONFIG_OF_GPIO */ =20 -static struct gpiochip_fwd * -devm_gpiochip_fwd_alloc(struct device *dev, unsigned int ngpios) +/** + * devm_gpio_fwd_alloc - Allocate and initialize a new GPIO forwarder + * @dev: Parent device pointer + * @ngpios: Number of GPIOs in the forwarder + * + * Returns: An opaque object pointer, or an ERR_PTR()-encoded negative err= or + * code on failure. + */ +struct gpiochip_fwd * +devm_gpio_fwd_alloc(struct device *dev, unsigned int ngpios) { const char *label =3D dev_name(dev); struct gpiochip_fwd *fwd; @@ -531,10 +636,18 @@ devm_gpiochip_fwd_alloc(struct device *dev, unsigned = int ngpios) =20 return fwd; } +EXPORT_SYMBOL_NS_GPL(devm_gpio_fwd_alloc, "GPIO_FORWARDER"); =20 -static int gpiochip_fwd_gpio_add(struct gpiochip_fwd *fwd, - struct gpio_desc *desc, - unsigned int offset) +/** + * gpio_fwd_gpio_add - Add a GPIO in the forwader + * @fwd: GPIO forwarder + * @desc: GPIO decriptor to register + * @offset: offset for the GPIO in the forwarder + * + * Returns: 0 on success, or negative errno on failure. + */ +int gpio_fwd_gpio_add(struct gpiochip_fwd *fwd, struct gpio_desc *desc, + unsigned int offset) { struct gpio_chip *parent =3D gpiod_to_chip(desc); struct gpio_chip *chip =3D &fwd->chip; @@ -564,8 +677,15 @@ static int gpiochip_fwd_gpio_add(struct gpiochip_fwd *= fwd, =20 return 0; } +EXPORT_SYMBOL_NS_GPL(gpio_fwd_gpio_add, "GPIO_FORWARDER"); =20 -static int gpiochip_fwd_register(struct gpiochip_fwd *fwd) +/** + * gpio_fwd_register - Register a GPIO forwarder + * @fwd: GPIO forwarder + * + * Returns: 0 on success, or negative errno on failure. + */ +int gpio_fwd_register(struct gpiochip_fwd *fwd) { struct gpio_chip *chip =3D &fwd->chip; =20 @@ -576,9 +696,10 @@ static int gpiochip_fwd_register(struct gpiochip_fwd *= fwd) =20 return devm_gpiochip_add_data(chip->parent, chip, fwd); } +EXPORT_SYMBOL_NS_GPL(gpio_fwd_register, "GPIO_FORWARDER"); =20 /** - * gpiochip_fwd_create() - Create a new GPIO forwarder + * gpio_fwd_create() - Create a new GPIO forwarder * @dev: Parent device pointer * @ngpios: Number of GPIOs in the forwarder. * @descs: Array containing the GPIO descriptors to forward to. @@ -592,32 +713,32 @@ static int gpiochip_fwd_register(struct gpiochip_fwd = *fwd) * Return: An opaque object pointer, or an ERR_PTR()-encoded negative error * code on failure. */ -static struct gpiochip_fwd *gpiochip_fwd_create(struct device *dev, - unsigned int ngpios, - struct gpio_desc *descs[], - unsigned long features) +static struct gpiochip_fwd *gpio_fwd_create(struct device *dev, + unsigned int ngpios, + struct gpio_desc *descs[], + unsigned long features) { struct gpiochip_fwd *fwd; unsigned int i; int error; =20 - fwd =3D devm_gpiochip_fwd_alloc(dev, ngpios); + fwd =3D devm_gpio_fwd_alloc(dev, ngpios); if (!fwd) return ERR_PTR(-ENOMEM); =20 for (i =3D 0; i < ngpios; i++) { - error =3D gpiochip_fwd_gpio_add(fwd, descs[i], i); + error =3D gpio_fwd_gpio_add(fwd, descs[i], i); if (error) return ERR_PTR(error); } =20 if (features & FWD_FEATURE_DELAY) { - error =3D gpiochip_fwd_setup_delay_line(fwd); + error =3D gpio_fwd_setup_delay_line(fwd); if (error) return ERR_PTR(error); } =20 - error =3D gpiochip_fwd_register(fwd); + error =3D gpio_fwd_register(fwd); if (error) return ERR_PTR(error); =20 @@ -652,7 +773,7 @@ static int gpio_aggregator_probe(struct platform_device= *pdev) } =20 features =3D (uintptr_t)device_get_match_data(dev); - fwd =3D gpiochip_fwd_create(dev, n, descs, features); + fwd =3D gpio_fwd_create(dev, n, descs, features); if (IS_ERR(fwd)) return PTR_ERR(fwd); =20 diff --git a/include/linux/gpio/forwarder.h b/include/linux/gpio/forwarder.h new file mode 100644 index 000000000000..73a1a15e09a5 --- /dev/null +++ b/include/linux/gpio/forwarder.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __LINUX_GPIO_FORWARDER_H +#define __LINUX_GPIO_FORWARDER_H + +#include +#include +#include +#include +#include + +struct gpiochip_fwd; + +struct gpio_chip *gpio_fwd_get_gpiochip(struct gpiochip_fwd *fwd); + +int gpio_fwd_get_direction(struct gpio_chip *chip, unsigned int offset); + +int gpio_fwd_direction_input(struct gpio_chip *chip, unsigned int offset); + +int gpio_fwd_direction_output(struct gpio_chip *chip, unsigned int offset, + int value); + +int gpio_fwd_get(struct gpio_chip *chip, unsigned int offset); + +int gpio_fwd_get_multiple_locked(struct gpio_chip *chip, unsigned long *ma= sk, + unsigned long *bits); + +int gpio_fwd_set(struct gpio_chip *chip, unsigned int offset, int value); + +int gpio_fwd_set_multiple_locked(struct gpio_chip *chip, unsigned long *ma= sk, + unsigned long *bits); + +int gpio_fwd_set_config(struct gpio_chip *chip, unsigned int offset, + unsigned long config); + +int gpio_fwd_to_irq(struct gpio_chip *chip, unsigned int offset); + +struct gpiochip_fwd *devm_gpio_fwd_alloc(struct device *dev, + unsigned int ngpios); + +int gpio_fwd_gpio_add(struct gpiochip_fwd *fwd, + struct gpio_desc *desc, unsigned int offset); + +int gpio_fwd_register(struct gpiochip_fwd *fwd); + +#endif --=20 2.39.5