Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4314518pxf; Tue, 16 Mar 2021 10:22:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUASkv2PSC7x6Mj6k7xGWiW8EQBiZquBDurSG51q6taEM4tKzVOsRvhNOAeA9OS8xeJ28w X-Received: by 2002:a05:6402:1d33:: with SMTP id dh19mr36858194edb.362.1615915344511; Tue, 16 Mar 2021 10:22:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615915344; cv=none; d=google.com; s=arc-20160816; b=xnK+Pd8CHhonK9yquU+6ZsRKgClQ7eUNQEycS17UJ843B9YVxfzrTaHBXemGXY4oer 3dvjT080noeRRlEHEFy3792yZG/MX6L81fGyne77Mf0iQoZPDIXXNO0neCV13+M3SaYL BlBmZ+PwbGpiuJ7xS+6tzRe8LCMx8dAc9s/IrTMr1dyidr7nTop3li8HuXIQeHkyjXo3 guHHs4W63zQO3FzWTQjPKIh4jkfEFY5kjhuqfu7dCNopAxUikUBHqp72UGNw+0LUDL+z IAQSnfMCo4pzYbY0J8EH0/8Z6FbGLrux+Df7cWB2E6Zg7Ys2YOPSLbKzaWmHC2DDzms+ 02Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=05U73IxY49l9mDFTBQgw9uRw0MCIPYqs1gdMaXeV3JE=; b=yTkehKWhuuOEMJNReOcWiMX/P54mUlzC1MH0Wgc+dnVmflepSf1jUGhgNbn9deFeQ4 6J1daOz90l/UEryqVsImTflFV7aYlkLdJ+DZhAWauE1kjfrhmlVTLrG5kW/X+bBFHMPd RYaW6XsiWRGH0wAPbhZM08VyPOf/EfbnRsBntCmjMGAvKrHT0Nu04KMIt282QhDH9SLB DXiffw/Auvmr40Y86zOQnJ53O7bZYJVchPk8g8jJ6+IZC8VKZYyHSSjDOHCfzNN7XsIn KcA7qv6btX2Nn4QLdBL8Gcc/ivCFDXiINnj/q18oifCiidn4rX7gCSk0PVMi84c21ALV Y2ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="t+wbp/m2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g19si14179742ejf.52.2021.03.16.10.22.01; Tue, 16 Mar 2021 10:22:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="t+wbp/m2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237036AbhCPRBA (ORCPT + 99 others); Tue, 16 Mar 2021 13:01:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:49080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236981AbhCPRAl (ORCPT ); Tue, 16 Mar 2021 13:00:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 476A465111; Tue, 16 Mar 2021 17:00:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615914036; bh=05U73IxY49l9mDFTBQgw9uRw0MCIPYqs1gdMaXeV3JE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=t+wbp/m2eh4KPu2YTm1+UO/RugfabPnV3zNooKcLOtWWFrZ1DY4R2kNcC7sSQkbRZ E1kS3fC8+F0NnxDPZHtlKBQPlWxUEWSEGA/ZVDobK9ZrsJzFr0nnr9GC9+jrFx2vzx 5TmwQH7y/RTcSGpbgqt3jcBac48j+zS9yyCctIHXRTIa4kYwPvHML+D8Kk4DiqJKW/ YvtWqUA9M35pwscRAi9XuoIL7gGZ2G9IDHJSVvAwZuXTBN8+wghW3jQaGtIQR+Fpty y+ffHaWc4juNyMDE+M6yO5t5cc7A1MGEG7HzbnTwmNlO8Of44XxNcTXLMcbtR+Zyfh YDVtlwyhC6N3A== Date: Tue, 16 Mar 2021 18:00:33 +0100 From: Wolfram Sang To: Mark Jonas Cc: Support Opensource , Lee Jones , linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Adam.Thomson.Opensource@diasemi.com, stwiss.opensource@diasemi.com, marek.vasut@gmail.com, tingquan.ruan@cn.bosch.com, hubert.streidl@de.bosch.com Subject: Re: [PATCH v6 1/1] mfd: da9063: Support SMBus and I2C mode Message-ID: <20210316170033.GB1110@ninjato> References: <20210316162237.877436-1-mark.jonas@de.bosch.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kVXhAStRUZ/+rrGn" Content-Disposition: inline In-Reply-To: <20210316162237.877436-1-mark.jonas@de.bosch.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --kVXhAStRUZ/+rrGn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 16, 2021 at 05:22:37PM +0100, Mark Jonas wrote: > From: Hubert Streidl >=20 > By default the PMIC DA9063 2-wire interface is SMBus compliant. This > means the PMIC will automatically reset the interface when the clock > signal ceases for more than the SMBus timeout of 35 ms. >=20 > If the I2C driver / device is not capable of creating atomic I2C > transactions, a context change can cause a ceasing of the clock signal. > This can happen if for example a real-time thread is scheduled. Then > the DA9063 in SMBus mode will reset the 2-wire interface. Subsequently > a write message could end up in the wrong register. This could cause > unpredictable system behavior. >=20 > The DA9063 PMIC also supports an I2C compliant mode for the 2-wire > interface. This mode does not reset the interface when the clock > signal ceases. Thus the problem depicted above does not occur. >=20 > This patch tests for the bus functionality "I2C_FUNC_I2C". It can > reasonably be assumed that the bus cannot obey SMBus timings if > this functionality is set. SMBus commands most probably are emulated > in this case which is prone to the latency issue described above. >=20 > This patch enables the I2C bus mode if I2C_FUNC_I2C is set or > otherwise keeps the default SMBus mode. >=20 > Signed-off-by: Hubert Streidl > Signed-off-by: Mark Jonas Reviewed-by: Wolfram Sang --kVXhAStRUZ/+rrGn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmBQ5DEACgkQFA3kzBSg KbZSJw//WSvavoNZA3U9LAgm5FpQsMZCe/A5A74TjybIM89va6ZOyalu341WhEBz DoTjedJYuiCzK2Dh8qHjLaxChrkTPlM8wYQ+hgA7irVb2rM16cCwttoBd1QDcJIK lz6iNxZpRonfLCsqB14+LHTgvW+k1mRzjd9pIE1e04+fekb/258zabo5lvM6N8KQ 0TaYfBGVzIiG/9R7bNw59cE/FK+nwDjUYrEf8o+2hoWe97eCbJcGNkkSYv0hkgO4 q3HZ2TXZSSOaxVL9lPvk/sMYT7Y+eeHQZbpncKrprvuMSWFHtFDqMC78YJmCyujA fXMM6B0QMslwXLBhuuChEiUBm+1Bz+4REDGI0UBpFd8oIN97WP6n19o4zoQXQEqA Ld9I6K9hgeb40BHg6tyzr7HOR5pSu4gkipXqxIkPKqxtKBr7shrUzlSIojX9oI4N 3kpXQSiu9Lxweg6SFMSqbmF5xokYqVu/KpkxCDuI/B0eFJUSA2Enx92Y8PgF8NTT C/ajwx/b1VQ8s29kwcSv5y4YivWSz2bbRQNgwe6QAUBgZCi2U2qIM1Q+LfV8E3le pD+6V4PpFwveB0T44iCCxp8nSddP6mDsJtK2QC8gLibXAOf4aK7a9be9FBFH7bv7 ASnBOacxDRNSQJd5jMvG6TVD/N+MMKODVQQPkWW7LVVnY3sBJwI= =FXQ3 -----END PGP SIGNATURE----- --kVXhAStRUZ/+rrGn--