Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1190676ybl; Fri, 9 Aug 2019 22:31:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWhipbL7EHAigiUnX+VfHozlgou8xzmpxUWrrzbsUnhfvMm4E2AnKUcdp8MmB+9XPrNM/R X-Received: by 2002:a17:902:20b:: with SMTP id 11mr22961246plc.78.1565415084292; Fri, 09 Aug 2019 22:31:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565415084; cv=none; d=google.com; s=arc-20160816; b=TM4xMF7oAmAnzA/vINsNa4tSVUEye9S6NKzby3h9kQk4q4YnNQxdbuKY6HpE3nUl1c +i2GgcPpw9Pjaf9eLrBLQnGsNfmx5PXy/PetnUOtTsnxDclqS+Pp0J3Z5A7KU47ieLXX pDFOp9UgLM7dAy0DnCsDrYCyu52xcCALrMdVpjqRvwr8x5wAKBYfAJqe37aERwAFhd4z TY3iBrjjycX3D+qJybQHqgK1CVORAkk66zdHo3s1Vh+A1yYv+51SFQKGtp0x38tnrOra LWJigJU/k3JuESPVD6tc29ackh+IMOr2/Wi6uHIFA/45mlW9b6tWhPYpPz+5cRDTxpEh htlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=71DUVtj5Cvg/Wok9dZsUDEqRY7qzU/CKNT9zSocN+ao=; b=Q0KAN1tEnjIUX/qa+fjMAliTQzecuqHfUFP2qQIuD2gfvHadPkqmPyBGmd3H63+Q4+ B0hScRnOufpTGGCI/tvHd2JxKel9MaL2NmzHc4e7abupTnuAOtACF+84nXL7nwrGtUmV dAgkLHHLON+kVT0S8BWldqB/NwvZbPW+eqAgWGwncE3Irracov1/kMCX23p7MIVdcsAE Uh6uslVkY6emtzq653TEXzQdiuKqN3KlPiYseEscZiKK2+arEjHTCLQVDNTQn+nkrkyX n+/TKHh6AFjBcea6uJ8N8wInx//aX9a4M+vjQ98RjXrKDl+M+fufB8RoFD7sltL/xXut rF8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AHZ5OqTY; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n184si28577370pgn.399.2019.08.09.22.31.08; Fri, 09 Aug 2019 22:31:24 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AHZ5OqTY; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726533AbfHJFaJ (ORCPT + 99 others); Sat, 10 Aug 2019 01:30:09 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:35838 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726165AbfHJFaI (ORCPT ); Sat, 10 Aug 2019 01:30:08 -0400 Received: by mail-pg1-f193.google.com with SMTP id n4so5123079pgv.2; Fri, 09 Aug 2019 22:30:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=71DUVtj5Cvg/Wok9dZsUDEqRY7qzU/CKNT9zSocN+ao=; b=AHZ5OqTYDdsovC5n1BNsaS8kgOU6oa6y2cAM5Wbguuqk5X5JFfCB99NyHGj1db+4X6 MdEl7N+AOMFOoTs6oYVoU/1LtNcBNYKSFh/+dcZryJAp6056TKQKoZKWgELUPsA/t+RU 7mZeZnDlpJoV8qs/Fekb/eNC5INfy6h3z9PXVNwktXZjAtaIRvOAuFQTodDeVeyRTMMI c9sYeO6khNfyyoCr0gwVC/M6JZvyLAbXKVKzHnkA7bJSqXHlBS3k7WTu0XfCnBu1tJ5J dGASctZiWvoOEgrrTdIyvM1NBcDFX4TzCg75DRXDb7lYZiGB2YcX6EfvWA9XSIXjpFD0 r70A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=71DUVtj5Cvg/Wok9dZsUDEqRY7qzU/CKNT9zSocN+ao=; b=B3Ws9koyjE3QbWyyGIoz3oPb6x1YvEYpl6jzwIk799Ej/qPZQP2x63CPvpYMCUHRKC amKnKi5hf0nkvQ4Sf1JAi5AN5BmvgU69DduriCjKi1cz8FNDU9RR9AKmZkRc+ekMzY4E zo3op/p4zEbg8wspBSAEqZdFvET38qG47+OEYiAPAlKv8Xx0sAn4NzGv9ZHhPX1mOGkm ehgKbOvSZDbQYsk5/ZfCEM+9vtoVDzppsri9lGg+Z8SOr/+SsRrL991DN4I/QaNd7nSk Jtx/x4SEYS1wHOS7FuBltpHnaWjHNUwS2EKVenHvapzYdJX0UD5OLQGei+ZlHtrHmLIe 2tAA== X-Gm-Message-State: APjAAAUh6TyeWsuIQqdWS+i0+frIh9bm8MxnW/oKduEuWkcIc/vrPd5B 3ZxiTXq6a4LnpJJJaxEufCA= X-Received: by 2002:aa7:8d98:: with SMTP id i24mr25671345pfr.199.1565415007779; Fri, 09 Aug 2019 22:30:07 -0700 (PDT) Received: from localhost ([202.182.106.211]) by smtp.gmail.com with ESMTPSA id o12sm6113304pjr.22.2019.08.09.22.30.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Aug 2019 22:30:07 -0700 (PDT) From: Yangtao Li To: rui.zhang@intel.com, edubezval@gmail.com, daniel.lezcano@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@bootlin.com, wens@csie.org, mchehab+samsung@kernel.org, davem@davemloft.net, gregkh@linuxfoundation.org, Jonathan.Cameron@huawei.com, nicolas.ferre@microchip.com Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Vasily Khoruzhick Subject: [PATCH v5 13/18] thermal: sun8i: add thermal driver for A64 Date: Sat, 10 Aug 2019 05:28:24 +0000 Message-Id: <20190810052829.6032-14-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190810052829.6032-1-tiny.windzz@gmail.com> References: <20190810052829.6032-1-tiny.windzz@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vasily Khoruzhick Thermal sensor controller in A64 is similar to H3, but it has 3 sensors. Extend H3 functions to add support for multiple sensors. Signed-off-by: Vasily Khoruzhick --- drivers/thermal/sun8i_thermal.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c index 41ce8cdc0546..3259081da841 100644 --- a/drivers/thermal/sun8i_thermal.c +++ b/drivers/thermal/sun8i_thermal.c @@ -515,6 +515,17 @@ static const struct ths_thermal_chip sun8i_h3_ths = { .irq_ack = sun8i_h3_irq_ack, }; +static const struct ths_thermal_chip sun50i_a64_ths = { + .sensor_num = 3, + .offset = -2170, + .scale = -117, + .has_mod_clk = true, + .temp_data_base = SUN8I_THS_TEMP_DATA, + .calibrate = sun8i_h3_ths_calibrate, + .init = sun8i_h3_thermal_init, + .irq_ack = sun8i_h3_irq_ack, +}; + static const struct ths_thermal_chip sun50i_h6_ths = { .sensor_num = 2, .offset = -2794, @@ -528,6 +539,7 @@ static const struct ths_thermal_chip sun50i_h6_ths = { static const struct of_device_id of_ths_match[] = { { .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths }, + { .compatible = "allwinner,sun50i-a64-ths", .data = &sun50i_a64_ths }, { .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths }, { /* sentinel */ }, }; -- 2.17.1