24 Apr, 2014

1 commit


12 Mar, 2014

1 commit


20 Feb, 2014

1 commit

  • Adds a selftest function for the of_match_node function. of_match_node
    is supposed to handle precedence for the compatible property as well as
    the name and device_type values. This patch adds some test case data and
    a function that makes sure each test node matches against the correct
    entry of an of_device_id table.

    This code was written to verify the new of_match_node() implementation
    that is an earlier part of this series.

    Signed-off-by: Grant Likely
    Cc: Kevin Hao

    Grant Likely
     

29 Oct, 2013

1 commit

  • The standard interrupts property in device tree can only handle
    interrupts coming from a single interrupt parent. If a device is wired
    to multiple interrupt controllers, then it needs to be attached to a
    node with an interrupt-map property to demux the interrupt specifiers
    which is confusing. It would be a lot easier if there was a form of the
    interrupts property that allows for a separate interrupt phandle for
    each interrupt specifier.

    This patch does exactly that by creating a new interrupts-extended
    property which reuses the phandle+arguments pattern used by GPIOs and
    other core bindings.

    Signed-off-by: Grant Likely
    Acked-by: Tony Lindgren
    Acked-by: Kumar Gala
    [grant.likely: removed versatile platform hunks into separate patch]
    Cc: Rob Herring

    Grant Likely
     

24 Oct, 2013

1 commit


13 Feb, 2013

3 commits

  • This patch creates of_count_phandle_with_args(), a new function for
    counting the number of phandle+argument tuples in a given property. This
    is better than the existing method of parsing each phandle individually
    until parsing fails which is a horribly slow way to do the count.

    Tested on ARM using the selftest code.

    v3: - Rebased on top of selftest code cleanup patch
    v2: - fix bug where of_parse_phandle_with_args() could behave like _count_.
    - made of_gpio_named_count() into a static inline regardless of CONFIG_OF_GPIO

    Tested-by: Andreas Larsson
    Signed-off-by: Grant Likely
    Cc: Linus Walleij
    Cc: Rob Herring

    Grant Likely
     
  • Some of the selftests are open-coded. Others use the selftest() macro
    defined in drivers/of/selftest.c. The macro makes for cleaner selftest
    code, so refactor the of_parse_phandle_with_args() tests to use it.

    Cc: Rob Herring
    Signed-off-by: Grant Likely

    Grant Likely
     
  • The of_gpio_named_count() self test doesn't hit the out-of-range
    condition even though it is coded. Fix the bug by increasing the for
    loop range by one.

    Reported-by: Andreas Larsson
    Cc: Rob Herring
    Signed-off-by: Grant Likely

    Grant Likely
     

29 Jan, 2012

1 commit


13 Dec, 2011

1 commit

  • Add some runtime test cases for the library of device tree parsing functions.

    v2: - Add testcase for phandle with 0 args
    - Don't run testcases if testcase data isn't present in device tree

    Signed-off-by: Grant Likely

    Grant Likely