[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <D7S5D37XT80H.2WLFX1D18TZ6P@bootlin.com>
Date: Fri, 14 Feb 2025 12:54:29 +0100
From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@...tlin.com>
To: "Mathieu Dubois-Briand" <mathieu.dubois-briand@...tlin.com>, "Lee Jones"
<lee@...nel.org>, "Rob Herring" <robh@...nel.org>, "Krzysztof Kozlowski"
<krzk+dt@...nel.org>, "Conor Dooley" <conor+dt@...nel.org>, "Kamel Bouhara"
<kamel.bouhara@...tlin.com>, "Linus Walleij" <linus.walleij@...aro.org>,
"Bartosz Golaszewski" <brgl@...ev.pl>, "Dmitry Torokhov"
<dmitry.torokhov@...il.com>, Uwe Kleine-König
<ukleinek@...nel.org>, "Michael Walle" <mwalle@...nel.org>, "Mark Brown"
<broonie@...nel.org>, "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>, "Danilo Krummrich"
<dakr@...nel.org>
Cc: <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-gpio@...r.kernel.org>, <linux-input@...r.kernel.org>,
<linux-pwm@...r.kernel.org>, <andriy.shevchenko@...el.com>,
Grégory Clement <gregory.clement@...tlin.com>, "Thomas
Petazzoni" <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v4 07/10] gpio: max7360: Add MAX7360 gpio support
On Fri Feb 14, 2025 at 12:49 PM CET, Mathieu Dubois-Briand wrote:
> Add driver for Maxim Integrated MAX7360 GPIO/GPO controller.
>
> Two sets of GPIOs are provided by the device:
> - Up to 8 GPIOs, shared with the PWM and rotary encoder functionalities.
> These GPIOs also provide interrupts on input changes.
> - Up to 6 GPOs, on unused keypad columns pins.
>
> Co-developed-by: Kamel Bouhara <kamel.bouhara@...tlin.com>
> Signed-off-by: Kamel Bouhara <kamel.bouhara@...tlin.com>
> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@...tlin.com>
> ---
...
> +static int max7360_gpio_probe(struct platform_device *pdev)
...
> + } else {
> + u32 ngpios;
> +
> + ret = device_property_read_u32(dev, "ngpios", &ngpios);
> + if (ret < 0) {
> + dev_err(dev, "Missing ngpios OF property\n");
> + return ret;
> + }
> +
> + gpio_config.reg_set_base = GPIO_REGMAP_ADDR(MAX7360_REG_PORTS);
> + gpio_config.reg_mask_xlate = max7360_gpo_reg_mask_xlate;
> + gpio_config.ngpio = ngpios;
The device_property_read_u32() and setting of gpio_config.ngpio here
will be removed, once the "gpio: regmap: Make use of 'ngpios' property"
series gets merged.
https://lore.kernel.org/linux-gpio/20250213195621.3133406-1-andriy.shevchenko@linux.intel.com/
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists