Linux Tegra architecture development
 help / color / mirror / Atom feed
From: "andriy.shevchenko@linux.intel.com" <andriy.shevchenko@linux.intel.com>
To: Kartik Rajput <kkartik@nvidia.com>
Cc: Jon Hunter <jonathanh@nvidia.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"robert.marko@sartura.hr" <robert.marko@sartura.hr>,
	"arnd@kernel.org" <arnd@kernel.org>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"geert+renesas@glider.be" <geert+renesas@glider.be>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"jirislaby@kernel.org" <jirislaby@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"hvilleneuve@dimonoff.com" <hvilleneuve@dimonoff.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"schnelle@linux.ibm.com" <schnelle@linux.ibm.com>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH 2/2] serial: tegra-utc: Add driver for Tegra UART Trace Controller (UTC)
Date: Wed, 29 Jan 2025 12:11:55 +0200	[thread overview]
Message-ID: <Z5n-6z6SOSZy-BMW@smile.fi.intel.com> (raw)
In-Reply-To: <101d68c9789ef774c242d038a51b35113e6fbcc0.camel@nvidia.com>

On Wed, Jan 29, 2025 at 08:04:27AM +0000, Kartik Rajput wrote:
> On Wed, 2025-01-29 at 09:07 +0200, Andy Shevchenko wrote:
> > On Tue, Jan 28, 2025 at 12:16:33PM +0530, Kartik Rajput wrote:

...

> > > +     ret = of_property_read_u32(np, "current-speed", &tup-
> > > >baudrate);
> > 
> > Why not clock-frequency? But if needed, add this to the above
> > mentioned API as
> > I know more than one driver may utilise this.
> 
> "current-speed" is to specify the baudrate at which the UTC is
> operating. Not sure if "clock-frequency" is the ideal property for this
> as we are not configuring any clocks in the driver.

I didn't say anything about configuring clocks. The clock-frequency property is
standard way to provide a functional frequency of the UART (usually some MHz
crystal) which you can divide by the known HW coefficients and get the baud rate
(but yes, I agree that this is HW-dependent and needs to be thought through).

> Also, to add this in uart_read_port_properties() would require updating
> uart_port stucture to store the baudrate value. Would this be fine?

Sure, it requires some members to be defined beforehand.

> Asking because I do not see termios related configurations stored in
> uart_port structure.

Yeah, the only one is uartclk. But again, if you need current-speed to be
parsed, consider doing this in the uart_read_port_properties() and saving
as uartclk in the known way.
Technically it's possible to add a new member to uart_port, but it has
a lot of downsides as I can see: additional memory, added ambiguity to
how parse uartclk and current speed if they both are defined.

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2025-01-29 10:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-28  6:46 [PATCH 0/2] Add support for Tegra UART Trace Controller (UTC) client Kartik Rajput
2025-01-28  6:46 ` [PATCH 1/2] dt-bindings: serial: Add bindings for nvidia,tegra264-utc Kartik Rajput
2025-01-28  7:52   ` Krzysztof Kozlowski
2025-01-29  7:30     ` Kartik Rajput
2025-01-29 14:52       ` Thierry Reding
2025-01-28  6:46 ` [PATCH 2/2] serial: tegra-utc: Add driver for Tegra UART Trace Controller (UTC) Kartik Rajput
2025-01-29  7:07   ` Andy Shevchenko
2025-01-29  8:04     ` Kartik Rajput
2025-01-29 10:11       ` andriy.shevchenko [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=Z5n-6z6SOSZy-BMW@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=arnd@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=hvilleneuve@dimonoff.com \
    --cc=jirislaby@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=kkartik@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=robert.marko@sartura.hr \
    --cc=robh@kernel.org \
    --cc=schnelle@linux.ibm.com \
    --cc=thierry.reding@gmail.com \
    /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