From patchwork Thu Oct 20 10:27:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13013222 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 B5875C4332F for ; Thu, 20 Oct 2022 11:15:37 +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: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:In-Reply-To:References: List-Owner; bh=umcIlsvNH7tlUz1O0OUbHX8dVXlnhNHJV2d461jq/XU=; b=D+1HCFHsMkTvRF D4Mek8jxvoyhHNHAc5/q5lZ8B6aJsDsqjP8fccoa6CG1Xgo57qnfFom9Ny9QS+AVRfMlGe911a+iG SFe8NCXsAc8tnLtWBfQUGMBJHkPok3c8C0HyP3UawJoi+Odykae6eBV8uScVx+NY381uu9o0Id3L+ xDl7mh5wTkEk71nnV1qI96ENwh/6I+QHHfUhqgb2QAEP6C9+lBcMBHEU0e3d/35fpmQRaLZJeAsH6 HY3Rk+HQ4Zhee1xdwwFESHJXfZ0Q4ZuW0nDESVV6NPdgJR19b33TY9gCSmEXqR1XD5RTJidelJotZ F92QCC42iIShsWX2wyRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olTUw-00DxGF-6V; Thu, 20 Oct 2022 11:14:02 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olSjS-00DWWC-Sh for linux-arm-kernel@lists.infradead.org; Thu, 20 Oct 2022 10:25:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1666261498; x=1697797498; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5CJvQyXYSyeyrHUYB55JAtZ2HIfmh1x13LmNIgYZbtw=; b=ehZ2zx8up/QBJxc+pp4I1qZ6LFrt5VNNAu+kzOpkZk3Y3q28seZmnsca OkPRGpj/86BGisINkW+sEUAhybbrPeSJdrD1UY4aVkAIomlTDg+QOFWRD N5KfLmAHTvhwCaWXa9g2FhGHNMdbCJvQlw2i+k/Eza7zD9keU0uarm6mS cr3UPsHMUUQvYWyq/SSDIIHirJ4SGra3NWLOhaoICCINF7czFQtPj2ISR BjubjFF0+y1X3YSBilRzEOMvv5khMferKeneF1q7Rkq1xVOti/AaPUuh7 ncl6hI+u1xXMtERu+sByGpa+VdDXz54hEjzIzDmsJrDnPR0eJlnQ9LBEO w==; X-IronPort-AV: E=Sophos;i="5.95,198,1661842800"; d="scan'208";a="196279431" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 20 Oct 2022 03:24:53 -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.12; Thu, 20 Oct 2022 03:24:53 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 20 Oct 2022 03:24:50 -0700 From: Claudiu Beznea To: , , , , CC: , , , Claudiu Beznea Subject: [PATCH] iio: adc: at91-sama5d2_adc: get rid of 5 degrees Celsius adjustment Date: Thu, 20 Oct 2022 13:27:05 +0300 Message-ID: <20221020102705.3639204-1-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221020_032458_997452_362F2418 X-CRM114-Status: UNSURE ( 8.95 ) X-CRM114-Notice: Please train this message. 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 On SAMA7G5 final chip version there is no need for 5 degrees Celsius adjustment when computing junction temperature, thus, remove it. Fixes: 5ab38b81895c ("iio: adc: at91-sama5d2_adc: add support for temperature sensor") Signed-off-by: Claudiu Beznea --- drivers/iio/adc/at91-sama5d2_adc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c index 33e251552214..870f4cb60923 100644 --- a/drivers/iio/adc/at91-sama5d2_adc.c +++ b/drivers/iio/adc/at91-sama5d2_adc.c @@ -2307,11 +2307,9 @@ static int at91_adc_temp_sensor_init(struct at91_adc_state *st, clb->p6 = buf[AT91_ADC_TS_CLB_IDX_P6]; /* - * We prepare here the conversion to milli and also add constant - * factor (5 degrees Celsius) to p1 here to avoid doing it on - * hotpath. + * We prepare here the conversion to milli to avoid doing it on hotpath. */ - clb->p1 = clb->p1 * 1000 + 5000; + clb->p1 = clb->p1 * 1000; free_buf: kfree(buf);