From: Ray Jui <ray.jui@broadcom.com>
To: Wolfram Sang <wsa@the-dreams.de>,
Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
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>,
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: Fri, 30 Aug 2019 11:35:08 -0700 [thread overview]
Message-ID: <3e70fa7e-de13-4edd-2e17-b7c56e91d220@broadcom.com> (raw)
In-Reply-To: <20190830125626.GC2870@ninjato>
On 8/30/19 5:56 AM, Wolfram Sang wrote:
> 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?
>
Right. But what is the implication of using smbus_xfer instead of
master_xfer in our driver?
Does it mean it will break existing functions of the i2c app that our
customers developed based on i2cdev (e.g., I2C_RDWR)?
1) Does
>> + /* 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
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-08-30 18:35 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 [this message]
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
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=3e70fa7e-de13-4edd-2e17-b7c56e91d220@broadcom.com \
--to=ray.jui@broadcom.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=icarus.chau@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lori.hikichi@broadcom.com \
--cc=mark.rutland@arm.com \
--cc=rayagonda.kokatanur@broadcom.com \
--cc=robh+dt@kernel.org \
--cc=sshetty1@broadcom.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).