From: Dave Jones <davej@redhat.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: dianders@chromium.org, lee.jones@linaro.org
Subject: Re: i2c: ChromeOS EC tunnel driver
Date: Tue, 10 Jun 2014 10:33:44 -0400 [thread overview]
Message-ID: <20140610143344.GA15699@redhat.com> (raw)
In-Reply-To: <20140606193128.CB477660FB4@gitolite.kernel.org>
On Fri, Jun 06, 2014 at 07:31:28PM +0000, Linux Kernel wrote:
> Gitweb: http://git.kernel.org/linus/;a=commit;h=9d230c9e4f4e67cb1c1cb9e0f6142da16b0f2796
> Commit: 9d230c9e4f4e67cb1c1cb9e0f6142da16b0f2796
> Parent: 5271db29d7199fe0ffb303ca4bbbb1485bba28c3
> Refname: refs/heads/next
> Author: Doug Anderson <dianders@chromium.org>
> AuthorDate: Wed Apr 30 10:44:09 2014 -0700
> Committer: Lee Jones <lee.jones@linaro.org>
> CommitDate: Tue Jun 3 08:11:49 2014 +0100
> +static int ec_i2c_construct_message(u8 *buf, const struct i2c_msg i2c_msgs[],
> + int num, u16 bus_num)
> +{
> + struct ec_params_i2c_passthru *params;
> + u8 *out_data;
> + int i;
> +
> + out_data = buf + sizeof(struct ec_params_i2c_passthru) +
> + num * sizeof(struct ec_params_i2c_passthru_msg);
> +
> + params = (struct ec_params_i2c_passthru *)buf;
> + params->port = bus_num;
> + params->num_msgs = num;
> + for (i = 0; i < num; i++) {
> + const struct i2c_msg *i2c_msg = &i2c_msgs[i];
> + struct ec_params_i2c_passthru_msg *msg = ¶ms->msg[i];
> +
> + msg->len = i2c_msg->len;
> + msg->addr_flags = i2c_msg->addr;
> +
> + if (i2c_msg->flags & I2C_M_TEN)
> + msg->addr_flags |= EC_I2C_FLAG_10BIT;
This is a fun bug. EC_I2C_FLAG_10BIT is 1<<16, but msg->addr_flags is only a uint16.
Dave
next parent reply other threads:[~2014-06-10 14:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20140606193128.CB477660FB4@gitolite.kernel.org>
2014-06-10 14:33 ` Dave Jones [this message]
2014-06-10 15:39 ` i2c: ChromeOS EC tunnel driver Doug Anderson
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=20140610143344.GA15699@redhat.com \
--to=davej@redhat.com \
--cc=dianders@chromium.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
/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