usb: dwc3: Fix setting of hird_thres property
First there was a one character typo ("res" instead of "ret")
that prevented the read value of the "snps,hird_thres" property
from being applied properly. Secondly, of_property_read_u8()
expects the property to be set in DT thusly:
snps,hird_thresh = /bits/ 8 <0x1f>;
Without the "/bits/ 8" specifier, the device tree compiler will
typically encode an integer value as 32-bits, and
of_property_read_u8() will fail to read it. Let's relax the bit
width requirement in device tree and simply read it as a full
integer into a temporary variable instead, which can then be
downcasted to the u8 member.
Change-Id: Ia3894b0d57eab223aab8baa3f10a355d51d07469
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment