From patchwork Fri Apr 15 13:32:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 562035 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6B63C433FE for ; Fri, 15 Apr 2022 13:37:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354071AbiDONkM (ORCPT ); Fri, 15 Apr 2022 09:40:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354092AbiDONkG (ORCPT ); Fri, 15 Apr 2022 09:40:06 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77F06BB0AA; Fri, 15 Apr 2022 06:36:13 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id u15so15361421ejf.11; Fri, 15 Apr 2022 06:36:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language :from:to:cc:references:in-reply-to:content-transfer-encoding; bh=amdgP1E8jI48xcX0gtNjukSdpBZkmgF/3KYhKkZ9D2Y=; b=phIEbvNYcustLt+DT+i+53RPM3x2Cxnt1PyGCb4C8iuLNT9EgEcuNiTouDwaTRaYZL dgJhhoabcpBQumuClKSY6K+lkUQNwOl/wNW9rzaa19QkEMV/KbUFlxP0Cc5sGXjR5rJc grbeW9IrKOsVSg6YQekb9q+jxhp7/CmblDSJbGM9q4tgC0ang6igqtwIfFlW4TcQrXuw QOfT9ULVd/j4EIb8qd7ysiLbMelDpLKkVXifU2jJJImBWk5LzUxDeUxRmIx1CZCCHByT o9RoEISLCRpXEqQGP/pF3OMCsTqzCRjtGjuqHTDIJa0bzZthNVuO+qB5hlBXEtCgnNiU 7/TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:from:to:cc:references:in-reply-to :content-transfer-encoding; bh=amdgP1E8jI48xcX0gtNjukSdpBZkmgF/3KYhKkZ9D2Y=; b=QmzFwq22D1cXeVObdrgkSfnt851NXuKrDq4XgeXnyG3siEb/QOI+VMWta9kZYkDjH2 BB/FJzdsmtZr8qydLZzkkbsnmN+DiE0+SnxqjPbyz4qA12cCltdywoePjyLpsPMjxVxd OVRRFRE+emIerP9MmLp1fOywV3MLqOAaZTH4PChMubAXlEYubRB9qk+KKXqY7284S969 Iubglxaxg8/bsE0J0LD2JQ7cuSfMRsJWnXb75PVeGxDQIl5W9+mJP6jGGdtEU7Tuqn5f PfwysmsptOrRqVawY0uvwlTDrkkPyQ2PbOSJBucYIVjZ8FKInCaQNlsm/BtWgjYYKYiX PXmg== X-Gm-Message-State: AOAM533GgHFqI7IfhL/sQ5M+Zg5vbPIjgLKRoDjaZS98KfmehTLAVTuq ir/+M7EYTcfTWkSuGp4dxTk= X-Google-Smtp-Source: ABdhPJwIKphohRo2zS1j300g6jgdjZcCvsV+fD8ssn26M5KJQYG1UQ9exWV9XqJmUBMiyBDTCnYkLg== X-Received: by 2002:a17:907:628e:b0:6d9:c6fa:6168 with SMTP id nd14-20020a170907628e00b006d9c6fa6168mr6272970ejc.132.1650029772003; Fri, 15 Apr 2022 06:36:12 -0700 (PDT) Received: from ?IPV6:2a01:c22:6faa:ed00:b906:e23f:946b:b9f7? (dynamic-2a01-0c22-6faa-ed00-b906-e23f-946b-b9f7.c22.pool.telefonica.de. [2a01:c22:6faa:ed00:b906:e23f:946b:b9f7]) by smtp.googlemail.com with ESMTPSA id e9-20020a17090618e900b006e8669f3941sm1677778ejf.209.2022.04.15.06.36.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Apr 2022 06:36:10 -0700 (PDT) Message-ID: Date: Fri, 15 Apr 2022 15:32:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: [PATCH 1/3] dt-bindings: i2c-gpio: Add property i2c-gpio,sda-output-only Content-Language: en-US From: Heiner Kallweit To: Rob Herring , Krzysztof Kozlowski , Wolfram Sang , Wolfram Sang Cc: "linux-i2c@vger.kernel.org" , "devicetree@vger.kernel.org" References: In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org This documents new property i2c-gpio,sda-output-only. Signed-off-by: Heiner Kallweit --- Documentation/devicetree/bindings/i2c/i2c-gpio.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-gpio.yaml b/Documentation/devicetree/bindings/i2c/i2c-gpio.yaml index fd0402845..25cd1b260 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-gpio.yaml +++ b/Documentation/devicetree/bindings/i2c/i2c-gpio.yaml @@ -33,6 +33,10 @@ properties: open drain. maxItems: 1 + i2c-gpio,sda-output-only: + description: sda as output only + type: boolean + i2c-gpio,scl-output-only: description: scl as output only type: boolean From patchwork Fri Apr 15 13:33:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 562034 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1E38C433F5 for ; Fri, 15 Apr 2022 13:37:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354077AbiDONkO (ORCPT ); Fri, 15 Apr 2022 09:40:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354093AbiDONkG (ORCPT ); Fri, 15 Apr 2022 09:40:06 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43199BB0B5; Fri, 15 Apr 2022 06:36:15 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id g18so15379925ejc.10; Fri, 15 Apr 2022 06:36:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language :from:to:cc:references:in-reply-to:content-transfer-encoding; bh=A4+ktht6E+aZpM5+3dwvgdmbjTzQMA5x6Q4uDTO6/dw=; b=KxEg9DTb7iIdGxmQkVo9U9yeKuk9RXZw5PHHTWvONV3+EsXrNviKmOLwuzdKCgNmKB 8J0V1sA7b8EmcVEOpJQRtD2UokXGhRrUpgqJR0wvFzJLd/6nkB7REv0gbmr+ghGebyZc dWvopDgnFilTD7DFYZdcCmQBeniYNAtA5rLJnbrGQyFCa+TMmqsTJBI3G8uDTQhZhbTW 55bSSVf65cR8PsAnfqYIEA/ATeV0t1JcW3+HQ9v4MD9a1V8hZ/WiOOsQTWg6QmOyVgZX rOL0aJhCHDYTpG5rcLQyuaNZex97qCB7M1YzRWlCyn9L9pmXW4FJ/0o0yUF6YItywQlZ orqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:from:to:cc:references:in-reply-to :content-transfer-encoding; bh=A4+ktht6E+aZpM5+3dwvgdmbjTzQMA5x6Q4uDTO6/dw=; b=57MigH5LOzipnsjBdPg1bEeXr3IGOdg0PhrpPyOkODxYsMISJuVnGnms7Svo4tmd4y 9hbdCi2kt1V6TkUHPdGcefB8KcElEHJBx9JTzsiMjAw5UlC3j49onoIP+hT/xBxri0Jx TeO0lGC4bDzfYfvJRbaGGiQ5AlTP99UWnZBf1gzTITtoxtR6Tat6hgNcBeW4sftm15wQ v5/ntLnoEyFCrEiLTe+nUssbCgk5h5VbbH35tZyYJYZX05pOQj4bEUzxeFM3tN6mL7mb OEKgmQyCxWkECqZLNOo9EF9z76AdddwLhDMk1gvPuKDbdXhuH6aabFp4Ul9+IYbVckqX sQhw== X-Gm-Message-State: AOAM530HFyO79ZkAwhjUMQuZF071r1p9d9AdlqhfGoO5Wn96bYjLvvgW 9F1QGy59wXOvnylOsTYodCNzbL30PRg= X-Google-Smtp-Source: ABdhPJzMwGjucRNSX+j1ngzeaTs7uxauWEXkMF3RrVSWt9xgXcKBo9tH3Yo1o4HtX5e7ubW0huu6sw== X-Received: by 2002:a17:907:168a:b0:6da:9177:9fdd with SMTP id hc10-20020a170907168a00b006da91779fddmr6321517ejc.757.1650029773734; Fri, 15 Apr 2022 06:36:13 -0700 (PDT) Received: from ?IPV6:2a01:c22:6faa:ed00:b906:e23f:946b:b9f7? (dynamic-2a01-0c22-6faa-ed00-b906-e23f-946b-b9f7.c22.pool.telefonica.de. [2a01:c22:6faa:ed00:b906:e23f:946b:b9f7]) by smtp.googlemail.com with ESMTPSA id f5-20020a17090624c500b006cee6661b6esm1728070ejb.10.2022.04.15.06.36.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Apr 2022 06:36:12 -0700 (PDT) Message-ID: <15e6fe6d-1ec4-09c0-a804-fb2760d1d033@gmail.com> Date: Fri, 15 Apr 2022 15:33:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: [PATCH 2/3] i2c: algo: bit: allow getsda to be NULL Content-Language: en-US From: Heiner Kallweit To: Rob Herring , Krzysztof Kozlowski , Wolfram Sang , Wolfram Sang Cc: "linux-i2c@vger.kernel.org" , "devicetree@vger.kernel.org" References: In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org This is in preparation of supporting write-only SDA in i2c-gpio. Signed-off-by: Heiner Kallweit --- drivers/i2c/algos/i2c-algo-bit.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c index fc90293af..ab5a73e90 100644 --- a/drivers/i2c/algos/i2c-algo-bit.c +++ b/drivers/i2c/algos/i2c-algo-bit.c @@ -184,8 +184,9 @@ static int i2c_outb(struct i2c_adapter *i2c_adap, unsigned char c) /* read ack: SDA should be pulled down by slave, or it may * NAK (usually to report problems with the data we wrote). + * Report ACK if SDA is write-only. */ - ack = !getsda(adap); /* ack: sda is pulled low -> success */ + ack = !adap->getsda || !getsda(adap); /* ack: sda is pulled low -> success */ bit_dbg(2, &i2c_adap->dev, "i2c_outb: 0x%02x %s\n", (int)c, ack ? "A" : "NA"); @@ -203,6 +204,9 @@ static int i2c_inb(struct i2c_adapter *i2c_adap) unsigned char indata = 0; struct i2c_algo_bit_data *adap = i2c_adap->algo_data; + if (!adap->getsda) + return -EOPNOTSUPP; + /* assert: scl is low */ sdahi(adap); for (i = 0; i < 8; i++) { @@ -232,6 +236,10 @@ static int test_bus(struct i2c_adapter *i2c_adap) const char *name = i2c_adap->name; int scl, sda, ret; + /* Testing not possible if both pins are write-only. */ + if (adap->getscl == NULL && adap->getsda == NULL) + return 0; + if (adap->pre_xfer) { ret = adap->pre_xfer(i2c_adap); if (ret < 0) @@ -670,8 +678,10 @@ static int __i2c_bit_add_bus(struct i2c_adapter *adap, if (ret < 0) return ret; - /* Complain if SCL can't be read */ - if (bit_adap->getscl == NULL) { + if (bit_adap->getscl == NULL && bit_adap->getsda == NULL) + dev_info(&adap->dev, "I2C-like interface, SDA and SCL are write-only\n"); + else if (bit_adap->getscl == NULL) { + /* Complain if SCL can't be read */ dev_warn(&adap->dev, "Not I2C compliant: can't read SCL\n"); dev_warn(&adap->dev, "Bus may be unreliable\n"); } From patchwork Fri Apr 15 13:35:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 562700 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AD43C433EF for ; Fri, 15 Apr 2022 13:37:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354080AbiDONkP (ORCPT ); Fri, 15 Apr 2022 09:40:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354096AbiDONkG (ORCPT ); Fri, 15 Apr 2022 09:40:06 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6FD8BB0BA; Fri, 15 Apr 2022 06:36:16 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id c6so9935826edn.8; Fri, 15 Apr 2022 06:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language :from:to:cc:references:in-reply-to:content-transfer-encoding; bh=2dA0epvc5N7hFjokHdhzA9rWHZSUiHXiHzxOnGfMxpU=; b=nSM0rLTRmSwkDd5hLrNSN3HsVr3JyqETDo/7IzxE9MrRJwnLU0X/5+CUvYj0WLsLZ2 6cYVEm4sC3Wb8BI6Wjw2ov4Ohe6nGXkupxmwa3ubCb5fbCr79GxIo9XrHnYhAw1A0Ora n97aHVtTOdtqNe4Q5gJFq1yQFWX8nplpa6y4MA3c2hae87VG1AMRLpshDHSYgSeTh/yS 2TOTf9q9MKa4VjLJfCeg12Wk6wFxCbTVI6sSj+RTMyNMe2QHml9+/gr0nLyGTezVLlQJ xyD/4YdnPfIHLZlwvUX3m+LXmNKOSnDullCPp5is+FIlNq5HnucsMaZEhaI+Uu8BC01R GppA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:from:to:cc:references:in-reply-to :content-transfer-encoding; bh=2dA0epvc5N7hFjokHdhzA9rWHZSUiHXiHzxOnGfMxpU=; b=QNrxM5zDDRe4M4siGjclNvUvTYl6Sc//FohMfIz1z3iCl/DxCYcDQTt6I9ZYBbeEBf x5HyJ3tvBCj2nrL1yx5JsGx30TwV7LXUixCVo2ni5/sFrUio1oDv51gD0QUb3PNL5qS1 dEOlMJdX+66UFal1DMyQXrYfS+/XQvyuwEbDNfW+biEq5A94tYb+PFB5Z+MbSj1Mjsqe GwgLj94TQ4QA7ou+amMYcgAkwg4K5/fvYcQiN7+CBMGN6Q+d2aS6G4Qu7ePbRT+JSyb3 0RKVUa6IpwGxmvd4bB2ascvzU+HBfS5Z42ZekPMWxBj/EUW6Jq52VbqoCch3PxMJ4JN6 zP7A== X-Gm-Message-State: AOAM5314mN8Dl9haMMxIS9ErYot36nIvS68H7jaoxVH+wjaRucwI1BBs TNI7dZYGK8i9jrxdgHuzXQ4= X-Google-Smtp-Source: ABdhPJw61r8DFzHBTa8cU7+3p5/gfze63H8SWyVbYK/jtnD8zHLPxyUF5Q3jI4eBXpP9VZvjFVnvMw== X-Received: by 2002:a05:6402:36d:b0:41d:7a5f:8393 with SMTP id s13-20020a056402036d00b0041d7a5f8393mr8181759edw.277.1650029775441; Fri, 15 Apr 2022 06:36:15 -0700 (PDT) Received: from ?IPV6:2a01:c22:6faa:ed00:b906:e23f:946b:b9f7? (dynamic-2a01-0c22-6faa-ed00-b906-e23f-946b-b9f7.c22.pool.telefonica.de. [2a01:c22:6faa:ed00:b906:e23f:946b:b9f7]) by smtp.googlemail.com with ESMTPSA id o15-20020a50fd8f000000b0041f95b8a90dsm2617410edt.69.2022.04.15.06.36.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Apr 2022 06:36:14 -0700 (PDT) Message-ID: Date: Fri, 15 Apr 2022 15:35:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: [PATCH 3/3] i2c: gpio: support write-only sda Content-Language: en-US From: Heiner Kallweit To: Rob Herring , Krzysztof Kozlowski , Wolfram Sang , Wolfram Sang Cc: "linux-i2c@vger.kernel.org" , "devicetree@vger.kernel.org" References: In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org There are slave devices that understand I2C but have read-only SDA and SCL. Examples are FD650 7-segment LED controller and its derivatives. Typical board designs don't even have a pull-up for both pins. Therefore don't enforce open-drain if SDA and SCL both are unidirectional. This patch makes i2c-gpio usable with such devices, based on new DT property i2c-gpio,sda-output-only. Signed-off-by: Heiner Kallweit --- drivers/i2c/busses/i2c-gpio.c | 14 +++++++++++--- include/linux/platform_data/i2c-gpio.h | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c index 7a048abbf..0a87af4a7 100644 --- a/drivers/i2c/busses/i2c-gpio.c +++ b/drivers/i2c/busses/i2c-gpio.c @@ -316,6 +316,8 @@ static void of_i2c_gpio_get_props(struct device_node *np, of_property_read_bool(np, "i2c-gpio,scl-open-drain"); pdata->scl_is_output_only = of_property_read_bool(np, "i2c-gpio,scl-output-only"); + pdata->sda_is_output_only = + of_property_read_bool(np, "i2c-gpio,sda-output-only"); } static struct gpio_desc *i2c_gpio_get_desc(struct device *dev, @@ -363,6 +365,7 @@ static int i2c_gpio_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; enum gpiod_flags gflags; + bool sda_scl_output_only; int ret; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); @@ -391,8 +394,12 @@ static int i2c_gpio_probe(struct platform_device *pdev) * marking these lines to be handled as open drain, and we should just * handle them as we handle any other output. Else we enforce open * drain as this is required for an I2C bus. + * If SCL/SDA both are write-only, then this indicates I2C-like slaves + * with read-only SCL/SDA. Such slaves don't need open-drain, and partially + * don't even work with open-drain. */ - if (pdata->sda_is_open_drain) + sda_scl_output_only = pdata->sda_is_output_only && pdata->scl_is_output_only; + if (pdata->sda_is_open_drain || sda_scl_output_only) gflags = GPIOD_OUT_HIGH; else gflags = GPIOD_OUT_HIGH_OPEN_DRAIN; @@ -400,7 +407,7 @@ static int i2c_gpio_probe(struct platform_device *pdev) if (IS_ERR(priv->sda)) return PTR_ERR(priv->sda); - if (pdata->scl_is_open_drain) + if (pdata->scl_is_open_drain || sda_scl_output_only) gflags = GPIOD_OUT_HIGH; else gflags = GPIOD_OUT_HIGH_OPEN_DRAIN; @@ -418,7 +425,8 @@ static int i2c_gpio_probe(struct platform_device *pdev) if (!pdata->scl_is_output_only) bit_data->getscl = i2c_gpio_getscl; - bit_data->getsda = i2c_gpio_getsda; + if (!pdata->sda_is_output_only) + bit_data->getsda = i2c_gpio_getsda; if (pdata->udelay) bit_data->udelay = pdata->udelay; diff --git a/include/linux/platform_data/i2c-gpio.h b/include/linux/platform_data/i2c-gpio.h index a907774fd..928c87b00 100644 --- a/include/linux/platform_data/i2c-gpio.h +++ b/include/linux/platform_data/i2c-gpio.h @@ -16,6 +16,7 @@ * isn't actively driven high when setting the output value high. * gpio_get_value() must return the actual pin state even if the * pin is configured as an output. + * @sda_is_output_only: I2C-like interface, SDA is write-only. * @scl_is_open_drain: SCL is set up as open drain. Same requirements * as for sda_is_open_drain apply. * @scl_is_output_only: SCL output drivers cannot be turned off. @@ -24,6 +25,7 @@ struct i2c_gpio_platform_data { int udelay; int timeout; unsigned int sda_is_open_drain:1; + unsigned int sda_is_output_only:1; unsigned int scl_is_open_drain:1; unsigned int scl_is_output_only:1; };