Skip to content

iio_attr infinite loop when writing to DAC #27

@SJ-Innovation

Description

@SJ-Innovation

Issuing an iio_attr command to write to the value of the DAC changes the value of the DAC successfully but hangs as it does so. The DAC updates successfully (verified by scoping output frequency), and can be read/written directly by devmem to its respective absolute address.

I suspect this may be due to the ad5660_mp driver added in this patch, which has some... Non-conformities... In how it uses IIO.
I have modified the driver to fix the below notes, and the DAC updates successfully. Happy to make a PR if requested.

  1. show/store functions are referenced by attributes which will cause EINVAL. Better to just use nullptrs so IIO itself generates the error, by setting more appropriate permissions on the unrequired store/show references.

  2. store function return value is incorrect, as are polarities of EINVAL throughout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions