Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp244542imm; Fri, 5 Oct 2018 03:09:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV634qAVv0QUtqFY//VweunDrTgf7cM8JQiF9QgBHEOM6goDzD1N4xe53aBjfF3L9rG/Cn7cs X-Received: by 2002:a17:902:9a45:: with SMTP id x5-v6mr10772498plv.213.1538734192591; Fri, 05 Oct 2018 03:09:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538734192; cv=none; d=google.com; s=arc-20160816; b=REC1+PVGwh77DD+mbEZWX1wpOCTC0HpEatEXPXDm6XngX557qIx1PqKnMjkzpRj6sq 07Zqg42Phr5djGUcGqRrBk3b2kizbXHs991Tl5d77oDEVJmzU2YzogXISiCZdW3uQOYP ZCHm/QfBojlpDLQBZQT+2Oej3nMuRka+LkKwRfVlnxrmKYrnjniUim+4DG05gj87Lxga ieeTpwAbNHhZ3UG04vtNuAlYGd1er8vhiB1+qE+nOtH//sulaaVFJdpHYjfgJOOu8h3z /5NXkVPy7tYRAJ24cdzc7FScXmewvYJYYiPkJMwR5sGtpZx4rEv84yhoxoo+RmTIk/WM aYtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from; bh=COjeoLnPJNTCE3DJ+P9rU8S2z1YmXZZ+5Pg6YeGi428=; b=Q4oAGENvUe5YUHkyD3/GeVU4D1wM6Vu2/mLTtnRMUe26Y7msG0CPs8O65UhxeRyMfT VWg6Kbq16ixwych6gJ7FVi4GXES4uDS1X/RWTbFeKofuNhyPubjTU0q5xnDhAwY4zW0P P9luLTYRQAHYa22Iv5c2ELMzKRVzbPFCVuV025bibMPiDP8gu3gCEmpVEU354oVxVFK5 sUiD/7ozsoaUff9bow82GOuI5K4P9J0qjOWKn/XQ2eABTm1dcmlRhe62VyN+bicoT3Ap eGvOlllRsL1oppPnVoE7OyZD/kuVaGe7EAGXWfAUOKMEeNpGbMjivBBHjTnAnHZ83rK9 6+Bg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11-v6si9309250plm.244.2018.10.05.03.09.36; Fri, 05 Oct 2018 03:09:52 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728145AbeJERH2 (ORCPT + 99 others); Fri, 5 Oct 2018 13:07:28 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:16603 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727535AbeJERH1 (ORCPT ); Fri, 5 Oct 2018 13:07:27 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w95A451C017515; Fri, 5 Oct 2018 12:08:47 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2msxh72enu-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 05 Oct 2018 12:08:47 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0E7D034; Fri, 5 Oct 2018 10:08:46 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag3node1.st.com [10.75.127.7]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id A90822758; Fri, 5 Oct 2018 10:08:46 +0000 (GMT) Received: from SFHDAG3NODE2.st.com (10.75.127.8) by SFHDAG3NODE1.st.com (10.75.127.7) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 5 Oct 2018 12:08:46 +0200 Received: from SFHDAG3NODE2.st.com ([fe80::b82f:1ce:8854:5b96]) by SFHDAG3NODE2.st.com ([fe80::b82f:1ce:8854:5b96%20]) with mapi id 15.00.1347.000; Fri, 5 Oct 2018 12:08:46 +0200 From: David HERNANDEZ SANCHEZ To: Zhang Rui , Eduardo Valentin , Daniel Lezcano , Rob Herring , Mark Rutland , Maxime Coquelin , Alexandre TORGUE CC: "linux-pm@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" Subject: [PATCH 2/3] thermal: add stm32 thermal driver Thread-Topic: [PATCH 2/3] thermal: add stm32 thermal driver Thread-Index: AQHUXJNn3hs+Z0GM9Ee3RYnXebDw0g== Date: Fri, 5 Oct 2018 10:08:46 +0000 Message-ID: <1538734081-26585-3-git-send-email-david.hernandezsanchez@st.com> References: <1538734081-26585-1-git-send-email-david.hernandezsanchez@st.com> In-Reply-To: <1538734081-26585-1-git-send-email-david.hernandezsanchez@st.com> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.47] Content-Type: text/plain; charset="utf-8" Content-ID: <88664D0CFB01D44A9FCAF0E00CFC1C53@st.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-05_05:,, signatures=0 Sender: linux-kernel-owner@v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