Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp696390ybl; Fri, 30 Aug 2019 05:57:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1u5TdIz2T1PCUYAYFmg0Ew9zKQg6gJIAih9lIE7f6PNiXe6WwF7LUDeg3qx82ddsgRjP6 X-Received: by 2002:a63:ea50:: with SMTP id l16mr13173199pgk.160.1567169867871; Fri, 30 Aug 2019 05:57:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567169867; cv=none; d=google.com; s=arc-20160816; b=STcCMlePTI20gCJXTap+W8nEhaIUdLsl/NylRg+XeOTBVfD6NGxrSDNsaJlzQIymzK Ysoynaw7Q2pg/it4ED8RrMw/aMCxf+AfwZfwNi/eoUnrRTT4m2GOLafUh+3gtdWLnyrT h+aGWgFgcLZeDUSaFGPsr1ixRnrb5IOLcec7GFoMBA+enmqAz3mSjXMNgmcqeFxy0fS1 WEbwOKjjkqMn/xryTu3JXjt7FbAKUlWSeHe658sV75HtQ53fbWXY2wAVDDdporany00p E3yDXZMu0vaBJkNhpHU4J0ui7kdOhGdoljskxiFCRVb8GgAB0CyvndvQnhEdeQ5uiy43 Rmvw== 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=scEvX6tEuHAcXzNv34IQETwDVWGy25EGm+M3j9ueSZ8=; b=eqRy1/8e86rFYAPAQJEHXm+0b9Sw89XBh+VwhyeRkjeoXoeAgDcX4LF7HR5Ni9iGFY xMicrYklwo5m/wvsvDL+zLbvL9B2MX08uL4MePHHkXbaI8MtlUq1E90uonpMoFPsWH1l 4OsEvlLGn+uDaC4zHkU2K3ArQh8tJYdx9kXb4drgGodEMDXJAQ8Kj1OVK+cBm77ukher UaO6rzl2cZzFOz4943MnxAEPmYx1Le8Ssx7o/T4CPnxcj4kzdNgqI5PyhbVFcSRcYuQ9 Pnn5iv5QXsKGbgeKlDsG97DmWfwQAbQ6+42Biez99klG3LJZEuYtr7GNE29J4kZDIxXM +Xvw== 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 m10si4862799pjn.15.2019.08.30.05.57.32; Fri, 30 Aug 2019 05:57:47 -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 S1727901AbfH3M42 (ORCPT + 99 others); Fri, 30 Aug 2019 08:56:28 -0400 Received: from sauhun.de ([88.99.104.3]:53618 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727718AbfH3M42 (ORCPT ); Fri, 30 Aug 2019 08:56:28 -0400 Received: from localhost (p54B335BE.dip0.t-ipconnect.de [84.179.53.190]) by pokefinder.org (Postfix) with ESMTPSA id 922732C0095; Fri, 30 Aug 2019 14:56:26 +0200 (CEST) Date: Fri, 30 Aug 2019 14:56:26 +0200 From: Wolfram Sang To: Rayagonda Kokatanur Cc: Rob Herring , Mark Rutland , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Ray Jui , Florian Fainelli , Lori Hikichi , Icarus Chau , Shivaraj Shetty Subject: Re: [PATCH v1 1/1] i2c: iproc: Add i2c repeated start capability Message-ID: <20190830125626.GC2870@ninjato> References: <1565150941-27297-1-git-send-email-rayagonda.kokatanur@broadcom.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qjNfmADvan18RZcF" Content-Disposition: inline In-Reply-To: <1565150941-27297-1-git-send-email-rayagonda.kokatanur@broadcom.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --qjNfmADvan18RZcF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi everyone, > +/* > + * If 'process_call' is true, then this is a multi-msg transfer that requires > + * a repeated start between the messages. > + * More specifically, it must be a write (reg) followed by a read (data). > + * The i2c quirks are set to enforce this rule. > + */ With all the limitations in place, I wonder if it might be easier to implement an smbus_xfer callback instead? What is left that makes this controller more than SMBus and real I2C? > + /* Process the read message if this is process call */ Also, the term "process call" here seriously sounds like SMBus. > + addr = msg->addr << 1 | 1; addr = i2c_8bit_addr_from_msg(msg); > + u32 protocol; Hmm, another SMBus terminology. > + if (num > 2) { > + dev_err(iproc_i2c->device, > + "Only support up to 2 messages. Current msg count %d\n", > + num); > + return -EOPNOTSUPP; > + } With your quirks flags set, the core checks it for you. Kind regards, Wolfram --qjNfmADvan18RZcF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl1pHPkACgkQFA3kzBSg Kba6Ww/+MiQX21OGgbWmV1RzOJTJcm22OqliAmcBgIMJnQ3TB9Uoo0xpA4XkwD1z tHnXk1VKf4NsN7NLnoGRG8hYHwZLIElSTQz89eP/PMCmNnj5pu0ebgfP9X+NvC84 vbFUN3fhmdhMlzvWlS/ixiEbvFud28JxJE9YAOpSDv+3sTMDM/EB2rTLk+tF1Hrn +L3B0D2C99gN/fm9kakCYow3FBCXEIwv2CSok5YQ2OXPdteG/rSNnm+3q6gSnleg xEgzP6MNSkCJXUaGVt4VSNZ8uek8GQSwy+ZnPr8M07bpmhEfYARJYirQCMatbBoj 0Ga9/TZn/tFfArKiJMbVMVMJNzo479UQR+NXLpdcTSTScTckAyeNiFECAHXLAw76 ZMx8q2SAiO2GR9u8xJl7OQoPZoyc+4nHoLxtQVLW1xf+Kfl0irzNBZGQ41dk1gVL veiFQy3+By3BqwzA4BaOIU2gsXMYORQ1yIczK4vQOTzq6tShAzj3gjVbrl0ijfc/ 2EtqHB2b8b9X44xd1FppKiHfzcVc8RpNLUziBdJxlWKfC0SAVqM47IcSe/2beynS 4BUh9UbHhuIjJ+cS0fLUuaCHukk5p22G+g/DqmbctT7kP5GaZ0vQ07dWFyxzNb9/ 4e04NH5ZecIvlp2xlAuJBOn1DFIIBCHbDCPNhj59U5YhY6Mj6NQ= =1TD/ -----END PGP SIGNATURE----- --qjNfmADvan18RZcF--