From patchwork Wed Sep 14 13:27:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 76196 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp1877665qgf; Wed, 14 Sep 2016 06:32:30 -0700 (PDT) X-Received: by 10.98.30.133 with SMTP id e127mr4622999pfe.104.1473859948901; Wed, 14 Sep 2016 06:32:28 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s9si33541648pfi.100.2016.09.14.06.32.28; Wed, 14 Sep 2016 06:32:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763317AbcINNc0 (ORCPT + 7 others); Wed, 14 Sep 2016 09:32:26 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:36365 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762286AbcINN3N (ORCPT ); Wed, 14 Sep 2016 09:29:13 -0400 Received: by mail-wm0-f42.google.com with SMTP id b187so47343072wme.1 for ; Wed, 14 Sep 2016 06:29:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=27lKobwbe9kfXF9nFcwOChJNuUfl2bK5j2jLIf9Vle8=; b=gTHjRqkU2s66oqxsa6B+njoI4OWa28onXJDp7Zsr38s7DcKmrtt6hBTEgJsgIPkCES fgrSDyezgI4iNlrfjqfKwP2e46woYdB0S0HtppGtJn8dI+hbvM8oRTdiLjemWtCzrPjh AGO9RRp7QNQPXrSrqhqSNjsdv5nxFIYJjEOwU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=27lKobwbe9kfXF9nFcwOChJNuUfl2bK5j2jLIf9Vle8=; b=EauuixRMkiIqFBAKmwqO6Wk5I6ZfGIyw0E4xOnaJFEarSHXM164hcO4wKnZlYgXpeQ moOQGSh0O0HYiTPuAWGmrSFjHfVFAL9h2vDnB4SmC0MEUTsMvsljwQwbERoXie7jn999 yH6siRXFKHua3dDkLO6iRNMY7Fr2D2YtE60468GZ/Id9DE349cQZXX2ft9ypGos+G5Hm Io59lpMa4AnqntVbexKZKyBmC2bqVnjbWVbFZG0imHDjL5/A+hqr0MQW/9B0sjnjIvKy 9EeLDhw1LyPhZ8fcaauH8BK6fpNRJMrUkDoJ7NcEzsi3dXpWAcw9aipxD7eTszVKzQJQ hg/A== X-Gm-Message-State: AE9vXwOkpXZrLBsh+95lB2GODEhjfQOTI5Ngnzumos/40wrquoAzq6X4wDCfExWEJ4Mo0TNd X-Received: by 10.194.94.225 with SMTP id df1mr3183741wjb.51.1473859751540; Wed, 14 Sep 2016 06:29:11 -0700 (PDT) Received: from localhost.localdomain (cpc89244-aztw30-2-0-cust4998.18-1.cable.virginm.net. [86.31.179.135]) by smtp.gmail.com with ESMTPSA id c5sm4212812wjw.29.2016.09.14.06.29.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Sep 2016 06:29:10 -0700 (PDT) From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, patrice.chotard@st.com, devicetree@vger.kernel.org Cc: peter.griffin@linaro.org, lee.jones@linaro.org, , Subject: [PATCH 09/19] thermal: sti: Remove obsolete STiH416 platform support. Date: Wed, 14 Sep 2016 14:27:47 +0100 Message-Id: <1473859677-9231-10-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1473859677-9231-1-git-send-email-peter.griffin@linaro.org> References: <1473859677-9231-1-git-send-email-peter.griffin@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org STiH415/6 SoC support is being removed from the kernel. This patch removes support from the thermal driver. Also it updates the register defines and removes the SoC and die prefix as neither of these are relevant in the context of STiH407 based silicon (STiH415/6 were dual die SoCs with an MPE die and SAS die). Signed-off-by: Peter Griffin Cc: Cc: --- drivers/thermal/st/st_thermal_memmap.c | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/thermal/st/st_thermal_memmap.c b/drivers/thermal/st/st_thermal_memmap.c index fc0c9e1..d53965d 100644 --- a/drivers/thermal/st/st_thermal_memmap.c +++ b/drivers/thermal/st/st_thermal_memmap.c @@ -15,10 +15,10 @@ #include "st_thermal.h" -#define STIH416_MPE_CONF 0x0 -#define STIH416_MPE_STATUS 0x4 -#define STIH416_MPE_INT_THRESH 0x8 -#define STIH416_MPE_INT_EN 0xC +#define CONF 0x0 +#define STATUS 0x4 +#define INT_THRESH 0x8 +#define INT_EN 0xC /* Power control bits for the memory mapped thermal sensor */ #define THERMAL_PDN BIT(4) @@ -31,11 +31,11 @@ static const struct reg_field st_mmap_thermal_regfields[MAX_REGFIELDS] = { * written simultaneously for powering on and off the temperature * sensor. regmap_update_bits() will be used to update the register. */ - [INT_THRESH_HI] = REG_FIELD(STIH416_MPE_INT_THRESH, 0, 7), - [DCORRECT] = REG_FIELD(STIH416_MPE_CONF, 5, 9), - [OVERFLOW] = REG_FIELD(STIH416_MPE_STATUS, 9, 9), - [DATA] = REG_FIELD(STIH416_MPE_STATUS, 11, 18), - [INT_ENABLE] = REG_FIELD(STIH416_MPE_INT_EN, 0, 0), + [INT_THRESH_HI] = REG_FIELD(INT_THRESH, 0, 7), + [DCORRECT] = REG_FIELD(CONF, 5, 9), + [OVERFLOW] = REG_FIELD(STATUS, 9, 9), + [DATA] = REG_FIELD(STATUS, 11, 18), + [INT_ENABLE] = REG_FIELD(INT_EN, 0, 0), }; static irqreturn_t st_mmap_thermal_trip_handler(int irq, void *sdata) @@ -54,7 +54,7 @@ static int st_mmap_power_ctrl(struct st_thermal_sensor *sensor, const unsigned int mask = (THERMAL_PDN | THERMAL_SRSTN); const unsigned int val = power_state ? mask : 0; - return regmap_update_bits(sensor->regmap, STIH416_MPE_CONF, mask, val); + return regmap_update_bits(sensor->regmap, CONF, mask, val); } static int st_mmap_alloc_regfields(struct st_thermal_sensor *sensor) @@ -114,7 +114,7 @@ static int st_mmap_register_enable_irq(struct st_thermal_sensor *sensor) return st_mmap_enable_irq(sensor); } -static const struct regmap_config st_416mpe_regmap_config = { +static const struct regmap_config st_thermal_regmap_config = { .reg_bits = 32, .val_bits = 32, .reg_stride = 4, @@ -139,7 +139,7 @@ static int st_mmap_regmap_init(struct st_thermal_sensor *sensor) } sensor->regmap = devm_regmap_init_mmio(dev, sensor->mmio_base, - &st_416mpe_regmap_config); + &st_thermal_regmap_config); if (IS_ERR(sensor->regmap)) { dev_err(dev, "failed to initialise regmap\n"); return PTR_ERR(sensor->regmap); @@ -156,15 +156,6 @@ static const struct st_thermal_sensor_ops st_mmap_sensor_ops = { .enable_irq = st_mmap_enable_irq, }; -/* Compatible device data stih416 mpe thermal sensor */ -static const struct st_thermal_compat_data st_416mpe_cdata = { - .reg_fields = st_mmap_thermal_regfields, - .ops = &st_mmap_sensor_ops, - .calibration_val = 14, - .temp_adjust_val = -95, - .crit_temp = 120, -}; - /* Compatible device data stih407 thermal sensor */ static const struct st_thermal_compat_data st_407_cdata = { .reg_fields = st_mmap_thermal_regfields, @@ -175,7 +166,6 @@ static const struct st_thermal_compat_data st_407_cdata = { }; static const struct of_device_id st_mmap_thermal_of_match[] = { - { .compatible = "st,stih416-mpe-thermal", .data = &st_416mpe_cdata }, { .compatible = "st,stih407-thermal", .data = &st_407_cdata }, { /* sentinel */ } };