staging: iio: resolver: ad2s1210: use devicetree to get CLKIN rate
authorDavid Lechner <dlechner@baylibre.com>
Fri, 29 Sep 2023 17:23:14 +0000 (12:23 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 30 Sep 2023 14:44:21 +0000 (15:44 +0100)
commit68d319571b8fee7b4135b118ad4733b4469ccaf0
tree72c66014bd75a755e265f1c9df6af0df4c2c696b
parent4623b414e68bb57ce30fe286ca932202fc438a16
staging: iio: resolver: ad2s1210: use devicetree to get CLKIN rate

This removes the fclkin sysfs attribute and replaces it with getting
the CLKIN clock rate using the clk subsystem (i.e. from the devicetree).

CLKIN comes from an external oscillator that is connected directly to
the AD2S1210 chip, so users of the sysfs attributes should not need to
be concerned with this.

The fclkin field (the datasheet name) is renamed to clkin_hz to be more
obvious that it is a frequency in Hz.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20230929-ad2s1210-mainline-v3-9-fa4364281745@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/resolver/Kconfig
drivers/staging/iio/resolver/ad2s1210.c