Re: [PATCH 0/3] Fixes for stop monitoring disabled devices series

2020-07-03 Thread Andrzej Pietrasiewicz
Hi, W dniu 03.07.2020 o 13:06, Daniel Lezcano pisze: On 03/07/2020 12:43, Andrzej Pietrasiewicz wrote: This short series contains fixes for "Stop monitoring disabled devices" series https://www.spinics.net/lists/arm-kernel/msg817861.html Invocation of thermal_zone_device_is_enabled

Re: [PATCH v7 00/11] Stop monitoring disabled devices

2020-07-03 Thread Andrzej Pietrasiewicz
Hi, W dniu 03.07.2020 o 08:38, Daniel Lezcano pisze: On 03/07/2020 03:49, Zhang Rui wrote: On Thu, 2020-07-02 at 19:49 +0200, Daniel Lezcano wrote: [ ... ] So the reason is that ->get_temp() is called while the mutex is held and thermal_zone_device_is_enabled() wants to take the same mutex.

[PATCH 0/3] Fixes for stop monitoring disabled devices series

2020-07-03 Thread Andrzej Pietrasiewicz
core only, as there are no driver users of it. Andrzej Pietrasiewicz (3): acpi: thermal: Don't call thermal_zone_device_is_enabled() thermal: imx: Use driver's local data to decide whether to run a measurement thermal: Make thermal_zone_device_is_enabled() available to c

[PATCH 2/3] thermal: imx: Use driver's local data to decide whether to run a measurement

2020-07-03 Thread Andrzej Pietrasiewicz
Use driver's local data to evaluate the need to run or not to run a measurement. Signed-off-by: Andrzej Pietrasiewicz --- drivers/thermal/imx_thermal.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c

[PATCH 1/3] acpi: thermal: Don't call thermal_zone_device_is_enabled()

2020-07-03 Thread Andrzej Pietrasiewicz
thermal_zone_device_update() can now handle disabled thermal zones, so the check here is not needed. Signed-off-by: Andrzej Pietrasiewicz --- drivers/acpi/thermal.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 29a2b73fe035

[PATCH 3/3] thermal: Make thermal_zone_device_is_enabled() available to core only

2020-07-03 Thread Andrzej Pietrasiewicz
This function is not needed by drivers. Signed-off-by: Andrzej Pietrasiewicz --- drivers/thermal/thermal_core.c | 1 - drivers/thermal/thermal_core.h | 2 ++ include/linux/thermal.h| 5 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/thermal/thermal_core.c b

Re: [PATCH v7 00/11] Stop monitoring disabled devices

2020-07-02 Thread Andrzej Pietrasiewicz
Hi, W dniu 02.07.2020 o 19:01, Daniel Lezcano pisze: On 02/07/2020 15:53, Andrzej Pietrasiewicz wrote: Hi Daniel, I did reproduce: v5.8-rc3 + series => imx6 hang at boot time v5.8-rc3 => imx6 boots correctly So finally I succeeded to reproduce it on my imx7 locally. The sens

Re: [PATCH v7 00/11] Stop monitoring disabled devices

2020-07-02 Thread Andrzej Pietrasiewicz
Hi Daniel, I did reproduce: v5.8-rc3 + series => imx6 hang at boot time v5.8-rc3 => imx6 boots correctly So finally I succeeded to reproduce it on my imx7 locally. The sensor was failing to initialize for another reason related to the legacy cooling device, this is why it is not appearing

Re: [PATCH v7 00/11] Stop monitoring disabled devices

2020-07-01 Thread Andrzej Pietrasiewicz
Hi, W dniu 30.06.2020 o 20:33, Daniel Lezcano pisze: On 30/06/2020 18:56, Andrzej Pietrasiewicz wrote: Hi, W dniu 30.06.2020 o 17:53, Daniel Lezcano pisze: On 30/06/2020 17:29, Andrzej Pietrasiewicz wrote: Hi Daniel, W dniu 30.06.2020 o 16:53, Daniel Lezcano pisze: On 30/06/2020 15:43

Re: [PATCH v7 00/11] Stop monitoring disabled devices

2020-06-30 Thread Andrzej Pietrasiewicz
Hi, W dniu 30.06.2020 o 17:53, Daniel Lezcano pisze: On 30/06/2020 17:29, Andrzej Pietrasiewicz wrote: Hi Daniel, W dniu 30.06.2020 o 16:53, Daniel Lezcano pisze: On 30/06/2020 15:43, Andrzej Pietrasiewicz wrote: Hi Daniel, I am reading the logs and can't find anything specific to th

Re: [PATCH v7 00/11] Stop monitoring disabled devices

2020-06-30 Thread Andrzej Pietrasiewicz
Hi Daniel, W dniu 30.06.2020 o 16:53, Daniel Lezcano pisze: On 30/06/2020 15:43, Andrzej Pietrasiewicz wrote: Hi Daniel, I am reading the logs and can't find anything specific to thermal. What I can see is "random: crng init done" with large times (~200s) and then e.g. &#x

Re: [PATCH v7 00/11] Stop monitoring disabled devices

2020-06-30 Thread Andrzej Pietrasiewicz
for the imx6. https://kernelci.org/test/job/thermal/branch/testing/kernel/v5.8-rc3-11-gf5e50bf4d3ef/plan/baseline/ On 29/06/2020 14:29, Andrzej Pietrasiewicz wrote: A respin of v6 with these changes: v6..v7: - removed duplicate S-o-b line from patch 6/11 v5..v6: - staticized thermal_zone_device

[PATCH v7 05/11] thermal: remove get_mode() operation of drivers

2020-06-29 Thread Andrzej Pietrasiewicz
get_mode() is now redundant, as the state is stored in struct thermal_zone_device. Consequently the "mode" attribute in sysfs can always be visible, because it is always possible to get the mode from struct tzd. Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by: Pet

[PATCH v7 01/11] acpi: thermal: Fix error handling in the register function

2020-06-29 Thread Andrzej Pietrasiewicz
The acpi_thermal_register_thermal_zone() is missing any error handling. This needs to be fixed. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Guenter Roeck Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Amit Kucheria --- drivers/acpi/thermal.c | 20 1 file

[PATCH v7 02/11] thermal: Store thermal mode in a dedicated enum

2020-06-29 Thread Andrzej Pietrasiewicz
Prepare for storing mode in struct thermal_zone_device. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Guenter Roeck [for acerhdf] Acked-by: Peter Kaestle Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Amit Kucheria --- drivers/acpi/thermal.c| 27

[PATCH v7 04/11] thermal: Store device mode in struct thermal_zone_device

2020-06-29 Thread Andrzej Pietrasiewicz
Prepare for eliminating get_mode(). Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by: Peter Kaestle Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Amit Kucheria --- drivers/acpi/thermal.c| 18 ++-- .../ethernet/mellanox/mlxsw/core_thermal.c

[PATCH v7 09/11] thermal: core: Stop polling DISABLED thermal devices

2020-06-29 Thread Andrzej Pietrasiewicz
Polling DISABLED devices is not desired, as all such "disabled" devices are meant to be handled by userspace. This patch introduces and uses should_stop_polling() to decide whether the device should be polled or not. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Bartlomiej Zoln

[PATCH v7 08/11] thermal: Explicitly enable non-changing thermal zone devices

2020-06-29 Thread Andrzej Pietrasiewicz
Some thermal zone devices never change their state, so they should be always enabled. Signed-off-by: Andrzej Pietrasiewicz --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c | 8 drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 9 - drivers/platform/x86

[PATCH v7 03/11] thermal: Add current mode to thermal zone device

2020-06-29 Thread Andrzej Pietrasiewicz
Prepare for changing the place where the mode is stored: now it is in drivers, which might or might not implement get_mode()/set_mode() methods. A lot of cleanup can be done thanks to storing it in struct tzd. The get_mode() methods will become redundant. Signed-off-by: Andrzej Pietrasiewicz

[PATCH v7 00/11] Stop monitoring disabled devices

2020-06-29 Thread Andrzej Pietrasiewicz
in thermal_of.c (Bartlomiej) Andrzej Pietrasiewicz (11): acpi: thermal: Fix error handling in the register function thermal: Store thermal mode in a dedicated enum thermal: Add current mode to thermal zone device thermal: Store device mode in struct thermal_zone_device thermal: rem

[PATCH v6 05/11] thermal: remove get_mode() operation of drivers

2020-06-29 Thread Andrzej Pietrasiewicz
get_mode() is now redundant, as the state is stored in struct thermal_zone_device. Consequently the "mode" attribute in sysfs can always be visible, because it is always possible to get the mode from struct tzd. Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by: Pet

[PATCH v6 03/11] thermal: Add current mode to thermal zone device

2020-06-29 Thread Andrzej Pietrasiewicz
Prepare for changing the place where the mode is stored: now it is in drivers, which might or might not implement get_mode()/set_mode() methods. A lot of cleanup can be done thanks to storing it in struct tzd. The get_mode() methods will become redundant. Signed-off-by: Andrzej Pietrasiewicz

[PATCH v6 01/11] acpi: thermal: Fix error handling in the register function

2020-06-29 Thread Andrzej Pietrasiewicz
The acpi_thermal_register_thermal_zone() is missing any error handling. This needs to be fixed. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Guenter Roeck Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Amit Kucheria --- drivers/acpi/thermal.c | 20 1 file

[PATCH v6 09/11] thermal: core: Stop polling DISABLED thermal devices

2020-06-29 Thread Andrzej Pietrasiewicz
Polling DISABLED devices is not desired, as all such "disabled" devices are meant to be handled by userspace. This patch introduces and uses should_stop_polling() to decide whether the device should be polled or not. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Bartlomiej Zoln

[PATCH v6 10/11] thermal: Simplify or eliminate unnecessary set_mode() methods

2020-06-29 Thread Andrzej Pietrasiewicz
Setting polling_delay is now done at thermal_core level (by not polling DISABLED devices), so no need to repeat this code. int340x: Checking for an impossible enum value is unnecessary. acpi/thermal: It only prints debug messages. Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by

[PATCH v6 08/11] thermal: Explicitly enable non-changing thermal zone devices

2020-06-29 Thread Andrzej Pietrasiewicz
Some thermal zone devices never change their state, so they should be always enabled. Signed-off-by: Andrzej Pietrasiewicz --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c | 8 drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 9 - drivers/platform/x86

[PATCH v6 07/11] thermal: Use mode helpers in drivers

2020-06-29 Thread Andrzej Pietrasiewicz
be propagated to thermal_zone_device_{en|dis}able() and ultimately tzd's member will not be changed in thermal_zone_device_set_mode(). - thermal/of-thermal.c: no need to set zone->mode to DISABLED in of_parse_thermal_zones() as a tzd is kzalloc'ed so mode is DISABLED anyway Signed-off

[PATCH v6 11/11] thermal: Rename set_mode() to change_mode()

2020-06-29 Thread Andrzej Pietrasiewicz
. To better reflect the purpose of the method rename it to change_mode() Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by: Peter Kaestle Reviewed-by: Bartlomiej Zolnierkiewicz --- drivers/platform/x86/acerhdf.c | 6 +++--- drivers/thermal/imx_ther

[PATCH v6 00/11] Stop monitoring disabled devices

2020-06-29 Thread Andrzej Pietrasiewicz
A respin of v5 with these changes: v5..v6: - staticized thermal_zone_device_set_mode() (kbuild test robot) v4..v5: - EXPORT_SYMBOL -> EXPORT_SYMBOL_GPL (Daniel) - dropped unnecessary thermal_zone_device_enable() in int3400_thermal.c and in thermal_of.c (Bartlomiej) Andrzej Pietrasiewicz

[PATCH v6 06/11] thermal: Add mode helpers

2020-06-29 Thread Andrzej Pietrasiewicz
Prepare for making the drivers not access tzd's private members. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Bartlomiej Zolnierkiewicz [EXPORT_SYMBOL -> EXPORT_SYMBOL_GPL] Signed-off-by: Andrzej Pietrasiewicz [staticize thermal_zone_device_set_mode()] Signed-off-by: kernel te

[PATCH v6 02/11] thermal: Store thermal mode in a dedicated enum

2020-06-29 Thread Andrzej Pietrasiewicz
Prepare for storing mode in struct thermal_zone_device. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Guenter Roeck [for acerhdf] Acked-by: Peter Kaestle Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Amit Kucheria --- drivers/acpi/thermal.c| 27

[PATCH v6 04/11] thermal: Store device mode in struct thermal_zone_device

2020-06-29 Thread Andrzej Pietrasiewicz
Prepare for eliminating get_mode(). Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by: Peter Kaestle Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Amit Kucheria --- drivers/acpi/thermal.c| 18 ++-- .../ethernet/mellanox/mlxsw/core_thermal.c

[PATCH v7 06/11] thermal: Add mode helpers

2020-06-29 Thread Andrzej Pietrasiewicz
Prepare for making the drivers not access tzd's private members. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Bartlomiej Zolnierkiewicz [staticize thermal_zone_device_set_mode()] Signed-off-by: kernel test robot --- drivers/thermal/thermal_core.c

[PATCH v7 07/11] thermal: Use mode helpers in drivers

2020-06-29 Thread Andrzej Pietrasiewicz
be propagated to thermal_zone_device_{en|dis}able() and ultimately tzd's member will not be changed in thermal_zone_device_set_mode(). - thermal/of-thermal.c: no need to set zone->mode to DISABLED in of_parse_thermal_zones() as a tzd is kzalloc'ed so mode is DISABLED anyway Signed-off

[PATCH v7 10/11] thermal: Simplify or eliminate unnecessary set_mode() methods

2020-06-29 Thread Andrzej Pietrasiewicz
Setting polling_delay is now done at thermal_core level (by not polling DISABLED devices), so no need to repeat this code. int340x: Checking for an impossible enum value is unnecessary. acpi/thermal: It only prints debug messages. Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by

[PATCH v7 11/11] thermal: Rename set_mode() to change_mode()

2020-06-29 Thread Andrzej Pietrasiewicz
. To better reflect the purpose of the method rename it to change_mode() Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by: Peter Kaestle Reviewed-by: Bartlomiej Zolnierkiewicz --- drivers/platform/x86/acerhdf.c | 6 +++--- drivers/thermal/imx_ther

[PATCH v5 04/11] thermal: Store device mode in struct thermal_zone_device

2020-06-26 Thread Andrzej Pietrasiewicz
Prepare for eliminating get_mode(). Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by: Peter Kaestle Reviewed-by: Bartlomiej Zolnierkiewicz --- drivers/acpi/thermal.c| 18 ++-- .../ethernet/mellanox/mlxsw/core_thermal.c| 21

[PATCH v5 03/11] thermal: Add current mode to thermal zone device

2020-06-26 Thread Andrzej Pietrasiewicz
Prepare for changing the place where the mode is stored: now it is in drivers, which might or might not implement get_mode()/set_mode() methods. A lot of cleanup can be done thanks to storing it in struct tzd. The get_mode() methods will become redundant. Signed-off-by: Andrzej Pietrasiewicz

[PATCH v5 07/11] thermal: Use mode helpers in drivers

2020-06-26 Thread Andrzej Pietrasiewicz
be propagated to thermal_zone_device_{en|dis}able() and ultimately tzd's member will not be changed in thermal_zone_device_set_mode(). - thermal/of-thermal.c: no need to set zone->mode to DISABLED in of_parse_thermal_zones() as a tzd is kzalloc'ed so mode is DISABLED anyway Signed-off

[PATCH v5 00/11] Stop monitoring disabled devices

2020-06-26 Thread Andrzej Pietrasiewicz
A respin of v4 with these changes: v4..v5: - EXPORT_SYMBOL -> EXPORT_SYMBOL_GPL (Daniel) - dropped unnecessary thermal_zone_device_enable() in int3400_thermal.c and in thermal_of.c (Bartlomiej) Andrzej Pietrasiewicz (11): acpi: thermal: Fix error handling in the register function ther

[PATCH v5 11/11] thermal: Rename set_mode() to change_mode()

2020-06-26 Thread Andrzej Pietrasiewicz
. To better reflect the purpose of the method rename it to change_mode() Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by: Peter Kaestle Reviewed-by: Bartlomiej Zolnierkiewicz --- drivers/platform/x86/acerhdf.c | 6 +++--- drivers/thermal/imx_ther

[PATCH v5 10/11] thermal: Simplify or eliminate unnecessary set_mode() methods

2020-06-26 Thread Andrzej Pietrasiewicz
Setting polling_delay is now done at thermal_core level (by not polling DISABLED devices), so no need to repeat this code. int340x: Checking for an impossible enum value is unnecessary. acpi/thermal: It only prints debug messages. Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by

[PATCH v5 06/11] thermal: Add mode helpers

2020-06-26 Thread Andrzej Pietrasiewicz
Prepare for making the drivers not access tzd's private members. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Bartlomiej Zolnierkiewicz [EXPORT_SYMBOL -> EXPORT_SYMBOL_GPL] Signed-off-by: Andrzej Pietrasiewicz --- drivers/thermal/thermal_cor

[PATCH v5 08/11] thermal: Explicitly enable non-changing thermal zone devices

2020-06-26 Thread Andrzej Pietrasiewicz
Some thermal zone devices never change their state, so they should be always enabled. Signed-off-by: Andrzej Pietrasiewicz --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c | 8 drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 9 - drivers/platform/x86

[PATCH v5 05/11] thermal: remove get_mode() operation of drivers

2020-06-26 Thread Andrzej Pietrasiewicz
get_mode() is now redundant, as the state is stored in struct thermal_zone_device. Consequently the "mode" attribute in sysfs can always be visible, because it is always possible to get the mode from struct tzd. Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by: Pet

[PATCH v5 01/11] acpi: thermal: Fix error handling in the register function

2020-06-26 Thread Andrzej Pietrasiewicz
The acpi_thermal_register_thermal_zone() is missing any error handling. This needs to be fixed. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Guenter Roeck Reviewed-by: Bartlomiej Zolnierkiewicz --- drivers/acpi/thermal.c | 20 1 file changed, 16 insertions(+), 4

[PATCH v5 02/11] thermal: Store thermal mode in a dedicated enum

2020-06-26 Thread Andrzej Pietrasiewicz
Prepare for storing mode in struct thermal_zone_device. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Guenter Roeck [for acerhdf] Acked-by: Peter Kaestle Reviewed-by: Bartlomiej Zolnierkiewicz --- drivers/acpi/thermal.c| 27 +-- drivers/platform

[PATCH v5 09/11] thermal: core: Stop polling DISABLED thermal devices

2020-06-26 Thread Andrzej Pietrasiewicz
Polling DISABLED devices is not desired, as all such "disabled" devices are meant to be handled by userspace. This patch introduces and uses should_stop_polling() to decide whether the device should be polled or not. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Bartlomiej Zoln

Re: [PATCH v4 07/11] thermal: Use mode helpers in drivers

2020-06-26 Thread Andrzej Pietrasiewicz
Hi Bartlomiej, W dniu 24.06.2020 o 11:51, Bartlomiej Zolnierkiewicz pisze: On 5/28/20 9:20 PM, Andrzej Pietrasiewicz wrote: Use thermal_zone_device_{en|dis}able() and thermal_zone_device_is_enabled(). Consequently, all set_mode() implementations in drivers: - can stop modifying tzd's

Re: [PATCH v4 06/11] thermal: Add mode helpers

2020-06-01 Thread Andrzej Pietrasiewicz
Hi Guenter, W dniu 29.05.2020 o 17:52, Guenter Roeck pisze: On Thu, May 28, 2020 at 09:20:46PM +0200, Andrzej Pietrasiewicz wrote: Prepare for making the drivers not access tzd's private members. Signed-off-by: Andrzej Pietrasiewicz + Nit: unnecessary empty

Re: [PATCH v4 00/11] Stop monitoring disabled devices

2020-06-01 Thread Andrzej Pietrasiewicz
W dniu 01.06.2020 o 12:02, Peter Kästle pisze: Hi, 28. Mai 2020 21:21, "Andrzej Pietrasiewicz" schrieb: [...] This v4 series addresses those concerns: it takes a more gradual approach and uses explicit tzd state initialization, hence there are more insertions than in v3, and the

Re: [PATCH v4 05/11] thermal: remove get_mode() operation of drivers

2020-05-29 Thread Andrzej Pietrasiewicz
Hi Guenter, W dniu 29.05.2020 o 17:49, Guenter Roeck pisze: On Thu, May 28, 2020 at 09:20:45PM +0200, Andrzej Pietrasiewicz wrote: get_mode() is now redundant, as the state is stored in struct thermal_zone_device. Consequently the "mode" attribute in sysfs can always be visible, bec

Re: [PATCH v4 04/11] thermal: Store device mode in struct thermal_zone_device

2020-05-29 Thread Andrzej Pietrasiewicz
Hi again, W dniu 29.05.2020 o 18:08, Andrzej Pietrasiewicz pisze: Hi Guenter, W dniu 29.05.2020 o 17:42, Guenter Roeck pisze: On Thu, May 28, 2020 at 09:20:44PM +0200, Andrzej Pietrasiewicz wrote: Prepare for eliminating get_mode(). Might be worthwhile to explain (not only in the subject

Re: [PATCH v4 04/11] thermal: Store device mode in struct thermal_zone_device

2020-05-29 Thread Andrzej Pietrasiewicz
Hi Guenter, W dniu 29.05.2020 o 17:42, Guenter Roeck pisze: On Thu, May 28, 2020 at 09:20:44PM +0200, Andrzej Pietrasiewicz wrote: Prepare for eliminating get_mode(). Might be worthwhile to explain (not only in the subject) what you are doing here. Signed-off-by: Andrzej Pietrasiewicz

Re: [PATCH v4 02/11] thermal: Store thermal mode in a dedicated enum

2020-05-29 Thread Andrzej Pietrasiewicz
Hi Guenter, W dniu 29.05.2020 o 16:48, Guenter Roeck pisze: On Thu, May 28, 2020 at 09:20:42PM +0200, Andrzej Pietrasiewicz wrote: Prepare for storing mode in struct thermal_zone_device. Signed-off-by: Andrzej Pietrasiewicz --- drivers/acpi/thermal.c| 27

Re: [PATCH v4 02/11] thermal: Store thermal mode in a dedicated enum

2020-05-29 Thread Andrzej Pietrasiewicz
W dniu 29.05.2020 o 17:05, Guenter Roeck pisze: On Thu, May 28, 2020 at 09:20:42PM +0200, Andrzej Pietrasiewicz wrote: Prepare for storing mode in struct thermal_zone_device. Signed-off-by: Andrzej Pietrasiewicz What is the baseline for this series ? I can't get this patch to apply o

[PATCH v4 04/11] thermal: Store device mode in struct thermal_zone_device

2020-05-28 Thread Andrzej Pietrasiewicz
Prepare for eliminating get_mode(). Signed-off-by: Andrzej Pietrasiewicz --- drivers/acpi/thermal.c| 18 ++-- .../ethernet/mellanox/mlxsw/core_thermal.c| 21 +++ drivers/platform/x86/acerhdf.c| 15 ++--- drivers

[PATCH v4 05/11] thermal: remove get_mode() operation of drivers

2020-05-28 Thread Andrzej Pietrasiewicz
get_mode() is now redundant, as the state is stored in struct thermal_zone_device. Consequently the "mode" attribute in sysfs can always be visible, because it is always possible to get the mode from struct tzd. Signed-off-by: Andrzej Pietrasiewicz --- drivers/acpi

[PATCH v4 07/11] thermal: Use mode helpers in drivers

2020-05-28 Thread Andrzej Pietrasiewicz
be propagated to thermal_zone_device_{en|dis}able() and ultimately tzd's member will not be changed in thermal_zone_device_set_mode(). - thermal/of-thermal.c: no need to set zone->mode to DISABLED in of_parse_thermal_zones() as a tzd is kzalloc'ed so mode is DISABLED anyway Signed-o

[PATCH v4 10/11] thermal: Simplify or eliminate unnecessary set_mode() methods

2020-05-28 Thread Andrzej Pietrasiewicz
Setting polling_delay is now done at thermal_core level (by not polling DISABLED devices), so no need to repeat this code. int340x: Checking for an impossible enum value is unnecessary. acpi/thermal: It only prints debug messages. Signed-off-by: Andrzej Pietrasiewicz --- drivers/acpi/thermal.c

[PATCH v4 08/11] thermal: Explicitly enable non-changing thermal zone devices

2020-05-28 Thread Andrzej Pietrasiewicz
Some thermal zone devices never change their state, so they should be always enabled. Signed-off-by: Andrzej Pietrasiewicz --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c | 8 drivers/net/wireless/intel/iwlwifi/mvm/tt.c| 9 - drivers/platform/x86

[PATCH v4 11/11] thermal: Rename set_mode() to change_mode()

2020-05-28 Thread Andrzej Pietrasiewicz
. To better reflect the purpose of the method rename it to change_mode() Signed-off-by: Andrzej Pietrasiewicz --- drivers/platform/x86/acerhdf.c | 6 +++--- drivers/thermal/imx_thermal.c | 8 drivers/thermal/intel/int340x_th

[PATCH v4 06/11] thermal: Add mode helpers

2020-05-28 Thread Andrzej Pietrasiewicz
Prepare for making the drivers not access tzd's private members. Signed-off-by: Andrzej Pietrasiewicz --- drivers/thermal/thermal_core.c | 53 ++ include/linux/thermal.h| 13 + 2 files changed, 66 insertions(+) diff --git a/drivers/th

[PATCH v4 09/11] thermal: core: Stop polling DISABLED thermal devices

2020-05-28 Thread Andrzej Pietrasiewicz
Polling DISABLED devices is not desired, as all such "disabled" devices are meant to be handled by userspace. This patch introduces and uses should_stop_polling() to decide whether the device should be polled or not. Signed-off-by: Andrzej Pietrasiewicz --- drivers/thermal/thermal_c

[PATCH v4 02/11] thermal: Store thermal mode in a dedicated enum

2020-05-28 Thread Andrzej Pietrasiewicz
Prepare for storing mode in struct thermal_zone_device. Signed-off-by: Andrzej Pietrasiewicz --- drivers/acpi/thermal.c| 27 +-- drivers/platform/x86/acerhdf.c| 8 -- .../intel/int340x_thermal/int3400_thermal.c | 18 + 3

[PATCH v4 00/11] Stop monitoring disabled devices

2020-05-28 Thread Andrzej Pietrasiewicz
e to oppose such a change. To better reflect the purpose of the method it is renamed to change_mode() (patch 11/11). Andrzej Pietrasiewicz (11): acpi: thermal: Fix error handling in the register function thermal: Store thermal mode in a dedicated enum thermal: Add current mod

[PATCH v4 03/11] thermal: Add current mode to thermal zone device

2020-05-28 Thread Andrzej Pietrasiewicz
Prepare for changing the place where the mode is stored: now it is in drivers, which might or might not implement get_mode()/set_mode() methods. A lot of cleanup can be done thanks to storing it in struct tzd. The get_mode() methods will become redundant. Signed-off-by: Andrzej Pietrasiewicz

[PATCH v4 01/11] acpi: thermal: Fix error handling in the register function

2020-05-28 Thread Andrzej Pietrasiewicz
The acpi_thermal_register_thermal_zone() is missing any error handling. This needs to be fixed. Signed-off-by: Andrzej Pietrasiewicz --- drivers/acpi/thermal.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/thermal.c b/drivers/acpi

Re: [RFC v3 1/2] thermal: core: Let thermal zone device's mode be stored in its struct

2020-05-26 Thread Andrzej Pietrasiewicz
Hi Daniel, W dniu 26.05.2020 o 00:08, Daniel Lezcano pisze: On 25/05/2020 21:35, Andrzej Pietrasiewicz wrote: Hi Daniel, W dniu 23.05.2020 o 23:24, Daniel Lezcano pisze: Hi Andrzej, On 17/04/2020 18:20, Andrzej Pietrasiewicz wrote: Thermal zone devices' mode is stored in individual dr

Re: [RFC v3 1/2] thermal: core: Let thermal zone device's mode be stored in its struct

2020-05-25 Thread Andrzej Pietrasiewicz
Hi Daniel, W dniu 23.05.2020 o 23:24, Daniel Lezcano pisze: Hi Andrzej, On 17/04/2020 18:20, Andrzej Pietrasiewicz wrote: Thermal zone devices' mode is stored in individual drivers. This patch changes it so that mode is stored in struct thermal_zone_device instead. As a result all d

Re: [PATCH 07/23] usb-gadget/f_loopback: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
Hi, W dniu 28.09.2015 o 15:41, Christoph Hellwig pisze: On Mon, Sep 28, 2015 at 01:46:57PM +0200, Andrzej Pietrasiewicz wrote: } -static struct f_lb_opts_attribute f_lb_opts_qlen = - __CONFIGFS_ATTR(qlen, S_IRUGO | S_IWUSR, - f_lb_opts_qlen_show

Re: simplify configfs attributes

2015-09-28 Thread Andrzej Pietrasiewicz
Hi Christoph, W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: This series consolidates the code to implement configfs attributes by providing the ->show and ->store method in common code and using container_of in the methods to access the containing structure. This reduces source and binary

Re: [PATCH 23/23] configfs: remove old API

2015-09-28 Thread Andrzej Pietrasiewicz
Hi Christoph, Please see inline. W dniu 25.09.2015 o 15:50, Christoph Hellwig pisze: Remove the old show_attribute and store_attribute methods and update the documentation. Also replace the two C samples with a single new one in the proper samples directory where people expect to find it. Sig

Re: [PATCH 16/23] usb-gadget/f_serial: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: Signed-off-by: Christoph Hellwig Reviewed-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/function/f_serial.c | 26 -- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/drivers/usb/gadget/function

Re: [PATCH 15/23] usb-gadget/f_phonet: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: Signed-off-by: Christoph Hellwig Reviewed-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/function/f_phonet.c | 25 - 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/drivers/usb/gadget/function

Re: [PATCH 14/23] usb-gadget/f_obex: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: Signed-off-by: Christoph Hellwig Reviewed-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/function/f_obex.c | 26 -- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/drivers/usb/gadget/function

Re: [PATCH 13/23] usb-gadget/f_uac2: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: Signed-off-by: Christoph Hellwig Reviewed-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/function/f_uac2.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/drivers/usb/gadget/function

Re: [PATCH 12/23] usb-gadget/f_ac1: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
Hi Christoph, The commit title should be " usb-gadget/f_uac1 ..." instead of " f_ac1 ..." Reviewed-by: Andrzej Pietrasiewicz W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: Signed-off-by: Christoph Hellwig --- drivers/usb/gadget/fu

Re: [PATCH 11/23] usb-gadget/f_mass_storage: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
Hi Christoph, The same remark as for f_loopback (__CONFIGFS_ATTR location vs CONFIGFS_ATTR location after applying) If addressed Reviewed-by: Andrzej Pietrasiewicz W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: Signed-off-by: Christoph Hellwig --- drivers/usb/gadget/function

Re: [PATCH 10/23] usb-gadget/f_sourcesink: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
Hi Christoph, The same remark as for f_loopback (__CONFIGFS_ATTR location vs CONFIGFS_ATTR location after applying) If addressed Reviewed-by: Andrzej Pietrasiewicz W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: Signed-off-by: Christoph Hellwig --- drivers/usb/gadget/function

Re: [PATCH 09/23] usb-gadget/f_printer: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
Hi Christoph, The same remark as for f_loopback (__CONFIGFS_ATTR location vs CONFIGFS_ATTR location after applying) If addressed Reviewed-by: Andrzej Pietrasiewicz W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: Signed-off-by: Christoph Hellwig --- drivers/usb/gadget/function

Re: [PATCH 08/23] usb-gadget/f_midi: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: Signed-off-by: Christoph Hellwig Reviewed-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/function/f_midi.c | 37 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/drivers/usb/gadget

Re: [PATCH 07/23] usb-gadget/f_loopback: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
Hi Christoph, Please see comments inline. With the issue addressed you can add Reviewed-by: Andrzej Pietrasiewicz W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: Signed-off-by: Christoph Hellwig --- drivers/usb/gadget/function/f_loopback.c | 32 1

Re: [PATCH 06/23] usb-gadget/ether: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: Signed-off-by: Christoph Hellwig Reviewed-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/function/f_ecm.c| 8 ++--- drivers/usb/gadget/function/f_eem.c| 8 ++--- drivers/usb/gadget/function/f_ncm.c

Re: [PATCH 05/23] usb-gadget/f_acm: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: Signed-off-by: Christoph Hellwig Reviewed-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/function/f_acm.c | 26 -- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/drivers/usb/gadget/function

Re: [PATCH 04/23] usb-gadget/f_hid: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: Signed-off-by: Christoph Hellwig Reviewed-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/function/f_hid.c | 34 ++ 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/drivers/usb/gadget

Re: [PATCH 03/23] usb-gadget/uvc: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
Hi Christoph, please see my comments inline. With the issues addressed you can add Reviewed-by: Andrzej Pietrasiewicz W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: UVC is a little different from other configfs consumers in that it wants different function and field names from the

Re: [PATCH 02/23] usb-gadget: use per-attribute show and store methods

2015-09-28 Thread Andrzej Pietrasiewicz
W dniu 25.09.2015 o 15:49, Christoph Hellwig pisze: Signed-off-by: Christoph Hellwig Reviewed-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/configfs.c | 295 ++-- include/linux/usb/gadget_configfs.h | 19 +-- 2 files changed, 118 insertions