On 07/10/2023 18:13, Anshul Dalal wrote: >>> + err = i2c_master_send(client, register_reset, sizeof(register_reset)); >>> + if (err < 0) >>> + return err; >>> + if (err != sizeof(register_reset)) >>> + return -EIO; >>> + mdelay(10); >> >> Why 10? This should be explained somehow in the code. > > The reason for the delay is to ensure the register reset process is > finished before going further. The reference Arduino driver from the > manufacturer also had a delay for the same amount though my hardware > unit worked fine till 5ms delay. Is there some kernel abstraction I > could use to indicate a short delay or will the previous explanation in > a comment above the line do? > Just explain it briefly as a comment. Best regards, Krzysztof