public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Ray Jui <ray.jui@broadcom•com>
To: Wolfram Sang <wsa@the-dreams•de>
Cc: Mark Rutland <mark.rutland@arm•com>,
	devicetree@vger•kernel.org,
	Lori Hikichi <lori.hikichi@broadcom•com>,
	Florian Fainelli <f.fainelli@gmail•com>,
	Shivaraj Shetty <sshetty1@broadcom•com>,
	Rayagonda Kokatanur <rayagonda.kokatanur@broadcom•com>,
	linux-kernel@vger•kernel.org,
	Icarus Chau <icarus.chau@broadcom•com>,
	Rob Herring <robh+dt@kernel•org>,
	bcm-kernel-feedback-list@broadcom•com, linux-i2c@vger•kernel.org,
	linux-arm-kernel@lists•infradead.org
Subject: Re: [PATCH v1 1/1] i2c: iproc: Add i2c repeated start capability
Date: Tue, 24 Sep 2019 10:23:12 -0700	[thread overview]
Message-ID: <5ab79d0e-eb54-8fe1-1ca3-e763a17c6426@broadcom.com> (raw)
In-Reply-To: <20190904213745.GG23608@ninjato>

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-09-24 17:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07  4:09 [PATCH v1 1/1] i2c: iproc: Add i2c repeated start capability Rayagonda Kokatanur
2019-08-12 17:33 ` Ray Jui
2019-08-29 20:41   ` Wolfram Sang
2019-08-30 12:56 ` Wolfram Sang
2019-08-30 18:35   ` Ray Jui
2019-08-31  9:49     ` Wolfram Sang
2019-09-03 23:11       ` Ray Jui
2019-09-04 21:37         ` Wolfram Sang
2019-09-24 17:23           ` Ray Jui [this message]
2019-09-24 18:57             ` Wolfram Sang
2019-09-24 22:23               ` Ray Jui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5ab79d0e-eb54-8fe1-1ca3-e763a17c6426@broadcom.com \
    --to=ray.jui@broadcom$(echo .)com \
    --cc=bcm-kernel-feedback-list@broadcom$(echo .)com \
    --cc=devicetree@vger$(echo .)kernel.org \
    --cc=f.fainelli@gmail$(echo .)com \
    --cc=icarus.chau@broadcom$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-i2c@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=lori.hikichi@broadcom$(echo .)com \
    --cc=mark.rutland@arm$(echo .)com \
    --cc=rayagonda.kokatanur@broadcom$(echo .)com \
    --cc=robh+dt@kernel$(echo .)org \
    --cc=sshetty1@broadcom$(echo .)com \
    --cc=wsa@the-dreams$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox