Skip to content

Commit

Permalink
dt-bindings: hwmon: (adc128d818) Specify ti,mode property size
Browse files Browse the repository at this point in the history
By default, cells in DT are 32-bit in size. The driver reads "ti,mode"
using the function of_property_read_u8() which causes the value to be
read incorrectly in little-endian architectures if the size is not
specified.

Make it explicit in the binding documentation that this prorperty must
be set as a 8-bit value.

Signed-off-by: Carlos Menin <menin@carlosaurelio.net>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Carlos Menin authored and Guenter Roeck committed Mar 29, 2019
1 parent 5fd43dd commit d3b018f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/devicetree/bindings/hwmon/adc128d818.txt
Original file line number Diff line number Diff line change
@@ -26,13 +26,13 @@ Required node properties:

Optional node properties:

- ti,mode: Operation mode (see above).
- ti,mode: Operation mode (u8) (see above).


Example (operation mode 2):

adc128d818@1d {
compatible = "ti,adc128d818";
reg = <0x1d>;
ti,mode = <2>;
ti,mode = /bits/ 8 <2>;
};

0 comments on commit d3b018f

Please sign in to comment.