public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Judith Mendez <jm@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jiri Slaby <jirislaby@kernel.org>,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	Hari Nagalla <hnagalla@ti.com>
Subject: Re: [PATCH RFC 2/2] serial: 8250: Add PRUSS UART driver
Date: Fri, 9 May 2025 14:43:21 +0300	[thread overview]
Message-ID: <aB3qWWgWfs6fDTgg@smile.fi.intel.com> (raw)
In-Reply-To: <22de0384-974d-4170-8181-e43cc90aab9d@ti.com>

On Thu, May 08, 2025 at 05:09:03PM -0500, Judith Mendez wrote:
> On 5/2/25 4:50 AM, Andy Shevchenko wrote:
> > On Wed, Apr 30, 2025 at 07:31:13PM -0500, Judith Mendez wrote:

...

> > The list of the inclusions is semi-random. Please, follow the IWYU principle.

This and other comments left unanswered, why? What does this mean? Usual way is
to remove the context with all what you are agree on and discuss only stuff
that needs more elaboration.

Ah, I see now the P.S., but please also remove the context you agree with next
time.

> > > +#include <linux/clk.h>
> > > +#include <linux/module.h>
> > > +#include <linux/serial_reg.h>
> > > +#include <linux/serial_core.h>
> > 
> > > +#include <linux/of_irq.h>
> > > +#include <linux/of_address.h>
> > > +#include <linux/of_platform.h>
> > 
> > Please, no of*.h in a new code.
> 
> Will only keep linux/of_platform.h for of_device_id struct.

Hmm... Is it really the header where it's defined? (I know the answer,
but want you to perform some research.)

> > > +#include <linux/remoteproc.h>
> > 
> > Keep them ordered as well.
> > 
> > + blank line here.
> > 
> > > +#include "8250.h"

...

> > > +	/* Old custom speed handling */
> > > +	if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST) {
> > > +		quot = port->custom_divisor & UART_DIV_MAX;
> > > +		if (port->custom_divisor & (1 << 16))
> > > +			*frac = PRUSS_UART_MDR_13X_MODE;
> > > +		else
> > > +			*frac = PRUSS_UART_MDR_16X_MODE;
> > > +
> > > +		return quot;
> > > +	}
> > 
> > Why?! Please, try to avoid adding more drivers with this ugly hack.
> 
> My understanding is that this is not a hack, for 38400 we need to pass
> as custom baud. What is the alternative here?

BOTHER. The 38400 is a hack, you lie to the stakeholders that you are at 38.4,
while in real life it means anything.

> I see other drivers are doing this as well, will look into this further
> but not sure if there is a better solution for this.

BOTHER is the solution. Not perfect, but the existing one.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-05-09 11:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-01  0:31 [PATCH RFC 0/2] Introduce PRU UART driver Judith Mendez
2025-05-01  0:31 ` [PATCH RFC 1/2] dt-bindings: serial: add binding documentation for TI PRUSS UART Judith Mendez
2025-05-01  0:31 ` [PATCH RFC 2/2] serial: 8250: Add PRUSS UART driver Judith Mendez
2025-05-01 16:28   ` Andrew Davis
2025-05-08 22:11     ` Judith Mendez
2025-05-02  9:50   ` Andy Shevchenko
2025-05-08 22:09     ` Judith Mendez
2025-05-09 11:43       ` Andy Shevchenko [this message]
2025-05-13  0:06         ` Judith Mendez
2025-05-01  5:18 ` [PATCH RFC 0/2] Introduce PRU " Greg Kroah-Hartman
2025-05-01 14:47   ` Judith Mendez
2025-05-02  9:51     ` Andy Shevchenko
2025-05-02 22:07       ` Judith Mendez
2025-05-02  9:38 ` Andy Shevchenko
2025-05-07 16:31   ` Judith Mendez

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=aB3qWWgWfs6fDTgg@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hnagalla@ti.com \
    --cc=jirislaby@kernel.org \
    --cc=jm@ti.com \
    --cc=khilman@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.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