From patchwork Tue Nov 15 10:31:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Moysan X-Patchwork-Id: 13043474 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6BBADC433FE for ; Tue, 15 Nov 2022 10:52:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UODW4jp7F6sjlVLum7Bn9SjDJA50al4F5EUORigpa/Y=; b=XfEuPJPzYsUIOc ZF+myoKKVkDWFSGotFwcvypyO+IzwKHTCCHfiJ4VUoHbnmlPvNgqqxquCxQOQScBtxikG40k8uwI/ EZqzseVDiwa/ngPH06RsliSSbY7oHoVhU26r8GkU2SURXeXzWDzOGBJt7xSHuNR925uzpdZbOT4zf er0ja/txoyol2P7uF6111IGhb0SuWDF32+oH/dImDpY7ShswW++QxoOEUc2yiA52svPgnKM5tiACy Dcbb5jbT55an2V2176XW0EbNvswqEzwp/bwZZOf6xIoGymnGgrltJqqdjgoDQTXGu2TcGu/npTnSu yxRvHkmSdSgNjqpa0G9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1outX4-00AAK9-Cy; Tue, 15 Nov 2022 10:51:11 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1outHF-009zZi-5G for linux-arm-kernel@lists.infradead.org; Tue, 15 Nov 2022 10:34:54 +0000 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AFA0DEu007359; Tue, 15 Nov 2022 11:34:37 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=lQpIOKYpc+Dxu48ZbINg3+W2yJFLZFkRBfz6KvFtNwI=; b=qvRVe31l4CfjXLhjlkpq+l3BvCqA34USuAPIOWq72lYzeAWe22rTP3hfXc85tyXJ1D0J P/FGRLdlhI89oZgrBNsDcb0Q+hOzGHB7CUZGqBnx8LOZJJ2jGBCIVtFUOzlierx+LTWB tW9aCBEzNBDBqQiaGAR7B5xQn9kkzpR3hqPmj7We6wqtS/9nOYFWPo98Ms+u4LJGDhFP NHbygsov/JinEsdl1PReCTHn3gvELxkGbgr1mmhF5MhExzaXJVcg0vNo8r2UAL63g/LQ zJ3HjAjRmDSa7MFjPedeGWQwiQyWmMSO7e/FYXGRQlTmcDqkFyCc98V0+FlG/S3GrEA6 Xw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3ktq2ynee1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Nov 2022 11:34:37 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0AA7F100038; Tue, 15 Nov 2022 11:34:33 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 0326621A206; Tue, 15 Nov 2022 11:34:33 +0100 (CET) Received: from localhost (10.201.20.178) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Tue, 15 Nov 2022 11:34:32 +0100 From: Olivier Moysan To: , Jonathan Cameron , Lars-Peter Clausen , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH 2/3] iio: adc: stm32-adc: improve calibration error log Date: Tue, 15 Nov 2022 11:31:22 +0100 Message-ID: <20221115103124.70074-3-olivier.moysan@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221115103124.70074-1-olivier.moysan@foss.st.com> References: <20221115103124.70074-1-olivier.moysan@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.178] X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-15_05,2022-11-15_01,2022-06-22_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221115_023449_577102_FA2BF3A6 X-CRM114-Status: GOOD ( 14.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add more information in calibration error log to differentiate single-ended and differential calibration. Signed-off-by: Olivier Moysan --- drivers/iio/adc/stm32-adc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c index 2b2b55eb130e..65dd45537505 100644 --- a/drivers/iio/adc/stm32-adc.c +++ b/drivers/iio/adc/stm32-adc.c @@ -1109,7 +1109,7 @@ static int stm32h7_adc_selfcalib(struct iio_dev *indio_dev, int do_lincal) !(val & STM32H7_ADCAL), 100, STM32H7_ADC_CALIB_TIMEOUT_US); if (ret) { - dev_err(&indio_dev->dev, "calibration failed\n"); + dev_err(&indio_dev->dev, "calibration (single-ended) error %d\n", ret); goto out; } @@ -1125,7 +1125,8 @@ static int stm32h7_adc_selfcalib(struct iio_dev *indio_dev, int do_lincal) !(val & STM32H7_ADCAL), 100, STM32H7_ADC_CALIB_TIMEOUT_US); if (ret) { - dev_err(&indio_dev->dev, "calibration failed\n"); + dev_err(&indio_dev->dev, "calibration (diff%s) error %d\n", + (msk & STM32H7_ADCALLIN) ? "+linear" : "", ret); goto out; }