From patchwork Sun Mar 3 08:49:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Shenhar, Talel" X-Patchwork-Id: 10837001 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C1DD41575 for ; Sun, 3 Mar 2019 08:50:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADF252A478 for ; Sun, 3 Mar 2019 08:50:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9CF9B2A4E6; Sun, 3 Mar 2019 08:50:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 482622A478 for ; Sun, 3 Mar 2019 08:50:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726022AbfCCIuU (ORCPT ); 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 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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