From: Wolfgang Grandegger <wg@grandegger•com>
To: Ben Dooks <ben-linux@fluff•org>
Cc: Devicetree-discuss@lists•ozlabs.org,
Linuxppc-dev@lists•ozlabs.org, Wolfgang Grandegger <wg@denx•de>,
Linux-i2c@vger•kernel.org
Subject: Re: [PATCH 2/3] i2c-mpc: add support for the MPC512x processors from Freescale
Date: Tue, 26 Jan 2010 19:44:57 +0100 [thread overview]
Message-ID: <4B5F3829.5080902@grandegger.com> (raw)
In-Reply-To: <20100126143925.GD12774@fluff.org.uk>
Ben Dooks wrote:
> On Mon, Jan 25, 2010 at 04:15:09PM +0100, Wolfram Sang wrote:
>>>>>
>>>>> -static void __devinit mpc_i2c_setclock_52xx(struct device_node *node,
>>>>> - struct mpc_i2c *i2c,
>>>>> - u32 clock, u32 prescaler)
>>>>> +static void __devinit mpc_i2c_setup_52xx(struct device_node *node,
>>>>> + struct mpc_i2c *i2c,
>>>>> + u32 clock, u32 prescaler)
>>>>> {
>>>>> int ret, fdr;
>>>>>
>>>>> + if (clock == -1) {
>>>> Could we use 0 for 'no_clock'? This would make the above statement simply
>>> "0" is already used to maintain backward compatibility setting a safe
>>> divider.
>> Ah, now I see:
>>
>> 'clock == -1' means 'preserve clocks' (and is checked here in mpc_i2c_setup_52xx())
>> 'clock == 0' means 'safe divider' (and is checked in mpc_i2c_get_fdr_52xx())
>
> hmm, sounds like a job for a #define or similar.
See v2 of this patch.
Wolfgang.
next prev parent reply other threads:[~2010-01-26 18:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-25 8:27 [PATCH 0/3] i2c-mpc: add support for the Freescale MPC512x and other fixes Wolfgang Grandegger
2010-01-25 8:27 ` [PATCH 1/3] i2c-mpc: use __devinit[data] for initialization functions and data Wolfgang Grandegger
2010-01-25 8:27 ` [PATCH 2/3] i2c-mpc: add support for the MPC512x processors from Freescale Wolfgang Grandegger
2010-01-25 8:27 ` [PATCH 3/3] powerpc: doc/dts-bindings: update doc of FSL I2C bindings Wolfgang Grandegger
2010-01-25 11:56 ` Wolfram Sang
2010-01-25 11:58 ` Wolfgang Grandegger
2010-01-25 11:52 ` [PATCH 2/3] i2c-mpc: add support for the MPC512x processors from Freescale Wolfram Sang
2010-01-25 12:06 ` Wolfgang Grandegger
2010-01-25 15:15 ` Wolfram Sang
2010-01-25 18:33 ` Wolfgang Grandegger
2010-01-25 20:48 ` Wolfram Sang
2010-01-25 20:54 ` Wolfgang Grandegger
2010-01-25 21:09 ` Wolfram Sang
2010-01-26 14:39 ` Ben Dooks
2010-01-26 18:44 ` Wolfgang Grandegger [this message]
2010-01-25 12:02 ` [PATCH 0/3] i2c-mpc: add support for the Freescale MPC512x and other fixes 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=4B5F3829.5080902@grandegger.com \
--to=wg@grandegger$(echo .)com \
--cc=Devicetree-discuss@lists$(echo .)ozlabs.org \
--cc=Linux-i2c@vger$(echo .)kernel.org \
--cc=Linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=ben-linux@fluff$(echo .)org \
--cc=wg@denx$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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