From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38F02C433E6 for ; Fri, 28 Aug 2020 07:04:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2938208C9 for ; Fri, 28 Aug 2020 07:04:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fBHqr0wn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2938208C9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=the-dreams.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bZ8SKrqMFgqr8hOb2jKdSILcwnfvUMqStdS0PgAf34o=; b=fBHqr0wnhdBKRlHpyThlI1FLM pHk20MnwRhnOb1sh1hBNbFVCAKst4F0mS9/BVtCUk4ojiIBXtzu4H9CAgAbSopaPzs8jrBmPXUw9c uvFdNrto6g85ipvK5PVQr5petr8YYa21Y85V5MaWGt1Xb0lWMKxb7lBWw1f6FK8TV8HfQyIsS6R7J j/hxy6JPtxMUt7Es5ghzNUU2ueCeQ75+5B6xph/rvE/qsTyo0p8vj7mNmihIZGFz3ByKXbKO3TM6N X6AijwcK1K1q28hvt+fSf4hcZbVjgdMpSDo0mgrf8TbERajRxXEPK/rM8VqV66CaCv+jYiQDfNAVQ mshEyjKvQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBYPh-0003Mh-3e; Fri, 28 Aug 2020 07:03:05 +0000 Received: from sauhun.de ([88.99.104.3] helo=pokefinder.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBYPa-0003Lc-LQ for linux-arm-kernel@lists.infradead.org; Fri, 28 Aug 2020 07:02:59 +0000 Received: from localhost (p54b3345c.dip0.t-ipconnect.de [84.179.52.92]) by pokefinder.org (Postfix) with ESMTPSA id 306812C0209; Fri, 28 Aug 2020 09:02:58 +0200 (CEST) Date: Fri, 28 Aug 2020 09:02:57 +0200 From: Wolfram Sang To: ext-jaakko.laine@vaisala.com Subject: Re: [PATCH 3/3] i2c: xiic: Support forcing single-master in DT Message-ID: <20200828070257.GC1343@ninjato> References: <20200827144848.12107-1-ext-jaakko.laine@vaisala.com> <20200827144848.12107-4-ext-jaakko.laine@vaisala.com> MIME-Version: 1.0 In-Reply-To: <20200827144848.12107-4-ext-jaakko.laine@vaisala.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200828_030258_869198_533E4A86 X-CRM114-Status: GOOD ( 18.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, michal.simek@xilinx.com Content-Type: multipart/mixed; boundary="===============6464726879729604798==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============6464726879729604798== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="raC6veAxrt5nqIoY" Content-Disposition: inline --raC6veAxrt5nqIoY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 27, 2020 at 05:48:48PM +0300, ext-jaakko.laine@vaisala.com wrot= e: > From: Jaakko Laine >=20 > I2C master operating in multimaster mode can get stuck > indefinitely if I2C start is detected on bus, but no master > has a transaction going. >=20 > This is a weakness in I2C standard, which defines no way > to recover, since all masters are indefinitely disallowed > from interrupting the currently operating master. A start > condition can be created for example by an electromagnetic > discharge applied near physical I2C lines. Or a already > operating master could get reset immediately after sending > a start. >=20 > If it is known during device tree creation that only a single > I2C master will be present on the bus, this deadlock of the > I2C bus could be avoided in the driver by ignoring the > bus_is_busy register of the xiic, since bus can never be > reserved by any other master. >=20 > This patch adds this support for detecting single-master flag > in device tree and when provided, improves I2C reliability by > ignoring the therefore unnecessary xiic bus_is_busy register. >=20 > Error can be reproduced by pulling I2C SDA -line temporarily low > by shorting it to ground, while linux I2C master is operating on > it using the xiic driver. The application using the bus will > start receiving linux error code 16: "Device or resource busy" > indefinitely: >=20 > kernel: pca953x 0-0020: failed writing register > app: Error writing file, error: 16 >=20 > With multi-master disabled device will instead receive error > code 5: "I/O error" while SDA is grounded, but recover normal > operation once short is removed. >=20 > kernel: pca953x 0-0020: failed reading register > app: Error reading file, error: 5 >=20 > Signed-off-by: Jaakko Laine Applied to for-next, thanks! --raC6veAxrt5nqIoY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl9IrCEACgkQFA3kzBSg KbazDw//T41/I1ZngKXPXT7w0I6sDxCIPHlevpaOVRTkfd9mMSETw5ZBx1BGDaeO NAe8tJVdrnmAYHJCGdQMUhp5VAqCtUBNDk0bIs46Y/esBSfRRudjBCAJkBD5BYrY 39FmOyWitzNJy1ycNeEVp30PuwXM0JWQIb7IQ8SBeA7HcSLyepRpSoahyv8I38th Aeq48fv+A+z/vHtmorOK9Pq7TmJzS7MqbG8lxAYwEX+2FwZrsUPH5QM6PMIqtM6e G5luAXDXAytrD/1hTfTsK8YPIM4Zq6jnarHwQ17KFX7G3Y4dp9Qbl28Q2WPIbRBY PSF6IJm3bVH0+DsziNuxw03Rh0BZfrtLrxTEu4QMXxfnKofHnxxh4ZbVaq8JFTES Drt57nB21CvJvg2Hh3lKtHwifC3QzjvPZHU8GUQ7+qD3NZwAVld64yK78RYfAP8M pcFP4YmpGJrjsx5vIdg0uWI8mneLT6y928+NCLVG2kv1JeQi5QeXuODahh7CcYG0 /7Agoe0kenJ6DuGXe0zGKa7xZiFXfKc46dBbx8uDupEDJBZWGEDL3lNrrrEcXwrX GyusDRedVVXZM3HdFc45gUECJScNAO+mhNIRmKuhH+sMzN4+0vqTqeug9HyzsO92 Xk80/G/eB4pKIyLVRYMLtexI6GibE94QbAu9DAr29XOI8RFC2vU= =+5f6 -----END PGP SIGNATURE----- --raC6veAxrt5nqIoY-- --===============6464726879729604798== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============6464726879729604798==--