Commit 939ca9f1 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal

Pull thermal SoC updates from Eduardo Valentin:
 "This is a really small pull in the midst of a lot of pending patches.

  We are in the middle of restructuring how we are maintaining the
  thermal subsystem, as per discussion in our last LPC. For now, I am
  sending just some changes that were pending in my tree. Looking
  forward to get a more streamlined process in the next merge window"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
  thermal: db8500: Rewrite to be a pure OF sensor
  thermal: db8500: Use dev helper variable
  thermal: db8500: Finalize device tree conversion
  thermal: thermal_mmio: remove some dead code
parents 9ecb3e10 6c375ecc
......@@ -36,7 +36,6 @@
#include <linux/regulator/db8500-prcmu.h>
#include <linux/regulator/machine.h>
#include <linux/platform_data/ux500_wdt.h>
#include <linux/platform_data/db8500_thermal.h>
#include "dbx500-prcmu-regs.h"
/* Index of different voltages to be used when accessing AVSData */
......@@ -3014,53 +3013,6 @@ static struct ux500_wdt_data db8500_wdt_pdata = {
.timeout = 600, /* 10 minutes */
.has_28_bits_resolution = true,
};
/*
* Thermal Sensor
*/
static struct resource db8500_thsens_resources[] = {
{
.name = "IRQ_HOTMON_LOW",
.start = IRQ_PRCMU_HOTMON_LOW,
.end = IRQ_PRCMU_HOTMON_LOW,
.flags = IORESOURCE_IRQ,
},
{
.name = "IRQ_HOTMON_HIGH",
.start = IRQ_PRCMU_HOTMON_HIGH,
.end = IRQ_PRCMU_HOTMON_HIGH,
.flags = IORESOURCE_IRQ,
},
};
static struct db8500_thsens_platform_data db8500_thsens_data = {
.trip_points[0] = {
.temp = 70000,
.type = THERMAL_TRIP_ACTIVE,
.cdev_name = {
[0] = "thermal-cpufreq-0",
},
},
.trip_points[1] = {
.temp = 75000,
.type = THERMAL_TRIP_ACTIVE,
.cdev_name = {
[0] = "thermal-cpufreq-0",
},
},
.trip_points[2] = {
.temp = 80000,
.type = THERMAL_TRIP_ACTIVE,
.cdev_name = {
[0] = "thermal-cpufreq-0",
},
},
.trip_points[3] = {
.temp = 85000,
.type = THERMAL_TRIP_CRITICAL,
},
.num_trips = 4,
};
static const struct mfd_cell common_prcmu_devs[] = {
{
......@@ -3084,10 +3036,7 @@ static const struct mfd_cell db8500_prcmu_devs[] = {
},
{
.name = "db8500-thermal",
.num_resources = ARRAY_SIZE(db8500_thsens_resources),
.resources = db8500_thsens_resources,
.platform_data = &db8500_thsens_data,
.pdata_size = sizeof(db8500_thsens_data),
.of_compatible = "stericsson,db8500-thermal",
},
};
......
......@@ -310,7 +310,7 @@ config DOVE_THERMAL
config DB8500_THERMAL
tristate "DB8500 thermal management"
depends on MFD_DB8500_PRCMU
depends on MFD_DB8500_PRCMU && OF
default y
help
Adds DB8500 thermal management implementation according to the thermal
......
This diff is collapsed.
......@@ -53,13 +53,6 @@ static int thermal_mmio_probe(struct platform_device *pdev)
return -ENOMEM;
resource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (IS_ERR(resource)) {
dev_err(&pdev->dev,
"fail to get platform memory resource (%ld)\n",
PTR_ERR(resource));
return PTR_ERR(resource);
}
sensor->mmio_base = devm_ioremap_resource(&pdev->dev, resource);
if (IS_ERR(sensor->mmio_base)) {
dev_err(&pdev->dev, "failed to ioremap memory (%ld)\n",
......
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* db8500_thermal.h - DB8500 Thermal Management Implementation
*
* Copyright (C) 2012 ST-Ericsson
* Copyright (C) 2012 Linaro Ltd.
*
* Author: Hongbo Zhang <hongbo.zhang@linaro.com>
*/
#ifndef _DB8500_THERMAL_H_
#define _DB8500_THERMAL_H_
#include <linux/thermal.h>
#define COOLING_DEV_MAX 8
struct db8500_trip_point {
unsigned long temp;
enum thermal_trip_type type;
char cdev_name[COOLING_DEV_MAX][THERMAL_NAME_LENGTH];
};
struct db8500_thsens_platform_data {
struct db8500_trip_point trip_points[THERMAL_MAX_TRIPS];
int num_trips;
};
#endif /* _DB8500_THERMAL_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment