| To: | David Daney <david.daney@cavium.com> |
|---|---|
| Subject: | Re: [PATCH 1/5] i2c: Convert i2c-octeon.c to use device tree. |
| From: | Wolfram Sang <w.sang@pengutronix.de> |
| Date: | Wed, 18 Apr 2012 17:16:21 +0200 |
| Cc: | Rob Herring <robherring2@gmail.com>, David Daney <ddaney.cavm@gmail.com>, "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>, "ralf@linux-mips.org" <ralf@linux-mips.org>, "devicetree-discuss@lists.ozlabs.org" <devicetree-discuss@lists.ozlabs.org>, Grant Likely <grant.likely@secretlab.ca>, Rob Herring <rob.herring@calxeda.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>, "Ben Dooks (embedded platforms)" <ben-linux@fluff.org>, "Jean Delvare (PC drivers, core)" <khali@linux-fr.org> |
| In-reply-to: | <4F7117FD.7000700@cavium.com> |
| References: | <1332808075-8333-1-git-send-email-ddaney.cavm@gmail.com> <1332808075-8333-2-git-send-email-ddaney.cavm@gmail.com> <4F7115FA.6080507@gmail.com> <4F7117FD.7000700@cavium.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
> >>- if (i2c_data == NULL) {
> >>- dev_err(i2c->dev, "no I2C frequency data\n");
> >>+ /*
> >>+ * "clock-rate" is a legacy binding, the official binding is
> >>+ * "clock-frequency". Try the official one first and then
> >>+ * fall back if it doesn't exist.
> >>+ */
> >>+ data = of_get_property(pdev->dev.of_node, "clock-frequency",&len);
> >>+ if (!data || len != sizeof(*data))
> >>+ data = of_get_property(pdev->dev.of_node, "clock-rate",&len);
> >>+ if (data&& len == sizeof(*data)) {
> >>+ i2c->twsi_freq = be32_to_cpup(data);
> >
> >Can't you use of_property_read_u32?
>
> I will investigate, and use it if possible.
Any outcome?
And shouldn't the bindings be documented? Or are they only standard and
we hide the legacy one?
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] MIPS: cavium: Don't enable irq in ->init__secondary(), Yong Zhang |
|---|---|
| Next by Date: | Re: [PATCH 1/5] i2c: Convert i2c-octeon.c to use device tree., David Daney |
| Previous by Thread: | [PATCH 1/2] seccomp: ignore secure_computing return values, Will Drewry |
| Next by Thread: | Re: [PATCH 1/5] i2c: Convert i2c-octeon.c to use device tree., David Daney |
| Indexes: | [Date] [Thread] [Top] [All Lists] |