• Nuno Sá's avatar
    iio: adis: Introduce timeouts structure · 380b107b
    Nuno Sá authored
    The adis library only allows to define a `startup_delay` which for some
    devices is enough. However, other devices define different timeouts with
    significantly different timings which could lead to devices to not wait
    enough time or to wait a lot more than necessary (which is not
    efficient). This patch introduces a new timeout struct that must be
    passed into `adis_init()`. There are mainly, for now, three timeouts
    used. This is also an introductory patch with the goal of refactoring
    `adis_initial_startup()`. New driver's (eg: adis16480, adis16460) are
    replicating code for the device initial setup. With some changes (being
    this the first one) we can pass this to `adis_initial_startup()`.
    Signed-off-by: default avatarNuno Sá <nuno.sa@analog.com>
    Signed-off-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
    Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
    380b107b
adis16460.c 12.2 KB