>> Our objective with that part of code is to wait for OTP_STATUS_BUSY_BIT >> to be cleared in the hardware, but make sure that we wait for a maximum >> of OTP_RW_TIMEOUT_MILLISECONDS ms in the driver and not beyond that. > > How exact much do you mean by "not beyond that"? Yeah that sounds strange. What is the reason to not wait "beyond that"? Reading that paragraph above, it looks like you should have a look at linux/iopoll.h. -michael