mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
iio: adc: ad7192: Fix internal/external clock selection
commitf7d9e21dd2upstream. Fix wrong selection of internal clock when mclk is defined. Resolve a logical inversion introduced inc9ec2cb328. Fixes:c9ec2cb328("iio: adc: ad7192: use devm_clk_get_optional() for mclk") Signed-off-by: Fabrizio Lamarque <fl.scratchpad@gmail.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Cc: <Stable@vger.kernel.org> Link: https://lore.kernel.org/r/20230530075311.400686-3-fl.scratchpad@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b61f26a8a0
commit
fcdae54e3d
@@ -368,7 +368,7 @@ static int ad7192_of_clock_select(struct ad7192_state *st)
|
|||||||
clock_sel = AD7192_CLK_INT;
|
clock_sel = AD7192_CLK_INT;
|
||||||
|
|
||||||
/* use internal clock */
|
/* use internal clock */
|
||||||
if (st->mclk) {
|
if (!st->mclk) {
|
||||||
if (of_property_read_bool(np, "adi,int-clock-output-enable"))
|
if (of_property_read_bool(np, "adi,int-clock-output-enable"))
|
||||||
clock_sel = AD7192_CLK_INT_CO;
|
clock_sel = AD7192_CLK_INT_CO;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user