[PATCHv2 14/49] thermal: core: move trips attributes to tz->device.groups

2016-11-07 Thread Eduardo Valentin
groups. As the removal of all attributes are handled by device core, the device remove calls are not needed anymore. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.

[PATCHv2 17/49] thermal: core: split policy_store

2016-11-07 Thread Eduardo Valentin
Similarly to passive_store, policy_store now is split between thermal core data structure handling and sysfs handling. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- dri

[PATCHv2 20/49] thermal: core: treat correctly the return value of *scanf calls

2016-11-07 Thread Eduardo Valentin
.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/dri

[PATCHv2 12/49] thermal: core: move the trip attrs to the tz sysfs I/F section

2016-11-07 Thread Eduardo Valentin
Code reorganization to keep all the sysfs I/F of a thermal zone in the same section. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_

[PATCHv2 09/49] thermal: core: move power actor code out of sysfs I/F section

2016-11-07 Thread Eduardo Valentin
Simply reorganize code to keep only functions of sysfs interface of thermal zone device together. Therefore, move the power actor code out of the sysfs I/F section. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Va

[PATCHv2 11/49] thermal: core: fix style on remove_trip_attrs()

2016-11-07 Thread Eduardo Valentin
Align to parentheses, removing checkpatch warning. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 2 +- 1 file changed, 1 insertion(+)

[PATCHv2 17/49] thermal: core: split policy_store

2016-11-07 Thread Eduardo Valentin
Similarly to passive_store, policy_store now is split between thermal core data structure handling and sysfs handling. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 37

[PATCHv2 20/49] thermal: core: treat correctly the return value of *scanf calls

2016-11-07 Thread Eduardo Valentin
...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index f5b519a..e2c4fc4 100644

[PATCHv2 12/49] thermal: core: move the trip attrs to the tz sysfs I/F section

2016-11-07 Thread Eduardo Valentin
Code reorganization to keep all the sysfs I/F of a thermal zone in the same section. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 216 - 1 file changed

[PATCHv2 09/49] thermal: core: move power actor code out of sysfs I/F section

2016-11-07 Thread Eduardo Valentin
Simply reorganize code to keep only functions of sysfs interface of thermal zone device together. Therefore, move the power actor code out of the sysfs I/F section. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal

[PATCHv2 11/49] thermal: core: fix style on remove_trip_attrs()

2016-11-07 Thread Eduardo Valentin
Align to parentheses, removing checkpatch warning. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/thermal_core.c b

[PATCHv2 00/49] thermal: reorganizing thermal core

2016-11-07 Thread Eduardo Valentin
rom Keerthy, a DRA7 device. The testing was done to check if the sysfs nodes were still working. On top of that I have also boot tested different devices using kernel CI infrastructure and the 0-day testing. BR, Eduardo Valentin (49): thermal: core: prevent zones with no types to be registered ther

[PATCHv2 03/49] thermal: core: group device_create_file() calls that are always created

2016-11-07 Thread Eduardo Valentin
Simple code reorganization to group files that are always created when registering a thermal zone. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal

[PATCHv2 00/49] thermal: reorganizing thermal core

2016-11-07 Thread Eduardo Valentin
rom Keerthy, a DRA7 device. The testing was done to check if the sysfs nodes were still working. On top of that I have also boot tested different devices using kernel CI infrastructure and the 0-day testing. BR, Eduardo Valentin (49): thermal: core: prevent zones with no types to be registered ther

[PATCHv2 03/49] thermal: core: group device_create_file() calls that are always created

2016-11-07 Thread Eduardo Valentin
Simple code reorganization to group files that are always created when registering a thermal zone. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 24 1 file changed, 12

Re: [PATCH] of: thermal: Fixed governor at each thermal zone

2016-09-27 Thread Eduardo Valentin
Hello, Lukasz, Inhyuk, Javi, On Tue, Sep 27, 2016 at 12:52:04PM +0100, Lukasz Luba wrote: > > On 27/09/16 02:46, Zhang Rui wrote: > >On 一, 2016-09-19 at 10:18 +0900, Inhyuk Kang wrote: > >>It is necessary to be added governor at each thermal_zone. > >>Because some governors should be operated in

Re: [PATCH] of: thermal: Fixed governor at each thermal zone

2016-09-27 Thread Eduardo Valentin
Hello, Lukasz, Inhyuk, Javi, On Tue, Sep 27, 2016 at 12:52:04PM +0100, Lukasz Luba wrote: > > On 27/09/16 02:46, Zhang Rui wrote: > >On 一, 2016-09-19 at 10:18 +0900, Inhyuk Kang wrote: > >>It is necessary to be added governor at each thermal_zone. > >>Because some governors should be operated in

Re: [Thermal] Need confirmation for the pending thermal soc patches

2016-09-05 Thread Eduardo Valentin
Hello Rui, On Sun, Aug 21, 2016 at 10:09:00PM +0800, Zhang Rui wrote: > Hi, > > As Eduardo is quite busy recently, I will take all the thermal soc > driver changes this time. Thanks for helping me out. I am slowing coming back to upstream activities. I have refreshed my branches, removing the

Re: [Thermal] Need confirmation for the pending thermal soc patches

2016-09-05 Thread Eduardo Valentin
Hello Rui, On Sun, Aug 21, 2016 at 10:09:00PM +0800, Zhang Rui wrote: > Hi, > > As Eduardo is quite busy recently, I will take all the thermal soc > driver changes this time. Thanks for helping me out. I am slowing coming back to upstream activities. I have refreshed my branches, removing the

Re: linux-next: please clean up the thermal-soc tree

2016-09-05 Thread Eduardo Valentin
r several weeks and my tree was broken during this time causing the above problem. Sorry for this. I have removed the problematic patches out of linux-next way. Let me know if you still have troubles. BR, Eduardo Valentin > > -- > Cheers, > Stephen Rothwell

Re: linux-next: please clean up the thermal-soc tree

2016-09-05 Thread Eduardo Valentin
r several weeks and my tree was broken during this time causing the above problem. Sorry for this. I have removed the problematic patches out of linux-next way. Let me know if you still have troubles. BR, Eduardo Valentin > > -- > Cheers, > Stephen Rothwell

Re: [GIT PULL] Thermal SoC management updates for v4.8-rc1

2016-08-03 Thread Eduardo Valentin
On Wed, Aug 03, 2016 at 03:58:47PM -0700, Eduardo Valentin wrote: > Hello Rui, > > Please pull from So, forgot to mention that I have been away from upstream work for some time now, and I am still catching up on my emails. I've just realized that this may be a bit too late for the pu

Re: [GIT PULL] Thermal SoC management updates for v4.8-rc1

2016-08-03 Thread Eduardo Valentin
On Wed, Aug 03, 2016 at 03:58:47PM -0700, Eduardo Valentin wrote: > Hello Rui, > > Please pull from So, forgot to mention that I have been away from upstream work for some time now, and I am still catching up on my emails. I've just realized that this may be a bit too late for the pu

[GIT PULL] Thermal SoC management updates for v4.8-rc1

2016-08-03 Thread Eduardo Valentin
thermal: rockchip: fixes the period time for tsadc thermal: rockchip: fixes the exception interrupts thermal: trivial: fix the typo Eduardo Valentin (65): thermal: core: prevent zones with no types to be registered thermal: core: group thermal_zone DEVICE_ATTR's

[GIT PULL] Thermal SoC management updates for v4.8-rc1

2016-08-03 Thread Eduardo Valentin
thermal: rockchip: fixes the period time for tsadc thermal: rockchip: fixes the exception interrupts thermal: trivial: fix the typo Eduardo Valentin (65): thermal: core: prevent zones with no types to be registered thermal: core: group thermal_zone DEVICE_ATTR's

[PATCHv2 1/1] thermal: sysfs: lock tz while on access to mode properties

2016-07-01 Thread Eduardo Valentin
<dvh...@infradead.org> Cc: Zhang Rui <rui.zh...@intel.com> Cc: Keerthy <j-keer...@ti.com> Cc: linux-kernel@vger.kernel.org Cc: linux-o...@vger.kernel.org Cc: platform-driver-...@vger.kernel.org Cc: linux...@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> ---

[PATCHv2 1/1] thermal: sysfs: lock tz while on access to mode properties

2016-07-01 Thread Eduardo Valentin
ux-o...@vger.kernel.org Cc: platform-driver-...@vger.kernel.org Cc: linux...@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/acpi/thermal.c | 1 - drivers/platform/x86/acerhdf.c | 1 - drivers/thermal/imx_thermal.c

Re: [PATCH v6 3/5] thermal: streamline get_trend callbacks

2016-07-01 Thread Eduardo Valentin
instead of an integer pointer. > > While the OF prototype may be the better one, this should be decided at > framework level and not on OF level. > > Signed-off-by: Sascha Hauer <s.ha...@pengutronix.de> > Signed-off-by: Caesar Wang <w...@rock-chips.com> > Cc: Zhang Rui <

Re: [PATCH v6 3/5] thermal: streamline get_trend callbacks

2016-07-01 Thread Eduardo Valentin
ile the OF prototype may be the better one, this should be decided at > framework level and not on OF level. > > Signed-off-by: Sascha Hauer > Signed-off-by: Caesar Wang > Cc: Zhang Rui > Cc: Eduardo Valentin > Cc: linux...@vger.kernel.org > Reviewed-by: Keerthy I had

[PATCH 1/1] thermal: core: move slop and offset helpers to thermal_helpers.c

2016-07-01 Thread Eduardo Valentin
Reorganize code to reflect better placement. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c| 30 -- dri

[PATCH 1/1] thermal: core: move slop and offset helpers to thermal_helpers.c

2016-07-01 Thread Eduardo Valentin
Reorganize code to reflect better placement. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c| 30 -- drivers/thermal/thermal_helpers.c | 30

Re: [PATCH v5 1/5] thermal: Add support for hardware-tracked trip points

2016-07-01 Thread Eduardo Valentin
ore. > > > > This patch is based on an earlier version from Mikko Perttunen > > <mikko.perttu...@kapsi.fi> > > > > Signed-off-by: Sascha Hauer <s.ha...@pengutronix.de> > > Signed-off-by: Caesar Wang <w...@rock-chips.com> > > Cc: Zhang Rui &

Re: [PATCH v5 1/5] thermal: Add support for hardware-tracked trip points

2016-07-01 Thread Eduardo Valentin
is patch is based on an earlier version from Mikko Perttunen > > > > > > Signed-off-by: Sascha Hauer > > Signed-off-by: Caesar Wang > > Cc: Zhang Rui > > Cc: Eduardo Valentin > > Cc: linux...@vger.kernel.org > > > > --- > > >

[PATCH 1/1] thermal: qcom: remove declare local symbols as static

2016-07-01 Thread Eduardo Valentin
linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/qcom/tsens-8916.c | 2 +- drivers/thermal/qcom/tsens-8960.c | 2 +- drivers/thermal/qcom/tsens-8974.c | 2 +- drivers/thermal/qcom/tsens-8996.c | 2 +- 4 files changed, 4 insertions(+), 4 deleti

[PATCH 1/1] thermal: qcom: remove declare local symbols as static

2016-07-01 Thread Eduardo Valentin
: symbol 'ops_8974' was not declared. Should it be static? drivers/thermal/qcom/tsens-8960.c:279:24: warning: symbol 'ops_8960' was not declared. Should it be static? Cc: Zhang Rui Cc: Rajendra Nayak Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin

Re: [PATCHv4 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-07-01 Thread Eduardo Valentin
ng only the new version of that patch. Are you OK to pick it up like that? > > thanks, > rui > > On 三, 2016-06-22 at 08:03 -0700, Eduardo Valentin wrote: > > Because several drivers do the following pattern: > > .set_mode() > >    ... > >    local_data-

Re: [PATCHv4 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-07-01 Thread Eduardo Valentin
ng only the new version of that patch. Are you OK to pick it up like that? > > thanks, > rui > > On 三, 2016-06-22 at 08:03 -0700, Eduardo Valentin wrote: > > Because several drivers do the following pattern: > > .set_mode() > >    ... > >    local_data-

Re: [PATCH 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-07-01 Thread Eduardo Valentin
On Thu, Jun 23, 2016 at 02:27:12PM +0200, Rafael J. Wysocki wrote: > On Wed, Jun 22, 2016 at 7:06 AM, Eduardo Valentin <edubez...@gmail.com> wrote: > > Because several drivers do the following pattern: > > .set_mode() > >... > >local_data->mode = new_mod

Re: [PATCH 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-07-01 Thread Eduardo Valentin
On Thu, Jun 23, 2016 at 02:27:12PM +0200, Rafael J. Wysocki wrote: > On Wed, Jun 22, 2016 at 7:06 AM, Eduardo Valentin wrote: > > Because several drivers do the following pattern: > > .set_mode() > >... > >local_data->mode = new_mode; > >thermal_z

Re: [PATCHv2 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-06-22 Thread Eduardo Valentin
On Wed, Jun 22, 2016 at 07:36:11AM -0700, Eduardo Valentin wrote: > On Wed, Jun 22, 2016 at 03:03:45PM +0530, Keerthy wrote: > > > > > > On Wednesday 22 June 2016 10:45 AM, Eduardo Valentin wrote: > > >Because several drivers do the fol

Re: [PATCHv2 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-06-22 Thread Eduardo Valentin
On Wed, Jun 22, 2016 at 07:36:11AM -0700, Eduardo Valentin wrote: > On Wed, Jun 22, 2016 at 03:03:45PM +0530, Keerthy wrote: > > > > > > On Wednesday 22 June 2016 10:45 AM, Eduardo Valentin wrote: > > >Because several drivers do the fol

[PATCHv4 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-06-22 Thread Eduardo Valentin
Darren Hart <dvh...@infradead.org> Cc: Zhang Rui <rui.zh...@intel.com> Cc: Keerthy <j-keer...@ti.com> Cc: linux-kernel@vger.kernel.org Cc: linux-o...@vger.kernel.org Cc: platform-driver-...@vger.kernel.org Cc: linux...@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gm

[PATCHv4 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-06-22 Thread Eduardo Valentin
ger.kernel.org Cc: linux-o...@vger.kernel.org Cc: platform-driver-...@vger.kernel.org Cc: linux...@vger.kernel.org Signed-off-by: Eduardo Valentin --- Hello, V3->V4: - ti-soc: Removed extra locking from TI SoC in set_mode - ACPI: Kept the update on check as it is called on other places BR, Edu

Re: [PATCHv2 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-06-22 Thread Eduardo Valentin
On Wed, Jun 22, 2016 at 03:03:45PM +0530, Keerthy wrote: > > > On Wednesday 22 June 2016 10:45 AM, Eduardo Valentin wrote: > >Because several drivers do the following pattern: > >.set_mode() > >... > >local_data->mode = new_mode; > >thermal_

Re: [PATCHv2 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-06-22 Thread Eduardo Valentin
On Wed, Jun 22, 2016 at 03:03:45PM +0530, Keerthy wrote: > > > On Wednesday 22 June 2016 10:45 AM, Eduardo Valentin wrote: > >Because several drivers do the following pattern: > >.set_mode() > >... > >local_data->mode = new_mode; > >thermal_

[PATCHv3 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-06-22 Thread Eduardo Valentin
Darren Hart <dvh...@infradead.org> Cc: Zhang Rui <rui.zh...@intel.com> Cc: Keerthy <j-keer...@ti.com> Cc: linux-kernel@vger.kernel.org Cc: linux-o...@vger.kernel.org Cc: platform-driver-...@vger.kernel.org Cc: linux...@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gm

[PATCHv3 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-06-22 Thread Eduardo Valentin
ger.kernel.org Cc: linux-o...@vger.kernel.org Cc: platform-driver-...@vger.kernel.org Cc: linux...@vger.kernel.org Signed-off-by: Eduardo Valentin --- Hey, V2--> V3: Remove locking from OF thermal set mode. The locking is done from thermal core already. BR, Eduardo drivers/acpi/thermal.c

[PATCHv2 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-06-21 Thread Eduardo Valentin
Darren Hart <dvh...@infradead.org> Cc: Zhang Rui <rui.zh...@intel.com> Cc: Keerthy <j-keer...@ti.com> Cc: linux-kernel@vger.kernel.org Cc: linux-o...@vger.kernel.org Cc: platform-driver-...@vger.kernel.org Cc: linux...@vger.kernel.org Signed-off-by: Eduardo Valentin <edube

[PATCHv2 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-06-21 Thread Eduardo Valentin
ger.kernel.org Cc: linux-o...@vger.kernel.org Cc: platform-driver-...@vger.kernel.org Cc: linux...@vger.kernel.org Signed-off-by: Eduardo Valentin --- Please ignore last version. V1-> V2: Cleaned the patch and remove unrelated changes. --- drivers/acpi/thermal.c | 2 -- d

[PATCH 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-06-21 Thread Eduardo Valentin
Darren Hart <dvh...@infradead.org> Cc: Zhang Rui <rui.zh...@intel.com> Cc: Keerthy <j-keer...@ti.com> Cc: linux-kernel@vger.kernel.org Cc: linux-o...@vger.kernel.org Cc: platform-driver-...@vger.kernel.org Cc: linux...@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@

[PATCH 1/1] thermal: core: call thermal_zone_device_update() after mode update

2016-06-21 Thread Eduardo Valentin
ger.kernel.org Cc: linux-o...@vger.kernel.org Cc: platform-driver-...@vger.kernel.org Cc: linux...@vger.kernel.org Signed-off-by: Eduardo Valentin --- Rui, Keerthy, I think this patch should take care of the introduced deadlock. Let me know if solves on your end. BR, Eduardo --

[PATCHv4 02/48] thermal: core: group thermal_zone DEVICE_ATTR's declarations

2016-05-31 Thread Eduardo Valentin
Simply reorganize the code to have all DEVICE_ATTR's in one point in the file. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 20 ++-

[PATCHv4 02/48] thermal: core: group thermal_zone DEVICE_ATTR's declarations

2016-05-31 Thread Eduardo Valentin
Simply reorganize the code to have all DEVICE_ATTR's in one point in the file. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 20 ++-- 1 file changed, 10 insertions(+), 10

[PATCHv4 03/48] thermal: core: group device_create_file() calls that are always created

2016-05-31 Thread Eduardo Valentin
Simple code reorganization to group files that are always created when registering a thermal zone. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal

[PATCHv4 00/48] thermal: reorganizing thermal core

2016-05-31 Thread Eduardo Valentin
ch issues in the existing code that was moved/changed. Rui, it would be great if you could review these earlier. I will be sending two extra patch series on top of this one. Eduardo Valentin (48): thermal: core: prevent zones with no types to be registered thermal: core: group thermal_zone DEVI

[PATCHv4 03/48] thermal: core: group device_create_file() calls that are always created

2016-05-31 Thread Eduardo Valentin
Simple code reorganization to group files that are always created when registering a thermal zone. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 24 1 file changed, 12

[PATCHv4 00/48] thermal: reorganizing thermal core

2016-05-31 Thread Eduardo Valentin
ch issues in the existing code that was moved/changed. Rui, it would be great if you could review these earlier. I will be sending two extra patch series on top of this one. Eduardo Valentin (48): thermal: core: prevent zones with no types to be registered thermal: core: group thermal_zone DEVI

[PATCHv4 06/48] thermal: core: move mode attribute to tz->device.groups

2016-05-31 Thread Eduardo Valentin
ng Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 36 1 file changed, 28 insertions(+), 8 deletions(-) diff --git

[PATCHv4 07/48] thermal: core: move passive attr to tz->device.groups

2016-05-31 Thread Eduardo Valentin
mal driver has exposed at least one passive trip point. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 42 +-

[PATCHv4 06/48] thermal: core: move mode attribute to tz->device.groups

2016-05-31 Thread Eduardo Valentin
ui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 36 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_

[PATCHv4 07/48] thermal: core: move passive attr to tz->device.groups

2016-05-31 Thread Eduardo Valentin
mal driver has exposed at least one passive trip point. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 42 +- 1 file changed, 33 insertions(+), 9 deletions(-) d

[PATCHv4 09/48] thermal: core: move power actor code out of sysfs I/F section

2016-05-31 Thread Eduardo Valentin
Simply reorganize code to keep only functions of sysfs interface of thermal zone device together. Therefore, move the power actor code out of the sysfs I/F section. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Va

[PATCHv4 09/48] thermal: core: move power actor code out of sysfs I/F section

2016-05-31 Thread Eduardo Valentin
Simply reorganize code to keep only functions of sysfs interface of thermal zone device together. Therefore, move the power actor code out of the sysfs I/F section. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal

[PATCHv4 05/48] thermal: core: move emul_temp creation to tz->device.groups

2016-05-31 Thread Eduardo Valentin
emul_temp creation is dependent on a compile time condition. Moving to tz->device.groups. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 11

[PATCHv4 05/48] thermal: core: move emul_temp creation to tz->device.groups

2016-05-31 Thread Eduardo Valentin
emul_temp creation is dependent on a compile time condition. Moving to tz->device.groups. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 11 --- 1 file changed, 4 insertions(+)

[PATCHv4 11/48] thermal: core: fix style on remove_trip_attrs()

2016-05-31 Thread Eduardo Valentin
Align to parentheses, removing checkpatch warning. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 2 +- 1 file changed, 1 insertion(+)

[PATCHv4 11/48] thermal: core: fix style on remove_trip_attrs()

2016-05-31 Thread Eduardo Valentin
Align to parentheses, removing checkpatch warning. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/thermal_core.c b

[PATCHv4 04/48] thermal: core: use dev.groups to manage always present tz attributes

2016-05-31 Thread Eduardo Valentin
linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 87 +- 1 file changed, 34 insertions(+), 53 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/dri

[PATCHv4 04/48] thermal: core: use dev.groups to manage always present tz attributes

2016-05-31 Thread Eduardo Valentin
: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 87 +- 1 file changed, 34 insertions(+), 53 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 3ce7882..657cc2a

[PATCH 00/15] thermal: sysfs: add locking

2016-05-31 Thread Eduardo Valentin
serialization to data will be done. For your consideration, I am also adding this to this branch: git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal sysfs_locking Comments are welcome. BR, Eduardo Valentin (15): thermal: sysfs: lock tz in type_show thermal: sysfs: lock tz

[PATCH 00/15] thermal: sysfs: add locking

2016-05-31 Thread Eduardo Valentin
serialization to data will be done. For your consideration, I am also adding this to this branch: git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal sysfs_locking Comments are welcome. BR, Eduardo Valentin (15): thermal: sysfs: lock tz in type_show thermal: sysfs: lock tz

[PATCH 01/15] thermal: sysfs: lock tz in type_show

2016-05-31 Thread Eduardo Valentin
Avoid race while accessing tz->type. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_sysfs.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion

[PATCH 03/15] thermal: sysfs: lock tz while on trip_point_type properties

2016-05-31 Thread Eduardo Valentin
Serialized calls to tz.ops in user facing sysfs handler trip_point_type_show() and trip_point_temp_store(). Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/the

[PATCH 01/15] thermal: sysfs: lock tz in type_show

2016-05-31 Thread Eduardo Valentin
Avoid race while accessing tz->type. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/thermal_sysfs.

[PATCH 03/15] thermal: sysfs: lock tz while on trip_point_type properties

2016-05-31 Thread Eduardo Valentin
Serialized calls to tz.ops in user facing sysfs handler trip_point_type_show() and trip_point_temp_store(). Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c | 2 ++ 1 file changed, 2 insertions

[PATCH 06/15] thermal: sysfs: lock tz while on passive properties

2016-05-31 Thread Eduardo Valentin
Serialized calls to tz.ops in user facing sysfs handler passive_store() and passive_show(). Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_

[PATCH 06/15] thermal: sysfs: lock tz while on passive properties

2016-05-31 Thread Eduardo Valentin
Serialized calls to tz.ops in user facing sysfs handler passive_store() and passive_show(). Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c | 15 ++- 1 file changed, 14 insertions(+), 1

[PATCH 12/15] thermal: sysfs: lock cdev while accessing max_state

2016-05-31 Thread Eduardo Valentin
Serialized calls to cdev->ops in user facing sysfs handler thermal_cooling_device_max_state_show(). Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/ther

[PATCH 08/15] thermal: sysfs: improve locking of emul_temp_store()

2016-05-31 Thread Eduardo Valentin
emul_temp_store locks only for setting temperature, but it must lock also for calls to tz.ops. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal

[PATCH 12/15] thermal: sysfs: lock cdev while accessing max_state

2016-05-31 Thread Eduardo Valentin
Serialized calls to cdev->ops in user facing sysfs handler thermal_cooling_device_max_state_show(). Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c | 2 ++ 1 file changed, 2 insertions(+) d

[PATCH 08/15] thermal: sysfs: improve locking of emul_temp_store()

2016-05-31 Thread Eduardo Valentin
emul_temp_store locks only for setting temperature, but it must lock also for calls to tz.ops. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c | 9 - 1 file changed, 4 insertions(+), 5

[PATCH 09/15] thermal: sysfs: lock tz when access sustainable power properties

2016-05-31 Thread Eduardo Valentin
Lock tz when in user facing sysfs handlers to expose sustainable power properties. This includes: sustainable_power_show() sustainable_power_store() Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin &

[PATCH 09/15] thermal: sysfs: lock tz when access sustainable power properties

2016-05-31 Thread Eduardo Valentin
Lock tz when in user facing sysfs handlers to expose sustainable power properties. This includes: sustainable_power_show() sustainable_power_store() Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c

[PATCH 13/15] thermal: sysfs: lock cdev while accessing cur_state

2016-05-31 Thread Eduardo Valentin
Serialized calls to cdev->ops in user facing sysfs handlers thermal_cooling_device_cur_state_show() and thermal_cooling_device_cur_state_store(). Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez.

[PATCH 13/15] thermal: sysfs: lock cdev while accessing cur_state

2016-05-31 Thread Eduardo Valentin
Serialized calls to cdev->ops in user facing sysfs handlers thermal_cooling_device_cur_state_show() and thermal_cooling_device_cur_state_store(). Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c

[PATCH 14/15] thermal: sysfs: serialize access to instances

2016-05-31 Thread Eduardo Valentin
linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_sysfs.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c i

[PATCH 11/15] thermal: sysfs: lock cdev while accessing type

2016-05-31 Thread Eduardo Valentin
Serialized data access to cdev->type in user facing sysfs handler thermal_cooling_device_type_show(). The existing cdev lock is used. Updating comment on the lock definition. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by

[PATCH 14/15] thermal: sysfs: serialize access to instances

2016-05-31 Thread Eduardo Valentin
@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index ab78e08..31314be 100644 --- a/drivers/thermal

[PATCH 11/15] thermal: sysfs: lock cdev while accessing type

2016-05-31 Thread Eduardo Valentin
Serialized data access to cdev->type in user facing sysfs handler thermal_cooling_device_type_show(). The existing cdev lock is used. Updating comment on the lock definition. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valen

[PATCH 15/15] thermal: sysfs: add comments describing locking strategy

2016-05-31 Thread Eduardo Valentin
. The exception of the locking strategy are functions called during initialization of cdev and tz. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_

[PATCH 02/15] thermal: sysfs: lock tz while on access to mode properties

2016-05-31 Thread Eduardo Valentin
Serialized calls to tz.ops in user facing sysfs handler mode_show() and mode_store(). Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_sysfs.c | 13

[PATCH 15/15] thermal: sysfs: add comments describing locking strategy

2016-05-31 Thread Eduardo Valentin
. The exception of the locking strategy are functions called during initialization of cdev and tz. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c | 16 +++- 1 file changed, 15 insertions(+), 1

[PATCH 02/15] thermal: sysfs: lock tz while on access to mode properties

2016-05-31 Thread Eduardo Valentin
Serialized calls to tz.ops in user facing sysfs handler mode_show() and mode_store(). Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c | 13 ++--- 1 file changed, 10 insertions(+), 3

[PATCH 07/15] thermal: sysfs: lock tz while on policy properties

2016-05-31 Thread Eduardo Valentin
Serialized calls to tz.ops in user facing sysfs handler policy_show(). policy_store() is already locked by the thermal core. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- dri

[PATCH 05/15] thermal: sysfs: lock tz while on trip_point_hyst properties

2016-05-31 Thread Eduardo Valentin
Serialized calls to tz.ops in user facing sysfs handler trip_point_hyst_store() and trip_point_hyst_show(). Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/the

[PATCH 04/15] thermal: sysfs: lock tz while on trip_point_temp properties

2016-05-31 Thread Eduardo Valentin
Serialized calls to tz.ops in user facing sysfs handler trip_point_temp_show() and trip_point_temp_store(). Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/the

[PATCH 10/15] thermal: sysfs: lock tz when access tzp properties

2016-05-31 Thread Eduardo Valentin
linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_sysfs.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index 5b08d64..86

[PATCH 04/15] thermal: sysfs: lock tz while on trip_point_temp properties

2016-05-31 Thread Eduardo Valentin
Serialized calls to tz.ops in user facing sysfs handler trip_point_temp_show() and trip_point_temp_store(). Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c | 4 1 file changed, 4 insertions

[PATCH 10/15] thermal: sysfs: lock tz when access tzp properties

2016-05-31 Thread Eduardo Valentin
Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index 5b08d64..86a77cd 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers

[PATCH 07/15] thermal: sysfs: lock tz while on policy properties

2016-05-31 Thread Eduardo Valentin
Serialized calls to tz.ops in user facing sysfs handler policy_show(). policy_store() is already locked by the thermal core. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c | 8 +++- 1 file

<    3   4   5   6   7   8   9   10   11   12   >