From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FB80EB64DC for ; Thu, 15 Jun 2023 11:01:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238028AbjFOLBy (ORCPT ); Thu, 15 Jun 2023 07:01:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230267AbjFOLBx (ORCPT ); Thu, 15 Jun 2023 07:01:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D5CC199D for ; Thu, 15 Jun 2023 04:01:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CD44262A93 for ; Thu, 15 Jun 2023 11:01:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1206C433C8; Thu, 15 Jun 2023 11:01:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1686826911; bh=v/19qwGtUlv+eK+QXaAh8nOTAnJ2eOj4AQgQ3pHwqL4=; h=Subject:To:From:Date:From; b=VV+0xKkUnhY2q9UZ2GacTvUfg0pjvYOV3TIqkvIBiHYuWPqyaUJ5Ws8AEplI5BrJ9 ox+g1gffACW8iuGAKdkUGrSYpfrjULrZGZKBct+/tMEuHH0huNwBZu60AiKsbo5s4n RoclRmDBTNk87GCg7Kpeg2XTKu2RJlzms5DFCHxc= Subject: patch "iio: adc: ad7192: Fix internal/external clock selection" added to char-misc-testing To: fl.scratchpad@gmail.com, Jonathan.Cameron@huawei.com, Stable@vger.kernel.org, nuno.sa@analog.com From: Date: Thu, 15 Jun 2023 13:01:26 +0200 Message-ID: <2023061525-relearn-curdle-bf55@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org This is a note to let you know that I've just added the patch titled iio: adc: ad7192: Fix internal/external clock selection 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-testing 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 be merged to the char-misc-next branch sometime soon, after it passes testing, and the merge window is open. If you have any questions about this process, please let me know. >From f7d9e21dd274b97dc0a8dbc136a2ea8506063a96 Mon Sep 17 00:00:00 2001 From: Fabrizio Lamarque Date: Tue, 30 May 2023 09:53:08 +0200 Subject: iio: adc: ad7192: Fix internal/external clock selection Fix wrong selection of internal clock when mclk is defined. Resolve a logical inversion introduced in c9ec2cb328e3. Fixes: c9ec2cb328e3 ("iio: adc: ad7192: use devm_clk_get_optional() for mclk") Signed-off-by: Fabrizio Lamarque Reviewed-by: Nuno Sa Cc: Link: https://lore.kernel.org/r/20230530075311.400686-3-fl.scratchpad@gmail.com Signed-off-by: Jonathan Cameron --- drivers/iio/adc/ad7192.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad7192.c b/drivers/iio/adc/ad7192.c index 55a26dbd6108..8685e0b58a83 100644 --- a/drivers/iio/adc/ad7192.c +++ b/drivers/iio/adc/ad7192.c @@ -367,7 +367,7 @@ static int ad7192_of_clock_select(struct ad7192_state *st) clock_sel = AD7192_CLK_INT; /* use internal clock */ - if (st->mclk) { + if (!st->mclk) { if (of_property_read_bool(np, "adi,int-clock-output-enable")) clock_sel = AD7192_CLK_INT_CO; } else { -- 2.41.0