public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Peter Rosin <peda@axentia.se>,
	Michael Hennerich <michael.hennerich@analog.com>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Andi Shyti <andi.shyti@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v7 3/5] i2c: davinci: calculate bus freq from Hz instead of kHz
Date: Mon, 9 Mar 2026 12:14:15 +0100	[thread overview]
Message-ID: <aa6rhyZLhPY7aE-D@gmail.com> (raw)
In-Reply-To: <aZxrZbbXxm31q62s@smile.fi.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]

Hi Andy,

On Mon, Feb 23, 2026 at 04:59:49PM +0200, Andy Shevchenko wrote:
> On Mon, Feb 23, 2026 at 03:33:52PM +0100, Marcus Folkesson wrote:
> > The bus frequency is unnecessarily converted between Hz and kHz in
> > several places.
> > This is probably an old legacy from the old times (pre-devicetrees)
> > when the davinci_i2c_platform_data took the bus_freq in kHz.
> > 
> > Stick to Hz.
> 
> ...
> 
> > -	clk = ((input_clock / (psc + 1)) / (dev->bus_freq * 1000));
> > +	clk = ((input_clock / (psc + 1)) / (dev->bus_freq_hz));
> 
> Two pairs too many parentheses!
> 
> 	clk = (input_clock / (psc + 1)) / dev->bus_freq_hz;
> 
> ...
> 
> > +	dev_dbg(dev->dev, "bus_freq_hz = %dHz\n", dev->bus_freq_hz);
> 
> %u ?


Thank you for your comments, both this and the other.

This driver has a a few  other style & formatting issues, would you prefer
to fix those in a separate patch in this patchset or in a following one?

> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

Thanks,
Marcus Folkesson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-03-09 11:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 14:33 [PATCH v7 0/5] I2C Mux per channel bus speed Marcus Folkesson
2026-02-23 14:33 ` [PATCH v7 1/5] i2c: core: add callback to change bus frequency Marcus Folkesson
2026-02-23 14:53   ` Andy Shevchenko
2026-02-23 14:55     ` Andy Shevchenko
2026-02-23 14:33 ` [PATCH v7 2/5] i2c: mux: add support for per channel " Marcus Folkesson
2026-02-23 14:57   ` Andy Shevchenko
2026-02-23 14:33 ` [PATCH v7 3/5] i2c: davinci: calculate bus freq from Hz instead of kHz Marcus Folkesson
2026-02-23 14:59   ` Andy Shevchenko
2026-03-09 11:14     ` Marcus Folkesson [this message]
2026-03-09 11:33       ` Andy Shevchenko
2026-02-23 14:33 ` [PATCH v7 4/5] i2c: davinci: add support for setting bus frequency Marcus Folkesson
2026-02-23 15:01   ` Andy Shevchenko
2026-02-23 14:33 ` [PATCH v7 5/5] docs: i2c: i2c-topology: add section about bus speed Marcus Folkesson

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=aa6rhyZLhPY7aE-D@gmail.com \
    --to=marcus.folkesson@gmail.com \
    --cc=andi.shyti@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=brgl@bgdev.pl \
    --cc=brgl@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=peda@axentia.se \
    --cc=wsa+renesas@sang-engineering.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