On 5/13/26 11:02 AM, Börge Strümpfel wrote:

[...]

+       ctx->lvds_hsdrv_isel = 8; /* default: 25 uA */
+       ret = of_property_read_u32(dev->of_node, "drive-strength-microamp",
+                                  &microamp);

if ret != 0 , then what happens here ?


if ret != 0, we will keep the default value of 8 (corresponding to 25 uA
as written above), which is the behavior that the driver had previously.

According to the documentation, of_property_read_u32() will return 0 on
success, -EINVAL if the property does not exist, -ENODATA if property
does not have a value, and -EOVERFLOW if the property data isn't large
enough. I think we only would need to give a warning or similar if the
-ENODATA or -EOVERFLOW cases. However, I personally do not think that is
necessary, as the usage is specified unambiguously in the devicetree
bindings.
Users can pass in malformed DT, so a warning is a good idea. Thanks.

Reply via email to