]> git.baikalelectronics.ru Git - kernel.git/commit
iio: frequency: ADF4350: Fix potential reference div factor overflow.
authorMichael Hennerich <michael.hennerich@analog.com>
Fri, 20 Jul 2012 08:31:00 +0000 (09:31 +0100)
committerJonathan Cameron <jic23@kernel.org>
Thu, 16 Aug 2012 19:24:33 +0000 (20:24 +0100)
commit13f3ea0ce23aada11d123c1fcf14b70c403cf0f6
treeba45e6d7779aab84f6a7c1ba37697d9914158b97
parentbc97d48fa0c0926ddf4d03fc01b9b9b055e66994
iio: frequency: ADF4350: Fix potential reference div factor overflow.

With small channel spacing values and high reference frequencies it is
possible to exceed the range of the 10-bit counter.
Workaround by checking the range and widening some constrains.

We don't use the REG1_PHASE value in this case the datasheet recommends to set
it to 1 if not used.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/frequency/adf4350.c
include/linux/iio/frequency/adf4350.h