Re: [PATCH 1/4] iio: adc: rockchip_saradc: reset saradc controller before programming it

From: Heiko Stübner
Date: Tue Jul 26 2016 - 05:17:55 EST


Am Dienstag, 26. Juli 2016, 14:11:47 schrieb Caesar Wang:
> SARADC controller needs to be reset before programming it, otherwise
> it will not function properly.
>
> Signed-off-by: Caesar Wang <wxt@xxxxxxxxxxxxxx>
> Cc: Jonathan Cameron <jic23@xxxxxxxxxx>
> Cc: Heiko Stuebner <heiko@xxxxxxxxx>
> Cc: Rob Herring <robh+dt@xxxxxxxxxx>
> Cc: linux-iio@xxxxxxxxxxxxxxx
> Cc: linux-rockchip@xxxxxxxxxxxxxxxxxxx
> ---
>
> .../bindings/iio/adc/rockchip-saradc.txt | 5 +++++
> drivers/iio/adc/Kconfig | 1 +
> drivers/iio/adc/rockchip_saradc.c | 22
> ++++++++++++++++++++++ 3 files changed, 28 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt
> b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt index
> bf99e2f..d2258be 100644
> --- a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt
> +++ b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt
> @@ -13,6 +13,9 @@ Required properties:
> - clocks: Must contain an entry for each entry in clock-names.
> - clock-names: Shall be "saradc" for the converter-clock, and "apb_pclk"
> for the peripheral clock.
> +- resets: Must contain an entry for each entry in reset-names.
> + See ../reset/reset.txt for details.
> +- reset-names: Must include the name "saradc-apb".

as pointed out by John, this should be an optional property, as it should work
with old devicetrees as well.