From: Andy Shevchenko <andy@kernel.org>
To: Andre Werner <andre.werner@systec-electronic.com>
Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org,
hvilleneuve@dimonoff.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
lech.perczak@camlingroup.com, krzk+dt@kernel.org,
conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v6 2/2] serial: sc16is7xx: Add polling mode if no IRQ pin is available
Date: Mon, 13 Jan 2025 14:51:11 +0200 [thread overview]
Message-ID: <Z4UMP1-0x25g1fX2@smile.fi.intel.com> (raw)
In-Reply-To: <20250113073030.15970-2-andre.werner@systec-electronic.com>
On Mon, Jan 13, 2025 at 08:30:30AM +0100, Andre Werner wrote:
> Fall back to polling mode if no interrupt is configured because there
> is no possibility to connect the interrupt pin.
> If "interrupts" property is missing in devicetree the driver
> uses a delayed worker to pull the state of interrupt status registers.
pull ? Hmm...
...
> V6:
> - Use polling mode for IRQ numbers <= 0 which encounter no valid IRQ
> were found/defined.
Thanks, this part looks better now.
...
> +static void sc16is7xx_poll_proc(struct kthread_work *ws)
> +{
> + struct sc16is7xx_port *s = container_of(ws, struct sc16is7xx_port, poll_work.work);
> +
> + /* Reuse standard IRQ handler. Interrupt ID is unused in this context. */
Period.
> + sc16is7xx_irq(0, s);
> +
> + /* Setup delay based on SC16IS7XX_POLL_PERIOD_MS */
No period.
> + kthread_queue_delayed_work(&s->kworker, &s->poll_work,
> + msecs_to_jiffies(SC16IS7XX_POLL_PERIOD_MS));
> +}
Please, go through the comments you added in the patch and use the style that
is mostly used in the driver for the similar (one-line comment) situations.
...
> + /* Initialize kernel thread for polling */
Again, no period.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-01-13 12:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-13 7:30 [PATCH v6 1/2] dt-bindings: serial: sc16is7xx: Add description for polling mode Andre Werner
2025-01-13 7:30 ` [PATCH v6 2/2] serial: sc16is7xx: Add polling mode if no IRQ pin is available Andre Werner
2025-01-13 12:51 ` Andy Shevchenko [this message]
2025-01-13 13:02 ` [External Email] " Andre Werner
2025-01-13 13:11 ` Andy Shevchenko
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=Z4UMP1-0x25g1fX2@smile.fi.intel.com \
--to=andy@kernel.org \
--cc=andre.werner@systec-electronic.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hvilleneuve@dimonoff.com \
--cc=jirislaby@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lech.perczak@camlingroup.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=robh@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