From: Wolfram Sang <wsa@the-dreams.de>
To: 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,
Ray Jui <ray.jui@broadcom.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v1 1/1] i2c: iproc: Add i2c repeated start capability
Date: Fri, 30 Aug 2019 14:56:26 +0200 [thread overview]
Message-ID: <20190830125626.GC2870@ninjato> (raw)
In-Reply-To: <1565150941-27297-1-git-send-email-rayagonda.kokatanur@broadcom.com>
[-- Attachment #1.1: Type: text/plain, Size: 955 bytes --]
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
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
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 12:56 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 [this message]
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
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=20190830125626.GC2870@ninjato \
--to=wsa@the-dreams.de \
--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=ray.jui@broadcom.com \
--cc=rayagonda.kokatanur@broadcom.com \
--cc=robh+dt@kernel.org \
--cc=sshetty1@broadcom.com \
/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).