mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum via B4 Relay <devnull+a.fatoum.barebox.org@kernel.org>
Cc: BAREBOX <barebox@lists.infradead.org>,
	Ahmad Fatoum <a.fatoum@barebox.org>
Subject: Re: [PATCH] input: usb_kbd: make polling interval configurable
Date: Tue, 15 Oct 2024 09:47:22 +0200	[thread overview]
Message-ID: <Zw4eCkcezQBu55b9@pengutronix.de> (raw)
In-Reply-To: <20241014-usb_kbd-polling_interval-v1-1-92309deabaf2@barebox.org>

On Mon, Oct 14, 2024 at 05:32:38PM +0200, Ahmad Fatoum via B4 Relay wrote:
> From: Ahmad Fatoum <a.fatoum@barebox.org>
> 
> We currently use whatever polling interval the keyboard reports, but in
> some keyboard it can be useful to set a lower interval, e.g. for better
> control of the snake in the barebox demo[1].
> 
> Add a parameter to make this possible.
> 
> [1]: https://fosstodon.org/@barebox/112983807569839989
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
> ---
>  drivers/input/usb_kbd.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/input/usb_kbd.c b/drivers/input/usb_kbd.c
> index 2e75aabf3da4..d47e760a89ee 100644
> --- a/drivers/input/usb_kbd.c
> +++ b/drivers/input/usb_kbd.c
> @@ -169,6 +169,11 @@ static int usb_kbd_probe(struct usb_device *usbdev,
>  	data->intpktsize = min(usb_maxpacket(usbdev, data->intpipe),
>  			       USB_KBD_BOOT_REPORT_SIZE);
>  	data->intinterval = data->ep->bInterval;
> +
> +	dev_add_param_uint32(&usbdev->dev, "polling_interval",
> +			     NULL, NULL, &data->intinterval, "%u",
> +			     NULL);

Should be polling_interval_ms to make it more clear what is expected
here.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      reply	other threads:[~2024-10-15  7:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14 15:32 Ahmad Fatoum via B4 Relay
2024-10-15  7:47 ` Sascha Hauer [this message]

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=Zw4eCkcezQBu55b9@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=a.fatoum@barebox.org \
    --cc=barebox@lists.infradead.org \
    --cc=devnull+a.fatoum.barebox.org@kernel.org \
    /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