From: Ben Dooks <ben-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
To: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Luotao Fu <l.fu-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
Kevin Wells <kevin.wells-3arQi8VN3Tc@public.gmane.org>,
Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Subject: Re: [PATCH] i2c/pnx: Really fix start/stop issue
Date: Tue, 20 Apr 2010 01:03:38 +0100 [thread overview]
Message-ID: <20100420000338.GI32401@fluff.org.uk> (raw)
In-Reply-To: <1271586070-12266-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
On Sun, Apr 18, 2010 at 12:21:10PM +0200, Wolfram Sang wrote:
> The issue was truly solved by the second patch in this thread:
>
> http://thread.gmane.org/gmane.linux.drivers.i2c/5436
Looks like i've got this in my i2c next.
> Accidently, the first one was picked up. So, this patch adds the
> remaining diff (and an additional newline).
>
> Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Cc: Luotao Fu <l.fu-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Cc: Kevin Wells <kevin.wells-3arQi8VN3Tc@public.gmane.org>
> Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
> Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> ---
>
> Jean, can you pick this up, so it will be correct in 2.6.34?
>
> drivers/i2c/busses/i2c-pnx.c | 7 ++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
> index 2471033..0853ee1 100644
> --- a/drivers/i2c/busses/i2c-pnx.c
> +++ b/drivers/i2c/busses/i2c-pnx.c
> @@ -173,6 +173,10 @@ static int i2c_pnx_master_xmit(struct i2c_pnx_algo_data *alg_data)
> /* We still have something to talk about... */
> val = *alg_data->mif.buf++;
>
> + /* last byte of a message */
> + if (alg_data->mif.len == 1)
> + val |= stop_bit;
> +
> alg_data->mif.len--;
> iowrite32(val, I2C_REG_TX(alg_data));
>
> @@ -246,6 +250,9 @@ static int i2c_pnx_master_rcv(struct i2c_pnx_algo_data *alg_data)
> __func__);
>
> if (alg_data->mif.len == 1) {
> + /* Last byte, do not acknowledge next rcv. */
> + val |= stop_bit;
> +
> /*
> * Enable interrupt RFDAIE (data in Rx fifo),
> * and disable DRMIE (need data for Tx)
> --
> 1.7.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Ben (ben-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
prev parent reply other threads:[~2010-04-20 0:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-18 10:21 [PATCH] i2c/pnx: Really fix start/stop issue Wolfram Sang
[not found] ` <1271586070-12266-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-04-18 11:04 ` Jean Delvare
[not found] ` <20100418130457.0341efce-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-04-18 11:40 ` Wolfram Sang
[not found] ` <20100418114021.GA21364-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-04-18 16:53 ` Ben Dooks
[not found] ` <20100418165306.GB2234-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2010-04-18 22:40 ` Wolfram Sang
2010-04-19 16:59 ` Kevin Wells
[not found] ` <083DF309106F364B939360100EC290F80979C8121C-SIPbe8o7cfX8DdpCu65jn8FrZmdRls4ZQQ4Iyu8u01E@public.gmane.org>
2010-04-19 23:52 ` Ben Dooks
2010-04-20 0:15 ` Ben Dooks
[not found] ` <20100420001536.GL32401-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2010-04-20 7:16 ` Wolfram Sang
[not found] ` <20100420071629.GI19957-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-04-20 17:23 ` Kevin Wells
2010-04-20 0:03 ` Ben Dooks [this message]
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=20100420000338.GI32401@fluff.org.uk \
--to=ben-elnmno+kys3pigct6eibzw@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=kevin.wells-3arQi8VN3Tc@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=l.fu-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.