[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d26a74d-af5c-490a-8a00-ca0791bb23f6@kernel.org>
Date: Fri, 16 Aug 2024 07:52:43 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Mary Strodl <mstrodl@....rit.edu>, linux-kernel@...r.kernel.org
Cc: linus.walleij@...aro.org, brgl@...ev.pl, linux-gpio@...r.kernel.org
Subject: Re: [PATCH] gpio: add support for FTDI's MPSSE as GPIO
On 14/08/2024 21:15, Mary Strodl wrote:
> FTDI FT2232H is a USB to GPIO chip. Sealevel produces some devices
> with this chip. FT2232H presents itself as a composite device with two
> interfaces (each is an "MPSSE"). Each MPSSE has two banks (high and low)
> of 8 GPIO each. I believe some MPSSE's have only one bank, but I don't
> know how to identify them (I don't have any for testing) and as a result
> are unsupported for the time being.
>
> Additionally, this driver provides software polling-based interrupts for
> edge detection. For the Sealevel device I have to test with, this works
> well because there is hardware debouncing. From talking to Sealevel's
> people, this is their preferred way to do edge detection.
>
> Signed-off-by: Mary Strodl <mstrodl@....rit.edu>
Thank you for your patch. There is something to discuss/improve.
> +
> +static struct usb_driver gpio_mpsse_driver = {
> + .name = "gpio-mpsse",
> + .probe = gpio_mpsse_probe,
> + .disconnect = gpio_mpsse_disconnect,
> + .id_table = gpio_mpsse_table,
> +};
> +
> +module_usb_driver(gpio_mpsse_driver);
> +
> +MODULE_ALIAS("gpio-mpsse");
You should not need MODULE_ALIAS() in normal cases. If you need it,
usually it means your device ID table is wrong (e.g. misses either
entries or MODULE_DEVICE_TABLE()). MODULE_ALIAS() is not a substitute
for incomplete ID table.
The module with autoload based on USB ids, right?
> +MODULE_AUTHOR("Mary Strodl <mstrodl@....rit.edu>");
> +MODULE_DESCRIPTION("MPSSE GPIO driver");
> +MODULE_LICENSE("GPL");
Best regards,
Krzysztof
Powered by blists - more mailing lists