Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'devicetree-fixes-for-4.0' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull DeviceTree fixes from Rob Herring:

- fix for stdout-path option parsing with added unittest

- fix for stdout-path interaction with earlycon

- several DT unittest fixes

- fix Sparc allmodconfig build error on of_platform_register_reconfig_notifier

- several DT overlay kconfig and build warning fixes

- several DT binding documentation updates

* tag 'devicetree-fixes-for-4.0' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
of/platform: Fix sparc:allmodconfig build
of: unittest: Add options string testcase variants
of: fix handling of '/' in options for of_find_node_by_path()
of/unittest: Fix the wrong expected value in of_selftest_property_string
of/unittest: remove the duplicate of_changeset_init
dt: submitting-patches: clarify that DT maintainers are to be cced on bindings
of: unittest: fix I2C dependency
of/overlay: Remove unused variable
Documentation: DT: Renamed of-serial.txt to 8250.txt
of: Fix premature bootconsole disable with 'stdout-path'
serial: add device tree binding documentation for ETRAX FS UART
of/overlay: Directly include idr.h
of: Drop superfluous dependance for OF_OVERLAY
of: Add vendor prefix for Arasan
of: Add prompt for OF_OVERLAY config

+65 -22
+19
Documentation/devicetree/bindings/serial/axis,etraxfs-uart.txt
··· 1 + ETRAX FS UART 2 + 3 + Required properties: 4 + - compatible : "axis,etraxfs-uart" 5 + - reg: offset and length of the register set for the device. 6 + - interrupts: device interrupt 7 + 8 + Optional properties: 9 + - {dtr,dsr,ri,cd}-gpios: specify a GPIO for DTR/DSR/RI/CD 10 + line respectively. 11 + 12 + Example: 13 + 14 + serial@b00260000 { 15 + compatible = "axis,etraxfs-uart"; 16 + reg = <0xb0026000 0x1000>; 17 + interrupts = <68>; 18 + status = "disabled"; 19 + };
Documentation/devicetree/bindings/serial/of-serial.txt Documentation/devicetree/bindings/serial/8250.txt
+3
Documentation/devicetree/bindings/submitting-patches.txt
··· 12 12 13 13 devicetree@vger.kernel.org 14 14 15 + and Cc: the DT maintainers. Use scripts/get_maintainer.pl to identify 16 + all of the DT maintainers. 17 + 15 18 3) The Documentation/ portion of the patch should come in the series before 16 19 the code implementing the binding. 17 20
+2
Documentation/devicetree/bindings/vendor-prefixes.txt
··· 20 20 ams AMS AG 21 21 amstaos AMS-Taos Inc. 22 22 apm Applied Micro Circuits Corporation (APM) 23 + arasan Arasan Chip Systems 23 24 arm ARM Ltd. 24 25 armadeus ARMadeus Systems SARL 25 26 asahi-kasei Asahi Kasei Corp. ··· 28 27 auo AU Optronics Corporation 29 28 avago Avago Technologies 30 29 avic Shanghai AVIC Optoelectronics Co., Ltd. 30 + axis Axis Communications AB 31 31 bosch Bosch Sensortec GmbH 32 32 brcm Broadcom Corporation 33 33 buffalo Buffalo, Inc.
+1 -2
drivers/of/Kconfig
··· 84 84 bool 85 85 86 86 config OF_OVERLAY 87 - bool 88 - depends on OF 87 + bool "Device Tree overlays" 89 88 select OF_DYNAMIC 90 89 select OF_RESOLVE 91 90
+18 -9
drivers/of/base.c
··· 714 714 const char *path) 715 715 { 716 716 struct device_node *child; 717 - int len = strchrnul(path, '/') - path; 718 - int term; 717 + int len; 718 + const char *end; 719 719 720 + end = strchr(path, ':'); 721 + if (!end) 722 + end = strchrnul(path, '/'); 723 + 724 + len = end - path; 720 725 if (!len) 721 726 return NULL; 722 - 723 - term = strchrnul(path, ':') - path; 724 - if (term < len) 725 - len = term; 726 727 727 728 __for_each_child_of_node(parent, child) { 728 729 const char *name = strrchr(child->full_name, '/'); ··· 769 768 770 769 /* The path could begin with an alias */ 771 770 if (*path != '/') { 772 - char *p = strchrnul(path, '/'); 773 - int len = separator ? separator - path : p - path; 771 + int len; 772 + const char *p = separator; 773 + 774 + if (!p) 775 + p = strchrnul(path, '/'); 776 + len = p - path; 774 777 775 778 /* of_aliases must not be NULL */ 776 779 if (!of_aliases) ··· 799 794 path++; /* Increment past '/' delimiter */ 800 795 np = __of_find_node_by_path(np, path); 801 796 path = strchrnul(path, '/'); 797 + if (separator && separator < path) 798 + break; 802 799 } 803 800 raw_spin_unlock_irqrestore(&devtree_lock, flags); 804 801 return np; ··· 1893 1886 name = of_get_property(of_chosen, "linux,stdout-path", NULL); 1894 1887 if (IS_ENABLED(CONFIG_PPC) && !name) 1895 1888 name = of_get_property(of_aliases, "stdout", NULL); 1896 - if (name) 1889 + if (name) { 1897 1890 of_stdout = of_find_node_opts_by_path(name, &of_stdout_options); 1891 + add_preferred_console("stdout-path", 0, NULL); 1892 + } 1898 1893 } 1899 1894 1900 1895 if (!of_aliases)
+2 -1
drivers/of/overlay.c
··· 19 19 #include <linux/string.h> 20 20 #include <linux/slab.h> 21 21 #include <linux/err.h> 22 + #include <linux/idr.h> 22 23 23 24 #include "of_private.h" 24 25 ··· 86 85 struct device_node *target, struct device_node *child) 87 86 { 88 87 const char *cname; 89 - struct device_node *tchild, *grandchild; 88 + struct device_node *tchild; 90 89 int ret = 0; 91 90 92 91 cname = kbasename(child->full_name);
+19 -9
drivers/of/unittest.c
··· 92 92 "option path test failed\n"); 93 93 of_node_put(np); 94 94 95 + np = of_find_node_opts_by_path("/testcase-data:test/option", &options); 96 + selftest(np && !strcmp("test/option", options), 97 + "option path test, subcase #1 failed\n"); 98 + of_node_put(np); 99 + 95 100 np = of_find_node_opts_by_path("/testcase-data:testoption", NULL); 96 101 selftest(np, "NULL option path test failed\n"); 97 102 of_node_put(np); ··· 105 100 &options); 106 101 selftest(np && !strcmp("testaliasoption", options), 107 102 "option alias path test failed\n"); 103 + of_node_put(np); 104 + 105 + np = of_find_node_opts_by_path("testcase-alias:test/alias/option", 106 + &options); 107 + selftest(np && !strcmp("test/alias/option", options), 108 + "option alias path test, subcase #1 failed\n"); 108 109 of_node_put(np); 109 110 110 111 np = of_find_node_opts_by_path("testcase-alias:testaliasoption", NULL); ··· 389 378 rc = of_property_match_string(np, "phandle-list-names", "first"); 390 379 selftest(rc == 0, "first expected:0 got:%i\n", rc); 391 380 rc = of_property_match_string(np, "phandle-list-names", "second"); 392 - selftest(rc == 1, "second expected:0 got:%i\n", rc); 381 + selftest(rc == 1, "second expected:1 got:%i\n", rc); 393 382 rc = of_property_match_string(np, "phandle-list-names", "third"); 394 - selftest(rc == 2, "third expected:0 got:%i\n", rc); 383 + selftest(rc == 2, "third expected:2 got:%i\n", rc); 395 384 rc = of_property_match_string(np, "phandle-list-names", "fourth"); 396 385 selftest(rc == -ENODATA, "unmatched string; rc=%i\n", rc); 397 386 rc = of_property_match_string(np, "missing-property", "blah"); ··· 489 478 struct device_node *n1, *n2, *n21, *nremove, *parent, *np; 490 479 struct of_changeset chgset; 491 480 492 - of_changeset_init(&chgset); 493 481 n1 = __of_node_dup(NULL, "/testcase-data/changeset/n1"); 494 482 selftest(n1, "testcase setup failure\n"); 495 483 n2 = __of_node_dup(NULL, "/testcase-data/changeset/n2"); ··· 989 979 return pdev != NULL; 990 980 } 991 981 992 - #if IS_ENABLED(CONFIG_I2C) 982 + #if IS_BUILTIN(CONFIG_I2C) 993 983 994 984 /* get the i2c client device instantiated at the path */ 995 985 static struct i2c_client *of_path_to_i2c_client(const char *path) ··· 1455 1445 return; 1456 1446 } 1457 1447 1458 - #if IS_ENABLED(CONFIG_I2C) && IS_ENABLED(CONFIG_OF_OVERLAY) 1448 + #if IS_BUILTIN(CONFIG_I2C) && IS_ENABLED(CONFIG_OF_OVERLAY) 1459 1449 1460 1450 struct selftest_i2c_bus_data { 1461 1451 struct platform_device *pdev; ··· 1594 1584 .id_table = selftest_i2c_dev_id, 1595 1585 }; 1596 1586 1597 - #if IS_ENABLED(CONFIG_I2C_MUX) 1587 + #if IS_BUILTIN(CONFIG_I2C_MUX) 1598 1588 1599 1589 struct selftest_i2c_mux_data { 1600 1590 int nchans; ··· 1705 1695 "could not register selftest i2c bus driver\n")) 1706 1696 return ret; 1707 1697 1708 - #if IS_ENABLED(CONFIG_I2C_MUX) 1698 + #if IS_BUILTIN(CONFIG_I2C_MUX) 1709 1699 ret = i2c_add_driver(&selftest_i2c_mux_driver); 1710 1700 if (selftest(ret == 0, 1711 1701 "could not register selftest i2c mux driver\n")) ··· 1717 1707 1718 1708 static void of_selftest_overlay_i2c_cleanup(void) 1719 1709 { 1720 - #if IS_ENABLED(CONFIG_I2C_MUX) 1710 + #if IS_BUILTIN(CONFIG_I2C_MUX) 1721 1711 i2c_del_driver(&selftest_i2c_mux_driver); 1722 1712 #endif 1723 1713 platform_driver_unregister(&selftest_i2c_bus_driver); ··· 1824 1814 of_selftest_overlay_10(); 1825 1815 of_selftest_overlay_11(); 1826 1816 1827 - #if IS_ENABLED(CONFIG_I2C) 1817 + #if IS_BUILTIN(CONFIG_I2C) 1828 1818 if (selftest(of_selftest_overlay_i2c_init() == 0, "i2c init failed\n")) 1829 1819 goto out; 1830 1820
+1 -1
include/linux/of_platform.h
··· 84 84 static inline void of_platform_depopulate(struct device *parent) { } 85 85 #endif 86 86 87 - #ifdef CONFIG_OF_DYNAMIC 87 + #if defined(CONFIG_OF_DYNAMIC) && defined(CONFIG_OF_ADDRESS) 88 88 extern void of_platform_register_reconfig_notifier(void); 89 89 #else 90 90 static inline void of_platform_register_reconfig_notifier(void) { }