Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1886524ybn; Thu, 26 Sep 2019 03:47:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwwATAFyrHIeF3mYoL30zpkhkEiRO7kqmOipmOaqKzmFhIq93kGQgZ1D3nBqbDBkxJASyl6 X-Received: by 2002:aa7:d7d3:: with SMTP id e19mr2867052eds.80.1569494870861; Thu, 26 Sep 2019 03:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569494870; cv=none; d=google.com; s=arc-20160816; b=UfcgGwRlqrbjV3OTB4XYgMl1cZ+44CxrEGGQvHNpMkGzNLvLDPLCwHdEzNtIG83I1z d0WLLacY8sE5yYQOj8agomwqP3HMNgkDap7MOWZy+7bMT+uCo4LuRhZbeFg/5x/o/Q/O LfVhII18CVbP2Koja6FIShQWjUqseef31zRrl3e25D9WJ9FCltrafLpTZ274B95dGWAC F5c6E4f5x7a6INZWeZTeG9LsyPJhHbdx66S11B4OO6i/HIt2oqDYCR/Jssspqqwcjg8c X8OCb/cvkqJyNqg+kLjrSI2YiM5yP+7GEMgxxS7QdpPCSTCvypTDgaVmCxwDkm4zAVyT CXQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=zojDqhIDCVa616KN7v7PXKcR+n3TBwC2cffseILAS8Y=; b=MFHbBFZ36cUkTAKjSh9nATTlo5c6Y5Rtovq6kWROWntj4k/Cuf4G5K4NqKQ7GQ4RnN DP3qt8DSYycyjkixWDRWw9/tKWXMLEkmWmybl/MOlruoJkDIeGTREqJm1wNhpS3usLWY QM7hMZdUb1PTxRGcYLtuhkt0h6fsGPAgatprH9x64plwiPqmnudjY6UAtNGInLf4Buxx r16dh0/FPopYBrgqCGtEfF32htO49+2EjVsouUV6nwSgYb7CDF/06pokibN6Y7BOl7z0 XN5lEhct1xDATxsA+FQARSD8E6/sNKaD7m4dme71EFtH8+aWACZTFm1KdDm7MbF62Vhb TvOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=V0acmw1i; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h14si1144085edb.425.2019.09.26.03.47.27; Thu, 26 Sep 2019 03:47:50 -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; dkim=pass header.i=@broadcom.com header.s=google header.b=V0acmw1i; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407625AbfIXRXV (ORCPT + 99 others); Tue, 24 Sep 2019 13:23:21 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42791 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407047AbfIXRXV (ORCPT ); Tue, 24 Sep 2019 13:23:21 -0400 Received: by mail-wr1-f66.google.com with SMTP id n14so2841574wrw.9 for ; Tue, 24 Sep 2019 10:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=zojDqhIDCVa616KN7v7PXKcR+n3TBwC2cffseILAS8Y=; b=V0acmw1iJ5RBkC5LpIbyw+IvcVgmzKokEwS7utek9s8pSqnOYmD545QAUQGVet8zNs 6g+6V8Fds7Z2wu0dO4BufUP+UOAGIL5yk4vrfRXCNmXsuyHxPP8WbCyx5R3z53xAty0z E/A+HJ2vV6CvIFmfp9xG8Cc/0FAt/2AGAr2dM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zojDqhIDCVa616KN7v7PXKcR+n3TBwC2cffseILAS8Y=; b=E6PBQepfTAq18bjVqUaSft+SsdQAmrlYeMxHFiF4/dRwcEaSTmDZjDOa/KdZrH/IXJ 8jImbacfnIvExuEh3AOuLqOEl0PbGpNBkFesJ5wZd4Wblru88uP7aHPhBrd/PNGM/3sJ eXyBBgtXnbfzvLNiMh85h+vwEtThJf108twQMg/AtgLUEJDWDNdflMe2s36ErkJT4t3v lWXrvtbb9w7XqkzrJjS5fFIQRnB/38jNwzC/ac5TONqCpMjlxvLh5l7IEYKvQUw5QJs2 hT9RBdx1xzw9UyEh4ctIAiMiVdTrE6FWe7s8gUwp7Dbvn9P2hlciL6fa9p4u7dMerDe8 nPWA== X-Gm-Message-State: APjAAAUPqL2CqhU0rVYWjo3R0stPvrB3t5qvN19oW3iMLHrw10RMd3nE 1ZZK7Z3vLxtrPwQEepAVj7awkxH50m2jrD1c X-Received: by 2002:a5d:6951:: with SMTP id r17mr3365604wrw.208.1569345798765; Tue, 24 Sep 2019 10:23:18 -0700 (PDT) Received: from rj-aorus.ric.broadcom.com ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id o12sm4269440wrm.23.2019.09.24.10.23.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Sep 2019 10:23:18 -0700 (PDT) Subject: Re: [PATCH v1 1/1] i2c: iproc: Add i2c repeated start capability To: Wolfram Sang Cc: Rayagonda Kokatanur , 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, Florian Fainelli , Lori Hikichi , Icarus Chau , Shivaraj Shetty References: <1565150941-27297-1-git-send-email-rayagonda.kokatanur@broadcom.com> <20190830125626.GC2870@ninjato> <3e70fa7e-de13-4edd-2e17-b7c56e91d220@broadcom.com> <20190831094940.GA1138@kunai> <540c4e2d-0dd5-5260-30b2-e1589b279d71@broadcom.com> <20190904213745.GG23608@ninjato> From: Ray Jui Message-ID: <5ab79d0e-eb54-8fe1-1ca3-e763a17c6426@broadcom.com> Date: Tue, 24 Sep 2019 10:23:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190904213745.GG23608@ninjato> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wolfram, On 9/4/19 2:37 PM, Wolfram Sang wrote: > >> I think you are right that the controller does not seem to support >> additional I2C features in addition to SMBUS. >> >> However, my concern of switching to the smbus_xfer API is: >> >> 1) Some customers might have used I2C_RDWR based API from i2cdev. Changing >> from master_xfer to smbus_xfer may break the existing applications that are >> already developed. > > Well, given that you add new quirks in the original patch here, you are > kind of breaking it already. Most transfers which are not SMBus-alike > transfers would now be rejected. For SMBus-alike transfers which are > sent via I2C_RDWR (which is ugly), I have to think about it. > >> 2) The sound subsystem I2C regmap based implementation seems to be using >> i2c_ based API instead of smbus_ based API. Does this mean this will also >> break most of the audio codec drivers with I2C regmap API based usage? > > I don't think so. If you check regmap_get_i2c_bus() then it checks the > adapter functionality and chooses the best transfer option then. I may > be missing something but I would wonder if the sound system does > something special and different. > We did more investigation on this. First of all, like you said, there's no concern on regmap based API, the smbus_xfer only based approach should just work. Secondly, for most i2ctools like i2cget, i2cset, i2cdump, there's no concern either, given that they already use I2C_SMBUS based IOCTL. However, for i2ctransfer or any customer applications that use I2C_RDWR IOCTL, i2c_transfer (master_xfer) is the only supported function. And we can confirm we do have at least one customer using i2ctransfer for EEPROM access on their system, e.g., i2ctransfer 1 w2@0x50 0x00 0x00 r64. In my opinion, it's probably better to continue to support master_xfer in our driver (with obvious limitations), in order to allow i2ctransfer (or any apps that use I2C RDWR) to continue to work. What do you think? Regards, Ray