public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: "Richard Röjfors" <richard.rojfors-gfIc91nka+FZroRs9YW3xA@public.gmane.org>
To: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Subject: Re: [PATCH RESEND 1/1] i2c: Add support for Xilinx XPS IIC Bus Interface
Date: Thu, 28 Jan 2010 16:49:59 +0100	[thread overview]
Message-ID: <4B61B227.4070200@pelagicore.com> (raw)
In-Reply-To: <4B5F0A42.6060401-gfIc91nka+FZroRs9YW3xA@public.gmane.org>

Richard Röjfors wrote:
> Ben Dooks wrote:
>> On Sun, Jan 24, 2010 at 06:33:20PM +0100, Richard R?jfors wrote:
>>>>> +
>>>>> +#define XIIC_MSB_OFFSET 0
>>>>> +#define XIIC_REG_OFFSET (0x100+XIIC_MSB_OFFSET)
>>>> givevn you're running everything through indirect read/write calls,
>>>> how about doing it in there?
>>> Could do, bad thing is that it would add in an addition during runtime
>>> rather than having the C preprocessor doing it.
>>>
>>> I think I would like to leave it as is.
>>>
>>> What do you think?
>> Compilers aren't that stupid nowadays, they can generally sort this
>> thing out at compile time, esepcially with inline code. Try it and
>> see what happens...
> 
> If a constant value needs to be added to the sum of two input parameters of a function, I don's see
> any option for the compiler but add it runtime.

Ah, we can not add in the offset in the read/write functions. Because all registers are not offset:ed.
(The interrupt registers registered further down).

I will post an updated patch shortly.

Thanks for the feedback.

--Richard

      parent reply	other threads:[~2010-01-28 15:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-19 16:01 [PATCH RESEND 1/1] i2c: Add support for Xilinx XPS IIC Bus Interface Richard Röjfors
     [not found] ` <4B55D74C.2010806-gfIc91nka+FZroRs9YW3xA@public.gmane.org>
2010-01-24 15:49   ` Ben Dooks
     [not found]     ` <20100124154930.GE28675-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2010-01-24 17:33       ` Richard Röjfors
     [not found]         ` <4B5C8460.2040309-gfIc91nka+FZroRs9YW3xA@public.gmane.org>
2010-01-24 18:15           ` Wolfram Sang
     [not found]             ` <20100124181526.GB25641-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-01-24 18:54               ` Jean Delvare
2010-01-24 19:08               ` Peter Korsgaard
2010-01-26 14:44               ` Ben Dooks
2010-01-26 14:44           ` Ben Dooks
     [not found]             ` <20100126144402.GE12774-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2010-01-26 15:29               ` Richard Röjfors
     [not found]                 ` <4B5F0A42.6060401-gfIc91nka+FZroRs9YW3xA@public.gmane.org>
2010-01-28 15:49                   ` Richard Röjfors [this message]

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=4B61B227.4070200@pelagicore.com \
    --to=richard.rojfors-gfic91nka+fzrors9yw3xa@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@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