Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4591917rdh; Wed, 29 Nov 2023 05:56:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHtR3pcwt9ik3AkhpVroiU3R5K3srcGrmVYoViuRQgZ0cPL6yzxSbZGOVOnAdmauhKsMkaJ X-Received: by 2002:a05:6a20:144e:b0:18a:d766:cae1 with SMTP id a14-20020a056a20144e00b0018ad766cae1mr16451050pzi.54.1701266214756; Wed, 29 Nov 2023 05:56:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701266214; cv=none; d=google.com; s=arc-20160816; b=e2T17r5adEoLkq83b8uPiBwVvOoYrp5YRddP8PDdPGZyJ/fTMysfy6nyxwmPCMeUbK 2EKH0YB9JJnK2w4Oqp5tpyNRNeHgjKkIK787O0o+4muyWVYCDK9iemRHB4XzkvzwbdwO 0C/jT9wzcNP5x18TMAWuzBQ8CHHwk5Z/197ZaZuiyyl/34xhzndhOV24eSwaGLtgHFJO Fs4RLHegwRyAIVGizjPp0lkjc7t306IPS3yc0E+AzDrAxQmOfkwzMQEp1B9bVPEIApS7 JY4aErhFmhew84HpdyGkTUbb8vxzrcQM47GDs4cNJegVC0+lFb+YnMxmtRlMDzqq1HYM jf7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=RU9/WrQ2QN+WaJymQKZqBPmRnsuN6OLKxrccCsdlWZY=; fh=OahkkZGRMsx/QsvTzHLvmCoK5Fz3HImW7eii1n0wrVw=; b=l8A8ibG5fqtlVX3kQIifiWxD14fkR95HclLVwF/9yISTd+s3BOSub8KcYeTN/DqwDk Mj40vGZGhuOqAv68Nh97gCnmpuaPTm2Fiz/BaE4YvRxOXFqXLqs0wf09Kg9gSV7tdCnN 9TIHJoKF1kcfhpXOpmcgPb2/OljKEWnI4uPgyjjwZUvBC8VADA+ImQT4t4tFcpCusRfF L7PN4ZG2shLds8lJnApm8IHa4rGweVjMm4bP95pH6BULg4KTtAaoRSmbbCItkzoyaNkX lGmDt26SukfhR1NWEsPm3PomXc4I+XWkg1XeYSbrZmWFOGY7PgCgYm3J+0cuDhG/iOJB 1HEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=Phxi3k2u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id fi36-20020a056a0039a400b0068fe12b361dsi14997961pfb.249.2023.11.29.05.56.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 05:56:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=Phxi3k2u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 9215C822A4A5; Wed, 29 Nov 2023 05:56:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234434AbjK2N4i (ORCPT + 99 others); Wed, 29 Nov 2023 08:56:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230472AbjK2N4h (ORCPT ); Wed, 29 Nov 2023 08:56:37 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 070A6DE; Wed, 29 Nov 2023 05:56:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1701266203; x=1732802203; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=hei7pXJNKVP4qTlallaoc626BSGQdU10VHphmCZ1qaE=; b=Phxi3k2ujMog2Ek76+OslxHqMUmlr8/XuH0P4G6gebDiYPED733L5vwC ZUktuKTtYsHRagrFCx9X2nhYClv0uJKDRlgqknGQZffv5uk7MI45lKPcu 2GOmxJWVgLkkPx+wWnXpfcxfOXgWfmJ1sm3rpaZqFc2f8XlmAo2jY7C4a +60qNxcg8hH39Yo98iE5SxCQgaho0le8t+cb4YaJgyf86uQb9hWlbl67C Xv6xF8zFJPBEf/dtAJgRP2A1FAj9Vy5lszQx4XeJTsdn4OA/K7EB9dNXF iUDRl4ur8TKzI+fu4bNJfBY32vBxEGGUtIF9/I4P52a29fIJ2WBNzwm2H g==; X-CSE-ConnectionGUID: BHQX6+MwTYmhpSKF5vn9xQ== X-CSE-MsgGUID: bOTPZ+PEQJm/gapsuwWiuQ== X-ThreatScanner-Verdict: Negative X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="13258106" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 29 Nov 2023 06:56:43 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 29 Nov 2023 06:56:24 -0700 Received: from marius-VM.mshome.net (10.10.85.11) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Wed, 29 Nov 2023 06:56:22 -0700 From: To: , , , CC: , , Subject: [PATCH v2] iio: adc: MCP3564: fix hardware identification logic Date: Wed, 29 Nov 2023 15:56:19 +0200 Message-ID: <20231129135619.63475-1-marius.cristea@microchip.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 29 Nov 2023 05:56:52 -0800 (PST) From: Marius Cristea In mcp3564_config() fix the hardware identification logic based on the hardware ID registers. Second part of the code was disabled by an logic error. Fix a typo related to the "MODULE_DESCRIPTION". Fixes: 33ec3e5fc1ea (iio: adc: adding support for MCP3564 ADC) Signed-off-by: Marius Cristea --- drivers/iio/adc/mcp3564.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/mcp3564.c b/drivers/iio/adc/mcp3564.c index e3f1de5fcc5a..e914a885a868 100644 --- a/drivers/iio/adc/mcp3564.c +++ b/drivers/iio/adc/mcp3564.c @@ -1122,7 +1122,7 @@ static int mcp3564_config(struct iio_dev *indio_dev) enum mcp3564_ids ids; int ret = 0; unsigned int tmp = 0x01; - bool err = true; + bool err = false; /* * The address is set on a per-device basis by fuses in the factory, @@ -1509,5 +1509,5 @@ static struct spi_driver mcp3564_driver = { module_spi_driver(mcp3564_driver); MODULE_AUTHOR("Marius Cristea "); -MODULE_DESCRIPTION("Microchip MCP346x/MCP346xR and MCP356x/MCP346xR ADCs"); +MODULE_DESCRIPTION("Microchip MCP346x/MCP346xR and MCP356x/MCP356xR ADCs"); MODULE_LICENSE("GPL v2"); base-commit: 6543f376ec8aa90a6c1ed44b765f4f0d6c3eb1db -- 2.34.1