Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10d6dfc1 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'fixes-for-4.0-rc2' of...

Merge branch 'fixes-for-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal

Pull thermal management fixes from Eduardo Valentin:
 "Specifics:

   - Several fixes in tmon tool.

   - Fixes in intel int340x for _ART and _TRT tables.

   - Add id for Avoton SoC into powerclamp driver.

   - Fixes in RCAR thermal driver to remove race conditions and fix fail
     path

   - Fixes in TI thermal driver: removal of unnecessary code and build
     fix if !CONFIG_PM_SLEEP

   - Cleanups in exynos thermal driver

   - Add stubs for include/linux/thermal.h.  Now drivers using thermal
     calls but that also work without CONFIG_THERMAL will be able to
     compile for systems that don't care about thermal.

  Note: I am sending this pull on Rui's behalf while he fixes issues in
  his Linux box"

* 'fixes-for-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
  thermal: int340x_thermal: Ignore missing _ART, _TRT tables
  thermal/intel_powerclamp: add id for Avoton SoC
  tools/thermal: tmon: silence 'set but not used' warnings
  tools/thermal: tmon: use pkg-config to determine library dependencies
  tools/thermal: tmon: support cross-compiling
  tools/thermal: tmon: add .gitignore
  tools/thermal: tmon: fixup tui windowing calculations
  tools/thermal: tmon: tui: don't hard-code dialog window size assumptions
  tools/thermal: tmon: add min/max macros
  tools/thermal: tmon: add --target-temp parameter
  thermal: exynos: Clean-up code to use oneline entry for exynos compatible table
  thermal: rcar: Make error and remove paths symmetrical with init
  thermal: rcar: Fix race condition between init and interrupt
  thermal: Introduce dummy functions when thermal is not defined
  ti-soc-thermal: Delete an unnecessary check before the function call "cpufreq_cooling_unregister"
  thermal: ti-soc-thermal: bandgap: Fix build warning if !CONFIG_PM_SLEEP
parents 1a6f77ab 5912e264
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -262,13 +262,12 @@ static int int3400_thermal_probe(struct platform_device *pdev)
	result = acpi_parse_art(priv->adev->handle, &priv->art_count,
				&priv->arts, true);
	if (result)
		goto free_priv;

		dev_dbg(&pdev->dev, "_ART table parsing error\n");

	result = acpi_parse_trt(priv->adev->handle, &priv->trt_count,
				&priv->trts, true);
	if (result)
		goto free_art;
		dev_dbg(&pdev->dev, "_TRT table parsing error\n");

	platform_set_drvdata(pdev, priv);

@@ -281,7 +280,7 @@ static int int3400_thermal_probe(struct platform_device *pdev)
						&int3400_thermal_params, 0, 0);
	if (IS_ERR(priv->thermal)) {
		result = PTR_ERR(priv->thermal);
		goto free_trt;
		goto free_art_trt;
	}

	priv->rel_misc_dev_res = acpi_thermal_rel_misc_device_add(
@@ -295,9 +294,8 @@ static int int3400_thermal_probe(struct platform_device *pdev)

free_zone:
	thermal_zone_device_unregister(priv->thermal);
free_trt:
free_art_trt:
	kfree(priv->trts);
free_art:
	kfree(priv->arts);
free_priv:
	kfree(priv);
+1 −0
Original line number Diff line number Diff line
@@ -688,6 +688,7 @@ static const struct x86_cpu_id intel_powerclamp_ids[] = {
	{ X86_VENDOR_INTEL, 6, 0x45},
	{ X86_VENDOR_INTEL, 6, 0x46},
	{ X86_VENDOR_INTEL, 6, 0x4c},
	{ X86_VENDOR_INTEL, 6, 0x4d},
	{ X86_VENDOR_INTEL, 6, 0x56},
	{}
};
+11 −15
Original line number Diff line number Diff line
@@ -387,21 +387,9 @@ static int rcar_thermal_probe(struct platform_device *pdev)

	irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
	if (irq) {
		int ret;

		/*
		 * platform has IRQ support.
		 * Then, driver uses common registers
		 */

		ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0,
				       dev_name(dev), common);
		if (ret) {
			dev_err(dev, "irq request failed\n ");
			return ret;
		}

		/*
		 * rcar_has_irq_support() will be enabled
		 */
		res = platform_get_resource(pdev, IORESOURCE_MEM, mres++);
@@ -456,8 +444,16 @@ static int rcar_thermal_probe(struct platform_device *pdev)
	}

	/* enable temperature comparation */
	if (irq)
	if (irq) {
		ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0,
				       dev_name(dev), common);
		if (ret) {
			dev_err(dev, "irq request failed\n ");
			goto error_unregister;
		}

		rcar_thermal_common_write(common, ENR, enr_bits);
	}

	platform_set_drvdata(pdev, common);

@@ -467,9 +463,9 @@ static int rcar_thermal_probe(struct platform_device *pdev)

error_unregister:
	rcar_thermal_for_each_priv(priv, common) {
		thermal_zone_device_unregister(priv->zone);
		if (rcar_has_irq_support(priv))
			rcar_thermal_irq_disable(priv);
		thermal_zone_device_unregister(priv->zone);
	}

	pm_runtime_put(dev);
@@ -485,9 +481,9 @@ static int rcar_thermal_remove(struct platform_device *pdev)
	struct rcar_thermal_priv *priv;

	rcar_thermal_for_each_priv(priv, common) {
		thermal_zone_device_unregister(priv->zone);
		if (rcar_has_irq_support(priv))
			rcar_thermal_irq_disable(priv);
		thermal_zone_device_unregister(priv->zone);
	}

	pm_runtime_put(dev);
+10 −28
Original line number Diff line number Diff line
@@ -918,34 +918,16 @@ static irqreturn_t exynos_tmu_irq(int irq, void *id)
}

static const struct of_device_id exynos_tmu_match[] = {
	{
		.compatible = "samsung,exynos3250-tmu",
	},
	{
		.compatible = "samsung,exynos4210-tmu",
	},
	{
		.compatible = "samsung,exynos4412-tmu",
	},
	{
		.compatible = "samsung,exynos5250-tmu",
	},
	{
		.compatible = "samsung,exynos5260-tmu",
	},
	{
		.compatible = "samsung,exynos5420-tmu",
	},
	{
		.compatible = "samsung,exynos5420-tmu-ext-triminfo",
	},
	{
		.compatible = "samsung,exynos5440-tmu",
	},
	{
		.compatible = "samsung,exynos7-tmu",
	},
	{},
	{ .compatible = "samsung,exynos3250-tmu", },
	{ .compatible = "samsung,exynos4210-tmu", },
	{ .compatible = "samsung,exynos4412-tmu", },
	{ .compatible = "samsung,exynos5250-tmu", },
	{ .compatible = "samsung,exynos5260-tmu", },
	{ .compatible = "samsung,exynos5420-tmu", },
	{ .compatible = "samsung,exynos5420-tmu-ext-triminfo", },
	{ .compatible = "samsung,exynos5440-tmu", },
	{ .compatible = "samsung,exynos7-tmu", },
	{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, exynos_tmu_match);

+1 −1
Original line number Diff line number Diff line
@@ -1402,7 +1402,7 @@ int ti_bandgap_remove(struct platform_device *pdev)
	return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int ti_bandgap_save_ctxt(struct ti_bandgap *bgp)
{
	int i;
Loading