From: Jochen Friedrich <jochen@scram.de>
To: sachin surendran <sachin.surendran@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] i2c-cpm: Fix to takeback i2c bus master-ship after a collision
Date: Wed, 31 Oct 2012 10:52:57 +0100 [thread overview]
Message-ID: <5090F4F9.8050208@scram.de> (raw)
In-Reply-To: <CABCb4NUJ0uJA5Z9vdgLndvpLrnK=m5xaeiHZxAwHKFU2DroaFw@mail.gmail.com>
Hi Sachin,
looks good to me.
Acked-By: Jochen Friedrich <jochen@scram.de>
> Signed-off-by: Sachin Surendran <sachin.surendran@alliedtelesis.co.nz
> <mailto:sachin.surendran@alliedtelesis.co.nz>>
> ---
> drivers/i2c/busses/i2c-cpm.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
> index c1e1096..bb94c6d 100644
> --- a/drivers/i2c/busses/i2c-cpm.c
> +++ b/drivers/i2c/busses/i2c-cpm.c
> @@ -338,6 +338,14 @@ static int cpm_i2c_xfer(struct i2c_adapter *adap,
> struct i2c_msg *msgs, int num)
> tptr = 0;
> rptr = 0;
> + /*
> + * If there was a collision in the last i2c transaction,
> + * Set I2COM_MASTER as it was cleared during collision.
> + */
> + if (in_be16(&tbdf->cbd_sc) & BD_SC_CL) {
> + out_8(&cpm->i2c_reg->i2com, I2COM_MASTER);
> + }
> +
> while (tptr < num) {
> pmsg = &msgs[tptr];
> dev_dbg(&adap->dev, "R: %d T: %d\n", rptr, tptr);
>
Thanks, Jochen
next prev parent reply other threads:[~2012-10-31 9:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 3:00 [PATCH] i2c-cpm: Fix to takeback i2c bus master-ship after a collision sachin surendran
2012-10-31 9:52 ` Jochen Friedrich [this message]
2012-11-25 13:21 ` Kumar Gala
2012-11-25 22:57 ` sachin surendran
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=5090F4F9.8050208@scram.de \
--to=jochen@scram.de \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=sachin.surendran@gmail.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 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.