Re: [PATCH] thermal: consistently use int for temperatures

2015-07-06 Thread Jean Delvare
On Mon,  6 Jul 2015 09:19:49 +0200, Sascha Hauer wrote:
 The thermal code uses int, long and unsigned long for temperatures
 in different places.
 
 Using an unsigned type limits the thermal framework to positive
 temperatures without need. Also several drivers currently will report
 temperatures near UINT_MAX for temperatures below 0°C. This will probably
 immediately shut the machine down due to overtemperature if started below
 0°C.
 
 'long' is 64bit on several architectures. This is not needed since INT_MAX °mC
 is above the melting point of all known materials.
 
 Consistently use a plain 'int' for temperatures throughout the thermal code 
 and
 the drivers. This only changes the places in the drivers where the temperature
 is passed around as pointer, when drivers internally use another type this is
 not changed.
 
 Signed-off-by: Sascha Hauer s.ha...@pengutronix.de
 Cc: Zhang Rui rui.zh...@intel.com
 Cc: Eduardo Valentin edubez...@gmail.com
 Cc: linux...@vger.kernel.org
 Cc: linux-ker...@vger.kernel.org
 Cc: Jean Delvare jdelv...@suse.de
 Cc: Peter Feuerer pe...@piie.net
 Cc: Heiko Stuebner he...@sntech.de
 Cc: Lukasz Majewski l.majew...@samsung.com
 Cc: Stephen Warren swar...@wwwdotorg.org
 Cc: Thierry Reding thierry.red...@gmail.com
 Cc: linux-a...@vger.kernel.org
 Cc: platform-driver-...@vger.kernel.org
 Cc: linux-arm-ker...@lists.infradead.org
 Cc: linux-o...@vger.kernel.org
 Cc: linux-samsung-soc@vger.kernel.org
 Cc: Guenter Roeck li...@roeck-us.net
 Cc: Rafael J. Wysocki r...@rjwysocki.net
 Cc: Maxime Ripard maxime.rip...@free-electrons.com
 Cc: Darren Hart dvh...@infradead.org
 Cc: lm-sens...@lm-sensors.org
 ---
  drivers/acpi/thermal.c | 12 +-
  drivers/hwmon/lm75.c   |  2 +-
  drivers/hwmon/ntc_thermistor.c |  2 +-
  drivers/hwmon/tmp102.c |  2 +-
  drivers/input/touchscreen/sun4i-ts.c   |  8 +++
  drivers/platform/x86/acerhdf.c |  9 
  drivers/platform/x86/intel_mid_thermal.c   |  9 
  drivers/power/power_supply_core.c  |  2 +-
  drivers/thermal/armada_thermal.c   |  2 +-
  drivers/thermal/db8500_thermal.c   |  7 +++---
  drivers/thermal/dove_thermal.c |  2 +-
  drivers/thermal/fair_share.c   |  2 +-
  drivers/thermal/gov_bang_bang.c|  5 ++--
  drivers/thermal/hisi_thermal.c |  4 ++--
  drivers/thermal/imx_thermal.c  | 27 
 +++---
  drivers/thermal/int340x_thermal/int3400_thermal.c  |  2 +-
  .../thermal/int340x_thermal/int340x_thermal_zone.c | 10 
  .../thermal/int340x_thermal/int340x_thermal_zone.h |  8 +++
  .../int340x_thermal/processor_thermal_device.c |  4 ++--
  drivers/thermal/intel_quark_dts_thermal.c  | 13 +--
  drivers/thermal/intel_soc_dts_iosf.c   |  8 +++
  drivers/thermal/kirkwood_thermal.c |  2 +-
  drivers/thermal/of-thermal.c   | 14 +--
  drivers/thermal/power_allocator.c  | 16 ++---
  drivers/thermal/qcom-spmi-temp-alarm.c |  2 +-
  drivers/thermal/rcar_thermal.c |  7 +++---
  drivers/thermal/rockchip_thermal.c | 10 
  drivers/thermal/samsung/exynos_tmu.c   | 23 +-
  drivers/thermal/spear_thermal.c|  2 +-
  drivers/thermal/st/st_thermal.c|  5 ++--
  drivers/thermal/step_wise.c|  4 ++--
  drivers/thermal/tegra_soctherm.c   |  4 ++--
  drivers/thermal/thermal_core.c | 26 ++---
  drivers/thermal/thermal_hwmon.c| 10 
  drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 10 
  drivers/thermal/x86_pkg_temp_thermal.c | 10 
  include/linux/thermal.h| 26 +
  37 files changed, 148 insertions(+), 163 deletions(-)
 (...)

No objection from me.

For the hwmon parts:

Reviewed-by: Jean Delvare jdelv...@suse.de

-- 
Jean Delvare
SUSE L3 Support
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] video: exynos: Add a dependency to the menu

2014-04-08 Thread Jean Delvare
All drivers under menu EXYNOS_VIDEO depend on either ARCH_S5PV210 or
ARCH_EXYNOS, so add these as dependencies to the menu itself. This
avoids presenting an empty and useless menu on other architectures.

Then drivers under the menu only need a dependency if they depend on
one of the supported architectures specifically.

Signed-off-by: Jean Delvare jdelv...@suse.de
Cc: Jean-Christophe Plagniol-Villard plagn...@jcrosoft.com
Cc: Tomi Valkeinen tomi.valkei...@ti.com
Cc: Kukjin Kim kgene@samsung.com
---
 drivers/video/exynos/Kconfig |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-3.15-rc0.orig/drivers/video/exynos/Kconfig2014-04-07 
10:23:07.316226676 +0200
+++ linux-3.15-rc0/drivers/video/exynos/Kconfig 2014-04-08 11:50:17.406723187 
+0200
@@ -4,6 +4,7 @@
 
 menuconfig EXYNOS_VIDEO
bool Exynos Video driver support
+   depends on ARCH_S5PV210 || ARCH_EXYNOS
help
  This enables support for EXYNOS Video device.
 
@@ -15,7 +16,6 @@ if EXYNOS_VIDEO
 
 config EXYNOS_MIPI_DSI
bool EXYNOS MIPI DSI driver support.
-   depends on ARCH_S5PV210 || ARCH_EXYNOS
select GENERIC_PHY
help
  This enables support for MIPI-DSI device.


-- 
Jean Delvare
SUSE L3 Support
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] i2c: samsung: resume race fix

2013-01-07 Thread Jean Delvare
On Mon, 7 Jan 2013 17:35:25 +0530, Naveen Krishna Ch wrote:
 On 7 November 2012 16:14, Jean Delvare kh...@linux-fr.org wrote:
  On Wed, 07 Nov 2012 15:58:26 +0530, Naveen Krishna Chatradhi wrote:
  Don't unmark the device as suspended until after it's been re-setup.
 
  The main race would be w.r.t. an i2c driver that gets resumed at the same
  time (asyncronously), that is allowed to do a transfer since suspended
  is set to 0 before reinit, but really should have seen the -EIO return
  instead.
 
  Signed-off-by: Olof Johansson ol...@chromium.org
  Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com
  ---
   drivers/i2c/busses/i2c-s3c2410.c |2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
 
  diff --git a/drivers/i2c/busses/i2c-s3c2410.c 
  b/drivers/i2c/busses/i2c-s3c2410.c
  index 3e0335f..dbaf920 100644
  --- a/drivers/i2c/busses/i2c-s3c2410.c
  +++ b/drivers/i2c/busses/i2c-s3c2410.c
  @@ -1134,10 +1134,10 @@ static int s3c24xx_i2c_resume(struct device *dev)
struct platform_device *pdev = to_platform_device(dev);
struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
 
  - i2c-suspended = 0;
clk_prepare_enable(i2c-clk);
s3c24xx_i2c_init(i2c);
clk_disable_unprepare(i2c-clk);
  + i2c-suspended = 0;
 
return 0;
   }
 
  Acked-by: Jean Delvare kh...@linux-fr.org
 I don't see this patch landed any where in linux-i2c tree, Though it was 
 acked.
 Was it missed or should i be doing something for this to be merged ??

Nothing needed from your side AFAIK, Wolfram should pick patches when I
ack them, maybe this one was simply overlooked.

-- 
Jean Delvare
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] i2c: samsung: resume race fix

2012-11-07 Thread Jean Delvare
On Wed, 07 Nov 2012 15:58:26 +0530, Naveen Krishna Chatradhi wrote:
 Don't unmark the device as suspended until after it's been re-setup.
 
 The main race would be w.r.t. an i2c driver that gets resumed at the same
 time (asyncronously), that is allowed to do a transfer since suspended
 is set to 0 before reinit, but really should have seen the -EIO return
 instead.

I thought that the suspend order was children first and the resume
order was parent first?

If this can really happen then I am afraid this is an issue for more
than just i2c-s3c2410. The proposed solution is also not really
satisfactory, as the i2c client will certainly still fail to resume
properly (the only improvement is that now the failure is no longer
silent.)

 
 Signed-off-by: Olof Johansson ol...@chromium.org
 Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com
 ---
  drivers/i2c/busses/i2c-s3c2410.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/i2c/busses/i2c-s3c2410.c 
 b/drivers/i2c/busses/i2c-s3c2410.c
 index 3e0335f..dbaf920 100644
 --- a/drivers/i2c/busses/i2c-s3c2410.c
 +++ b/drivers/i2c/busses/i2c-s3c2410.c
 @@ -1134,10 +1134,10 @@ static int s3c24xx_i2c_resume(struct device *dev)
   struct platform_device *pdev = to_platform_device(dev);
   struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
  
 - i2c-suspended = 0;
   clk_prepare_enable(i2c-clk);
   s3c24xx_i2c_init(i2c);
   clk_disable_unprepare(i2c-clk);
 + i2c-suspended = 0;
  
   return 0;
  }

Acked-by: Jean Delvare kh...@linux-fr.org

(Not perfect but still better than before.)

-- 
Jean Delvare
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] i2c-s3c2410: Add stub runtime power management

2011-12-13 Thread Jean Delvare
On Tue, 13 Dec 2011 15:53:48 +0100, Heiko Stübner wrote:
 Am Montag, 5. Dezember 2011, 15:06:06 schrieb Mark Brown:
  Add stub runtime_pm calls which go through the flow of enabling and
  disabling but don't actually do anything with the device itself as
  there's nothing useful we can do. This provides the core PM framework
  with information about when the device is idle, enabling chip wide
  power savings.
  
  Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com
 Acked-by: Heiko Stuebner he...@sntech.de
 
 Kgene, Jean, Ben: could we move this forward please?

The i2c-s3c2410 driver is in Ben's garden, not mine.

-- 
Jean Delvare
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [lm-sensors] [PATCH 2/2] HWMON: Add s3c64xx support to s3c-hwmon

2010-01-26 Thread Jean Delvare
On Wed, 27 Jan 2010 01:07:48 +, Ben Dooks wrote:
 On Tue, Jan 26, 2010 at 12:16:17PM +0100, Maurus Cuelenaere wrote:
  Signed-off-by: Maurus Cuelenaere mcuelena...@gmail.com
 Acked-by: Ben Dooks ben-li...@fluff.org
  ---
   drivers/hwmon/Kconfig |2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)
  
  diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
  index 68cf877..a8a267c 100644
  --- a/drivers/hwmon/Kconfig
  +++ b/drivers/hwmon/Kconfig
  @@ -702,7 +702,7 @@ config SENSORS_SHT15
  
   config SENSORS_S3C
  tristate S3C24XX/S3C64XX Inbuilt ADC
  -   depends on ARCH_S3C2410
  +   depends on ARCH_S3C2410 || ARCH_S3C64XX
  help
If you say yes here you get support for the on-board ADCs of
the Samsung S3C24XX or S3C64XX series of SoC

Applied, thanks.

-- 
Jean Delvare
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html