From patchwork Sat Feb 11 08:47:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 5276 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1401806wrn; Sat, 11 Feb 2023 00:51:52 -0800 (PST) X-Google-Smtp-Source: AK7set93tbCsmoWxxl1c1WPwrLR/WIggLaeMxA0Bl1F04HWM0+nE13d7NHCHulA9v9kouM/oYfkM X-Received: by 2002:a62:384f:0:b0:5a8:5901:3fb1 with SMTP id f76-20020a62384f000000b005a859013fb1mr8069660pfa.29.1676105512396; Sat, 11 Feb 2023 00:51:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676105512; cv=none; d=google.com; s=arc-20160816; b=Dp+qYJcOq6OMLxWQ/cgD4KeLv0i7oK4TWxA9JceF3ZGK4CKfoit3pRHhUKSIOf+wA+ 2BVfu3nafZ16pMJDUuBbaoNFlW3GO54KURse7gozp7ZBXnQly2d9lkdjtBw/06Z3Xqsn QK1enIomtt0K0lQrWOFcELzpH8B+Asz8jzZ6LoRhxTv/vgL4E1rKGujhtuN61euU3VmJ 8bdI3QxEHZZIo+Hd1jAAZOlBdgCBdJb1rk30HqiCLp9GwZ2aWdCu1254/xoCT85Q5RSz WQb+CSpegsgP6SpkGAb8ZN+S56+Spea5+F8tQOobuAFsEvfipShg4IptggeStJBiemFL vI8Q== 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=6rtV0NV/TzLWrTSuhcMpwaIOdSZAN+ROGbvbnV4Kr6U=; b=WAD/W9CkxRnfh/FCeAm7SWiPo+jxqHJ2qwQSiWYb9gAepkK5kIYOdU9bUQhIIUduLe QLOn/pcNRF3hfwnlwIAPsPkpk+Ryq/KK5ZQ/iXV74B5gnAON91perSeCVBOmSVFS7vmb 86TY9Hsf9b+f3bEy/6CT+nSspNJk8YfOssgT9uY30Lhlo7rQEO6IthXKXn9rK1u2GEMz ynSTVOBPPgBuK1QTZGFvhME+uuLSpG4GxRHJmfmvzvxY2pLoxH3BrpeMKXGJQe3qrgV6 bKjnq3OxTWHF86ZdIdPWEAb3hbV1Pj6XZ86YjXzP3R2QC18jL0nzYmYUuofvaHjEi9VP btZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=rGiasa7y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c16-20020a624e10000000b00594335f927esi2323676pfb.59.2023.02.11.00.51.40; Sat, 11 Feb 2023 00:51:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=rGiasa7y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229818AbjBKIry (ORCPT + 99 others); Sat, 11 Feb 2023 03:47:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbjBKIrw (ORCPT ); Sat, 11 Feb 2023 03:47:52 -0500 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C509F974E for ; Sat, 11 Feb 2023 00:47:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=k1; bh=jGE2RgQsU7h1/v4M/O803N5y1s7 nrcKlQODyN9uwt/Q=; b=rGiasa7ydrxZvQakIBYKltb64J4K0tAO40kwqA4WBaG 6xCc5nAj3z/lYBYzsnrRuPe4cG3PkQwwM+0+u5Wz9HaT6iB79uAyTssySf5OtWhB kqvnzlaOzE2qTMukaQPLdaYyMjrz9ejA1ob2NGD6EBjtQfTxE+pMVHTRzHHXeZRY = Received: (qmail 2337503 invoked from network); 11 Feb 2023 09:47:29 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 11 Feb 2023 09:47:29 +0100 X-UD-Smtp-Session: l3s3148p1@4q4Aqmj0Bpcujntl From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Yoshihiro Shimoda , Wolfram Sang , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH RFT 0/3] drivers/thermal/rcar_gen3_thermal: add Gen4 fuse support Date: Sat, 11 Feb 2023 09:47:24 +0100 Message-Id: <20230211084728.27832-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757524013473991748?= X-GMAIL-MSGID: =?utf-8?q?1757524013473991748?= R-Car Gen4 has the fuse registers at different locations and with different names, but with the same purpose. So, first refactor IP core differences into a 'info' struct, then add the fuse_read callback to it. Patches are based on top of: [PATCH v2 0/3] drivers/thermal/rcar_gen3_thermal: Fix device initialization [PATCH 0/2] thermal: Add support for R-Car V4H They have been tested on R-Car H3 ES2.0 and M3-N against regressions. Actual testing of the new fuses on S4-8 still needs to be done because I don't have access to such HW. @Shimoda-san: maybe the BSP team or Test team can test these patches? Looking forward to other review comments, too, of course. Happy hacking, Wolfram Wolfram Sang (3): drivers/thermal/rcar_gen3_thermal: introduce 'info' structure drivers/thermal/rcar_gen3_thermal: refactor reading fuses into seprarate function drivers/thermal/rcar_gen3_thermal: add reading fuses for Gen4 drivers/thermal/rcar_gen3_thermal.c | 141 ++++++++++++++++++++-------- 1 file changed, 102 insertions(+), 39 deletions(-) Reviewed-by: Niklas Söderlund