Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: dt_driver: allow parsing of phandle == 0
In Linux, it is allowed to specify a null phandle which means it should be skipped. Add support for this specific case by simply skipping over it. This is needed to parse assigned-clock-parents which can use such syntax. This is specified in the clock bindings [1] which says the following: To skip setting parent or rate of a clock its corresponding entry should be set to 0, or can be omitted if it is not followed by any non-zero entry For example this is a valid device-tree description: assigned-clocks = <foo>, <bar>; assigned-clock-parents = <0> <bar_parent>; assigned-clock-rates = <1000>; Link: [1] https://www.kernel.org/doc/Documentation/devicetree/bindings/clock/clock-bindings.txt Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Clément Léger <clement.leger@bootlin.com>
- Loading branch information