From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
To: Alexander Kochetkov <al.kochet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Kevin Hilman <khilman-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>,
Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC 5/5] i2c: omap: add trace
Date: Wed, 3 Dec 2014 08:49:34 -0600 [thread overview]
Message-ID: <20141203144934.GB16138@saruman> (raw)
In-Reply-To: <1417617242-16869-6-git-send-email-al.kochet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]
On Wed, Dec 03, 2014 at 06:34:02PM +0400, Alexander Kochetkov wrote:
> Signed-off-by: Alexander Kochetkov <al.kochet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/i2c/busses/i2c-omap.c | 45 ++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 42 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 66506db..d2dfabe 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -283,6 +283,23 @@ static inline u16 omap_i2c_read_reg(struct omap_i2c_dev *i2c_dev, int reg)
> (i2c_dev->regs[reg] << i2c_dev->reg_shift));
> }
>
> +#ifdef dev_dbg
> +#undef dev_dbg
> +#endif
> +#define dev_dbg dev_info
> +
> +static inline void omap_i2c_dump_state(const char *func, int line,
> + struct omap_i2c_dev *dev, const char *msg)
> +{
> + dev_dbg(dev->dev, "%s: STAT=0x%04x; IE=0x%04x; CON=0x%04x; (%s:%d)\n",
> + msg,
> + omap_i2c_read_reg(dev, OMAP_I2C_STAT_REG),
> + omap_i2c_read_reg(dev, OMAP_I2C_IE_REG),
> + omap_i2c_read_reg(dev, OMAP_I2C_CON_REG),
> + func, line);
> +}
> +#define OMAP_I2C_DUMP_STATE(dev, msg) omap_i2c_dump_state(__func__, __LINE__, (dev), (msg))
NAK, if you want to add traces, use, well, tracepoints :-) It makes no
sense to hack stuff like this.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-12-03 14:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 14:33 [RFC 0/5] i2c: omap: new fixes 2 Alexander Kochetkov
2014-12-03 14:33 ` [RFC 1/5] i2c: omap: ack only reported events Alexander Kochetkov
2014-12-03 14:33 ` [RFC 2/5] i2c: omap: simplify i462 errata handling for NACK and AL cases Alexander Kochetkov
2014-12-03 14:34 ` [RFC 3/5] i2c: omap: move STP generation logic into ISR thread Alexander Kochetkov
2014-12-03 14:34 ` [RFC 4/5] i2c: omap: reimpelement STP hack via 2-phases transfer Alexander Kochetkov
2014-12-03 14:34 ` [RFC 5/5] i2c: omap: add trace Alexander Kochetkov
[not found] ` <1417617242-16869-6-git-send-email-al.kochet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-12-03 14:49 ` Felipe Balbi [this message]
2014-12-03 14:52 ` Alexander Kochetkov
[not found] ` <2E40A984-A6AA-4D17-AB1D-725004EF845F-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-12-03 14:55 ` Felipe Balbi
[not found] ` <1417617242-16869-1-git-send-email-al.kochet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-12-04 18:23 ` [RFC 0/5] i2c: omap: new fixes 2 Tony Lindgren
2015-01-13 10:04 ` Wolfram Sang
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=20141203144934.GB16138@saruman \
--to=balbi-l0cymroini0@public.gmane.org \
--cc=al.kochet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=khilman-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox