Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3289163imm; Tue, 17 Jul 2018 02:10:52 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd+cqkjB+HFfpziLagvlsgindfdQm610dPfVJOQ8T1DNQrzqLxBVMs2bVRL7wcWGW/FO1eB X-Received: by 2002:a63:6e08:: with SMTP id j8-v6mr795303pgc.428.1531818652816; Tue, 17 Jul 2018 02:10:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531818652; cv=none; d=google.com; s=arc-20160816; b=ZAR12bt78nrLsXIwGA9QRw9vXdtSmlNAUj6DksZOjHo0Q++xt8N0ZXZW30n0T2nbup AaRagrMARhPJyHFGTvxf3iDyaF5yRtOCtt3rjHu1sv9VCz8+xUOnYaQm2r2PCw7GSV35 h08xBpX0wS3BwS6/gApx1ZL6fjQhTDLDWWqpmqZlEi3HI7HXDDxPoT6xapLlnpVDe3Z3 OzhYRRvSM3s6SYQ1Hruw7kVQhMoIMyjvcz3h1a9l8MBOOQGYfWMxlU93H8qcdiR8FdoA uEnY4cTR9liKNg52sbcC1mSZalhhwKMD1SqqltTSqy4q9jkAYauGbdJvhCgKgSrkhtgp cDVg== 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:arc-authentication-results; bh=D0A2fKHpesdcNMu7Yi/+X8RDvr1x1uFmvCzTP97FH6s=; b=wzes7tLHN5wQUIJs8f9H+tAdHpp0zsNsLDU7hPg3N+6EXdicyJ+rUBxCOkXfmA5zA6 m9QKiLL033Q3OgHhgF7ILPC8kLSzekCaTPdCEcvt6aZexbPvF7N7fT1gfiPPq3DoH9F1 KkRnm5j1f0p/fQhRLTHPXpU8L+vh8xR98XWR5eY5O3coV/RdmXjJRZgQrBknq//8Rt8u gEDV6pExejCUikmlShLe2AfKgrArVC0FqLTBr5ybg3RZRSi44ZoZ3d7Xb9u7TGcffnhE 4uH7CdhJuWW/2joMYXJLysiRaZl85UtlxkhSvp6cAXMCzoSmA78BhgLm8wZlX+wift3N lhcg== 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 c2-v6si460719pge.124.2018.07.17.02.10.37; Tue, 17 Jul 2018 02:10:52 -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 S1729719AbeGQJk7 (ORCPT + 99 others); Tue, 17 Jul 2018 05:40:59 -0400 Received: from sauhun.de ([88.99.104.3]:33922 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729060AbeGQJk6 (ORCPT ); Tue, 17 Jul 2018 05:40:58 -0400 Received: from localhost (p54B33605.dip0.t-ipconnect.de [84.179.54.5]) by pokefinder.org (Postfix) with ESMTPSA id 3DD1A5E000F; Tue, 17 Jul 2018 11:09:21 +0200 (CEST) Date: Tue, 17 Jul 2018 11:09:20 +0200 From: Wolfram Sang To: Phil Reid Cc: Wolfram Sang , linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org, kernel@pengutronix.de, Jarkko Nikula , Andy Shevchenko , Mika Westerberg , linux-kernel@vger.kernel.org Subject: Re: [PATCH/RFT 1/6] i2c: designware: use open drain for recovery GPIO Message-ID: <20180717090920.zy6lkeqlcewhrfs5@ninjato> References: <20180713210920.3648-1-wsa+renesas@sang-engineering.com> <20180713210920.3648-2-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tg455teebzxcygml" Content-Disposition: inline In-Reply-To: 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 --tg455teebzxcygml Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Phil, > > - gpio =3D devm_gpiod_get(dev->dev, "scl", GPIOD_OUT_HIGH); > > + gpio =3D devm_gpiod_get(dev->dev, "scl", GPIOD_OUT_HIGH_OPEN_DRAIN); > > if (IS_ERR(gpio)) { > > r =3D PTR_ERR(gpio); > > if (r =3D=3D -ENOENT || r =3D=3D -ENOSYS) > >=20 > > This was intentional. The gpio we use to drive the i2c line is implemente= d in an > FPGA and signals a buffer attached to the GPIO to drive scl OPEN drain. T= he GPIO is output > only. So, it is not possible to read SCL status then? Hmm, currently a working get_scl is required... > The gpio setup can still specify the the GPIO be allocated OPEN drain if = someone wishes > to use a "smarter" gpio. >=20 > So while the scl is open drain, there may be hardware in between that isn= 't. > What would the correct way be to deal with that now? Well, I don't know much about this IP core and how/where it is used. I just wonder what happens if another user comes along using an open-drain GPIO. Is that possible? I assume it is the same with SDA? Non open-drain? Output only? Regards, Wolfram --tg455teebzxcygml Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAltNskAACgkQFA3kzBSg KbZwbQ/+MJCShrVhonYuESLYY03BEi6p8a5WPFWHsZmTC4Nc8uuKXupxRvNP6qpy OdXYBJvLdhIjVRGbpV7MRQII/mYeXpC4hxaVoZhkInxpf07CwqMDUyNU9oiXC0yP kM0ONuHPZ/sjCWQSrASMZdu44JgMqZ61PV3FTWN+FBZZY/FEFy0jiem1LK4RupB3 J3ZrvOBzNE53yv1GLhXm4JvmYqOexkmm5NV2xJW/e1DB4LGNQvxgBxHmz1/1mMNE SkUSu125FR/6nhSizpr6Ftq/SC4AACPYmH+SXLCYh7GOtWCwY3ru2eWc5gBFoHkb pgjPV5H2GxCO38+IFPVSilH+9lMfc+BB/ykpXdLlo9wcIYBFU0g5ws4cY7/H4ZLL +FsJwFo3LZbNVVzA1xdT5OQmIQ5Y3ASN+Z2kJ5r3J0ZDRJrG6u5hUw0H/4/KVrm3 XcWZxxDr0L4xetggo007TvqD7tIt9qpPI94cgwKnkzR4ky65szKDJDynyswrjXID D1YjDkHwB6h+FfpIM/c9pWtSaR76NJ4J+f1ouF53NWSVANlUt+O7gDx6ugwDV05w BFfxq0iWvIKYtBuD9TjyH2HnMjJysHEfvtTsAImjsXtVEVq87L040UIxlEMz09fV j50YUzVql9wE2eQLncmIj2CV+xMhakex6SjkE6m7vLgumtQciZk= =L2Mj -----END PGP SIGNATURE----- --tg455teebzxcygml--