diff options
| -rw-r--r-- | Documentation/devicetree/bindings/ABI.txt | 39 | ||||
| -rw-r--r-- | Documentation/devicetree/bindings/submitting-patches.txt | 38 | ||||
| -rw-r--r-- | drivers/of/base.c | 3 |
3 files changed, 80 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/ABI.txt b/Documentation/devicetree/bindings/ABI.txt new file mode 100644 index 000000000000..d25f8d379680 --- /dev/null +++ b/Documentation/devicetree/bindings/ABI.txt | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | |||
| 2 | Devicetree (DT) ABI | ||
| 3 | |||
| 4 | I. Regarding stable bindings/ABI, we quote from the 2013 ARM mini-summit | ||
| 5 | summary document: | ||
| 6 | |||
| 7 | "That still leaves the question of, what does a stable binding look | ||
| 8 | like? Certainly a stable binding means that a newer kernel will not | ||
| 9 | break on an older device tree, but that doesn't mean the binding is | ||
| 10 | frozen for all time. Grant said there are ways to change bindings that | ||
| 11 | don't result in breakage. For instance, if a new property is added, | ||
| 12 | then default to the previous behaviour if it is missing. If a binding | ||
| 13 | truly needs an incompatible change, then change the compatible string | ||
| 14 | at the same time. The driver can bind against both the old and the | ||
| 15 | new. These guidelines aren't new, but they desperately need to be | ||
| 16 | documented." | ||
| 17 | |||
| 18 | II. General binding rules | ||
| 19 | |||
| 20 | 1) Maintainers, don't let perfect be the enemy of good. Don't hold up a | ||
| 21 | binding because it isn't perfect. | ||
| 22 | |||
| 23 | 2) Use specific compatible strings so that if we need to add a feature (DMA) | ||
| 24 | in the future, we can create a new compatible string. See I. | ||
| 25 | |||
| 26 | 3) Bindings can be augmented, but the driver shouldn't break when given | ||
| 27 | the old binding. ie. add additional properties, but don't change the | ||
| 28 | meaning of an existing property. For drivers, default to the original | ||
| 29 | behaviour when a newly added property is missing. | ||
| 30 | |||
| 31 | 4) Don't submit bindings for staging or unstable. That will be decided by | ||
| 32 | the devicetree maintainers *after* discussion on the mailinglist. | ||
| 33 | |||
| 34 | III. Notes | ||
| 35 | |||
| 36 | 1) This document is intended as a general familiarization with the process as | ||
| 37 | decided at the 2013 Kernel Summit. When in doubt, the current word of the | ||
| 38 | devicetree maintainers overrules this document. In that situation, a patch | ||
| 39 | updating this document would be appreciated. | ||
diff --git a/Documentation/devicetree/bindings/submitting-patches.txt b/Documentation/devicetree/bindings/submitting-patches.txt new file mode 100644 index 000000000000..042a0273b8ba --- /dev/null +++ b/Documentation/devicetree/bindings/submitting-patches.txt | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | |||
| 2 | Submitting devicetree (DT) binding patches | ||
| 3 | |||
| 4 | I. For patch submitters | ||
| 5 | |||
| 6 | 0) Normal patch submission rules from Documentation/SubmittingPatches | ||
| 7 | applies. | ||
| 8 | |||
| 9 | 1) The Documentation/ portion of the patch should be a separate patch. | ||
| 10 | |||
| 11 | 2) Submit the entire series to the devicetree mailinglist at | ||
| 12 | |||
| 13 | devicetree@vger.kernel.org | ||
| 14 | |||
| 15 | II. For kernel maintainers | ||
| 16 | |||
| 17 | 1) If you aren't comfortable reviewing a given binding, reply to it and ask | ||
| 18 | the devicetree maintainers for guidance. This will help them prioritize | ||
| 19 | which ones to review and which ones are ok to let go. | ||
| 20 | |||
| 21 | 2) For driver (not subsystem) bindings: If you are comfortable with the | ||
| 22 | binding, and it hasn't received an Acked-by from the devicetree | ||
| 23 | maintainers after a few weeks, go ahead and take it. | ||
| 24 | |||
| 25 | Subsystem bindings (anything affecting more than a single device) | ||
| 26 | then getting a devicetree maintainer to review it is required. | ||
| 27 | |||
| 28 | 3) For a series going though multiple trees, the binding patch should be | ||
| 29 | kept with the driver using the binding. | ||
| 30 | |||
| 31 | III. Notes | ||
| 32 | |||
| 33 | 0) Please see ...bindings/ABI.txt for details regarding devicetree ABI. | ||
| 34 | |||
| 35 | 1) This document is intended as a general familiarization with the process as | ||
| 36 | decided at the 2013 Kernel Summit. When in doubt, the current word of the | ||
| 37 | devicetree maintainers overrules this document. In that situation, a patch | ||
| 38 | updating this document would be appreciated. | ||
diff --git a/drivers/of/base.c b/drivers/of/base.c index 8d007d8b8c78..ff85450d5683 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
| @@ -415,6 +415,9 @@ static int __of_device_is_available(const struct device_node *device) | |||
| 415 | const char *status; | 415 | const char *status; |
| 416 | int statlen; | 416 | int statlen; |
| 417 | 417 | ||
| 418 | if (!device) | ||
| 419 | return 0; | ||
| 420 | |||
| 418 | status = __of_get_property(device, "status", &statlen); | 421 | status = __of_get_property(device, "status", &statlen); |
| 419 | if (status == NULL) | 422 | if (status == NULL) |
| 420 | return 1; | 423 | return 1; |
