public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
To: Masayuki Ohtak <masa-korg-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
Cc: "Jean Delvare (PC drivers,
	core)" <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
	"Ben Dooks (embedded platforms)"
	<ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
	Crane Cai <crane.cai-5C7GfCeVMHo@public.gmane.org>,
	Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Linus Walleij
	<linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>,
	Ralf Baechle <ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>,
	srinidhi kasagar
	<srinidhi.kasagar-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"Wang Yong Y\""
	<yong.y.wang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Wang Qi\"" <qi.wang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Andrew\""
	<andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	arjan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
	Tomoya MORINAGA
	<morinaga526-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>,
	Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Subject: Re: [MeeGo-Dev][PATCH] Topcliff: Update PCH_I2C driver to 2.6.35
Date: Tue, 31 Aug 2010 19:43:52 -0700	[thread overview]
Message-ID: <1283309032.1797.123.camel@Joe-Laptop> (raw)
In-Reply-To: <4C7DB9CF.5000905-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>

On Wed, 2010-09-01 at 11:26 +0900, Masayuki Ohtak wrote:
> I2C driver of Topcliff PCH
> +++ b/drivers/i2c/busses/i2c-pch.c
[]
> +static void pch_init(struct i2c_algo_pch_data *adap)
[]
> +	if (pch_i2c_speed == FAST_MODE_CLK) {
> +		reg_value |= FAST_MODE_EN;
> +		dev_dbg(adap->pch_adapter.dev.parent, "Fast mode enabled\n");
> +	}

Just a suggestion below, ignore it at your pleasure...

These dev_<level> calls might be easier to read if you had
some #defines like:

#define pch_dbg(adap, fmt, arg...)		\
	dev_dbg(adap->pch_adapter.dev.parent, fmt, ##arg)
#define pch_err(adap, fmt, arg...)		\
	dev_err(adap->pch_adapter.dev.parent, fmt, ##arg)
#define pch_info(adap, fmt, arg...)		\
	dev_info(adap->pch_adapter.dev.parent, fmt, ##arg)

then the last dev_dbg becomes:

		pch_dbg(adap, "Fast mode enabled\n");

Many modules use similar wrapper #defines.

> +	dev_dbg(adap->pch_adapter.dev.parent,
> +		"%s: I2CCTL=%x pch_i2cbc=%x pch_i2ctmr=%x Enable interrupts\n",
> +		__func__, ioread32(p + PCH_I2CCTL),
> +		pch_i2cbc, pch_i2ctmr);

	pch_dbg(adap, etc...)

etc.

cheers, Joe

       reply	other threads:[~2010-09-01  2:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4C7DB9CF.5000905@dsn.okisemi.com>
     [not found] ` <4C7DB9CF.5000905-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
2010-09-01  2:43   ` Joe Perches [this message]
2010-09-01  4:16     ` [MeeGo-Dev][PATCH] Topcliff: Update PCH_I2C driver to 2.6.35 Masayuki Ohtake
2010-09-01  5:08     ` Masayuki Ohtake
2010-09-01  5:24       ` Joe Perches
2010-09-01  5:44         ` Masayuki Ohtake
2010-09-01 19:44   ` Linus Walleij
2010-09-03  3:12     ` Masayuki Ohtake
2010-09-06  1:31 Masayuki Ohtak
  -- strict thread matches above, loose matches on Subject: below --
2010-09-06  1:10 Masayuki Ohtak
2010-09-03 10:19 Masayuki Ohtak
     [not found] ` <4C80CBC0.5050908-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
2010-09-03 12:36   ` Alan Cox
     [not found]     ` <20100903133613.1c519c49-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2010-09-03 12:26       ` Wolfram Sang
2010-09-06  0:44         ` Masayuki Ohtake
2010-09-06  0:43     ` Masayuki Ohtake
2010-09-07 23:55   ` Ben Dooks
2010-09-08 12:06     ` Masayuki Ohtake
2010-09-03  7:15 Masayuki Ohtak
     [not found] ` <4C80A089.508-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
2010-09-03  8:10   ` Joe Perches
2010-09-03 10:01     ` Masayuki Ohtake
2010-09-03  3:19 Masayuki Ohtak
     [not found] ` <4C80692E.80004-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
2010-09-03  4:38   ` Joe Perches
2010-09-03  8:39   ` Linus WALLEIJ
2010-09-01  2:26 Masayuki Ohtak

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=1283309032.1797.123.camel@Joe-Laptop \
    --to=joe-6d6dil74uinbdgjk7y7tuq@public.gmane.org \
    --cc=andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=arjan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=crane.cai-5C7GfCeVMHo@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=masa-korg-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org \
    --cc=morinaga526-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org \
    --cc=qi.wang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
    --cc=sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=srinidhi.kasagar-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org \
    --cc=yong.y.wang-ral2JQCrhuEAvxtiuMwx3w@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