Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp490404yba; Thu, 9 May 2019 00:56:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxnqdR+O+RiouFygkudbyHs7sVbT/OcIIu1ntkRhmbtBPnzTkhNEEgS/GLHTMaogBVDvDWY X-Received: by 2002:a62:3381:: with SMTP id z123mr3212299pfz.42.1557388602333; Thu, 09 May 2019 00:56:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557388602; cv=none; d=google.com; s=arc-20160816; b=XMQTSKFpYO9Bzad0eGuSTpyZQcbLHqe+kXDm9d1717s69oeEFNurzCeL6uXw8i5oIL 8ZdXp24MIV3pR9rfWxtGUDd2r38gdCTGdeoCNl1oaekixu7yFKBlCZ18Z2qMu9kde1Xs QzDf5y9lMSv7e8uc9UYi5dh40elMoRFrNmuB2ZBSAfse09cZYN7S1sOT/SG73FbbpMHT 49iG3yFNhgIoIgKg8znwxrsNszO5g7xUeAc4dz3Ndz/qzLth7b8ggbFiDnr678hgX21X 8P012bYb34guGzwGGtmU3GFN3WziES6dW5qjSlZElqqXcQXxgzVdAJpMzte7qHeOl9Lg DnRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=gdoji11qH57wSpqyDO8wtKC0iD+HluCisS7gwx1Faok=; b=w2KDRB47+m9+8fp9h/92QzDl/r3KmYs7c9T1tvladdSVobrBiRYBcyGCEASFt6xs+m CqIgL38blPGU9+FVlaAbrq06WE8p4T37go+MjXJvjOPbwYLUT74AG5hCeaUq+6gPUAAY gi3IvS1qmZrE06g0Eh2kOxVryM4lJwGqlLT8g3wKke2pSqIO2Xy20HbIehgQo7xisYTD CudRE05O0XF/fb/jHk4oL/lPfu7DiomUH1ZR375XbK/CxXQQCGdlFN2QEQZCu4bxOmO0 X0ZQTvsnLJjccj7ntol42ZSS6BEuzhU0z+5G0XGUOHGYHrWe+s529ZdD0smQVLk1vVYP CkYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si1848405pgp.378.2019.05.09.00.56.25; Thu, 09 May 2019 00:56:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726597AbfEIHzg (ORCPT + 99 others); Thu, 9 May 2019 03:55:36 -0400 Received: from sauhun.de ([88.99.104.3]:59382 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725774AbfEIHzf (ORCPT ); Thu, 9 May 2019 03:55:35 -0400 Received: from localhost (p54B33113.dip0.t-ipconnect.de [84.179.49.19]) by pokefinder.org (Postfix) with ESMTPSA id E8C702E3571; Thu, 9 May 2019 09:55:31 +0200 (CEST) Date: Thu, 9 May 2019 09:55:28 +0200 From: Wolfram Sang To: Sascha Hauer Cc: Sumit Batra , Chuanhua Han , "shawnguo@kernel.org" , Leo Li , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "linux-kernel@vger.kernel.org" , "linux-i2c@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "festevam@gmail.com" , dl-linux-imx , "wsa+renesas@sang-engineering.com" , "u.kleine-koenig@pengutronix.de" , "eha@deif.com" , "linux@rempel-privat.de" , "l.stach@pengutronix.de" , "peda@axentia.se" Subject: Re: [EXT] Re: [PATCH 1/2] i2c: imx: I2C Driver doesn't consider I2C_IPGCLK_SEL RCW bit when using ls1046a SoC Message-ID: <20190509075528.obzchc3midbjpvzs@katana> References: <20190430044719.30720-1-chuanhua.han@nxp.com> <20190430125043.weqwzim4gpsvtkfe@pengutronix.de> <20190506073735.ctzybytamu44pbvv@pengutronix.de> <20190509074851.czcjlpfm2iooqjv4@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gv6qjm3xh6s2jhl3" Content-Disposition: inline In-Reply-To: <20190509074851.czcjlpfm2iooqjv4@pengutronix.de> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gv6qjm3xh6s2jhl3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > There are 2 places where clock division takes place - > >=20 > > 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 i= s Platform Clock/4, > > if 424th bit is 1 then it remains Platform Clock/2) >=20 > 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. >=20 > 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. --gv6qjm3xh6s2jhl3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAlzT3OsACgkQFA3kzBSg KbbgNQ/8CGasqnfiTpZ11DFig8JEAVVpHiW7URbOcwfSNliiGRcajU0Z15c9dQrB FXq50Xgz1DAf+yhNgfWk28gZ9DdbGEdEvRUyZsW1oq/Vf2vJEx5wBQUB04Rw12KS 6OjdgBK1mWDHsbRcI7/Ug9nL2gWPTz/u0bzL9btM/AT7CDnKi+CiLlcjqrLGWT0b KasALzS/AfnrtXTqyNL2wdqkTZC6wrdjgiUswYQ1Yr065NZnHxrH/zR6RgOIA1ya p5A//ME3DiCQRLToYXM8KU8Rb/PW29n1GtefaiFyrrhXAg7ZPfR4y8n+AQTkgPUq 2Mcpz2nRod1e79YpgYm5+XpcTD7bgV7XZD8RH9uPKfpAW0W33QP0OFKG92RigTTW 6mJRvtus8S3VfaHatBupH/kQsnoyZXktZXRAdgWEa713zybXoGUzwvQICnJAUp5T sB2LxykMYyb8T862XbNzQtC+0cCDotY4ZZ2plIOlUrNomf37ZunQu5/uEecPf6s6 2MlVlzgTYTwG6lz5WxkZ6A2RTnx8rXvcr7jwo7wwVcjf9W2erTR18+tqU7bmtrol qh1V0XeufPewhKfCmSR+9yyP029AP4cwdRHNQNsg9oDQGzqYZxhHSKH1IMBt2PI1 Ozxlx/gjom3K5yCe1tWBIG0yzxnFvXJBHgGKimBFmYt4I8Eh2Uo= =q/1n -----END PGP SIGNATURE----- --gv6qjm3xh6s2jhl3--