Linux I2C development
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Sumit Batra <sumit.batra@nxp.com>,
	Chuanhua Han <chuanhua.han@nxp.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	Leo Li <leoyang.li@nxp.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"festevam@gmail.com" <festevam@gmail.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	"wsa+renesas@sang-engineering.com"
	<wsa+renesas@sang-engineering.com>,
	"u.kleine-koenig@pengutronix.de" <u.kleine-koenig@pengutronix.de>,
	"eha@deif.com" <eha@deif.com>"linux@rempel-privat.de" <l>
Subject: Re: [EXT] Re: [PATCH 1/2] i2c: imx: I2C Driver doesn't consider I2C_IPGCLK_SEL RCW bit when using ls1046a SoC
Date: Thu, 9 May 2019 09:55:28 +0200	[thread overview]
Message-ID: <20190509075528.obzchc3midbjpvzs@katana> (raw)
In-Reply-To: <20190509074851.czcjlpfm2iooqjv4@pengutronix.de>

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


> > There are 2 places where clock division takes place -
> > 
> > 1) There is a clock divider outside of I2C block, which makes the clock reaching
> >    I2C module as - Platform Clock/2
> > 2) There is another clock divider which specifically divides the clock to the I2C block,
> >    based on RCW bit 424 (if 424th bit is 0 then the baud clock source is Platform Clock/4,
> >    if 424th bit is 1 then it remains Platform Clock/2)
> 
> So there is a clock divider which based on RCW bit 424 divides the clock
> *to* the i2c module. This suggests the divider is outside of the i2c
> module itself and thus part of the clock module.
> 
> We could argue that this divider sits between the clock module and the
> i2c module, but for sure it's not in the i2c module. I really suggest to
> put this SoC specific into the SoC specific clock driver rather than
> littering the i2c driver with it.

I am with Sascha here. The fact that you need to of_ioremap some
registers is a really strong indication that the code should go
somewhere else. I can't tell the best place (clock driver or seperate
GUTS driver or syscon driver), but the I2C bus driver seems not
suitable.


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

  reply	other threads:[~2019-05-09  7:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-30  4:47 [PATCH 1/2] i2c: imx: I2C Driver doesn't consider I2C_IPGCLK_SEL RCW bit when using ls1046a SoC Chuanhua Han
2019-04-30  4:47 ` [PATCH 2/2] arm64: dts: fsl: ls1046a: Add the guts node in dts Chuanhua Han
2019-05-06  7:41   ` Sascha Hauer
2019-05-06  7:44     ` [EXT] " Chuanhua Han
2019-05-08 11:38     ` Chuanhua Han
2019-04-30 12:50 ` [PATCH 1/2] i2c: imx: I2C Driver doesn't consider I2C_IPGCLK_SEL RCW bit when using ls1046a SoC Sascha Hauer
2019-05-04  9:28   ` [EXT] " Chuanhua Han
2019-05-06  7:37     ` Sascha Hauer
2019-05-06  7:46       ` Chuanhua Han
2019-05-08 11:34       ` Chuanhua Han
2019-05-09  4:35         ` Sumit Batra
2019-05-09  5:10           ` Sumit Batra
2019-05-09  7:48           ` Sascha Hauer
2019-05-09  7:55             ` Wolfram Sang [this message]
2019-05-06  7:47 ` Sascha Hauer
2019-05-06  7:53   ` [EXT] " Chuanhua Han
2019-05-08 11:42   ` Chuanhua Han

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=20190509075528.obzchc3midbjpvzs@katana \
    --to=wsa@the-dreams.de \
    --cc=chuanhua.han@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eha@deif.com \
    --cc=festevam@gmail.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=sumit.batra@nxp.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --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