From patchwork Mon Oct 31 23:26:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 13026491 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 8473AFA3741 for ; Mon, 31 Oct 2022 23:31:17 +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=BJYqrA8Xmn4UCKznyCQetdsFnI/GxoeJBGMCz2SIXYI=; b=Jutz6evsseqrDe OaljNHbYVvTIdJaDoRp9rRMAbbFv+QBP2ELhEclV+bUCHpxt8wIPVcmfBboH1QqO/OS9eW2MIswM4 aX6u3SEJp58qSgHEnaEQbVAhy6HA30RO656kGzMB+fUSclFY+YDWJvVnZWhHMzoPXpIfbBxJ+fcSB 6BB5EOXqbnlVoetLyJgp5tgYRxYGuV0xiaKeuI1aXceesIXbdzRRwkZuSvH3igoo0QX+zDBIsLZkh bSMLt78YvfcT37vUnh77B9pXsuLURJikhtonrgmECdyuGjjfIy0FJoqWRjo4BbHkdnXfBR4qJFDxK tMmW20ftrL6VBNrwjgEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1opeEQ-00Gctk-69; Mon, 31 Oct 2022 23:30:14 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1opeBf-00Gbz6-Tu for linux-arm-kernel@lists.infradead.org; Mon, 31 Oct 2022 23:27:28 +0000 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 29VNRGJO058546; Mon, 31 Oct 2022 18:27:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1667258836; bh=40t8c0//hZUFD6l6R3W73jp60b91DTNg2PGZAtjfemM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ypCn9bgYYTe5JNk0VG97XYJDpYfSyCYdTVKaO1DAvw8V7fWh0F+T2zMg4G00Z1pd8 m8Psiw2eGTp/HxYVsEDwNr65CxDJLxJvTflXJ8RkwKktg615qwEPMO7bJwwQ32gQRC kYu9N0171+7+MEMlpt0KJQV2Dwa9+OA5VLdHFoW8= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 29VNRGxv023429 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 31 Oct 2022 18:27:16 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Mon, 31 Oct 2022 18:27:15 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Mon, 31 Oct 2022 18:27:15 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 29VNRFwN027828; Mon, 31 Oct 2022 18:27:15 -0500 From: Bryan Brattlof To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Rob Herring , Krzysztof Kozlowski , Nishanth Menon , Vignesh Raghavendra , Tero Kristo CC: Keerthy , Linux PM , Device Trees , LKML , LKML ARM , Bryan Brattlof Subject: [PATCH v3 02/11] thermal: k3_j72xx_bandgap: use bool for i2128 erratum flag Date: Mon, 31 Oct 2022 18:26:53 -0500 Message-ID: <20221031232702.10339-3-bb@ti.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221031232702.10339-1-bb@ti.com> References: <20221031232702.10339-1-bb@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1769; h=from:subject; bh=CBnvYRL9huVrlmYgI1dWwQk4JHA1y8ajdopZHQJDTuQ=; b=owNCWmg5MUFZJlNZdxwcoAAAan///rfr/r/recf+u+n/WPlT1rP/fv5iWu6v37/f/fd1126wARsY HagGgyAAAA0DQ09QGgAPUAA0NAAAAAxDRoAAGhkaD1MJoximEaN6SHQHqA00GmgBpoAPQmQaaAAGgA AGIMQBoG1DJo9TRoep6T1DINMgAPU0AZDaghoZNNMjQ0YmgAGhpiZMmQ0DRoAABoGCYjEyYAEANGhp iAYIANAAAAEDqhBNpiA0AKKDB+cf4+8wD3JwJD0QWGso8PBIPo2h5QFdWKNKU0WZ6aq9ftAWy6ZVS2 0DyTGOZrJBBEATxcU/boPoaTXjd61zZhJGa9DXhCD1TVkGEZPTiQVsXHbKSJdbHT5UHbrr8peEEMZI mHiH7jc+VDGUTvmFAfzJO3NsPZUjoNJ/ChfcQkOMLs0yvBMEoZS01/NQeyFz2VNVCs3ocbQCbHJ8sI H02YnhO/oJhgsQ6rx6gPiNQbyiOZ7RZLA7emlpvqkc1L5rCDGXwJ/DvTyCmeFK8c2rnNRi2hLlTJpc KlC/2fmQwqFZ8HCiufTJPwkhF2fIeBncpc8aQRXPaKS93dREdQRm2kW0goQg7tBlBxgpiv2SGi8BUN iuPEg5DOMAIwza7jBG3DswIQDOKB0EErTMAdCTVZIKkMk41vHhL/i7kinChIO44OUA X-Developer-Key: i=bb@ti.com; a=openpgp; fpr=D3D177E40A38DF4D1853FEEF41B90D5D71D56CE0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221031_162724_169745_31D13A4C X-CRM114-Status: GOOD ( 15.26 ) 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 Some of TI's J721E SoCs require a software trimming method to report temperatures accurately. Currently we are using a few different data types to indicate when we should apply the erratum. Change the 'workaround_needed' variable's data type to a bool to align with how we are using this variable currently. Signed-off-by: Bryan Brattlof --- drivers/thermal/k3_j72xx_bandgap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/k3_j72xx_bandgap.c b/drivers/thermal/k3_j72xx_bandgap.c index a9f99a190cb61..b9d20026771a5 100644 --- a/drivers/thermal/k3_j72xx_bandgap.c +++ b/drivers/thermal/k3_j72xx_bandgap.c @@ -340,7 +340,7 @@ static void print_look_up_table(struct device *dev, int *ref_table) } struct k3_j72xx_bandgap_data { - unsigned int has_errata_i2128; + const bool has_errata_i2128; }; static int k3_j72xx_bandgap_probe(struct platform_device *pdev) @@ -351,7 +351,7 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct k3_j72xx_bandgap *bgp; struct k3_thermal_data *data; - int workaround_needed = 0; + bool workaround_needed = false; const struct k3_j72xx_bandgap_data *driver_data; struct thermal_zone_device *ti_thermal; int *ref_table; @@ -522,11 +522,11 @@ static int k3_j72xx_bandgap_remove(struct platform_device *pdev) } static const struct k3_j72xx_bandgap_data k3_j72xx_bandgap_j721e_data = { - .has_errata_i2128 = 1, + .has_errata_i2128 = true, }; static const struct k3_j72xx_bandgap_data k3_j72xx_bandgap_j7200_data = { - .has_errata_i2128 = 0, + .has_errata_i2128 = false, }; static const struct of_device_id of_k3_j72xx_bandgap_match[] = {