[PATCH 1/5] i2c: Convert i2c-octeon.c to use device tree.
Wolfram Sang
w.sang at pengutronix.de
Thu Apr 19 01:16:21 EST 2012
> >>- 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/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20120418/d2e8d332/attachment.sig>
More information about the devicetree-discuss
mailing list