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

From: Andy Shevchenko
Date: Mon May 18 2020 - 10:56:04 EST


On Mon, May 18, 2020 at 4:38 PM Jonathan Albrieux
<jonathan.albrieux@xxxxxxxxx> wrote:

> + gpiod_set_value_cansleep(data->reset_gpiod, 1);

(1)

...

> + /*
> + * If reset pin is provided then will be set to high on power on
> + * and to low on power off according to AK09911 datasheet
> + */

Wording is confusing, perhaps you have to use 'asserted / deasserted'.

Btw, in (1) it's also "high" (asserted). I barely understand how it's
supposed to work in all cases?

> + reset_gpiod = devm_gpiod_get_optional(&client->dev,
> + "reset", GPIOD_OUT_HIGH);
> + if (IS_ERR(reset_gpiod))
> + return PTR_ERR(reset_gpiod);


--
With Best Regards,
Andy Shevchenko