Re: [PATCH 3/3] iio: magnetometer: ak8975: Add gpio reset support

From: Pavel Machek
Date: Fri May 29 2020 - 09:33:57 EST


Hi!

> AK09911 has a reset gpio to handle register's reset. If reset gpio is
> set to low it will trigger the reset. AK09911 datasheed says that if not
> used reset pin should be connected to VID and this patch emulates this
> situation
>
> Signed-off-by: Jonathan Albrieux <jonathan.albrieux@xxxxxxxxx>
> ---
> drivers/iio/magnetometer/ak8975.c | 21 +++++++++++++++++++--
> 1 file changed, 19 insertions(+), 2 deletions(-)
>
> /*
> - * According to the datasheet the power supply rise time i 200us
> + * According to the datasheet the power supply rise time is 200us
> * and the minimum wait time before mode setting is 100us, in
> - * total 300 us. Add some margin and say minimum 500us here.
> + * total 300us. Add some margin and say minimum 500us here.
> */
> usleep_range(500, 1000);

I'd assume that datasheet added some safety margin too, and there's another one in usleep...
So I believe usleep..(300) should be okay..

Best regards,
Pavel