From: Wolfram Sang <w.sang@pengutronix•de>
To: Wolfgang Grandegger <wg@grandegger•com>
Cc: Devicetree-discuss@lists•ozlabs.org,
Linuxppc-dev@lists•ozlabs.org, Linux-i2c@vger•kernel.org,
Wolfgang Grandegger <wg@denx•de>
Subject: Re: [PATCH 2/3] i2c-mpc: add support for the MPC512x processors from Freescale
Date: Mon, 25 Jan 2010 16:15:09 +0100 [thread overview]
Message-ID: <20100125151509.GD5257@pengutronix.de> (raw)
In-Reply-To: <4B5D894C.4090001@grandegger.com>
[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]
> >>
> >> -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())
This is not a beauty ;)
What about adding a flags variable to the setup-functions?
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2010-01-25 15:15 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 [this message]
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
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=20100125151509.GD5257@pengutronix.de \
--to=w.sang@pengutronix$(echo .)de \
--cc=Devicetree-discuss@lists$(echo .)ozlabs.org \
--cc=Linux-i2c@vger$(echo .)kernel.org \
--cc=Linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=wg@denx$(echo .)de \
--cc=wg@grandegger$(echo .)com \
/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