[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <69f72478-7102-4cfd-98d7-a93dcfe5a1a0@wanadoo.fr>
Date: Fri, 9 May 2025 11:29:13 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: 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 v8 02/11] mfd: Add max7360 support
Le 09/05/2025 à 11:14, mathieu.dubois-briand@...tlin.com a écrit :
> From: Kamel Bouhara <kamel.bouhara@...tlin.com>
>
> Add core driver to support MAX7360 i2c chip, multi function device
> with keypad, GPIO, PWM, GPO and rotary encoder submodules.
>
> Signed-off-by: Kamel Bouhara <kamel.bouhara@...tlin.com>
> Co-developed-by: Mathieu Dubois-Briand <mathieu.dubois-briand@...tlin.com>
> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@...tlin.com>
> ---
Hi,
...
> +static int max7360_mask_irqs(struct regmap *regmap)
> +{
> + struct device *dev = regmap_get_device(regmap);
> + unsigned int val;
> + int ret;
> +
> + /*
> + * GPIO/PWM interrupts are not masked on reset: as the MAX7360 "INTI"
> + * interrupt line is shared between GPIOs and rotary encoder, this could
> + * result in repeated spurious interrupts on the rotary encoder driver
> + * if the GPIO driver is not loaded. Mask them now to avoid this
> + * situation.
> + */
> + for (unsigned int i = 0; i < MAX7360_PORT_PWM_COUNT; i++) {
> + ret = regmap_write_bits(regmap, MAX7360_REG_PWMCFG(i),
> + MAX7360_PORT_CFG_INTERRUPT_MASK,
> + MAX7360_PORT_CFG_INTERRUPT_MASK);
> + if (ret)
> + return dev_err_probe(dev, ret,
> + "Failed to write MAX7360 port configuration");
Nitpick: Missing \n
> + }
> +
> + /* Read GPIO in register, to ACK any pending IRQ. */
> + ret = regmap_read(regmap, MAX7360_REG_GPIOIN, &val);
> + if (ret)
> + return dev_err_probe(dev, ret, "Failed to read GPIO values: %d\n", ret);
Nitpick: ret is not needed in the error message.
> +
> + return 0;
> +}
...
CJ
Powered by blists - more mailing lists