Skip to content
Commit 5c24d355 authored by Heiko Stuebner's avatar Heiko Stuebner Committed by Mark Brown
Browse files

regulator: ti-abb-regulator: do not open-code counting and access of dt array elements



Open coding the counting of elements in a dt-property is abstracted by the newly
introduced of_property_count_uXX_elems functions. Additionally the raw iteration
over the states element exposes the endian conversion and dtb-format details,
which according to Mark Rutland "would be nice to limit [...] to of_ helper
functions".

Thus change ti-abb-regulator to use the helper for element counting and
of_property_read_u32_index for retrieval of individual values.

This makes it possible to remove the raw access to the property entirely.

Signed-off-by: default avatarHeiko Stuebner <heiko.stuebner@bqreaders.com>
Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 13cf4ea0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment