patch "iio: adc: rockchip: Fix clock initialization sequence" added to char-misc-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
iio: adc: rockchip: Fix clock initialization sequence
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 839f81de397019f55161c5982d670ac19d836173 Mon Sep 17 00:00:00 2001
From: Simon Xue <[email protected]>
Date: Wed, 12 Mar 2025 14:20:16 +0800
Subject: iio: adc: rockchip: Fix clock initialization sequence
clock_set_rate should be executed after devm_clk_get_enabled.
--- drivers/iio/adc/rockchip_saradc.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
drivers/iio/adc/rockchip_saradc.c +8 -9
@@ -520,15 +520,6 @@ static int rockchip_saradc_probe(struct platform_device *pdev)if (info->reset)rockchip_saradc_reset_controller (info->reset); -/* -* Use a default value for the converter clock. -* This may become user-configurable in the future. -*/ - ret =clk_set_rate (info->clk, info->data->clk_rate); -if (ret <0 ) -return dev_err_probe (&pdev->dev, ret, -"failed to set adc clk rate\n" ); - ret =regulator_enable (info->vref);if (ret <0 ) return dev_err_probe(&pdev->dev, ret,
@@ -555,6 +546,14 @@ static int rockchip_saradc_probe(struct platform_device *pdev)if (IS_ERR (info->clk))return dev_err_probe (&pdev->dev,PTR_ERR (info->clk),"failed to get adc clock\n" ); +/* +* Use a default value for the converter clock. +* This may become user-configurable in the future. +*/ + ret =clk_set_rate (info->clk, info->data->clk_rate); +if (ret <0 ) +return dev_err_probe (&pdev->dev, ret, +"failed to set adc clk rate\n" );platform_set_drvdata (pdev, indio_dev);
Signature · 1 line
2.49.0