All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Hugues Deschenes <jean-hugues.deschenes-YGVykHU+fedBDgjK7y7TUQ@public.gmane.org>
To: Shinya Kuribayashi
	<shinya.kuribayashi-jaWZhaxaiAMAvxtiuMwx3w@public.gmane.org>
Cc: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>,
	Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/3] Use local version of readl & writel
Date: Fri, 15 Jan 2010 08:33:43 -0500	[thread overview]
Message-ID: <4B506EB7.709@octasic.com> (raw)
In-Reply-To: <4B4FAB83.1060408-jaWZhaxaiAMAvxtiuMwx3w@public.gmane.org>



Shinya Kuribayashi wrote:
> Jean-Hugues Deschenes wrote:
>> Use local versions of readl & writel, so per-access manipulations may 
>> be performed
>
> Let's put Signed-off-by: here.
My apologies; I need to figure out where in the process that was droppted...
>
>> ---
>>  drivers/i2c/busses/i2c-designware.c |   88 
>> ++++++++++++++++++++----------------
>>  1 file changed, 49 insertions(+), 39 deletions(-)
>>
>> Index: linux-2.6_i2c/drivers/i2c/busses/i2c-designware.c
>> ===================================================================
>> --- linux-2.6_i2c.orig/drivers/i2c/busses/i2c-designware.c
>> +++ linux-2.6_i2c/drivers/i2c/busses/i2c-designware.c
>> @@ -219,6 +219,16 @@ struct dw_i2c_dev {
>>      unsigned int        rx_fifo_depth;
>>  };
>>
>> +static u32 i2c_dw_readl(struct dw_i2c_dev *dev, int addr)
>> +{
>> +    return readl(dev->base + addr);
>> +}
>
> nit: As being used with dev->base, "offset", "reg" or something
> like that would be nice, rather than "addr".
Good idea; It'll be in the updated patch...
>
>> +static void i2c_dw_writel(struct dw_i2c_dev *dev, u32 b, int addr)
>> +{
>> +    writel(b, dev->base + addr);
>> +}
>> +
>>  static u32
>>  i2c_dw_scl_hcnt(u32 ic_clk, u32 tSYMBOL, u32 tf, int cond, int offset)
>>  {
>
> Since these are I/O accessros / wrappers, and don't provide any
> meaningful functions, how about simply dw_readl() / dw_writel(),
> similarly as other {read,write}[bwl] wrappers do.  I'd prefer a
> reasonably shorter name for this kind of accessors!
... That should help with the code's readeability as well. Will be in 
the next patch

jh

  parent reply	other threads:[~2010-01-15 13:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13 19:32 [PATCH 0/3] i2c-designware: Allow mixed endianness Jean-Hugues Deschenes
2010-01-13 19:32 ` [PATCH 1/3] Use local version of readl & writel Jean-Hugues Deschenes
     [not found]   ` <20100113193421.068608000-YGVykHU+fedBDgjK7y7TUQ@public.gmane.org>
2010-01-14 23:40     ` Shinya Kuribayashi
     [not found]       ` <4B4FAB83.1060408-jaWZhaxaiAMAvxtiuMwx3w@public.gmane.org>
2010-01-15 13:33         ` Jean-Hugues Deschenes [this message]
2010-01-13 19:32 ` [PATCH 2/3] Check component type register Jean-Hugues Deschenes
     [not found]   ` <20100113193421.139644000-YGVykHU+fedBDgjK7y7TUQ@public.gmane.org>
2010-01-14  1:11     ` Ben Dooks
     [not found]       ` <20100114011101.GK3738-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2010-01-14 12:37         ` Jean-Hugues Deschenes
2010-01-13 19:32 ` [PATCH 3/3] Allow mixed endianness accesses Jean-Hugues Deschenes
     [not found]   ` <20100113193421.212989000-YGVykHU+fedBDgjK7y7TUQ@public.gmane.org>
2010-01-15  0:01     ` Shinya Kuribayashi
     [not found]       ` <4B4FB03E.1070708-jaWZhaxaiAMAvxtiuMwx3w@public.gmane.org>
2010-01-15 14:04         ` Jean-Hugues Deschenes
     [not found]           ` <4B5075ED.8020307-YGVykHU+fedBDgjK7y7TUQ@public.gmane.org>
2010-01-15 15:16             ` Jean-Hugues Deschenes
2010-01-18 10:00             ` Shinya Kuribayashi
     [not found]               ` <4B54312E.9030106-jaWZhaxaiAMAvxtiuMwx3w@public.gmane.org>
2010-01-18 12:54                 ` Jean-Hugues Deschenes
     [not found] ` <20100113193224.753273000-YGVykHU+fedBDgjK7y7TUQ@public.gmane.org>
2010-01-14  0:40   ` [PATCH 0/3] i2c-designware: Allow mixed endianness Shinya Kuribayashi
     [not found]     ` <4B4E6815.9050908-jaWZhaxaiAMAvxtiuMwx3w@public.gmane.org>
2010-01-14  1:09       ` Ben Dooks
     [not found]         ` <390831ED3DF58E41A3D2FB82591E2C36047AF627@MAILEXCH.octasic.com>
     [not found]           ` <390831ED3DF58E41A3D2FB82591E2C36047AF627-Jh1kU4MlLDZ5rAAhGZPdxVaTQe2KTcn/@public.gmane.org>
2010-01-14  6:45             ` Ben Dooks
     [not found]               ` <20100114064501.GR3738-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2010-01-14 12:34                 ` Jean-Hugues Deschenes
2010-01-14 12:30   ` Baruch Siach

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=4B506EB7.709@octasic.com \
    --to=jean-hugues.deschenes-ygvykhu+fedbdgjk7y7tuq@public.gmane.org \
    --cc=baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=shinya.kuribayashi-jaWZhaxaiAMAvxtiuMwx3w@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.