summaryrefslogtreecommitdiffstats
path: root/drivers/of/unittest-data
Commit message (Collapse)AuthorAgeFilesLines
* vsprintf: Add %p extension "%pOF" for device treePantelis Antoniou2017-06-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 90% of the usage of device node's full_name is printing it out in a kernel message. However, storing the full path for every node is wasteful and redundant. With a custom format specifier, we can generate the full path at run-time and eventually remove the full path from every node. For instance typical use is: pr_info("Frobbing node %s\n", node->full_name); Which can be written now as: pr_info("Frobbing node %pOF\n", node); '%pO' is the base specifier to represent kobjects with '%pOF' representing struct device_node. Currently, struct device_node is the only supported type of kobject. More fine-grained control of formatting includes printing the name, flags, path-spec name and others, explained in the documentation entry. Originally written by Pantelis, but pretty much rewrote the core function using existing string/number functions. The 2 passes were unnecessary and have been removed. Also, updated the checkpatch.pl check. The unittest code was written by Grant Likely. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Rob Herring <robh@kernel.org>
* of: Add unit tests for applying overlaysFrank Rowand2017-04-284-3/+167
| | | | | | | | Existing overlay unit tests examine individual pieces of the overlay code. The new tests target the entire process of applying an overlay. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
* of/unittest: replace 'selftest' with 'unittest'Wang Long2015-03-251-54/+54
| | | | | | | | | | This patch just replace the string 'selftest' with 'unittest' in OF unittest and data and binding file. I have tested it successfully on ARM. Signed-off-by: Wang Long <long.wanglong@huawei.com> Signed-off-by: Rob Herring <robh@kernel.org>
* dt: OF_UNITTEST make dependency brokenFrank Rowand2015-03-252-0/+9
| | | | | | | | | | If CONFIG_OF_UNITTEST=y then a kernel image make will always cause .version to be incremented, even if there are not source changes. This is caused by a lack of dependency tracking and checking for drivers/of/unittest-data/testcases.dtb.o. Signed-off-by: Frank Rowand <frank.rowand@sonymobile.com> Signed-off-by: Rob Herring <robh@kernel.org>
* of: unitest: Add I2C overlay unit tests.Pantelis Antoniou2015-02-041-0/+94
| | | | | | | | Introduce I2C device tree overlay tests. Tests insertion and removal of i2c adapters, i2c devices, and muxes. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: Rob Herring <robh@kernel.org>
* of/unittest: Overlays with sub-devices testsPantelis Antoniou2015-01-231-0/+55
| | | | | | | | Introduce selftests for overlays using sub-devices present in children nodes. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: Grant Likely <grant.likely@linaro.org>
* of/overlay: Add overlay unittestsPantelis Antoniou2014-11-242-0/+196
| | | | | | | | | | | | | Add unittests for OF overlays. It tests overlay device addition/removal and whether the apply revert sequence is correct. Changes since V1: * Added local fixups entries. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: Grant Likely <grant.likely@linaro.org>
* of/resolver: Switch to new local fixups format.Pantelis Antoniou2014-11-241-24/+37
| | | | | | | | | | | | | The original resolver format is way too cryptic, switch to using a tree based format that gets rid of repetitions, is more compact and readable. At the same time, update the selftests to using the new local fixups format. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> [grant.likely: Squashed in testcase changes and merged similar functions] Signed-off-by: Grant Likely <grant.likely@linaro.org>
* of/unittest: Rename selftest.c to unittest.cGrant Likely2014-11-045-0/+223
This is unit testing code. It should use that name because it makes more sense than 'selftest'. Rename the files to match and rename the config variable. Signed-off-by: Grant Likely <grant.likely@linaro.org>