Re: [PATCH 2/2] input: add Adafruit Seesaw Gamepad driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux