All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
To: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
	uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org,
	Michael Hennerich
	<michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 2/2] i2c-bfin-twi: add debug output for error status
Date: Tue, 13 Oct 2009 23:54:38 +0100	[thread overview]
Message-ID: <20091013225438.GD13398@fluff.org.uk> (raw)
In-Reply-To: <1254973096-4391-2-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>

On Wed, Oct 07, 2009 at 11:38:16PM -0400, Mike Frysinger wrote:
> From: Michael Hennerich <michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
> 
> Add some debug() code to decode the error register.

are you sure you want such verbose debug, if someone issues a bus-scan
then you'll be in for a treat of debuggyness.
 
> Signed-off-by: Michael Hennerich <michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
> ---
>  drivers/i2c/busses/i2c-bfin-twi.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c
> index bbce6bd..be85e3d 100644
> --- a/drivers/i2c/busses/i2c-bfin-twi.c
> +++ b/drivers/i2c/busses/i2c-bfin-twi.c
> @@ -156,6 +156,18 @@ static void bfin_twi_handle_interrupt(struct bfin_twi_iface *iface)
>  		write_MASTER_CTL(iface, 0);
>  		SSYNC();
>  		iface->result = -EIO;
> +
> +		if (mast_stat & LOSTARB)
> +			dev_dbg(&iface->adap.dev, "Lost Arbitration\n");
> +		if (mast_stat & ANAK)
> +			dev_dbg(&iface->adap.dev, "Address Not Acknowledged\n");
> +		if (mast_stat & DNAK)
> +			dev_dbg(&iface->adap.dev, "Data Not Acknowledged\n");
> +		if (mast_stat & BUFRDERR)
> +			dev_dbg(&iface->adap.dev, "Buffer Read Error\n");
> +		if (mast_stat & BUFWRERR)
> +			dev_dbg(&iface->adap.dev, "Buffer Write Error\n");
> +
>  		/* if both err and complete int stats are set, return proper
>  		 * results.
>  		 */
> -- 
> 1.6.5.rc2
> 
> --
> 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'

  parent reply	other threads:[~2009-10-13 22:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-08  3:38 [PATCH 1/2] i2c-bfin-twi: integrate timeout timer with completion interface Mike Frysinger
     [not found] ` <1254973096-4391-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2009-10-08  3:38   ` [PATCH 2/2] i2c-bfin-twi: add debug output for error status Mike Frysinger
     [not found]     ` <1254973096-4391-2-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2009-10-13 22:54       ` Ben Dooks [this message]
     [not found]         ` <20091013225438.GD13398-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2009-10-13 23:18           ` [Uclinux-dist-devel] " Mike Frysinger
2009-10-08  9:38   ` [PATCH 1/2] i2c-bfin-twi: integrate timeout timer with completion interface Wolfram Sang
     [not found]     ` <20091008093817.GB6112-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-10-09  4:49       ` [PATCH 1/2] i2c-bfin-twi: integrate timeout timer withcompletion interface Zhang, Sonic
     [not found]         ` <0F1B54C89D5F954D8535DB252AF412FA04D6FC09-SGdA1W8gREmuVPpjEGsWsTcYPEmu4y7e@public.gmane.org>
2009-10-09  5:10           ` Mike Frysinger
     [not found]             ` <8bd0f97a0910082210x7d89ac85wf9e9d144b59bdb85-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-10  4:04               ` Zhang, Sonic
2009-10-10 17:44   ` [PATCH 1/2 v2] i2c-bfin-twi: integrate timeout timer with completion interface Mike Frysinger
2009-10-13 22:53   ` [PATCH 1/2] " Ben Dooks
     [not found]     ` <20091013225359.GC13398-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2009-10-13 23:17       ` Mike Frysinger

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=20091013225438.GD13398@fluff.org.uk \
    --to=ben-elnmno+kys3ytjvyw6ydsg@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org \
    --cc=uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org \
    --cc=vapier-aBrp7R+bbdUdnm+yROfE0A@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.