Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp1628752imb; Sun, 3 Mar 2019 00:52:07 -0800 (PST) X-Google-Smtp-Source: APXvYqxMIdiPVyg83czkOyq7jgaq6sPivzuf9CeEJf1y+xNj4rHK/sWnHQYMG1qmUdg5FUKWCNxP X-Received: by 2002:a63:f310:: with SMTP id l16mr13049408pgh.72.1551603127160; Sun, 03 Mar 2019 00:52:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551603127; cv=none; d=google.com; s=arc-20160816; b=govDQ3VGN91kFaNNRtwaGPRDcywehYeU+H6j8sbzXguOa+o7yGje/yXX2mxTl1kRh4 3SkgfSqryIVQABU9fDVEF4BTfUfoqOiRi/srNBB6mBgX8gT98PQoi+WYJRnMo0JLvsp5 mB69ckPkxvGyHli6SPLhCg6JSxP21PFfjfaPU2furxYRQWtLIRoA8bMwClrqFrFo5Djs yBE7+eeBnqkfLxybSOLIjxV7JrGkVmUCThWUSbOpbR8ye0Fv+kozjfAqKae5cPgy1EfF jNaXFSbuYXEw+WC+FUOZkwL3fDTj2ZgI9KsUswEa8g1mAxvBcsooJhazsaodMX6x7Uc4 ZYPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:to :from:dkim-signature; bh=HULVZF1Nd30wsAPzXNiwMKC16XIsSssaDMvSux7F4Jw=; b=DT+c7Nn3D5hKgBHGTeoD9k++mdrAEppA/3tCU1/UKYU0jTKHtwOLmQnOUR5+br/K7U nVPs3o5mapxYgEbngct/rajRpZE3o9aIq/MO50SG8VfHPfMcIXhOFHovH44LwWgUIrCR uE8lI9jrOHk6Cov0GmlHH2LBTpyhclEWnbXAas1Ih3P2GFvlmxWf7pzGT2+NdwE0A0Fp 8jegpvEi1Bix2R77Q7c7JhNzY1OII0AccrMYnkIHqky9bu2fUhDok7+qoPO2cTEB2MOK CXcNs/QnW5mQxtDdJVp9Sx/Vg0Ja9RDwNkVzHA9vS6AJSRAGCHyN9U1GijQCV17nuT3Q Cugw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=GDaQDExm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f131si2547750pfc.92.2019.03.03.00.51.52; Sun, 03 Mar 2019 00:52:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=GDaQDExm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726046AbfCCIuU (ORCPT + 99 others); Sun, 3 Mar 2019 03:50:20 -0500 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]:32654 "EHLO smtp-fw-9101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725923AbfCCIuU (ORCPT ); Sun, 3 Mar 2019 03:50:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1551603019; x=1583139019; h=from:to:subject:date:message-id:mime-version; bh=HULVZF1Nd30wsAPzXNiwMKC16XIsSssaDMvSux7F4Jw=; b=GDaQDExm5XnbCcwXqzF7JZVRjeI/LosNFgFD+Fc5ZfMqhsMSlqFm1xAj GiF63+SGpHFyeK4BgqrOsIJojT3bcJhFMwa+m/Z42vuYX802iqoLuXanB qFgHonMbrVca42GDkQG23KFDi14qcyFEYuprcuwQLmbRApm7XFb8SLgBb 8=; X-IronPort-AV: E=Sophos;i="5.58,435,1544486400"; d="scan'208";a="791048729" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-1e-17c49630.us-east-1.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 03 Mar 2019 08:50:14 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1e-17c49630.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id x238oBZu086876 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Sun, 3 Mar 2019 08:50:11 GMT Received: from EX13D01EUB001.ant.amazon.com (10.43.166.194) by EX13MTAUEA001.ant.amazon.com (10.43.61.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 3 Mar 2019 08:50:10 +0000 Received: from udc4a3e82dbc15a031435.hfa14.amazon.com (10.43.161.217) by EX13D01EUB001.ant.amazon.com (10.43.166.194) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 3 Mar 2019 08:50:04 +0000 From: Talel Shenhar To: , , , , , , , , , , , Subject: [PATCH 0/2] Thermal MMIO Driver Date: Sun, 3 Mar 2019 10:49:24 +0200 Message-ID: <1551602966-2334-1-git-send-email-talel@amazon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.161.217] X-ClientProxiedBy: EX13D24UWA004.ant.amazon.com (10.43.160.233) To EX13D01EUB001.ant.amazon.com (10.43.166.194) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series introduces the generic thermal MMIO driver that will use memory mapped reads to get the temperature. Any HW/System that allows temperature reading by a single memory-mapped reading, be it register or shared memory, is a potential candidate to work with this driver. This driver is most suitable for cases such as the following: - The entire thermal HW setup is done by another SW entity (e.g. bootloader) and all that is left is to read the current temperature from a register. - The thermal HW setup is done via an external CPU (e.g. micro-controller) and that CPU has is using shared memory that can be memory-mapped to this driver. - The thermal HW setup and reading is done via CPLD, which exports the current temperature to the system via a register. - The thermal HW is working out-of-the-box and only reports temperature via a single register access. Talel Shenhar (2): dt-bindings: thermal: thermal_mmio: Add binding documentation thermal: Introduce thermal MMIO .../devicetree/bindings/thermal/thermal_mmio.txt | 173 +++++++++++++++++ drivers/thermal/Kconfig | 11 ++ drivers/thermal/Makefile | 3 + drivers/thermal/thermal_mmio.c | 214 +++++++++++++++++++++ 4 files changed, 401 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/thermal_mmio.txt create mode 100644 drivers/thermal/thermal_mmio.c -- 2.7.4