of: functions to count number of elements and convert regulators
Status from this message: Applied, thanks.
Get series with b4
b4 am 2573561.oCYNnnL0gm@philVersions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | of: add functions to count number of elements in a propertydrivers/ include/ | +108 | 1 reply | |
| 2/3 | regulator: gpio-regulator: do not open-code counting and access of dt array elementsdrivers/ | +6 | 1 reply | |
| 3/3 | regulator: ti-abb-regulator: do not open-code counting and access of dt array elementsdrivers/ | +20 | 1 reply |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Rob Herring | Grant Likely | Mark Rutland |
|---|---|---|---|
| Series | A-b | ||
| 1/3 | A-b | A-b | |
| 2/3 | |||
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 0/3] of: functions to count number of elements and convert regulators
In a different thread [0] Mark Rutland suggested that drivers should not repeatedly open-code the counting of array elements in a property as well as handling the format and endianes of the DTB, as these should be limited to the of_ helper functions.
Therefore the first patch introduces a set of helper functions for counting the number of u8,...,u64 elements in a property.
The second and third patch convert the two regulator drivers that use this pattern to instead use both of_property_count_u32_elemens as well as of_property_read_u32_index.
gpio-regulator change tested on a s3c2416-based device, ti-abb-regulator compile-tested only.
[0] https://lkml.org/lkml/2014/1/16/172
Heiko Stuebner (3):
of: add functions to count number of elements in a property
regulator: gpio-regulator: do not open-code counting and access of dt array elements
regulator: ti-abb-regulator: do not open-code counting and access of dt array elements
drivers/of/base.c | 32 ++++++++++++++ drivers/regulator/gpio-regulator.c | 15 +++---- drivers/regulator/ti-abb-regulator.c | 43 +++++++++---------- include/linux/of.h | 76 ++++++++++++++++++++++++++++++++++ 4 files changed, 134 insertions(+), 32 deletions(-)
Signature · 1 line
1.7.10.4