lkml.org 
[lkml]   [2012]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/5] i2c: Convert i2c-octeon.c to use device tree.
    On 04/18/2012 08:16 AM, Wolfram Sang wrote:
    >>>> - 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?

    Yes, I have implemented Rob's suggestions. A new patch set reflecting
    this is coming soon.

    >
    > And shouldn't the bindings be documented? Or are they only standard and
    > we hide the legacy one?
    >

    Yes, they are documented here:

    http://patchwork.linux-mips.org/patch/3536/

    look in the cavium-i2c.txt file.

    Thanks,
    David Daney


    \
     
     \ /
      Last update: 2012-04-18 22:37    [W:0.023 / U:31.352 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site