[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ac50f6a-684d-d2b3-a32d-97635abdff13@microchip.com>
Date: Sat, 16 Jul 2022 12:17:36 +0000
From: <Lewis.Hanly@...rochip.com>
To: <maz@...nel.org>
CC: <linux-gpio@...r.kernel.org>, <linux-riscv@...ts.infradead.org>,
<linus.walleij@...aro.org>, <brgl@...ev.pl>,
<linux-kernel@...r.kernel.org>, <palmer@...belt.com>,
<Conor.Dooley@...rochip.com>, <Daire.McNamara@...rochip.com>
Subject: Re: [PATCH v3 1/1] gpio: mpfs: add polarfire soc gpio support
On 16/07/2022 11:44, Marc Zyngier wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On Sat, 16 Jul 2022 08:11:13 +0100,
> <lewis.hanly@...rochip.com> wrote:
>>
>> From: Lewis Hanly <lewis.hanly@...rochip.com>
>>
>> Add a driver to support the Polarfire SoC gpio controller.
>>
>> Signed-off-by: Lewis Hanly <lewis.hanly@...rochip.com>
>> ---
>> drivers/gpio/Kconfig | 9 +
>> drivers/gpio/Makefile | 1 +
>> drivers/gpio/gpio-mpfs.c | 361 +++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 371 insertions(+)
>> create mode 100644 drivers/gpio/gpio-mpfs.c
>
> A couple of other nits:
>
>> +static const struct of_device_id mpfs_of_ids[] = {
>> + { .compatible = "microchip,mpfs-gpio", },
>
> Where is the DT binding for this?
Already upstream,
Documentation/devicetree/bindings/gpio/microchip%2Cmpfs-gpio.yaml
>
>> + { /* end of list */ }
>> +};
>> +
>> +static struct platform_driver mpfs_gpio_driver = {
>> + .probe = mpfs_gpio_probe,
>> + .driver = {
>> + .name = "microchip,mpfs-gpio",
>> + .of_match_table = mpfs_of_ids,
>> + },
>> + .remove = mpfs_gpio_remove,
>
> No, please. You cannot enforce that there are no interrupts being used
> (and nothing checks for this), and you're pretty much guaranteed that
> the system will catch fire on the first interrupt being delivered.
> Moreover, your "remove" callback only turns the clock off, which is
> yet another nail on that coffin.
Will remove.
>
> M.
>
> --
> Without deviation from the norm, progress is not possible.
Powered by blists - more mailing lists