Skip to content
Commit acd82567 authored by Ivan T. Ivanov's avatar Ivan T. Ivanov Committed by Jonathan Cameron
Browse files

iio: inkern: Add of_xlate function to struct iio_info



When #iio-cells is greater than '0', the driver could provide
a custom of_xlate function that reads the *args* and returns
the appropriate index in registered IIO channels array.

Add simple translation function, suitable for the most 1:1
mapped channels in IIO chips, and use it when driver did not
provide custom implementation.

Signed-off-by: default avatarIvan T. Ivanov <iivanov@mm-sol.com>
Reviewed-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent a9bef750
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment