linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Mary Strodl <mstrodl@csh.rit.edu>, linux-kernel@vger.kernel.org
Cc: linus.walleij@linaro.org, brgl@bgdev.pl, linux-gpio@vger.kernel.org
Subject: Re: [PATCH] gpio: add support for FTDI's MPSSE as GPIO
Date: Fri, 16 Aug 2024 07:52:43 +0200	[thread overview]
Message-ID: <5d26a74d-af5c-490a-8a00-ca0791bb23f6@kernel.org> (raw)
In-Reply-To: <20240814191509.1577661-1-mstrodl@csh.rit.edu>

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@csh.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@csh.rit.edu>");
> +MODULE_DESCRIPTION("MPSSE GPIO driver");
> +MODULE_LICENSE("GPL");

Best regards,
Krzysztof


  reply	other threads:[~2024-08-16  5:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-14 19:15 [PATCH] gpio: add support for FTDI's MPSSE as GPIO Mary Strodl
2024-08-16  5:52 ` Krzysztof Kozlowski [this message]
2024-08-16 12:23   ` Mary Strodl
2024-08-24 14:25 ` Linus Walleij
2024-08-29 14:11   ` Mary Strodl
2024-09-05 15:18     ` Mary Strodl
2024-10-11 11:59       ` Linus Walleij
2024-10-11 14:09         ` Mary Strodl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5d26a74d-af5c-490a-8a00-ca0791bb23f6@kernel.org \
    --to=krzk@kernel.org \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mstrodl@csh.rit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).