* [PATCH v4 0/4] thermal: add brcmstb AVS TMON driver @ 2017-08-09 22:02 ` Markus Mayer 0 siblings, 0 replies; 44+ messages in thread From: Markus Mayer @ 2017-08-09 22:02 UTC (permalink / raw) To: Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Rafał Miłecki, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson Cc: Markus Mayer, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List From: Markus Mayer <mmayer@broadcom.com> This series adds the brcmstb AVS TMON driver. The driver was originally written by Brian Norris. This series is also available at https://github.com/mmayer/linux/tree/brcmstb-thermal-4.13-v4. v1 of this series can be found at https://lkml.org/lkml/2017/6/5/921 v2 of this series can be found at https://lkml.org/lkml/2017/7/21/585 v3 of this series can be found at https://lkml.org/lkml/2017/7/31/710 Changes since v3: - Rebased on v4.13-rc3 to resolve conflicts in the MAINTAINERS file Changes since v2: - replaced calls to pr_debug() with calls to dev_dbg() [PATCH 2/4 only] - all other patches are unchanged from v2 Changes since v1: - Fixed wording in binding document - Fixed lincensing to consistently mention GPL v2 - Use thermal_zone_get_slope() and thermal_zone_get_offset() - Some minor clean-ups Brian Norris (2): Documentation: devicetree: add binding for Broadcom STB AVS TMON thermal: add brcmstb AVS TMON driver Markus Mayer (2): ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL arm64: defconfig: add CONFIG_BRCMSTB_THERMAL .../devicetree/bindings/thermal/brcm,avs-tmon.txt | 20 ++ MAINTAINERS | 8 + arch/arm/configs/multi_v7_defconfig | 1 + arch/arm64/configs/defconfig | 1 + drivers/thermal/Kconfig | 2 +- drivers/thermal/broadcom/Kconfig | 7 + drivers/thermal/broadcom/Makefile | 1 + drivers/thermal/broadcom/brcmstb_thermal.c | 386 +++++++++++++++++++++ 8 files changed, 425 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt create mode 100644 drivers/thermal/broadcom/brcmstb_thermal.c -- 2.7.4 ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 0/4] thermal: add brcmstb AVS TMON driver @ 2017-08-09 22:02 ` Markus Mayer 0 siblings, 0 replies; 44+ messages in thread From: Markus Mayer @ 2017-08-09 22:02 UTC (permalink / raw) To: linux-arm-kernel From: Markus Mayer <mmayer@broadcom.com> This series adds the brcmstb AVS TMON driver. The driver was originally written by Brian Norris. This series is also available at https://github.com/mmayer/linux/tree/brcmstb-thermal-4.13-v4. v1 of this series can be found at https://lkml.org/lkml/2017/6/5/921 v2 of this series can be found at https://lkml.org/lkml/2017/7/21/585 v3 of this series can be found at https://lkml.org/lkml/2017/7/31/710 Changes since v3: - Rebased on v4.13-rc3 to resolve conflicts in the MAINTAINERS file Changes since v2: - replaced calls to pr_debug() with calls to dev_dbg() [PATCH 2/4 only] - all other patches are unchanged from v2 Changes since v1: - Fixed wording in binding document - Fixed lincensing to consistently mention GPL v2 - Use thermal_zone_get_slope() and thermal_zone_get_offset() - Some minor clean-ups Brian Norris (2): Documentation: devicetree: add binding for Broadcom STB AVS TMON thermal: add brcmstb AVS TMON driver Markus Mayer (2): ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL arm64: defconfig: add CONFIG_BRCMSTB_THERMAL .../devicetree/bindings/thermal/brcm,avs-tmon.txt | 20 ++ MAINTAINERS | 8 + arch/arm/configs/multi_v7_defconfig | 1 + arch/arm64/configs/defconfig | 1 + drivers/thermal/Kconfig | 2 +- drivers/thermal/broadcom/Kconfig | 7 + drivers/thermal/broadcom/Makefile | 1 + drivers/thermal/broadcom/brcmstb_thermal.c | 386 +++++++++++++++++++++ 8 files changed, 425 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt create mode 100644 drivers/thermal/broadcom/brcmstb_thermal.c -- 2.7.4 ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 1/4] Documentation: devicetree: add binding for Broadcom STB AVS TMON 2017-08-09 22:02 ` Markus Mayer @ 2017-08-09 22:02 ` Markus Mayer -1 siblings, 0 replies; 44+ messages in thread From: Markus Mayer @ 2017-08-09 22:02 UTC (permalink / raw) To: Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Rafał Miłecki, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson Cc: Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List, Markus Mayer From: Brian Norris <computersforpeace@gmail.com> Add binding for Broadcom STB thermal. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Markus Mayer <mmayer@broadcom.com> --- .../devicetree/bindings/thermal/brcm,avs-tmon.txt | 20 ++++++++++++++++++++ MAINTAINERS | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt diff --git a/Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt b/Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt new file mode 100644 index 0000000..9d43553 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt @@ -0,0 +1,20 @@ +* Broadcom STB thermal management + +Thermal management core, provided by the AVS TMON hardware block. + +Required properties: +- compatible: must be "brcm,avs-tmon" and/or "brcm,avs-tmon-bcm7445" +- reg: address range for the AVS TMON registers +- interrupts: temperature monitor interrupt, for high/low threshold triggers +- interrupt-names: should be "tmon" +- interrupt-parent: the parent interrupt controller + +Example: + + thermal@f04d1500 { + compatible = "brcm,avs-tmon-bcm7445", "brcm,avs-tmon"; + reg = <0xf04d1500 0x28>; + interrupts = <0x6>; + interrupt-names = "tmon"; + interrupt-parent = <&avs_host_l2_intc>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index f66488d..2f116a8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2903,6 +2903,14 @@ S: Maintained F: Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt F: drivers/cpufreq/brcmstb* +BROADCOM STB AVS TMON DRIVER +M: Markus Mayer <mmayer@broadcom.com> +M: bcm-kernel-feedback-list@broadcom.com +L: linux-pm@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt +F: drivers/thermal/broadcom/brcmstb* + BROADCOM STB NAND FLASH DRIVER M: Brian Norris <computersforpeace@gmail.com> M: Kamal Dasu <kdasu.kdev@gmail.com> -- 2.7.4 ^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH v4 1/4] Documentation: devicetree: add binding for Broadcom STB AVS TMON @ 2017-08-09 22:02 ` Markus Mayer 0 siblings, 0 replies; 44+ messages in thread From: Markus Mayer @ 2017-08-09 22:02 UTC (permalink / raw) To: linux-arm-kernel From: Brian Norris <computersforpeace@gmail.com> Add binding for Broadcom STB thermal. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Markus Mayer <mmayer@broadcom.com> --- .../devicetree/bindings/thermal/brcm,avs-tmon.txt | 20 ++++++++++++++++++++ MAINTAINERS | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt diff --git a/Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt b/Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt new file mode 100644 index 0000000..9d43553 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt @@ -0,0 +1,20 @@ +* Broadcom STB thermal management + +Thermal management core, provided by the AVS TMON hardware block. + +Required properties: +- compatible: must be "brcm,avs-tmon" and/or "brcm,avs-tmon-bcm7445" +- reg: address range for the AVS TMON registers +- interrupts: temperature monitor interrupt, for high/low threshold triggers +- interrupt-names: should be "tmon" +- interrupt-parent: the parent interrupt controller + +Example: + + thermal at f04d1500 { + compatible = "brcm,avs-tmon-bcm7445", "brcm,avs-tmon"; + reg = <0xf04d1500 0x28>; + interrupts = <0x6>; + interrupt-names = "tmon"; + interrupt-parent = <&avs_host_l2_intc>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index f66488d..2f116a8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2903,6 +2903,14 @@ S: Maintained F: Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt F: drivers/cpufreq/brcmstb* +BROADCOM STB AVS TMON DRIVER +M: Markus Mayer <mmayer@broadcom.com> +M: bcm-kernel-feedback-list at broadcom.com +L: linux-pm at vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt +F: drivers/thermal/broadcom/brcmstb* + BROADCOM STB NAND FLASH DRIVER M: Brian Norris <computersforpeace@gmail.com> M: Kamal Dasu <kdasu.kdev@gmail.com> -- 2.7.4 ^ permalink raw reply related [flat|nested] 44+ messages in thread
* Re: [PATCH v4 1/4] Documentation: devicetree: add binding for Broadcom STB AVS TMON 2017-08-09 22:02 ` Markus Mayer (?) @ 2017-08-17 15:10 ` Rob Herring -1 siblings, 0 replies; 44+ messages in thread From: Rob Herring @ 2017-08-17 15:10 UTC (permalink / raw) To: Markus Mayer Cc: Zhang Rui, Eduardo Valentin, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Rafał Miłecki, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List, Markus Mayer On Wed, Aug 09, 2017 at 03:02:54PM -0700, Markus Mayer wrote: > From: Brian Norris <computersforpeace@gmail.com> > > Add binding for Broadcom STB thermal. > > Signed-off-by: Brian Norris <computersforpeace@gmail.com> > Signed-off-by: Markus Mayer <mmayer@broadcom.com> > --- > .../devicetree/bindings/thermal/brcm,avs-tmon.txt | 20 ++++++++++++++++++++ > MAINTAINERS | 8 ++++++++ > 2 files changed, 28 insertions(+) > create mode 100644 Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt Acked-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 1/4] Documentation: devicetree: add binding for Broadcom STB AVS TMON @ 2017-08-17 15:10 ` Rob Herring 0 siblings, 0 replies; 44+ messages in thread From: Rob Herring @ 2017-08-17 15:10 UTC (permalink / raw) To: linux-arm-kernel On Wed, Aug 09, 2017 at 03:02:54PM -0700, Markus Mayer wrote: > From: Brian Norris <computersforpeace@gmail.com> > > Add binding for Broadcom STB thermal. > > Signed-off-by: Brian Norris <computersforpeace@gmail.com> > Signed-off-by: Markus Mayer <mmayer@broadcom.com> > --- > .../devicetree/bindings/thermal/brcm,avs-tmon.txt | 20 ++++++++++++++++++++ > MAINTAINERS | 8 ++++++++ > 2 files changed, 28 insertions(+) > create mode 100644 Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt Acked-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH v4 1/4] Documentation: devicetree: add binding for Broadcom STB AVS TMON @ 2017-08-17 15:10 ` Rob Herring 0 siblings, 0 replies; 44+ messages in thread From: Rob Herring @ 2017-08-17 15:10 UTC (permalink / raw) To: Markus Mayer Cc: Zhang Rui, Eduardo Valentin, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Rafał Miłecki, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List On Wed, Aug 09, 2017 at 03:02:54PM -0700, Markus Mayer wrote: > From: Brian Norris <computersforpeace@gmail.com> > > Add binding for Broadcom STB thermal. > > Signed-off-by: Brian Norris <computersforpeace@gmail.com> > Signed-off-by: Markus Mayer <mmayer@broadcom.com> > --- > .../devicetree/bindings/thermal/brcm,avs-tmon.txt | 20 ++++++++++++++++++++ > MAINTAINERS | 8 ++++++++ > 2 files changed, 28 insertions(+) > create mode 100644 Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt Acked-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver 2017-08-09 22:02 ` Markus Mayer @ 2017-08-09 22:02 ` Markus Mayer -1 siblings, 0 replies; 44+ messages in thread From: Markus Mayer @ 2017-08-09 22:02 UTC (permalink / raw) To: Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Rafał Miłecki, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson Cc: Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List, Markus Mayer From: Brian Norris <computersforpeace@gmail.com> The AVS TMON core provides temperature readings, a pair of configurable high- and low-temperature threshold interrupts, and an emergency over-temperature chip reset. The driver utilizes the first two to provide temperature readings and high-temperature notifications to applications. The over-temperature reset is not exposed to applications; this reset threshold is critical to the system and should be set with care within the bootloader. Applications may choose to utilize the notification mechanism, the temperature reading mechanism (e.g., through polling), or both. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Doug Berger <opendmb@gmail.com> Signed-off-by: Markus Mayer <mmayer@broadcom.com> --- drivers/thermal/Kconfig | 2 +- drivers/thermal/broadcom/Kconfig | 7 + drivers/thermal/broadcom/Makefile | 1 + drivers/thermal/broadcom/brcmstb_thermal.c | 386 +++++++++++++++++++++++++++++ 4 files changed, 395 insertions(+), 1 deletion(-) create mode 100644 drivers/thermal/broadcom/brcmstb_thermal.c diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index b5b5fac..396ad6b 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -408,7 +408,7 @@ config MTK_THERMAL controller present in Mediatek SoCs menu "Broadcom thermal drivers" -depends on ARCH_BCM || COMPILE_TEST +depends on ARCH_BCM || ARCH_BRCMSTB || COMPILE_TEST source "drivers/thermal/broadcom/Kconfig" endmenu diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig index 42c098e..c106a15 100644 --- a/drivers/thermal/broadcom/Kconfig +++ b/drivers/thermal/broadcom/Kconfig @@ -6,6 +6,13 @@ config BCM2835_THERMAL help Support for thermal sensors on Broadcom bcm2835 SoCs. +config BRCMSTB_THERMAL + tristate "Broadcom STB AVS TMON thermal driver" + depends on ARCH_BRCMSTB || COMPILE_TEST + help + Enable this driver if you have a Broadcom STB SoC and would like + thermal framework support. + config BCM_NS_THERMAL tristate "Northstar thermal driver" depends on ARCH_BCM_IPROC || COMPILE_TEST diff --git a/drivers/thermal/broadcom/Makefile b/drivers/thermal/broadcom/Makefile index c6f62e4..fae10ec 100644 --- a/drivers/thermal/broadcom/Makefile +++ b/drivers/thermal/broadcom/Makefile @@ -1,2 +1,3 @@ obj-$(CONFIG_BCM2835_THERMAL) += bcm2835_thermal.o +obj-$(CONFIG_BRCMSTB_THERMAL) += brcmstb_thermal.o obj-$(CONFIG_BCM_NS_THERMAL) += ns-thermal.o diff --git a/drivers/thermal/broadcom/brcmstb_thermal.c b/drivers/thermal/broadcom/brcmstb_thermal.c new file mode 100644 index 0000000..87b8e7a --- /dev/null +++ b/drivers/thermal/broadcom/brcmstb_thermal.c @@ -0,0 +1,386 @@ +/* + * Broadcom STB AVS TMON thermal sensor driver + * + * Copyright (c) 2015-2017 Broadcom + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#define DRV_NAME "brcmstb_thermal" + +#define pr_fmt(fmt) DRV_NAME ": " fmt + +#include <linux/bitops.h> +#include <linux/device.h> +#include <linux/err.h> +#include <linux/io.h> +#include <linux/irqreturn.h> +#include <linux/interrupt.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/of_device.h> +#include <linux/thermal.h> + +#define AVS_TMON_STATUS 0x00 + #define AVS_TMON_STATUS_valid_msk BIT(11) + #define AVS_TMON_STATUS_data_msk GENMASK(10, 1) + #define AVS_TMON_STATUS_data_shift 1 + +#define AVS_TMON_EN_OVERTEMP_RESET 0x04 + #define AVS_TMON_EN_OVERTEMP_RESET_msk BIT(0) + +#define AVS_TMON_RESET_THRESH 0x08 + #define AVS_TMON_RESET_THRESH_msk GENMASK(10, 1) + #define AVS_TMON_RESET_THRESH_shift 1 + +#define AVS_TMON_INT_IDLE_TIME 0x10 + +#define AVS_TMON_EN_TEMP_INT_SRCS 0x14 + #define AVS_TMON_EN_TEMP_INT_SRCS_high BIT(1) + #define AVS_TMON_EN_TEMP_INT_SRCS_low BIT(0) + +#define AVS_TMON_INT_THRESH 0x18 + #define AVS_TMON_INT_THRESH_high_msk GENMASK(26, 17) + #define AVS_TMON_INT_THRESH_high_shift 17 + #define AVS_TMON_INT_THRESH_low_msk GENMASK(10, 1) + #define AVS_TMON_INT_THRESH_low_shift 1 + +#define AVS_TMON_TEMP_INT_CODE 0x1c +#define AVS_TMON_TP_TEST_ENABLE 0x20 + +/* Default coefficients */ +#define AVS_TMON_TEMP_SLOPE -487 +#define AVS_TMON_TEMP_OFFSET 410040 + +/* HW related temperature constants */ +#define AVS_TMON_TEMP_MAX 0x3ff +#define AVS_TMON_TEMP_MIN -88161 +#define AVS_TMON_TEMP_MASK AVS_TMON_TEMP_MAX + +enum avs_tmon_trip_type { + TMON_TRIP_TYPE_LOW = 0, + TMON_TRIP_TYPE_HIGH, + TMON_TRIP_TYPE_RESET, + TMON_TRIP_TYPE_MAX, +}; + +struct avs_tmon_trip { + /* HW bit to enable the trip */ + u32 enable_offs; + u32 enable_mask; + + /* HW field to read the trip temperature */ + u32 reg_offs; + u32 reg_msk; + int reg_shift; +}; + +static struct avs_tmon_trip avs_tmon_trips[] = { + /* Trips when temperature is below threshold */ + [TMON_TRIP_TYPE_LOW] = { + .enable_offs = AVS_TMON_EN_TEMP_INT_SRCS, + .enable_mask = AVS_TMON_EN_TEMP_INT_SRCS_low, + .reg_offs = AVS_TMON_INT_THRESH, + .reg_msk = AVS_TMON_INT_THRESH_low_msk, + .reg_shift = AVS_TMON_INT_THRESH_low_shift, + }, + /* Trips when temperature is above threshold */ + [TMON_TRIP_TYPE_HIGH] = { + .enable_offs = AVS_TMON_EN_TEMP_INT_SRCS, + .enable_mask = AVS_TMON_EN_TEMP_INT_SRCS_high, + .reg_offs = AVS_TMON_INT_THRESH, + .reg_msk = AVS_TMON_INT_THRESH_high_msk, + .reg_shift = AVS_TMON_INT_THRESH_high_shift, + }, + /* Automatically resets chip when above threshold */ + [TMON_TRIP_TYPE_RESET] = { + .enable_offs = AVS_TMON_EN_OVERTEMP_RESET, + .enable_mask = AVS_TMON_EN_OVERTEMP_RESET_msk, + .reg_offs = AVS_TMON_RESET_THRESH, + .reg_msk = AVS_TMON_RESET_THRESH_msk, + .reg_shift = AVS_TMON_RESET_THRESH_shift, + }, +}; + +struct brcmstb_thermal_priv { + void __iomem *tmon_base; + struct device *dev; + struct thermal_zone_device *thermal; +}; + +static void avs_tmon_get_coeffs(struct thermal_zone_device *tz, int *slope, + int *offset) +{ + *slope = thermal_zone_get_slope(tz); + *offset = thermal_zone_get_offset(tz); +} + +/* Convert a HW code to a temperature reading (millidegree celsius) */ +static inline int avs_tmon_code_to_temp(struct thermal_zone_device *tz, + u32 code) +{ + const int val = code & AVS_TMON_TEMP_MASK; + int slope, offset; + + avs_tmon_get_coeffs(tz, &slope, &offset); + + return slope * val + offset; +} + +/* + * Convert a temperature value (millidegree celsius) to a HW code + * + * @temp: temperature to convert + * @low: if true, round toward the low side + */ +static inline u32 avs_tmon_temp_to_code(struct thermal_zone_device *tz, + int temp, bool low) +{ + int slope, offset; + + if (temp < AVS_TMON_TEMP_MIN) + return AVS_TMON_TEMP_MAX; /* Maximum code value */ + + avs_tmon_get_coeffs(tz, &slope, &offset); + + if (temp >= offset) + return 0; /* Minimum code value */ + + if (low) + return (u32)(DIV_ROUND_UP(offset - temp, abs(slope))); + else + return (u32)((offset - temp) / abs(slope)); +} + +static int brcmstb_get_temp(void *data, int *temp) +{ + struct brcmstb_thermal_priv *priv = data; + u32 val; + long t; + + val = __raw_readl(priv->tmon_base + AVS_TMON_STATUS); + + if (!(val & AVS_TMON_STATUS_valid_msk)) { + dev_err(priv->dev, "reading not valid\n"); + return -EIO; + } + + val = (val & AVS_TMON_STATUS_data_msk) >> AVS_TMON_STATUS_data_shift; + + t = avs_tmon_code_to_temp(priv->thermal, val); + if (t < 0) + *temp = 0; + else + *temp = t; + + return 0; +} + +static void avs_tmon_trip_enable(struct brcmstb_thermal_priv *priv, + enum avs_tmon_trip_type type, int en) +{ + struct avs_tmon_trip *trip = &avs_tmon_trips[type]; + u32 val = __raw_readl(priv->tmon_base + trip->enable_offs); + + dev_dbg(priv->dev, "%sable trip, type %d\n", en ? "en" : "dis", type); + + if (en) + val |= trip->enable_mask; + else + val &= ~trip->enable_mask; + + __raw_writel(val, priv->tmon_base + trip->enable_offs); +} + +static int avs_tmon_get_trip_temp(struct brcmstb_thermal_priv *priv, + enum avs_tmon_trip_type type) +{ + struct avs_tmon_trip *trip = &avs_tmon_trips[type]; + u32 val = __raw_readl(priv->tmon_base + trip->reg_offs); + + val &= trip->reg_msk; + val >>= trip->reg_shift; + + return avs_tmon_code_to_temp(priv->thermal, val); +} + +static void avs_tmon_set_trip_temp(struct brcmstb_thermal_priv *priv, + enum avs_tmon_trip_type type, + int temp) +{ + struct avs_tmon_trip *trip = &avs_tmon_trips[type]; + u32 val, orig; + + dev_dbg(priv->dev, "set temp %d to %d\n", type, temp); + + /* round toward low temp for the low interrupt */ + val = avs_tmon_temp_to_code(priv->thermal, temp, + type == TMON_TRIP_TYPE_LOW); + + val <<= trip->reg_shift; + val &= trip->reg_msk; + + orig = __raw_readl(priv->tmon_base + trip->reg_offs); + orig &= ~trip->reg_msk; + orig |= val; + __raw_writel(orig, priv->tmon_base + trip->reg_offs); +} + +static int avs_tmon_get_intr_temp(struct brcmstb_thermal_priv *priv) +{ + u32 val; + + val = __raw_readl(priv->tmon_base + AVS_TMON_TEMP_INT_CODE); + return avs_tmon_code_to_temp(priv->thermal, val); +} + +static irqreturn_t brcmstb_tmon_irq_thread(int irq, void *data) +{ + struct brcmstb_thermal_priv *priv = data; + int low, high, intr; + + low = avs_tmon_get_trip_temp(priv, TMON_TRIP_TYPE_LOW); + high = avs_tmon_get_trip_temp(priv, TMON_TRIP_TYPE_HIGH); + intr = avs_tmon_get_intr_temp(priv); + + dev_dbg(priv->dev, "low/intr/high: %d/%d/%d\n", + low, intr, high); + + /* Disable high-temp until next threshold shift */ + if (intr >= high) + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_HIGH, 0); + /* Disable low-temp until next threshold shift */ + if (intr <= low) + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_LOW, 0); + + /* + * Notify using the interrupt temperature, in case the temperature + * changes before it can next be read out + */ + thermal_zone_device_update(priv->thermal, intr); + + return IRQ_HANDLED; +} + +static int brcmstb_set_trips(void *data, int low, int high) +{ + struct brcmstb_thermal_priv *priv = data; + + dev_dbg(priv->dev, "set trips %d <--> %d\n", low, high); + + if (low) { + if (low > INT_MAX) + low = INT_MAX; + avs_tmon_set_trip_temp(priv, TMON_TRIP_TYPE_LOW, low); + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_LOW, 1); + } else { + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_LOW, 0); + } + + if (high < ULONG_MAX) { + if (high > INT_MAX) + high = INT_MAX; + avs_tmon_set_trip_temp(priv, TMON_TRIP_TYPE_HIGH, high); + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_HIGH, 1); + } else { + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_HIGH, 0); + } + + return 0; +} + +static struct thermal_zone_of_device_ops of_ops = { + .get_temp = brcmstb_get_temp, + .set_trips = brcmstb_set_trips, +}; + +static const struct of_device_id brcmstb_thermal_id_table[] = { + { .compatible = "brcm,avs-tmon" }, + {}, +}; +MODULE_DEVICE_TABLE(of, brcmstb_thermal_id_table); + +static int brcmstb_thermal_probe(struct platform_device *pdev) +{ + struct thermal_zone_device *thermal; + struct brcmstb_thermal_priv *priv; + struct resource *res; + int irq, ret; + + priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + priv->tmon_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(priv->tmon_base)) + return PTR_ERR(priv->tmon_base); + + priv->dev = &pdev->dev; + platform_set_drvdata(pdev, priv); + + thermal = thermal_zone_of_sensor_register(&pdev->dev, 0, priv, &of_ops); + if (IS_ERR(thermal)) { + ret = PTR_ERR(thermal); + dev_err(&pdev->dev, "could not register sensor: %d\n", ret); + return ret; + } + + priv->thermal = thermal; + + irq = platform_get_irq(pdev, 0); + if (irq < 0) { + dev_err(&pdev->dev, "could not get IRQ\n"); + ret = irq; + goto err; + } + ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, + brcmstb_tmon_irq_thread, IRQF_ONESHOT, + DRV_NAME, priv); + if (ret < 0) { + dev_err(&pdev->dev, "could not request IRQ: %d\n", ret); + goto err; + } + + dev_info(&pdev->dev, "registered AVS TMON of-sensor driver\n"); + + return 0; + +err: + thermal_zone_of_sensor_unregister(&pdev->dev, thermal); + return ret; +} + +static int brcmstb_thermal_exit(struct platform_device *pdev) +{ + struct brcmstb_thermal_priv *priv = platform_get_drvdata(pdev); + struct thermal_zone_device *thermal = priv->thermal; + + if (thermal) + thermal_zone_of_sensor_unregister(&pdev->dev, priv->thermal); + + return 0; +} + +static struct platform_driver brcmstb_thermal_driver = { + .probe = brcmstb_thermal_probe, + .remove = brcmstb_thermal_exit, + .driver = { + .name = DRV_NAME, + .of_match_table = brcmstb_thermal_id_table, + }, +}; +module_platform_driver(brcmstb_thermal_driver); + +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Brian Norris"); +MODULE_DESCRIPTION("Broadcom STB AVS TMON thermal driver"); -- 2.7.4 ^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver @ 2017-08-09 22:02 ` Markus Mayer 0 siblings, 0 replies; 44+ messages in thread From: Markus Mayer @ 2017-08-09 22:02 UTC (permalink / raw) To: linux-arm-kernel From: Brian Norris <computersforpeace@gmail.com> The AVS TMON core provides temperature readings, a pair of configurable high- and low-temperature threshold interrupts, and an emergency over-temperature chip reset. The driver utilizes the first two to provide temperature readings and high-temperature notifications to applications. The over-temperature reset is not exposed to applications; this reset threshold is critical to the system and should be set with care within the bootloader. Applications may choose to utilize the notification mechanism, the temperature reading mechanism (e.g., through polling), or both. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Doug Berger <opendmb@gmail.com> Signed-off-by: Markus Mayer <mmayer@broadcom.com> --- drivers/thermal/Kconfig | 2 +- drivers/thermal/broadcom/Kconfig | 7 + drivers/thermal/broadcom/Makefile | 1 + drivers/thermal/broadcom/brcmstb_thermal.c | 386 +++++++++++++++++++++++++++++ 4 files changed, 395 insertions(+), 1 deletion(-) create mode 100644 drivers/thermal/broadcom/brcmstb_thermal.c diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index b5b5fac..396ad6b 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -408,7 +408,7 @@ config MTK_THERMAL controller present in Mediatek SoCs menu "Broadcom thermal drivers" -depends on ARCH_BCM || COMPILE_TEST +depends on ARCH_BCM || ARCH_BRCMSTB || COMPILE_TEST source "drivers/thermal/broadcom/Kconfig" endmenu diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig index 42c098e..c106a15 100644 --- a/drivers/thermal/broadcom/Kconfig +++ b/drivers/thermal/broadcom/Kconfig @@ -6,6 +6,13 @@ config BCM2835_THERMAL help Support for thermal sensors on Broadcom bcm2835 SoCs. +config BRCMSTB_THERMAL + tristate "Broadcom STB AVS TMON thermal driver" + depends on ARCH_BRCMSTB || COMPILE_TEST + help + Enable this driver if you have a Broadcom STB SoC and would like + thermal framework support. + config BCM_NS_THERMAL tristate "Northstar thermal driver" depends on ARCH_BCM_IPROC || COMPILE_TEST diff --git a/drivers/thermal/broadcom/Makefile b/drivers/thermal/broadcom/Makefile index c6f62e4..fae10ec 100644 --- a/drivers/thermal/broadcom/Makefile +++ b/drivers/thermal/broadcom/Makefile @@ -1,2 +1,3 @@ obj-$(CONFIG_BCM2835_THERMAL) += bcm2835_thermal.o +obj-$(CONFIG_BRCMSTB_THERMAL) += brcmstb_thermal.o obj-$(CONFIG_BCM_NS_THERMAL) += ns-thermal.o diff --git a/drivers/thermal/broadcom/brcmstb_thermal.c b/drivers/thermal/broadcom/brcmstb_thermal.c new file mode 100644 index 0000000..87b8e7a --- /dev/null +++ b/drivers/thermal/broadcom/brcmstb_thermal.c @@ -0,0 +1,386 @@ +/* + * Broadcom STB AVS TMON thermal sensor driver + * + * Copyright (c) 2015-2017 Broadcom + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#define DRV_NAME "brcmstb_thermal" + +#define pr_fmt(fmt) DRV_NAME ": " fmt + +#include <linux/bitops.h> +#include <linux/device.h> +#include <linux/err.h> +#include <linux/io.h> +#include <linux/irqreturn.h> +#include <linux/interrupt.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/of_device.h> +#include <linux/thermal.h> + +#define AVS_TMON_STATUS 0x00 + #define AVS_TMON_STATUS_valid_msk BIT(11) + #define AVS_TMON_STATUS_data_msk GENMASK(10, 1) + #define AVS_TMON_STATUS_data_shift 1 + +#define AVS_TMON_EN_OVERTEMP_RESET 0x04 + #define AVS_TMON_EN_OVERTEMP_RESET_msk BIT(0) + +#define AVS_TMON_RESET_THRESH 0x08 + #define AVS_TMON_RESET_THRESH_msk GENMASK(10, 1) + #define AVS_TMON_RESET_THRESH_shift 1 + +#define AVS_TMON_INT_IDLE_TIME 0x10 + +#define AVS_TMON_EN_TEMP_INT_SRCS 0x14 + #define AVS_TMON_EN_TEMP_INT_SRCS_high BIT(1) + #define AVS_TMON_EN_TEMP_INT_SRCS_low BIT(0) + +#define AVS_TMON_INT_THRESH 0x18 + #define AVS_TMON_INT_THRESH_high_msk GENMASK(26, 17) + #define AVS_TMON_INT_THRESH_high_shift 17 + #define AVS_TMON_INT_THRESH_low_msk GENMASK(10, 1) + #define AVS_TMON_INT_THRESH_low_shift 1 + +#define AVS_TMON_TEMP_INT_CODE 0x1c +#define AVS_TMON_TP_TEST_ENABLE 0x20 + +/* Default coefficients */ +#define AVS_TMON_TEMP_SLOPE -487 +#define AVS_TMON_TEMP_OFFSET 410040 + +/* HW related temperature constants */ +#define AVS_TMON_TEMP_MAX 0x3ff +#define AVS_TMON_TEMP_MIN -88161 +#define AVS_TMON_TEMP_MASK AVS_TMON_TEMP_MAX + +enum avs_tmon_trip_type { + TMON_TRIP_TYPE_LOW = 0, + TMON_TRIP_TYPE_HIGH, + TMON_TRIP_TYPE_RESET, + TMON_TRIP_TYPE_MAX, +}; + +struct avs_tmon_trip { + /* HW bit to enable the trip */ + u32 enable_offs; + u32 enable_mask; + + /* HW field to read the trip temperature */ + u32 reg_offs; + u32 reg_msk; + int reg_shift; +}; + +static struct avs_tmon_trip avs_tmon_trips[] = { + /* Trips when temperature is below threshold */ + [TMON_TRIP_TYPE_LOW] = { + .enable_offs = AVS_TMON_EN_TEMP_INT_SRCS, + .enable_mask = AVS_TMON_EN_TEMP_INT_SRCS_low, + .reg_offs = AVS_TMON_INT_THRESH, + .reg_msk = AVS_TMON_INT_THRESH_low_msk, + .reg_shift = AVS_TMON_INT_THRESH_low_shift, + }, + /* Trips when temperature is above threshold */ + [TMON_TRIP_TYPE_HIGH] = { + .enable_offs = AVS_TMON_EN_TEMP_INT_SRCS, + .enable_mask = AVS_TMON_EN_TEMP_INT_SRCS_high, + .reg_offs = AVS_TMON_INT_THRESH, + .reg_msk = AVS_TMON_INT_THRESH_high_msk, + .reg_shift = AVS_TMON_INT_THRESH_high_shift, + }, + /* Automatically resets chip when above threshold */ + [TMON_TRIP_TYPE_RESET] = { + .enable_offs = AVS_TMON_EN_OVERTEMP_RESET, + .enable_mask = AVS_TMON_EN_OVERTEMP_RESET_msk, + .reg_offs = AVS_TMON_RESET_THRESH, + .reg_msk = AVS_TMON_RESET_THRESH_msk, + .reg_shift = AVS_TMON_RESET_THRESH_shift, + }, +}; + +struct brcmstb_thermal_priv { + void __iomem *tmon_base; + struct device *dev; + struct thermal_zone_device *thermal; +}; + +static void avs_tmon_get_coeffs(struct thermal_zone_device *tz, int *slope, + int *offset) +{ + *slope = thermal_zone_get_slope(tz); + *offset = thermal_zone_get_offset(tz); +} + +/* Convert a HW code to a temperature reading (millidegree celsius) */ +static inline int avs_tmon_code_to_temp(struct thermal_zone_device *tz, + u32 code) +{ + const int val = code & AVS_TMON_TEMP_MASK; + int slope, offset; + + avs_tmon_get_coeffs(tz, &slope, &offset); + + return slope * val + offset; +} + +/* + * Convert a temperature value (millidegree celsius) to a HW code + * + * @temp: temperature to convert + * @low: if true, round toward the low side + */ +static inline u32 avs_tmon_temp_to_code(struct thermal_zone_device *tz, + int temp, bool low) +{ + int slope, offset; + + if (temp < AVS_TMON_TEMP_MIN) + return AVS_TMON_TEMP_MAX; /* Maximum code value */ + + avs_tmon_get_coeffs(tz, &slope, &offset); + + if (temp >= offset) + return 0; /* Minimum code value */ + + if (low) + return (u32)(DIV_ROUND_UP(offset - temp, abs(slope))); + else + return (u32)((offset - temp) / abs(slope)); +} + +static int brcmstb_get_temp(void *data, int *temp) +{ + struct brcmstb_thermal_priv *priv = data; + u32 val; + long t; + + val = __raw_readl(priv->tmon_base + AVS_TMON_STATUS); + + if (!(val & AVS_TMON_STATUS_valid_msk)) { + dev_err(priv->dev, "reading not valid\n"); + return -EIO; + } + + val = (val & AVS_TMON_STATUS_data_msk) >> AVS_TMON_STATUS_data_shift; + + t = avs_tmon_code_to_temp(priv->thermal, val); + if (t < 0) + *temp = 0; + else + *temp = t; + + return 0; +} + +static void avs_tmon_trip_enable(struct brcmstb_thermal_priv *priv, + enum avs_tmon_trip_type type, int en) +{ + struct avs_tmon_trip *trip = &avs_tmon_trips[type]; + u32 val = __raw_readl(priv->tmon_base + trip->enable_offs); + + dev_dbg(priv->dev, "%sable trip, type %d\n", en ? "en" : "dis", type); + + if (en) + val |= trip->enable_mask; + else + val &= ~trip->enable_mask; + + __raw_writel(val, priv->tmon_base + trip->enable_offs); +} + +static int avs_tmon_get_trip_temp(struct brcmstb_thermal_priv *priv, + enum avs_tmon_trip_type type) +{ + struct avs_tmon_trip *trip = &avs_tmon_trips[type]; + u32 val = __raw_readl(priv->tmon_base + trip->reg_offs); + + val &= trip->reg_msk; + val >>= trip->reg_shift; + + return avs_tmon_code_to_temp(priv->thermal, val); +} + +static void avs_tmon_set_trip_temp(struct brcmstb_thermal_priv *priv, + enum avs_tmon_trip_type type, + int temp) +{ + struct avs_tmon_trip *trip = &avs_tmon_trips[type]; + u32 val, orig; + + dev_dbg(priv->dev, "set temp %d to %d\n", type, temp); + + /* round toward low temp for the low interrupt */ + val = avs_tmon_temp_to_code(priv->thermal, temp, + type == TMON_TRIP_TYPE_LOW); + + val <<= trip->reg_shift; + val &= trip->reg_msk; + + orig = __raw_readl(priv->tmon_base + trip->reg_offs); + orig &= ~trip->reg_msk; + orig |= val; + __raw_writel(orig, priv->tmon_base + trip->reg_offs); +} + +static int avs_tmon_get_intr_temp(struct brcmstb_thermal_priv *priv) +{ + u32 val; + + val = __raw_readl(priv->tmon_base + AVS_TMON_TEMP_INT_CODE); + return avs_tmon_code_to_temp(priv->thermal, val); +} + +static irqreturn_t brcmstb_tmon_irq_thread(int irq, void *data) +{ + struct brcmstb_thermal_priv *priv = data; + int low, high, intr; + + low = avs_tmon_get_trip_temp(priv, TMON_TRIP_TYPE_LOW); + high = avs_tmon_get_trip_temp(priv, TMON_TRIP_TYPE_HIGH); + intr = avs_tmon_get_intr_temp(priv); + + dev_dbg(priv->dev, "low/intr/high: %d/%d/%d\n", + low, intr, high); + + /* Disable high-temp until next threshold shift */ + if (intr >= high) + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_HIGH, 0); + /* Disable low-temp until next threshold shift */ + if (intr <= low) + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_LOW, 0); + + /* + * Notify using the interrupt temperature, in case the temperature + * changes before it can next be read out + */ + thermal_zone_device_update(priv->thermal, intr); + + return IRQ_HANDLED; +} + +static int brcmstb_set_trips(void *data, int low, int high) +{ + struct brcmstb_thermal_priv *priv = data; + + dev_dbg(priv->dev, "set trips %d <--> %d\n", low, high); + + if (low) { + if (low > INT_MAX) + low = INT_MAX; + avs_tmon_set_trip_temp(priv, TMON_TRIP_TYPE_LOW, low); + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_LOW, 1); + } else { + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_LOW, 0); + } + + if (high < ULONG_MAX) { + if (high > INT_MAX) + high = INT_MAX; + avs_tmon_set_trip_temp(priv, TMON_TRIP_TYPE_HIGH, high); + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_HIGH, 1); + } else { + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_HIGH, 0); + } + + return 0; +} + +static struct thermal_zone_of_device_ops of_ops = { + .get_temp = brcmstb_get_temp, + .set_trips = brcmstb_set_trips, +}; + +static const struct of_device_id brcmstb_thermal_id_table[] = { + { .compatible = "brcm,avs-tmon" }, + {}, +}; +MODULE_DEVICE_TABLE(of, brcmstb_thermal_id_table); + +static int brcmstb_thermal_probe(struct platform_device *pdev) +{ + struct thermal_zone_device *thermal; + struct brcmstb_thermal_priv *priv; + struct resource *res; + int irq, ret; + + priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + priv->tmon_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(priv->tmon_base)) + return PTR_ERR(priv->tmon_base); + + priv->dev = &pdev->dev; + platform_set_drvdata(pdev, priv); + + thermal = thermal_zone_of_sensor_register(&pdev->dev, 0, priv, &of_ops); + if (IS_ERR(thermal)) { + ret = PTR_ERR(thermal); + dev_err(&pdev->dev, "could not register sensor: %d\n", ret); + return ret; + } + + priv->thermal = thermal; + + irq = platform_get_irq(pdev, 0); + if (irq < 0) { + dev_err(&pdev->dev, "could not get IRQ\n"); + ret = irq; + goto err; + } + ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, + brcmstb_tmon_irq_thread, IRQF_ONESHOT, + DRV_NAME, priv); + if (ret < 0) { + dev_err(&pdev->dev, "could not request IRQ: %d\n", ret); + goto err; + } + + dev_info(&pdev->dev, "registered AVS TMON of-sensor driver\n"); + + return 0; + +err: + thermal_zone_of_sensor_unregister(&pdev->dev, thermal); + return ret; +} + +static int brcmstb_thermal_exit(struct platform_device *pdev) +{ + struct brcmstb_thermal_priv *priv = platform_get_drvdata(pdev); + struct thermal_zone_device *thermal = priv->thermal; + + if (thermal) + thermal_zone_of_sensor_unregister(&pdev->dev, priv->thermal); + + return 0; +} + +static struct platform_driver brcmstb_thermal_driver = { + .probe = brcmstb_thermal_probe, + .remove = brcmstb_thermal_exit, + .driver = { + .name = DRV_NAME, + .of_match_table = brcmstb_thermal_id_table, + }, +}; +module_platform_driver(brcmstb_thermal_driver); + +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Brian Norris"); +MODULE_DESCRIPTION("Broadcom STB AVS TMON thermal driver"); -- 2.7.4 ^ permalink raw reply related [flat|nested] 44+ messages in thread
* Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver 2017-08-09 22:02 ` Markus Mayer @ 2017-08-15 6:08 ` Zhang Rui -1 siblings, 0 replies; 44+ messages in thread From: Zhang Rui @ 2017-08-15 6:08 UTC (permalink / raw) To: Markus Mayer, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Rafał Miłecki, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson Cc: Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List, Markus Mayer On Wed, 2017-08-09 at 15:02 -0700, Markus Mayer wrote: > From: Brian Norris <computersforpeace@gmail.com> > > The AVS TMON core provides temperature readings, a pair of > configurable > high- and low-temperature threshold interrupts, and an emergency > over-temperature chip reset. The driver utilizes the first two to > provide temperature readings and high-temperature notifications to > applications. The over-temperature reset is not exposed to > applications; this reset threshold is critical to the system and > should > be set with care within the bootloader. > > Applications may choose to utilize the notification mechanism, the > temperature reading mechanism (e.g., through polling), or both. > > Signed-off-by: Brian Norris <computersforpeace@gmail.com> > Signed-off-by: Doug Berger <opendmb@gmail.com> > Signed-off-by: Markus Mayer <mmayer@broadcom.com> > --- > drivers/thermal/Kconfig | 2 +- > drivers/thermal/broadcom/Kconfig | 7 + > drivers/thermal/broadcom/Makefile | 1 + > drivers/thermal/broadcom/brcmstb_thermal.c | 386 > +++++++++++++++++++++++++++++ > 4 files changed, 395 insertions(+), 1 deletion(-) > create mode 100644 drivers/thermal/broadcom/brcmstb_thermal.c > > diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig > index b5b5fac..396ad6b 100644 > --- a/drivers/thermal/Kconfig > +++ b/drivers/thermal/Kconfig > @@ -408,7 +408,7 @@ config MTK_THERMAL > controller present in Mediatek SoCs > > menu "Broadcom thermal drivers" > -depends on ARCH_BCM || COMPILE_TEST > +depends on ARCH_BCM || ARCH_BRCMSTB || COMPILE_TEST > source "drivers/thermal/broadcom/Kconfig" > endmenu > > diff --git a/drivers/thermal/broadcom/Kconfig > b/drivers/thermal/broadcom/Kconfig > index 42c098e..c106a15 100644 > --- a/drivers/thermal/broadcom/Kconfig > +++ b/drivers/thermal/broadcom/Kconfig > @@ -6,6 +6,13 @@ config BCM2835_THERMAL > help > Support for thermal sensors on Broadcom bcm2835 SoCs. > > +config BRCMSTB_THERMAL > + tristate "Broadcom STB AVS TMON thermal driver" > + depends on ARCH_BRCMSTB || COMPILE_TEST > + help > + Enable this driver if you have a Broadcom STB SoC and > would like > + thermal framework support. > + I don't understand why I got the following checkpatch warning WARNING: please write a paragraph that describes the config symbol fully #73: FILE: drivers/thermal/broadcom/Kconfig:9: +config BRCMSTB_THERMAL I didn't see this for other Kconfig changes. thanks, rui > config BCM_NS_THERMAL > tristate "Northstar thermal driver" > depends on ARCH_BCM_IPROC || COMPILE_TEST > diff --git a/drivers/thermal/broadcom/Makefile > b/drivers/thermal/broadcom/Makefile > index c6f62e4..fae10ec 100644 > --- a/drivers/thermal/broadcom/Makefile > +++ b/drivers/thermal/broadcom/Makefile > @@ -1,2 +1,3 @@ > obj-$(CONFIG_BCM2835_THERMAL) += bcm2835_thermal.o > +obj-$(CONFIG_BRCMSTB_THERMAL) += brcmstb_thermal.o > obj-$(CONFIG_BCM_NS_THERMAL) += ns-thermal.o > diff --git a/drivers/thermal/broadcom/brcmstb_thermal.c > b/drivers/thermal/broadcom/brcmstb_thermal.c > new file mode 100644 > index 0000000..87b8e7a > --- /dev/null > +++ b/drivers/thermal/broadcom/brcmstb_thermal.c > @@ -0,0 +1,386 @@ > +/* > + * Broadcom STB AVS TMON thermal sensor driver > + * > + * Copyright (c) 2015-2017 Broadcom > + * > + * This software is licensed under the terms of the GNU General > Public > + * License version 2, as published by the Free Software Foundation, > and > + * may be copied, distributed, and modified under those terms. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + */ > + > +#define DRV_NAME "brcmstb_thermal" > + > +#define pr_fmt(fmt) DRV_NAME ": " fmt > + > +#include <linux/bitops.h> > +#include <linux/device.h> > +#include <linux/err.h> > +#include <linux/io.h> > +#include <linux/irqreturn.h> > +#include <linux/interrupt.h> > +#include <linux/kernel.h> > +#include <linux/module.h> > +#include <linux/platform_device.h> > +#include <linux/of_device.h> > +#include <linux/thermal.h> > + > +#define AVS_TMON_STATUS 0x00 > + #define AVS_TMON_STATUS_valid_msk BIT(11) > + #define AVS_TMON_STATUS_data_msk GENMASK(10, 1) > + #define AVS_TMON_STATUS_data_shift 1 > + > +#define AVS_TMON_EN_OVERTEMP_RESET 0x04 > + #define AVS_TMON_EN_OVERTEMP_RESET_msk BIT(0) > + > +#define AVS_TMON_RESET_THRESH 0x08 > + #define AVS_TMON_RESET_THRESH_msk GENMASK(10, 1) > + #define AVS_TMON_RESET_THRESH_shift 1 > + > +#define AVS_TMON_INT_IDLE_TIME 0x10 > + > +#define AVS_TMON_EN_TEMP_INT_SRCS 0x14 > + #define AVS_TMON_EN_TEMP_INT_SRCS_high BIT(1) > + #define AVS_TMON_EN_TEMP_INT_SRCS_low BIT(0) > + > +#define AVS_TMON_INT_THRESH 0x18 > + #define AVS_TMON_INT_THRESH_high_msk GENMASK(26, 17) > + #define AVS_TMON_INT_THRESH_high_shift 17 > + #define AVS_TMON_INT_THRESH_low_msk GENMASK(10, 1) > + #define AVS_TMON_INT_THRESH_low_shift 1 > + > +#define AVS_TMON_TEMP_INT_CODE 0x1c > +#define AVS_TMON_TP_TEST_ENABLE 0x20 > + > +/* Default coefficients */ > +#define AVS_TMON_TEMP_SLOPE -487 > +#define AVS_TMON_TEMP_OFFSET 410040 > + > +/* HW related temperature constants */ > +#define AVS_TMON_TEMP_MAX 0x3ff > +#define AVS_TMON_TEMP_MIN -88161 > +#define AVS_TMON_TEMP_MASK AVS_TMON_TEMP_MAX > + > +enum avs_tmon_trip_type { > + TMON_TRIP_TYPE_LOW = 0, > + TMON_TRIP_TYPE_HIGH, > + TMON_TRIP_TYPE_RESET, > + TMON_TRIP_TYPE_MAX, > +}; > + > +struct avs_tmon_trip { > + /* HW bit to enable the trip */ > + u32 enable_offs; > + u32 enable_mask; > + > + /* HW field to read the trip temperature */ > + u32 reg_offs; > + u32 reg_msk; > + int reg_shift; > +}; > + > +static struct avs_tmon_trip avs_tmon_trips[] = { > + /* Trips when temperature is below threshold */ > + [TMON_TRIP_TYPE_LOW] = { > + .enable_offs = AVS_TMON_EN_TEMP_INT_SRCS, > + .enable_mask = AVS_TMON_EN_TEMP_INT_SRCS_low, > + .reg_offs = AVS_TMON_INT_THRESH, > + .reg_msk = AVS_TMON_INT_THRESH_low_msk, > + .reg_shift = AVS_TMON_INT_THRESH_low_shift, > + }, > + /* Trips when temperature is above threshold */ > + [TMON_TRIP_TYPE_HIGH] = { > + .enable_offs = AVS_TMON_EN_TEMP_INT_SRCS, > + .enable_mask = > AVS_TMON_EN_TEMP_INT_SRCS_high, > + .reg_offs = AVS_TMON_INT_THRESH, > + .reg_msk = AVS_TMON_INT_THRESH_high_msk, > + .reg_shift = AVS_TMON_INT_THRESH_high_shift, > + }, > + /* Automatically resets chip when above threshold */ > + [TMON_TRIP_TYPE_RESET] = { > + .enable_offs = AVS_TMON_EN_OVERTEMP_RESET, > + .enable_mask = > AVS_TMON_EN_OVERTEMP_RESET_msk, > + .reg_offs = AVS_TMON_RESET_THRESH, > + .reg_msk = AVS_TMON_RESET_THRESH_msk, > + .reg_shift = AVS_TMON_RESET_THRESH_shift, > + }, > +}; > + > +struct brcmstb_thermal_priv { > + void __iomem *tmon_base; > + struct device *dev; > + struct thermal_zone_device *thermal; > +}; > + > +static void avs_tmon_get_coeffs(struct thermal_zone_device *tz, int > *slope, > + int *offset) > +{ > + *slope = thermal_zone_get_slope(tz); > + *offset = thermal_zone_get_offset(tz); > +} > + > +/* Convert a HW code to a temperature reading (millidegree celsius) > */ > +static inline int avs_tmon_code_to_temp(struct thermal_zone_device > *tz, > + u32 code) > +{ > + const int val = code & AVS_TMON_TEMP_MASK; > + int slope, offset; > + > + avs_tmon_get_coeffs(tz, &slope, &offset); > + > + return slope * val + offset; > +} > + > +/* > + * Convert a temperature value (millidegree celsius) to a HW code > + * > + * @temp: temperature to convert > + * @low: if true, round toward the low side > + */ > +static inline u32 avs_tmon_temp_to_code(struct thermal_zone_device > *tz, > + int temp, bool low) > +{ > + int slope, offset; > + > + if (temp < AVS_TMON_TEMP_MIN) > + return AVS_TMON_TEMP_MAX; /* Maximum code value */ > + > + avs_tmon_get_coeffs(tz, &slope, &offset); > + > + if (temp >= offset) > + return 0; /* Minimum code value */ > + > + if (low) > + return (u32)(DIV_ROUND_UP(offset - temp, > abs(slope))); > + else > + return (u32)((offset - temp) / abs(slope)); > +} > + > +static int brcmstb_get_temp(void *data, int *temp) > +{ > + struct brcmstb_thermal_priv *priv = data; > + u32 val; > + long t; > + > + val = __raw_readl(priv->tmon_base + AVS_TMON_STATUS); > + > + if (!(val & AVS_TMON_STATUS_valid_msk)) { > + dev_err(priv->dev, "reading not valid\n"); > + return -EIO; > + } > + > + val = (val & AVS_TMON_STATUS_data_msk) >> > AVS_TMON_STATUS_data_shift; > + > + t = avs_tmon_code_to_temp(priv->thermal, val); > + if (t < 0) > + *temp = 0; > + else > + *temp = t; > + > + return 0; > +} > + > +static void avs_tmon_trip_enable(struct brcmstb_thermal_priv *priv, > + enum avs_tmon_trip_type type, int > en) > +{ > + struct avs_tmon_trip *trip = &avs_tmon_trips[type]; > + u32 val = __raw_readl(priv->tmon_base + trip->enable_offs); > + > + dev_dbg(priv->dev, "%sable trip, type %d\n", en ? "en" : > "dis", type); > + > + if (en) > + val |= trip->enable_mask; > + else > + val &= ~trip->enable_mask; > + > + __raw_writel(val, priv->tmon_base + trip->enable_offs); > +} > + > +static int avs_tmon_get_trip_temp(struct brcmstb_thermal_priv *priv, > + enum avs_tmon_trip_type type) > +{ > + struct avs_tmon_trip *trip = &avs_tmon_trips[type]; > + u32 val = __raw_readl(priv->tmon_base + trip->reg_offs); > + > + val &= trip->reg_msk; > + val >>= trip->reg_shift; > + > + return avs_tmon_code_to_temp(priv->thermal, val); > +} > + > +static void avs_tmon_set_trip_temp(struct brcmstb_thermal_priv > *priv, > + enum avs_tmon_trip_type type, > + int temp) > +{ > + struct avs_tmon_trip *trip = &avs_tmon_trips[type]; > + u32 val, orig; > + > + dev_dbg(priv->dev, "set temp %d to %d\n", type, temp); > + > + /* round toward low temp for the low interrupt */ > + val = avs_tmon_temp_to_code(priv->thermal, temp, > + type == TMON_TRIP_TYPE_LOW); > + > + val <<= trip->reg_shift; > + val &= trip->reg_msk; > + > + orig = __raw_readl(priv->tmon_base + trip->reg_offs); > + orig &= ~trip->reg_msk; > + orig |= val; > + __raw_writel(orig, priv->tmon_base + trip->reg_offs); > +} > + > +static int avs_tmon_get_intr_temp(struct brcmstb_thermal_priv *priv) > +{ > + u32 val; > + > + val = __raw_readl(priv->tmon_base + AVS_TMON_TEMP_INT_CODE); > + return avs_tmon_code_to_temp(priv->thermal, val); > +} > + > +static irqreturn_t brcmstb_tmon_irq_thread(int irq, void *data) > +{ > + struct brcmstb_thermal_priv *priv = data; > + int low, high, intr; > + > + low = avs_tmon_get_trip_temp(priv, TMON_TRIP_TYPE_LOW); > + high = avs_tmon_get_trip_temp(priv, TMON_TRIP_TYPE_HIGH); > + intr = avs_tmon_get_intr_temp(priv); > + > + dev_dbg(priv->dev, "low/intr/high: %d/%d/%d\n", > + low, intr, high); > + > + /* Disable high-temp until next threshold shift */ > + if (intr >= high) > + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_HIGH, 0); > + /* Disable low-temp until next threshold shift */ > + if (intr <= low) > + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_LOW, 0); > + > + /* > + * Notify using the interrupt temperature, in case the > temperature > + * changes before it can next be read out > + */ > + thermal_zone_device_update(priv->thermal, intr); > + > + return IRQ_HANDLED; > +} > + > +static int brcmstb_set_trips(void *data, int low, int high) > +{ > + struct brcmstb_thermal_priv *priv = data; > + > + dev_dbg(priv->dev, "set trips %d <--> %d\n", low, high); > + > + if (low) { > + if (low > INT_MAX) > + low = INT_MAX; > + avs_tmon_set_trip_temp(priv, TMON_TRIP_TYPE_LOW, > low); > + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_LOW, 1); > + } else { > + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_LOW, 0); > + } > + > + if (high < ULONG_MAX) { > + if (high > INT_MAX) > + high = INT_MAX; > + avs_tmon_set_trip_temp(priv, TMON_TRIP_TYPE_HIGH, > high); > + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_HIGH, 1); > + } else { > + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_HIGH, 0); > + } > + > + return 0; > +} > + > +static struct thermal_zone_of_device_ops of_ops = { > + .get_temp = brcmstb_get_temp, > + .set_trips = brcmstb_set_trips, > +}; > + > +static const struct of_device_id brcmstb_thermal_id_table[] = { > + { .compatible = "brcm,avs-tmon" }, > + {}, > +}; > +MODULE_DEVICE_TABLE(of, brcmstb_thermal_id_table); > + > +static int brcmstb_thermal_probe(struct platform_device *pdev) > +{ > + struct thermal_zone_device *thermal; > + struct brcmstb_thermal_priv *priv; > + struct resource *res; > + int irq, ret; > + > + priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); > + if (!priv) > + return -ENOMEM; > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + priv->tmon_base = devm_ioremap_resource(&pdev->dev, res); > + if (IS_ERR(priv->tmon_base)) > + return PTR_ERR(priv->tmon_base); > + > + priv->dev = &pdev->dev; > + platform_set_drvdata(pdev, priv); > + > + thermal = thermal_zone_of_sensor_register(&pdev->dev, 0, > priv, &of_ops); > + if (IS_ERR(thermal)) { > + ret = PTR_ERR(thermal); > + dev_err(&pdev->dev, "could not register sensor: > %d\n", ret); > + return ret; > + } > + > + priv->thermal = thermal; > + > + irq = platform_get_irq(pdev, 0); > + if (irq < 0) { > + dev_err(&pdev->dev, "could not get IRQ\n"); > + ret = irq; > + goto err; > + } > + ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, > + brcmstb_tmon_irq_thread, > IRQF_ONESHOT, > + DRV_NAME, priv); > + if (ret < 0) { > + dev_err(&pdev->dev, "could not request IRQ: %d\n", > ret); > + goto err; > + } > + > + dev_info(&pdev->dev, "registered AVS TMON of-sensor > driver\n"); > + > + return 0; > + > +err: > + thermal_zone_of_sensor_unregister(&pdev->dev, thermal); > + return ret; > +} > + > +static int brcmstb_thermal_exit(struct platform_device *pdev) > +{ > + struct brcmstb_thermal_priv *priv = > platform_get_drvdata(pdev); > + struct thermal_zone_device *thermal = priv->thermal; > + > + if (thermal) > + thermal_zone_of_sensor_unregister(&pdev->dev, priv- > >thermal); > + > + return 0; > +} > + > +static struct platform_driver brcmstb_thermal_driver = { > + .probe = brcmstb_thermal_probe, > + .remove = brcmstb_thermal_exit, > + .driver = { > + .name = DRV_NAME, > + .of_match_table = brcmstb_thermal_id_table, > + }, > +}; > +module_platform_driver(brcmstb_thermal_driver); > + > +MODULE_LICENSE("GPL v2"); > +MODULE_AUTHOR("Brian Norris"); > +MODULE_DESCRIPTION("Broadcom STB AVS TMON thermal driver"); ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver @ 2017-08-15 6:08 ` Zhang Rui 0 siblings, 0 replies; 44+ messages in thread From: Zhang Rui @ 2017-08-15 6:08 UTC (permalink / raw) To: linux-arm-kernel On Wed, 2017-08-09 at 15:02 -0700, Markus Mayer wrote: > From: Brian Norris <computersforpeace@gmail.com> > > The AVS TMON core provides temperature readings, a pair of > configurable > high- and low-temperature threshold interrupts, and an emergency > over-temperature chip reset. The driver utilizes the first two to > provide temperature readings and high-temperature notifications to > applications. The over-temperature reset is not exposed to > applications; this reset threshold is critical to the system and > should > be set with care within the bootloader. > > Applications may choose to utilize the notification mechanism, the > temperature reading mechanism (e.g., through polling), or both. > > Signed-off-by: Brian Norris <computersforpeace@gmail.com> > Signed-off-by: Doug Berger <opendmb@gmail.com> > Signed-off-by: Markus Mayer <mmayer@broadcom.com> > --- > ?drivers/thermal/Kconfig????????????????????|???2 +- > ?drivers/thermal/broadcom/Kconfig???????????|???7 + > ?drivers/thermal/broadcom/Makefile??????????|???1 + > ?drivers/thermal/broadcom/brcmstb_thermal.c | 386 > +++++++++++++++++++++++++++++ > ?4 files changed, 395 insertions(+), 1 deletion(-) > ?create mode 100644 drivers/thermal/broadcom/brcmstb_thermal.c > > diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig > index b5b5fac..396ad6b 100644 > --- a/drivers/thermal/Kconfig > +++ b/drivers/thermal/Kconfig > @@ -408,7 +408,7 @@ config MTK_THERMAL > ? ??controller present in Mediatek SoCs > ? > ?menu "Broadcom thermal drivers" > -depends on ARCH_BCM || COMPILE_TEST > +depends on ARCH_BCM || ARCH_BRCMSTB || COMPILE_TEST > ?source "drivers/thermal/broadcom/Kconfig" > ?endmenu > ? > diff --git a/drivers/thermal/broadcom/Kconfig > b/drivers/thermal/broadcom/Kconfig > index 42c098e..c106a15 100644 > --- a/drivers/thermal/broadcom/Kconfig > +++ b/drivers/thermal/broadcom/Kconfig > @@ -6,6 +6,13 @@ config BCM2835_THERMAL > ? help > ? ??Support for thermal sensors on Broadcom bcm2835 SoCs. > ? > +config BRCMSTB_THERMAL > + tristate "Broadcom STB AVS TMON thermal driver" > + depends on ARCH_BRCMSTB || COMPILE_TEST > + help > + ??Enable this driver if you have a Broadcom STB SoC and > would like > + ??thermal framework support. > + I don't understand why I got the following checkpatch warning WARNING: please write a paragraph that describes the config symbol fully #73: FILE: drivers/thermal/broadcom/Kconfig:9: +config BRCMSTB_THERMAL I didn't see this for other Kconfig changes. thanks, rui > ?config BCM_NS_THERMAL > ? tristate "Northstar thermal driver" > ? depends on ARCH_BCM_IPROC || COMPILE_TEST > diff --git a/drivers/thermal/broadcom/Makefile > b/drivers/thermal/broadcom/Makefile > index c6f62e4..fae10ec 100644 > --- a/drivers/thermal/broadcom/Makefile > +++ b/drivers/thermal/broadcom/Makefile > @@ -1,2 +1,3 @@ > ?obj-$(CONFIG_BCM2835_THERMAL) += bcm2835_thermal.o > +obj-$(CONFIG_BRCMSTB_THERMAL) += brcmstb_thermal.o > ?obj-$(CONFIG_BCM_NS_THERMAL) += ns-thermal.o > diff --git a/drivers/thermal/broadcom/brcmstb_thermal.c > b/drivers/thermal/broadcom/brcmstb_thermal.c > new file mode 100644 > index 0000000..87b8e7a > --- /dev/null > +++ b/drivers/thermal/broadcom/brcmstb_thermal.c > @@ -0,0 +1,386 @@ > +/* > + * Broadcom STB AVS TMON thermal sensor driver > + * > + * Copyright (c) 2015-2017 Broadcom > + * > + * This software is licensed under the terms of the GNU General > Public > + * License version 2, as published by the Free Software Foundation, > and > + * may be copied, distributed, and modified under those terms. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + */ > + > +#define DRV_NAME "brcmstb_thermal" > + > +#define pr_fmt(fmt) DRV_NAME ": " fmt > + > +#include <linux/bitops.h> > +#include <linux/device.h> > +#include <linux/err.h> > +#include <linux/io.h> > +#include <linux/irqreturn.h> > +#include <linux/interrupt.h> > +#include <linux/kernel.h> > +#include <linux/module.h> > +#include <linux/platform_device.h> > +#include <linux/of_device.h> > +#include <linux/thermal.h> > + > +#define AVS_TMON_STATUS 0x00 > + #define AVS_TMON_STATUS_valid_msk BIT(11) > + #define AVS_TMON_STATUS_data_msk GENMASK(10, 1) > + #define AVS_TMON_STATUS_data_shift 1 > + > +#define AVS_TMON_EN_OVERTEMP_RESET 0x04 > + #define AVS_TMON_EN_OVERTEMP_RESET_msk BIT(0) > + > +#define AVS_TMON_RESET_THRESH 0x08 > + #define AVS_TMON_RESET_THRESH_msk GENMASK(10, 1) > + #define AVS_TMON_RESET_THRESH_shift 1 > + > +#define AVS_TMON_INT_IDLE_TIME 0x10 > + > +#define AVS_TMON_EN_TEMP_INT_SRCS 0x14 > + #define AVS_TMON_EN_TEMP_INT_SRCS_high BIT(1) > + #define AVS_TMON_EN_TEMP_INT_SRCS_low BIT(0) > + > +#define AVS_TMON_INT_THRESH 0x18 > + #define AVS_TMON_INT_THRESH_high_msk GENMASK(26, 17) > + #define AVS_TMON_INT_THRESH_high_shift 17 > + #define AVS_TMON_INT_THRESH_low_msk GENMASK(10, 1) > + #define AVS_TMON_INT_THRESH_low_shift 1 > + > +#define AVS_TMON_TEMP_INT_CODE 0x1c > +#define AVS_TMON_TP_TEST_ENABLE 0x20 > + > +/* Default coefficients */ > +#define AVS_TMON_TEMP_SLOPE -487 > +#define AVS_TMON_TEMP_OFFSET 410040 > + > +/* HW related temperature constants */ > +#define AVS_TMON_TEMP_MAX 0x3ff > +#define AVS_TMON_TEMP_MIN -88161 > +#define AVS_TMON_TEMP_MASK AVS_TMON_TEMP_MAX > + > +enum avs_tmon_trip_type { > + TMON_TRIP_TYPE_LOW = 0, > + TMON_TRIP_TYPE_HIGH, > + TMON_TRIP_TYPE_RESET, > + TMON_TRIP_TYPE_MAX, > +}; > + > +struct avs_tmon_trip { > + /* HW bit to enable the trip */ > + u32 enable_offs; > + u32 enable_mask; > + > + /* HW field to read the trip temperature */ > + u32 reg_offs; > + u32 reg_msk; > + int reg_shift; > +}; > + > +static struct avs_tmon_trip avs_tmon_trips[] = { > + /* Trips when temperature is below threshold */ > + [TMON_TRIP_TYPE_LOW] = { > + .enable_offs = AVS_TMON_EN_TEMP_INT_SRCS, > + .enable_mask = AVS_TMON_EN_TEMP_INT_SRCS_low, > + .reg_offs = AVS_TMON_INT_THRESH, > + .reg_msk = AVS_TMON_INT_THRESH_low_msk, > + .reg_shift = AVS_TMON_INT_THRESH_low_shift, > + }, > + /* Trips when temperature is above threshold */ > + [TMON_TRIP_TYPE_HIGH] = { > + .enable_offs = AVS_TMON_EN_TEMP_INT_SRCS, > + .enable_mask = > AVS_TMON_EN_TEMP_INT_SRCS_high, > + .reg_offs = AVS_TMON_INT_THRESH, > + .reg_msk = AVS_TMON_INT_THRESH_high_msk, > + .reg_shift = AVS_TMON_INT_THRESH_high_shift, > + }, > + /* Automatically resets chip when above threshold */ > + [TMON_TRIP_TYPE_RESET] = { > + .enable_offs = AVS_TMON_EN_OVERTEMP_RESET, > + .enable_mask = > AVS_TMON_EN_OVERTEMP_RESET_msk, > + .reg_offs = AVS_TMON_RESET_THRESH, > + .reg_msk = AVS_TMON_RESET_THRESH_msk, > + .reg_shift = AVS_TMON_RESET_THRESH_shift, > + }, > +}; > + > +struct brcmstb_thermal_priv { > + void __iomem *tmon_base; > + struct device *dev; > + struct thermal_zone_device *thermal; > +}; > + > +static void avs_tmon_get_coeffs(struct thermal_zone_device *tz, int > *slope, > + int *offset) > +{ > + *slope = thermal_zone_get_slope(tz); > + *offset = thermal_zone_get_offset(tz); > +} > + > +/* Convert a HW code to a temperature reading (millidegree celsius) > */ > +static inline int avs_tmon_code_to_temp(struct thermal_zone_device > *tz, > + u32 code) > +{ > + const int val = code & AVS_TMON_TEMP_MASK; > + int slope, offset; > + > + avs_tmon_get_coeffs(tz, &slope, &offset); > + > + return slope * val + offset; > +} > + > +/* > + * Convert a temperature value (millidegree celsius) to a HW code > + * > + * @temp: temperature to convert > + * @low: if true, round toward the low side > + */ > +static inline u32 avs_tmon_temp_to_code(struct thermal_zone_device > *tz, > + int temp, bool low) > +{ > + int slope, offset; > + > + if (temp < AVS_TMON_TEMP_MIN) > + return AVS_TMON_TEMP_MAX; /* Maximum code value */ > + > + avs_tmon_get_coeffs(tz, &slope, &offset); > + > + if (temp >= offset) > + return 0; /* Minimum code value */ > + > + if (low) > + return (u32)(DIV_ROUND_UP(offset - temp, > abs(slope))); > + else > + return (u32)((offset - temp) / abs(slope)); > +} > + > +static int brcmstb_get_temp(void *data, int *temp) > +{ > + struct brcmstb_thermal_priv *priv = data; > + u32 val; > + long t; > + > + val = __raw_readl(priv->tmon_base + AVS_TMON_STATUS); > + > + if (!(val & AVS_TMON_STATUS_valid_msk)) { > + dev_err(priv->dev, "reading not valid\n"); > + return -EIO; > + } > + > + val = (val & AVS_TMON_STATUS_data_msk) >> > AVS_TMON_STATUS_data_shift; > + > + t = avs_tmon_code_to_temp(priv->thermal, val); > + if (t < 0) > + *temp = 0; > + else > + *temp = t; > + > + return 0; > +} > + > +static void avs_tmon_trip_enable(struct brcmstb_thermal_priv *priv, > + ?enum avs_tmon_trip_type type, int > en) > +{ > + struct avs_tmon_trip *trip = &avs_tmon_trips[type]; > + u32 val = __raw_readl(priv->tmon_base + trip->enable_offs); > + > + dev_dbg(priv->dev, "%sable trip, type %d\n", en ? "en" : > "dis", type); > + > + if (en) > + val |= trip->enable_mask; > + else > + val &= ~trip->enable_mask; > + > + __raw_writel(val, priv->tmon_base + trip->enable_offs); > +} > + > +static int avs_tmon_get_trip_temp(struct brcmstb_thermal_priv *priv, > + ??enum avs_tmon_trip_type type) > +{ > + struct avs_tmon_trip *trip = &avs_tmon_trips[type]; > + u32 val = __raw_readl(priv->tmon_base + trip->reg_offs); > + > + val &= trip->reg_msk; > + val >>= trip->reg_shift; > + > + return avs_tmon_code_to_temp(priv->thermal, val); > +} > + > +static void avs_tmon_set_trip_temp(struct brcmstb_thermal_priv > *priv, > + ???enum avs_tmon_trip_type type, > + ???int temp) > +{ > + struct avs_tmon_trip *trip = &avs_tmon_trips[type]; > + u32 val, orig; > + > + dev_dbg(priv->dev, "set temp %d to %d\n", type, temp); > + > + /* round toward low temp for the low interrupt */ > + val = avs_tmon_temp_to_code(priv->thermal, temp, > + ????type == TMON_TRIP_TYPE_LOW); > + > + val <<= trip->reg_shift; > + val &= trip->reg_msk; > + > + orig = __raw_readl(priv->tmon_base + trip->reg_offs); > + orig &= ~trip->reg_msk; > + orig |= val; > + __raw_writel(orig, priv->tmon_base + trip->reg_offs); > +} > + > +static int avs_tmon_get_intr_temp(struct brcmstb_thermal_priv *priv) > +{ > + u32 val; > + > + val = __raw_readl(priv->tmon_base + AVS_TMON_TEMP_INT_CODE); > + return avs_tmon_code_to_temp(priv->thermal, val); > +} > + > +static irqreturn_t brcmstb_tmon_irq_thread(int irq, void *data) > +{ > + struct brcmstb_thermal_priv *priv = data; > + int low, high, intr; > + > + low = avs_tmon_get_trip_temp(priv, TMON_TRIP_TYPE_LOW); > + high = avs_tmon_get_trip_temp(priv, TMON_TRIP_TYPE_HIGH); > + intr = avs_tmon_get_intr_temp(priv); > + > + dev_dbg(priv->dev, "low/intr/high: %d/%d/%d\n", > + low, intr, high); > + > + /* Disable high-temp until next threshold shift */ > + if (intr >= high) > + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_HIGH, 0); > + /* Disable low-temp until next threshold shift */ > + if (intr <= low) > + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_LOW, 0); > + > + /* > + ?* Notify using the interrupt temperature, in case the > temperature > + ?* changes before it can next be read out > + ?*/ > + thermal_zone_device_update(priv->thermal, intr); > + > + return IRQ_HANDLED; > +} > + > +static int brcmstb_set_trips(void *data, int low, int high) > +{ > + struct brcmstb_thermal_priv *priv = data; > + > + dev_dbg(priv->dev, "set trips %d <--> %d\n", low, high); > + > + if (low) { > + if (low > INT_MAX) > + low = INT_MAX; > + avs_tmon_set_trip_temp(priv, TMON_TRIP_TYPE_LOW, > low); > + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_LOW, 1); > + } else { > + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_LOW, 0); > + } > + > + if (high < ULONG_MAX) { > + if (high > INT_MAX) > + high = INT_MAX; > + avs_tmon_set_trip_temp(priv, TMON_TRIP_TYPE_HIGH, > high); > + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_HIGH, 1); > + } else { > + avs_tmon_trip_enable(priv, TMON_TRIP_TYPE_HIGH, 0); > + } > + > + return 0; > +} > + > +static struct thermal_zone_of_device_ops of_ops = { > + .get_temp = brcmstb_get_temp, > + .set_trips = brcmstb_set_trips, > +}; > + > +static const struct of_device_id brcmstb_thermal_id_table[] = { > + { .compatible = "brcm,avs-tmon" }, > + {}, > +}; > +MODULE_DEVICE_TABLE(of, brcmstb_thermal_id_table); > + > +static int brcmstb_thermal_probe(struct platform_device *pdev) > +{ > + struct thermal_zone_device *thermal; > + struct brcmstb_thermal_priv *priv; > + struct resource *res; > + int irq, ret; > + > + priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); > + if (!priv) > + return -ENOMEM; > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + priv->tmon_base = devm_ioremap_resource(&pdev->dev, res); > + if (IS_ERR(priv->tmon_base)) > + return PTR_ERR(priv->tmon_base); > + > + priv->dev = &pdev->dev; > + platform_set_drvdata(pdev, priv); > + > + thermal = thermal_zone_of_sensor_register(&pdev->dev, 0, > priv, &of_ops); > + if (IS_ERR(thermal)) { > + ret = PTR_ERR(thermal); > + dev_err(&pdev->dev, "could not register sensor: > %d\n", ret); > + return ret; > + } > + > + priv->thermal = thermal; > + > + irq = platform_get_irq(pdev, 0); > + if (irq < 0) { > + dev_err(&pdev->dev, "could not get IRQ\n"); > + ret = irq; > + goto err; > + } > + ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, > + brcmstb_tmon_irq_thread, > IRQF_ONESHOT, > + DRV_NAME, priv); > + if (ret < 0) { > + dev_err(&pdev->dev, "could not request IRQ: %d\n", > ret); > + goto err; > + } > + > + dev_info(&pdev->dev, "registered AVS TMON of-sensor > driver\n"); > + > + return 0; > + > +err: > + thermal_zone_of_sensor_unregister(&pdev->dev, thermal); > + return ret; > +} > + > +static int brcmstb_thermal_exit(struct platform_device *pdev) > +{ > + struct brcmstb_thermal_priv *priv = > platform_get_drvdata(pdev); > + struct thermal_zone_device *thermal = priv->thermal; > + > + if (thermal) > + thermal_zone_of_sensor_unregister(&pdev->dev, priv- > >thermal); > + > + return 0; > +} > + > +static struct platform_driver brcmstb_thermal_driver = { > + .probe = brcmstb_thermal_probe, > + .remove = brcmstb_thermal_exit, > + .driver = { > + .name = DRV_NAME, > + .of_match_table = brcmstb_thermal_id_table, > + }, > +}; > +module_platform_driver(brcmstb_thermal_driver); > + > +MODULE_LICENSE("GPL v2"); > +MODULE_AUTHOR("Brian Norris"); > +MODULE_DESCRIPTION("Broadcom STB AVS TMON thermal driver"); ^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver 2017-08-15 6:08 ` Zhang Rui (?) @ 2017-08-15 6:42 ` Rafał Miłecki -1 siblings, 0 replies; 44+ messages in thread From: Rafał Miłecki @ 2017-08-15 6:42 UTC (permalink / raw) To: Zhang Rui Cc: Markus Mayer, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List, Markus Mayer On 2017-08-15 08:08, Zhang Rui wrote: >> diff --git a/drivers/thermal/broadcom/Kconfig >> b/drivers/thermal/broadcom/Kconfig >> index 42c098e..c106a15 100644 >> --- a/drivers/thermal/broadcom/Kconfig >> +++ b/drivers/thermal/broadcom/Kconfig >> @@ -6,6 +6,13 @@ config BCM2835_THERMAL >> help >> Support for thermal sensors on Broadcom bcm2835 SoCs. >> >> +config BRCMSTB_THERMAL >> + tristate "Broadcom STB AVS TMON thermal driver" >> + depends on ARCH_BRCMSTB || COMPILE_TEST >> + help >> + Enable this driver if you have a Broadcom STB SoC and >> would like >> + thermal framework support. >> + > > I don't understand why I got the following checkpatch warning > > WARNING: please write a paragraph that describes the config symbol > fully > #73: FILE: drivers/thermal/broadcom/Kconfig:9: > +config BRCMSTB_THERMAL > > I didn't see this for other Kconfig changes. It's because your help message is only 2 lines long (instead of 3). Some (many?) maintainers aren't pedantic about that, a common sense should be applied ;) ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver @ 2017-08-15 6:42 ` Rafał Miłecki 0 siblings, 0 replies; 44+ messages in thread From: Rafał Miłecki @ 2017-08-15 6:42 UTC (permalink / raw) To: linux-arm-kernel On 2017-08-15 08:08, Zhang Rui wrote: >> diff --git a/drivers/thermal/broadcom/Kconfig >> b/drivers/thermal/broadcom/Kconfig >> index 42c098e..c106a15 100644 >> --- a/drivers/thermal/broadcom/Kconfig >> +++ b/drivers/thermal/broadcom/Kconfig >> @@ -6,6 +6,13 @@ config BCM2835_THERMAL >> ? help >> ? ??Support for thermal sensors on Broadcom bcm2835 SoCs. >> ? >> +config BRCMSTB_THERMAL >> + tristate "Broadcom STB AVS TMON thermal driver" >> + depends on ARCH_BRCMSTB || COMPILE_TEST >> + help >> + ??Enable this driver if you have a Broadcom STB SoC and >> would like >> + ??thermal framework support. >> + > > I don't understand why I got the following checkpatch warning > > WARNING: please write a paragraph that describes the config symbol > fully > #73: FILE: drivers/thermal/broadcom/Kconfig:9: > +config BRCMSTB_THERMAL > > I didn't see this for other Kconfig changes. It's because your help message is only 2 lines long (instead of 3). Some (many?) maintainers aren't pedantic about that, a common sense should be applied ;) ^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver @ 2017-08-15 6:42 ` Rafał Miłecki 0 siblings, 0 replies; 44+ messages in thread From: Rafał Miłecki @ 2017-08-15 6:42 UTC (permalink / raw) To: Zhang Rui Cc: Markus Mayer, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List On 2017-08-15 08:08, Zhang Rui wrote: >> diff --git a/drivers/thermal/broadcom/Kconfig >> b/drivers/thermal/broadcom/Kconfig >> index 42c098e..c106a15 100644 >> --- a/drivers/thermal/broadcom/Kconfig >> +++ b/drivers/thermal/broadcom/Kconfig >> @@ -6,6 +6,13 @@ config BCM2835_THERMAL >> help >> Support for thermal sensors on Broadcom bcm2835 SoCs. >> >> +config BRCMSTB_THERMAL >> + tristate "Broadcom STB AVS TMON thermal driver" >> + depends on ARCH_BRCMSTB || COMPILE_TEST >> + help >> + Enable this driver if you have a Broadcom STB SoC and >> would like >> + thermal framework support. >> + > > I don't understand why I got the following checkpatch warning > > WARNING: please write a paragraph that describes the config symbol > fully > #73: FILE: drivers/thermal/broadcom/Kconfig:9: > +config BRCMSTB_THERMAL > > I didn't see this for other Kconfig changes. It's because your help message is only 2 lines long (instead of 3). Some (many?) maintainers aren't pedantic about that, a common sense should be applied ;) ^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver 2017-08-15 6:42 ` Rafał Miłecki (?) @ 2017-08-15 6:48 ` Zhang Rui -1 siblings, 0 replies; 44+ messages in thread From: Zhang Rui @ 2017-08-15 6:48 UTC (permalink / raw) To: Rafał Miłecki Cc: Markus Mayer, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List, Markus Mayer On Tue, 2017-08-15 at 08:42 +0200, Rafał Miłecki wrote: > On 2017-08-15 08:08, Zhang Rui wrote: > > > > > > > > diff --git a/drivers/thermal/broadcom/Kconfig > > > b/drivers/thermal/broadcom/Kconfig > > > index 42c098e..c106a15 100644 > > > --- a/drivers/thermal/broadcom/Kconfig > > > +++ b/drivers/thermal/broadcom/Kconfig > > > @@ -6,6 +6,13 @@ config BCM2835_THERMAL > > > help > > > Support for thermal sensors on Broadcom bcm2835 SoCs. > > > > > > +config BRCMSTB_THERMAL > > > + tristate "Broadcom STB AVS TMON thermal driver" > > > + depends on ARCH_BRCMSTB || COMPILE_TEST > > > + help > > > + Enable this driver if you have a Broadcom STB SoC and > > > would like > > > + thermal framework support. > > > + > > I don't understand why I got the following checkpatch warning > > > > WARNING: please write a paragraph that describes the config symbol > > fully > > #73: FILE: drivers/thermal/broadcom/Kconfig:9: > > +config BRCMSTB_THERMAL > > > > I didn't see this for other Kconfig changes. > It's because your help message is only 2 lines long (instead of 3). > > Some (many?) maintainers aren't pedantic about that, a common sense > should > be applied ;) thanks for explaining. Patch 1 and 2 queued for next merge window. -rui ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver @ 2017-08-15 6:48 ` Zhang Rui 0 siblings, 0 replies; 44+ messages in thread From: Zhang Rui @ 2017-08-15 6:48 UTC (permalink / raw) To: linux-arm-kernel On Tue, 2017-08-15 at 08:42 +0200, Rafa? Mi?ecki wrote: > On 2017-08-15 08:08, Zhang Rui wrote: > > > > > > > > diff --git a/drivers/thermal/broadcom/Kconfig > > > b/drivers/thermal/broadcom/Kconfig > > > index 42c098e..c106a15 100644 > > > --- a/drivers/thermal/broadcom/Kconfig > > > +++ b/drivers/thermal/broadcom/Kconfig > > > @@ -6,6 +6,13 @@ config BCM2835_THERMAL > > > ? help > > > ? ??Support for thermal sensors on Broadcom bcm2835 SoCs. > > > ? > > > +config BRCMSTB_THERMAL > > > + tristate "Broadcom STB AVS TMON thermal driver" > > > + depends on ARCH_BRCMSTB || COMPILE_TEST > > > + help > > > + ??Enable this driver if you have a Broadcom STB SoC and > > > would like > > > + ??thermal framework support. > > > + > > I don't understand why I got the following checkpatch warning > > > > WARNING: please write a paragraph that describes the config symbol > > fully > > #73: FILE: drivers/thermal/broadcom/Kconfig:9: > > +config BRCMSTB_THERMAL > > > > I didn't see this for other Kconfig changes. > It's because your help message is only 2 lines long (instead of 3). > > Some (many?) maintainers aren't pedantic about that, a common sense? > should > be applied ;) thanks for explaining. Patch 1 and 2 queued for next merge window. -rui ^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver @ 2017-08-15 6:48 ` Zhang Rui 0 siblings, 0 replies; 44+ messages in thread From: Zhang Rui @ 2017-08-15 6:48 UTC (permalink / raw) To: Rafał Miłecki Cc: Markus Mayer, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List On Tue, 2017-08-15 at 08:42 +0200, Rafał Miłecki wrote: > On 2017-08-15 08:08, Zhang Rui wrote: > > > > > > > > diff --git a/drivers/thermal/broadcom/Kconfig > > > b/drivers/thermal/broadcom/Kconfig > > > index 42c098e..c106a15 100644 > > > --- a/drivers/thermal/broadcom/Kconfig > > > +++ b/drivers/thermal/broadcom/Kconfig > > > @@ -6,6 +6,13 @@ config BCM2835_THERMAL > > > help > > > Support for thermal sensors on Broadcom bcm2835 SoCs. > > > > > > +config BRCMSTB_THERMAL > > > + tristate "Broadcom STB AVS TMON thermal driver" > > > + depends on ARCH_BRCMSTB || COMPILE_TEST > > > + help > > > + Enable this driver if you have a Broadcom STB SoC and > > > would like > > > + thermal framework support. > > > + > > I don't understand why I got the following checkpatch warning > > > > WARNING: please write a paragraph that describes the config symbol > > fully > > #73: FILE: drivers/thermal/broadcom/Kconfig:9: > > +config BRCMSTB_THERMAL > > > > I didn't see this for other Kconfig changes. > It's because your help message is only 2 lines long (instead of 3). > > Some (many?) maintainers aren't pedantic about that, a common sense > should > be applied ;) thanks for explaining. Patch 1 and 2 queued for next merge window. -rui ^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver 2017-08-15 6:48 ` Zhang Rui @ 2017-09-24 21:11 ` Florian Fainelli -1 siblings, 0 replies; 44+ messages in thread From: Florian Fainelli @ 2017-09-24 21:11 UTC (permalink / raw) To: Zhang Rui, Rafał Miłecki Cc: Markus Mayer, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List, Markus Mayer Le 08/14/17 à 23:48, Zhang Rui a écrit : > On Tue, 2017-08-15 at 08:42 +0200, Rafał Miłecki wrote: >> On 2017-08-15 08:08, Zhang Rui wrote: >>> >>>> >>>> diff --git a/drivers/thermal/broadcom/Kconfig >>>> b/drivers/thermal/broadcom/Kconfig >>>> index 42c098e..c106a15 100644 >>>> --- a/drivers/thermal/broadcom/Kconfig >>>> +++ b/drivers/thermal/broadcom/Kconfig >>>> @@ -6,6 +6,13 @@ config BCM2835_THERMAL >>>> help >>>> Support for thermal sensors on Broadcom bcm2835 SoCs. >>>> >>>> +config BRCMSTB_THERMAL >>>> + tristate "Broadcom STB AVS TMON thermal driver" >>>> + depends on ARCH_BRCMSTB || COMPILE_TEST >>>> + help >>>> + Enable this driver if you have a Broadcom STB SoC and >>>> would like >>>> + thermal framework support. >>>> + >>> I don't understand why I got the following checkpatch warning >>> >>> WARNING: please write a paragraph that describes the config symbol >>> fully >>> #73: FILE: drivers/thermal/broadcom/Kconfig:9: >>> +config BRCMSTB_THERMAL >>> >>> I didn't see this for other Kconfig changes. >> It's because your help message is only 2 lines long (instead of 3). >> >> Some (many?) maintainers aren't pedantic about that, a common sense >> should >> be applied ;) > > thanks for explaining. > Patch 1 and 2 queued for next merge window. Humm, I don't see this driver in your latest 4.14 pull request to Linus, so what happened here exactly? Can we expect this driver to be submitted for 4.14 or we just happened to have missed this window now? -- Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver @ 2017-09-24 21:11 ` Florian Fainelli 0 siblings, 0 replies; 44+ messages in thread From: Florian Fainelli @ 2017-09-24 21:11 UTC (permalink / raw) To: linux-arm-kernel Le 08/14/17 ? 23:48, Zhang Rui a ?crit?: > On Tue, 2017-08-15 at 08:42 +0200, Rafa? Mi?ecki wrote: >> On 2017-08-15 08:08, Zhang Rui wrote: >>> >>>> >>>> diff --git a/drivers/thermal/broadcom/Kconfig >>>> b/drivers/thermal/broadcom/Kconfig >>>> index 42c098e..c106a15 100644 >>>> --- a/drivers/thermal/broadcom/Kconfig >>>> +++ b/drivers/thermal/broadcom/Kconfig >>>> @@ -6,6 +6,13 @@ config BCM2835_THERMAL >>>> ? help >>>> ? ??Support for thermal sensors on Broadcom bcm2835 SoCs. >>>> ? >>>> +config BRCMSTB_THERMAL >>>> + tristate "Broadcom STB AVS TMON thermal driver" >>>> + depends on ARCH_BRCMSTB || COMPILE_TEST >>>> + help >>>> + ??Enable this driver if you have a Broadcom STB SoC and >>>> would like >>>> + ??thermal framework support. >>>> + >>> I don't understand why I got the following checkpatch warning >>> >>> WARNING: please write a paragraph that describes the config symbol >>> fully >>> #73: FILE: drivers/thermal/broadcom/Kconfig:9: >>> +config BRCMSTB_THERMAL >>> >>> I didn't see this for other Kconfig changes. >> It's because your help message is only 2 lines long (instead of 3). >> >> Some (many?) maintainers aren't pedantic about that, a common sense? >> should >> be applied ;) > > thanks for explaining. > Patch 1 and 2 queued for next merge window. Humm, I don't see this driver in your latest 4.14 pull request to Linus, so what happened here exactly? Can we expect this driver to be submitted for 4.14 or we just happened to have missed this window now? -- Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* RE: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver 2017-09-24 21:11 ` Florian Fainelli (?) @ 2017-09-26 3:02 ` Zhang, Rui -1 siblings, 0 replies; 44+ messages in thread From: Zhang, Rui @ 2017-09-26 3:02 UTC (permalink / raw) To: Florian Fainelli, Rafal Milecki Cc: Markus Mayer, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List, Markus Mayer Hi, Florian, This patch set was dropped in the last minute because of this discussion https://patchwork.kernel.org/patch/9936325/ as I don’t want to rebase the patch before sending the pull request. I don’t think we can make it for 4.14. Eduardo will be back and pick the soc patches for 4.15. Thanks, rui -----Original Message----- From: Florian Fainelli [mailto:f.fainelli@gmail.com] Sent: Monday, September 25, 2017 5:11 AM To: Zhang, Rui <rui.zhang@intel.com>; Rafał Miłecki <rafal@milecki.pl> Cc: Markus Mayer <code@mmayer.net>; Eduardo Valentin <edubezval@gmail.com>; Rob Herring <robh+dt@kernel.org>; Mark Rutland <mark.rutland@arm.com>; Doug Berger <opendmb@gmail.com>; Brian Norris <computersforpeace@gmail.com>; Gregory Fong <gregory.0xf0@gmail.com>; Russell King <linux@armlinux.org.uk>; Catalin Marinas <catalin.marinas@arm.com>; Will Deacon <will.deacon@arm.com>; Arnd Bergmann <arnd@arndb.de>; Olof Johansson <olof@lixom.net>; Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com>; Power Management List <linux-pm@vger.kernel.org>; Device Tree List <devicetree@vger.kernel.org>; ARM Kernel List <linux-arm-kernel@lists.infradead.org>; Linux Kernel Mailing List <linux-kernel@vger.kernel.org>; Markus Mayer <mmayer@broadcom.com> Subject: Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver Importance: High Le 08/14/17 à 23:48, Zhang Rui a écrit : > On Tue, 2017-08-15 at 08:42 +0200, Rafał Miłecki wrote: >> On 2017-08-15 08:08, Zhang Rui wrote: >>> >>>> >>>> diff --git a/drivers/thermal/broadcom/Kconfig >>>> b/drivers/thermal/broadcom/Kconfig >>>> index 42c098e..c106a15 100644 >>>> --- a/drivers/thermal/broadcom/Kconfig >>>> +++ b/drivers/thermal/broadcom/Kconfig >>>> @@ -6,6 +6,13 @@ config BCM2835_THERMAL >>>> help >>>> Support for thermal sensors on Broadcom bcm2835 SoCs. >>>> >>>> +config BRCMSTB_THERMAL >>>> + tristate "Broadcom STB AVS TMON thermal driver" >>>> + depends on ARCH_BRCMSTB || COMPILE_TEST >>>> + help >>>> + Enable this driver if you have a Broadcom STB SoC and >>>> would like >>>> + thermal framework support. >>>> + >>> I don't understand why I got the following checkpatch warning >>> >>> WARNING: please write a paragraph that describes the config symbol >>> fully >>> #73: FILE: drivers/thermal/broadcom/Kconfig:9: >>> +config BRCMSTB_THERMAL >>> >>> I didn't see this for other Kconfig changes. >> It's because your help message is only 2 lines long (instead of 3). >> >> Some (many?) maintainers aren't pedantic about that, a common sense >> should be applied ;) > > thanks for explaining. > Patch 1 and 2 queued for next merge window. Humm, I don't see this driver in your latest 4.14 pull request to Linus, so what happened here exactly? Can we expect this driver to be submitted for 4.14 or we just happened to have missed this window now? -- Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver @ 2017-09-26 3:02 ` Zhang, Rui 0 siblings, 0 replies; 44+ messages in thread From: Zhang, Rui @ 2017-09-26 3:02 UTC (permalink / raw) To: linux-arm-kernel Hi, Florian, This patch set was dropped in the last minute because of this discussion https://patchwork.kernel.org/patch/9936325/ as I don?t want to rebase the patch before sending the pull request. I don?t think we can make it for 4.14. Eduardo will be back and pick the soc patches for 4.15. Thanks, rui -----Original Message----- From: Florian Fainelli [mailto:f.fainelli at gmail.com] Sent: Monday, September 25, 2017 5:11 AM To: Zhang, Rui <rui.zhang@intel.com>; Rafa? Mi?ecki <rafal@milecki.pl> Cc: Markus Mayer <code@mmayer.net>; Eduardo Valentin <edubezval@gmail.com>; Rob Herring <robh+dt@kernel.org>; Mark Rutland <mark.rutland@arm.com>; Doug Berger <opendmb@gmail.com>; Brian Norris <computersforpeace@gmail.com>; Gregory Fong <gregory.0xf0@gmail.com>; Russell King <linux@armlinux.org.uk>; Catalin Marinas <catalin.marinas@arm.com>; Will Deacon <will.deacon@arm.com>; Arnd Bergmann <arnd@arndb.de>; Olof Johansson <olof@lixom.net>; Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com>; Power Management List <linux-pm@vger.kernel.org>; Device Tree List <devicetree@vger.kernel.org>; ARM Kernel List <linux-arm-kernel@lists.infradead.org>; Linux Kernel Mailing List <linux-kernel@vger.kernel.org>; Markus Mayer <mmayer@broadcom.com> Subject: Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver Importance: High Le 08/14/17 ? 23:48, Zhang Rui a ?crit?: > On Tue, 2017-08-15 at 08:42 +0200, Rafa? Mi?ecki wrote: >> On 2017-08-15 08:08, Zhang Rui wrote: >>> >>>> >>>> diff --git a/drivers/thermal/broadcom/Kconfig >>>> b/drivers/thermal/broadcom/Kconfig >>>> index 42c098e..c106a15 100644 >>>> --- a/drivers/thermal/broadcom/Kconfig >>>> +++ b/drivers/thermal/broadcom/Kconfig >>>> @@ -6,6 +6,13 @@ config BCM2835_THERMAL >>>> ? help >>>> ? ??Support for thermal sensors on Broadcom bcm2835 SoCs. >>>> ? >>>> +config BRCMSTB_THERMAL >>>> + tristate "Broadcom STB AVS TMON thermal driver" >>>> + depends on ARCH_BRCMSTB || COMPILE_TEST >>>> + help >>>> + ??Enable this driver if you have a Broadcom STB SoC and >>>> would like >>>> + ??thermal framework support. >>>> + >>> I don't understand why I got the following checkpatch warning >>> >>> WARNING: please write a paragraph that describes the config symbol >>> fully >>> #73: FILE: drivers/thermal/broadcom/Kconfig:9: >>> +config BRCMSTB_THERMAL >>> >>> I didn't see this for other Kconfig changes. >> It's because your help message is only 2 lines long (instead of 3). >> >> Some (many?) maintainers aren't pedantic about that, a common sense >> should be applied ;) > > thanks for explaining. > Patch 1 and 2 queued for next merge window. Humm, I don't see this driver in your latest 4.14 pull request to Linus, so what happened here exactly? Can we expect this driver to be submitted for 4.14 or we just happened to have missed this window now? -- Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* RE: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver @ 2017-09-26 3:02 ` Zhang, Rui 0 siblings, 0 replies; 44+ messages in thread From: Zhang, Rui @ 2017-09-26 3:02 UTC (permalink / raw) To: Florian Fainelli, Rafal Milecki Cc: Mark Rutland, Device Tree List, Doug Berger, Markus Mayer, Arnd Bergmann, Power Management List, Catalin Marinas, Will Deacon, Russell King, Linux Kernel Mailing List, Eduardo Valentin, Olof Johansson, Rob Herring, Broadcom Kernel List, Gregory Fong, Markus Mayer, Brian Norris, ARM Kernel List Hi, Florian, This patch set was dropped in the last minute because of this discussion https://patchwork.kernel.org/patch/9936325/ as I don’t want to rebase the patch before sending the pull request. I don’t think we can make it for 4.14. Eduardo will be back and pick the soc patches for 4.15. Thanks, rui -----Original Message----- From: Florian Fainelli [mailto:f.fainelli@gmail.com] Sent: Monday, September 25, 2017 5:11 AM To: Zhang, Rui <rui.zhang@intel.com>; Rafał Miłecki <rafal@milecki.pl> Cc: Markus Mayer <code@mmayer.net>; Eduardo Valentin <edubezval@gmail.com>; Rob Herring <robh+dt@kernel.org>; Mark Rutland <mark.rutland@arm.com>; Doug Berger <opendmb@gmail.com>; Brian Norris <computersforpeace@gmail.com>; Gregory Fong <gregory.0xf0@gmail.com>; Russell King <linux@armlinux.org.uk>; Catalin Marinas <catalin.marinas@arm.com>; Will Deacon <will.deacon@arm.com>; Arnd Bergmann <arnd@arndb.de>; Olof Johansson <olof@lixom.net>; Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com>; Power Management List <linux-pm@vger.kernel.org>; Device Tree List <devicetree@vger.kernel.org>; ARM Kernel List <linux-arm-kernel@lists.infradead.org>; Linux Kernel Mailing List <linux-kernel@vger.kernel.org>; Markus Mayer <mmayer@broadcom.com> Subject: Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver Importance: High Le 08/14/17 à 23:48, Zhang Rui a écrit : > On Tue, 2017-08-15 at 08:42 +0200, Rafał Miłecki wrote: >> On 2017-08-15 08:08, Zhang Rui wrote: >>> >>>> >>>> diff --git a/drivers/thermal/broadcom/Kconfig >>>> b/drivers/thermal/broadcom/Kconfig >>>> index 42c098e..c106a15 100644 >>>> --- a/drivers/thermal/broadcom/Kconfig >>>> +++ b/drivers/thermal/broadcom/Kconfig >>>> @@ -6,6 +6,13 @@ config BCM2835_THERMAL >>>> help >>>> Support for thermal sensors on Broadcom bcm2835 SoCs. >>>> >>>> +config BRCMSTB_THERMAL >>>> + tristate "Broadcom STB AVS TMON thermal driver" >>>> + depends on ARCH_BRCMSTB || COMPILE_TEST >>>> + help >>>> + Enable this driver if you have a Broadcom STB SoC and >>>> would like >>>> + thermal framework support. >>>> + >>> I don't understand why I got the following checkpatch warning >>> >>> WARNING: please write a paragraph that describes the config symbol >>> fully >>> #73: FILE: drivers/thermal/broadcom/Kconfig:9: >>> +config BRCMSTB_THERMAL >>> >>> I didn't see this for other Kconfig changes. >> It's because your help message is only 2 lines long (instead of 3). >> >> Some (many?) maintainers aren't pedantic about that, a common sense >> should be applied ;) > > thanks for explaining. > Patch 1 and 2 queued for next merge window. Humm, I don't see this driver in your latest 4.14 pull request to Linus, so what happened here exactly? Can we expect this driver to be submitted for 4.14 or we just happened to have missed this window now? -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver 2017-09-26 3:02 ` Zhang, Rui @ 2017-09-26 4:13 ` Florian Fainelli -1 siblings, 0 replies; 44+ messages in thread From: Florian Fainelli @ 2017-09-26 4:13 UTC (permalink / raw) To: Zhang, Rui, Rafal Milecki Cc: Markus Mayer, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List, Markus Mayer On 09/25/2017 08:02 PM, Zhang, Rui wrote: > Hi, Florian, > > This patch set was dropped in the last minute because of this discussion > https://patchwork.kernel.org/patch/9936325/ > as I don’t want to rebase the patch before sending the pull request. Ah, you wanted to squash that patch into the initial submission? > > I don’t think we can make it for 4.14. > Eduardo will be back and pick the soc patches for 4.15. I assume you would want to get that particular patch squashed into a clean submission targeting 4.15 now, right? Thanks > > Thanks, > rui > > > > -----Original Message----- > From: Florian Fainelli [mailto:f.fainelli@gmail.com] > Sent: Monday, September 25, 2017 5:11 AM > To: Zhang, Rui <rui.zhang@intel.com>; Rafał Miłecki <rafal@milecki.pl> > Cc: Markus Mayer <code@mmayer.net>; Eduardo Valentin <edubezval@gmail.com>; Rob Herring <robh+dt@kernel.org>; Mark Rutland <mark.rutland@arm.com>; Doug Berger <opendmb@gmail.com>; Brian Norris <computersforpeace@gmail.com>; Gregory Fong <gregory.0xf0@gmail.com>; Russell King <linux@armlinux.org.uk>; Catalin Marinas <catalin.marinas@arm.com>; Will Deacon <will.deacon@arm.com>; Arnd Bergmann <arnd@arndb.de>; Olof Johansson <olof@lixom.net>; Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com>; Power Management List <linux-pm@vger.kernel.org>; Device Tree List <devicetree@vger.kernel.org>; ARM Kernel List <linux-arm-kernel@lists.infradead.org>; Linux Kernel Mailing List <linux-kernel@vger.kernel.org>; Markus Mayer <mmayer@broadcom.com> > Subject: Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver > Importance: High > > Le 08/14/17 à 23:48, Zhang Rui a écrit : >> On Tue, 2017-08-15 at 08:42 +0200, Rafał Miłecki wrote: >>> On 2017-08-15 08:08, Zhang Rui wrote: >>>> >>>>> >>>>> diff --git a/drivers/thermal/broadcom/Kconfig >>>>> b/drivers/thermal/broadcom/Kconfig >>>>> index 42c098e..c106a15 100644 >>>>> --- a/drivers/thermal/broadcom/Kconfig >>>>> +++ b/drivers/thermal/broadcom/Kconfig >>>>> @@ -6,6 +6,13 @@ config BCM2835_THERMAL >>>>> help >>>>> Support for thermal sensors on Broadcom bcm2835 SoCs. >>>>> >>>>> +config BRCMSTB_THERMAL >>>>> + tristate "Broadcom STB AVS TMON thermal driver" >>>>> + depends on ARCH_BRCMSTB || COMPILE_TEST >>>>> + help >>>>> + Enable this driver if you have a Broadcom STB SoC and >>>>> would like >>>>> + thermal framework support. >>>>> + >>>> I don't understand why I got the following checkpatch warning >>>> >>>> WARNING: please write a paragraph that describes the config symbol >>>> fully >>>> #73: FILE: drivers/thermal/broadcom/Kconfig:9: >>>> +config BRCMSTB_THERMAL >>>> >>>> I didn't see this for other Kconfig changes. >>> It's because your help message is only 2 lines long (instead of 3). >>> >>> Some (many?) maintainers aren't pedantic about that, a common sense >>> should be applied ;) >> >> thanks for explaining. >> Patch 1 and 2 queued for next merge window. > > Humm, I don't see this driver in your latest 4.14 pull request to Linus, so what happened here exactly? Can we expect this driver to be submitted for 4.14 or we just happened to have missed this window now? > -- > Florian > -- Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver @ 2017-09-26 4:13 ` Florian Fainelli 0 siblings, 0 replies; 44+ messages in thread From: Florian Fainelli @ 2017-09-26 4:13 UTC (permalink / raw) To: linux-arm-kernel On 09/25/2017 08:02 PM, Zhang, Rui wrote: > Hi, Florian, > > This patch set was dropped in the last minute because of this discussion > https://patchwork.kernel.org/patch/9936325/ > as I don?t want to rebase the patch before sending the pull request. Ah, you wanted to squash that patch into the initial submission? > > I don?t think we can make it for 4.14. > Eduardo will be back and pick the soc patches for 4.15. I assume you would want to get that particular patch squashed into a clean submission targeting 4.15 now, right? Thanks > > Thanks, > rui > > > > -----Original Message----- > From: Florian Fainelli [mailto:f.fainelli at gmail.com] > Sent: Monday, September 25, 2017 5:11 AM > To: Zhang, Rui <rui.zhang@intel.com>; Rafa? Mi?ecki <rafal@milecki.pl> > Cc: Markus Mayer <code@mmayer.net>; Eduardo Valentin <edubezval@gmail.com>; Rob Herring <robh+dt@kernel.org>; Mark Rutland <mark.rutland@arm.com>; Doug Berger <opendmb@gmail.com>; Brian Norris <computersforpeace@gmail.com>; Gregory Fong <gregory.0xf0@gmail.com>; Russell King <linux@armlinux.org.uk>; Catalin Marinas <catalin.marinas@arm.com>; Will Deacon <will.deacon@arm.com>; Arnd Bergmann <arnd@arndb.de>; Olof Johansson <olof@lixom.net>; Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com>; Power Management List <linux-pm@vger.kernel.org>; Device Tree List <devicetree@vger.kernel.org>; ARM Kernel List <linux-arm-kernel@lists.infradead.org>; Linux Kernel Mailing List <linux-kernel@vger.kernel.org>; Markus Mayer <mmayer@broadcom.com> > Subject: Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver > Importance: High > > Le 08/14/17 ? 23:48, Zhang Rui a ?crit?: >> On Tue, 2017-08-15 at 08:42 +0200, Rafa? Mi?ecki wrote: >>> On 2017-08-15 08:08, Zhang Rui wrote: >>>> >>>>> >>>>> diff --git a/drivers/thermal/broadcom/Kconfig >>>>> b/drivers/thermal/broadcom/Kconfig >>>>> index 42c098e..c106a15 100644 >>>>> --- a/drivers/thermal/broadcom/Kconfig >>>>> +++ b/drivers/thermal/broadcom/Kconfig >>>>> @@ -6,6 +6,13 @@ config BCM2835_THERMAL >>>>> ? help >>>>> ? ??Support for thermal sensors on Broadcom bcm2835 SoCs. >>>>> ? >>>>> +config BRCMSTB_THERMAL >>>>> + tristate "Broadcom STB AVS TMON thermal driver" >>>>> + depends on ARCH_BRCMSTB || COMPILE_TEST >>>>> + help >>>>> + ??Enable this driver if you have a Broadcom STB SoC and >>>>> would like >>>>> + ??thermal framework support. >>>>> + >>>> I don't understand why I got the following checkpatch warning >>>> >>>> WARNING: please write a paragraph that describes the config symbol >>>> fully >>>> #73: FILE: drivers/thermal/broadcom/Kconfig:9: >>>> +config BRCMSTB_THERMAL >>>> >>>> I didn't see this for other Kconfig changes. >>> It's because your help message is only 2 lines long (instead of 3). >>> >>> Some (many?) maintainers aren't pedantic about that, a common sense >>> should be applied ;) >> >> thanks for explaining. >> Patch 1 and 2 queued for next merge window. > > Humm, I don't see this driver in your latest 4.14 pull request to Linus, so what happened here exactly? Can we expect this driver to be submitted for 4.14 or we just happened to have missed this window now? > -- > Florian > -- Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* RE: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver 2017-09-26 4:13 ` Florian Fainelli @ 2017-09-26 6:17 ` Zhang, Rui -1 siblings, 0 replies; 44+ messages in thread From: Zhang, Rui @ 2017-09-26 6:17 UTC (permalink / raw) To: Florian Fainelli, Rafal Milecki Cc: Markus Mayer, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List, Markus Mayer Hi, Florian, > -----Original Message----- > From: Florian Fainelli [mailto:f.fainelli@gmail.com] > Sent: Tuesday, September 26, 2017 12:14 PM > To: Zhang, Rui <rui.zhang@intel.com>; Rafal Milecki <rafal@milecki.pl> > Cc: Markus Mayer <code@mmayer.net>; Eduardo Valentin > <edubezval@gmail.com>; Rob Herring <robh+dt@kernel.org>; Mark Rutland > <mark.rutland@arm.com>; Doug Berger <opendmb@gmail.com>; Brian > Norris <computersforpeace@gmail.com>; Gregory Fong > <gregory.0xf0@gmail.com>; Russell King <linux@armlinux.org.uk>; Catalin > Marinas <catalin.marinas@arm.com>; Will Deacon <will.deacon@arm.com>; > Arnd Bergmann <arnd@arndb.de>; Olof Johansson <olof@lixom.net>; > Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com>; Power > Management List <linux-pm@vger.kernel.org>; Device Tree List > <devicetree@vger.kernel.org>; ARM Kernel List <linux-arm- > kernel@lists.infradead.org>; Linux Kernel Mailing List <linux- > kernel@vger.kernel.org>; Markus Mayer <mmayer@broadcom.com> > Subject: Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver > Importance: High > > On 09/25/2017 08:02 PM, Zhang, Rui wrote: > > Hi, Florian, > > > > This patch set was dropped in the last minute because of this > > discussion https://patchwork.kernel.org/patch/9936325/ > > as I don’t want to rebase the patch before sending the pull request. > > Ah, you wanted to squash that patch into the initial submission? > > > > > I don’t think we can make it for 4.14. > > Eduardo will be back and pick the soc patches for 4.15. > > I assume you would want to get that particular patch squashed into a clean > submission targeting 4.15 now, right? > Yes. As the patch in this thread has not been in upstream yet, I'd prefer the fix/cleanup meld into the original patch before sending upstream. Thanks, Rui > Thanks > > > > > Thanks, > > rui > > > > > > > > -----Original Message----- > > From: Florian Fainelli [mailto:f.fainelli@gmail.com] > > Sent: Monday, September 25, 2017 5:11 AM > > To: Zhang, Rui <rui.zhang@intel.com>; Rafał Miłecki <rafal@milecki.pl> > > Cc: Markus Mayer <code@mmayer.net>; Eduardo Valentin > > <edubezval@gmail.com>; Rob Herring <robh+dt@kernel.org>; Mark > Rutland > > <mark.rutland@arm.com>; Doug Berger <opendmb@gmail.com>; Brian > Norris > > <computersforpeace@gmail.com>; Gregory Fong > <gregory.0xf0@gmail.com>; > > Russell King <linux@armlinux.org.uk>; Catalin Marinas > > <catalin.marinas@arm.com>; Will Deacon <will.deacon@arm.com>; Arnd > > Bergmann <arnd@arndb.de>; Olof Johansson <olof@lixom.net>; > Broadcom > > Kernel List <bcm-kernel-feedback-list@broadcom.com>; Power > Management > > List <linux-pm@vger.kernel.org>; Device Tree List > > <devicetree@vger.kernel.org>; ARM Kernel List > > <linux-arm-kernel@lists.infradead.org>; Linux Kernel Mailing List > > <linux-kernel@vger.kernel.org>; Markus Mayer <mmayer@broadcom.com> > > Subject: Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver > > Importance: High > > > > Le 08/14/17 à 23:48, Zhang Rui a écrit : > >> On Tue, 2017-08-15 at 08:42 +0200, Rafał Miłecki wrote: > >>> On 2017-08-15 08:08, Zhang Rui wrote: > >>>> > >>>>> > >>>>> diff --git a/drivers/thermal/broadcom/Kconfig > >>>>> b/drivers/thermal/broadcom/Kconfig > >>>>> index 42c098e..c106a15 100644 > >>>>> --- a/drivers/thermal/broadcom/Kconfig > >>>>> +++ b/drivers/thermal/broadcom/Kconfig > >>>>> @@ -6,6 +6,13 @@ config BCM2835_THERMAL > >>>>> help > >>>>> Support for thermal sensors on Broadcom bcm2835 SoCs. > >>>>> > >>>>> +config BRCMSTB_THERMAL > >>>>> + tristate "Broadcom STB AVS TMON thermal driver" > >>>>> + depends on ARCH_BRCMSTB || COMPILE_TEST > >>>>> + help > >>>>> + Enable this driver if you have a Broadcom STB SoC and > >>>>> would like > >>>>> + thermal framework support. > >>>>> + > >>>> I don't understand why I got the following checkpatch warning > >>>> > >>>> WARNING: please write a paragraph that describes the config symbol > >>>> fully > >>>> #73: FILE: drivers/thermal/broadcom/Kconfig:9: > >>>> +config BRCMSTB_THERMAL > >>>> > >>>> I didn't see this for other Kconfig changes. > >>> It's because your help message is only 2 lines long (instead of 3). > >>> > >>> Some (many?) maintainers aren't pedantic about that, a common sense > >>> should be applied ;) > >> > >> thanks for explaining. > >> Patch 1 and 2 queued for next merge window. > > > > Humm, I don't see this driver in your latest 4.14 pull request to Linus, so > what happened here exactly? Can we expect this driver to be submitted for > 4.14 or we just happened to have missed this window now? > > -- > > Florian > > > > -- > Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver @ 2017-09-26 6:17 ` Zhang, Rui 0 siblings, 0 replies; 44+ messages in thread From: Zhang, Rui @ 2017-09-26 6:17 UTC (permalink / raw) To: linux-arm-kernel Hi, Florian, > -----Original Message----- > From: Florian Fainelli [mailto:f.fainelli at gmail.com] > Sent: Tuesday, September 26, 2017 12:14 PM > To: Zhang, Rui <rui.zhang@intel.com>; Rafal Milecki <rafal@milecki.pl> > Cc: Markus Mayer <code@mmayer.net>; Eduardo Valentin > <edubezval@gmail.com>; Rob Herring <robh+dt@kernel.org>; Mark Rutland > <mark.rutland@arm.com>; Doug Berger <opendmb@gmail.com>; Brian > Norris <computersforpeace@gmail.com>; Gregory Fong > <gregory.0xf0@gmail.com>; Russell King <linux@armlinux.org.uk>; Catalin > Marinas <catalin.marinas@arm.com>; Will Deacon <will.deacon@arm.com>; > Arnd Bergmann <arnd@arndb.de>; Olof Johansson <olof@lixom.net>; > Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com>; Power > Management List <linux-pm@vger.kernel.org>; Device Tree List > <devicetree@vger.kernel.org>; ARM Kernel List <linux-arm- > kernel at lists.infradead.org>; Linux Kernel Mailing List <linux- > kernel at vger.kernel.org>; Markus Mayer <mmayer@broadcom.com> > Subject: Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver > Importance: High > > On 09/25/2017 08:02 PM, Zhang, Rui wrote: > > Hi, Florian, > > > > This patch set was dropped in the last minute because of this > > discussion https://patchwork.kernel.org/patch/9936325/ > > as I don?t want to rebase the patch before sending the pull request. > > Ah, you wanted to squash that patch into the initial submission? > > > > > I don?t think we can make it for 4.14. > > Eduardo will be back and pick the soc patches for 4.15. > > I assume you would want to get that particular patch squashed into a clean > submission targeting 4.15 now, right? > Yes. As the patch in this thread has not been in upstream yet, I'd prefer the fix/cleanup meld into the original patch before sending upstream. Thanks, Rui > Thanks > > > > > Thanks, > > rui > > > > > > > > -----Original Message----- > > From: Florian Fainelli [mailto:f.fainelli at gmail.com] > > Sent: Monday, September 25, 2017 5:11 AM > > To: Zhang, Rui <rui.zhang@intel.com>; Rafa? Mi?ecki <rafal@milecki.pl> > > Cc: Markus Mayer <code@mmayer.net>; Eduardo Valentin > > <edubezval@gmail.com>; Rob Herring <robh+dt@kernel.org>; Mark > Rutland > > <mark.rutland@arm.com>; Doug Berger <opendmb@gmail.com>; Brian > Norris > > <computersforpeace@gmail.com>; Gregory Fong > <gregory.0xf0@gmail.com>; > > Russell King <linux@armlinux.org.uk>; Catalin Marinas > > <catalin.marinas@arm.com>; Will Deacon <will.deacon@arm.com>; Arnd > > Bergmann <arnd@arndb.de>; Olof Johansson <olof@lixom.net>; > Broadcom > > Kernel List <bcm-kernel-feedback-list@broadcom.com>; Power > Management > > List <linux-pm@vger.kernel.org>; Device Tree List > > <devicetree@vger.kernel.org>; ARM Kernel List > > <linux-arm-kernel@lists.infradead.org>; Linux Kernel Mailing List > > <linux-kernel@vger.kernel.org>; Markus Mayer <mmayer@broadcom.com> > > Subject: Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver > > Importance: High > > > > Le 08/14/17 ? 23:48, Zhang Rui a ?crit?: > >> On Tue, 2017-08-15 at 08:42 +0200, Rafa? Mi?ecki wrote: > >>> On 2017-08-15 08:08, Zhang Rui wrote: > >>>> > >>>>> > >>>>> diff --git a/drivers/thermal/broadcom/Kconfig > >>>>> b/drivers/thermal/broadcom/Kconfig > >>>>> index 42c098e..c106a15 100644 > >>>>> --- a/drivers/thermal/broadcom/Kconfig > >>>>> +++ b/drivers/thermal/broadcom/Kconfig > >>>>> @@ -6,6 +6,13 @@ config BCM2835_THERMAL > >>>>> ? help > >>>>> ? ??Support for thermal sensors on Broadcom bcm2835 SoCs. > >>>>> > >>>>> +config BRCMSTB_THERMAL > >>>>> + tristate "Broadcom STB AVS TMON thermal driver" > >>>>> + depends on ARCH_BRCMSTB || COMPILE_TEST > >>>>> + help > >>>>> + ??Enable this driver if you have a Broadcom STB SoC and > >>>>> would like > >>>>> + ??thermal framework support. > >>>>> + > >>>> I don't understand why I got the following checkpatch warning > >>>> > >>>> WARNING: please write a paragraph that describes the config symbol > >>>> fully > >>>> #73: FILE: drivers/thermal/broadcom/Kconfig:9: > >>>> +config BRCMSTB_THERMAL > >>>> > >>>> I didn't see this for other Kconfig changes. > >>> It's because your help message is only 2 lines long (instead of 3). > >>> > >>> Some (many?) maintainers aren't pedantic about that, a common sense > >>> should be applied ;) > >> > >> thanks for explaining. > >> Patch 1 and 2 queued for next merge window. > > > > Humm, I don't see this driver in your latest 4.14 pull request to Linus, so > what happened here exactly? Can we expect this driver to be submitted for > 4.14 or we just happened to have missed this window now? > > -- > > Florian > > > > -- > Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver @ 2017-09-26 21:36 ` Markus Mayer 0 siblings, 0 replies; 44+ messages in thread From: Markus Mayer @ 2017-09-26 21:36 UTC (permalink / raw) To: Zhang, Rui Cc: Florian Fainelli, Rafal Milecki, Markus Mayer, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List, Markus Mayer On 25 September 2017 at 23:17, Zhang, Rui <rui.zhang@intel.com> wrote: > Hi, Florian, > >> -----Original Message----- >> From: Florian Fainelli [mailto:f.fainelli@gmail.com] >> Sent: Tuesday, September 26, 2017 12:14 PM >> To: Zhang, Rui <rui.zhang@intel.com>; Rafal Milecki <rafal@milecki.pl> >> Cc: Markus Mayer <code@mmayer.net>; Eduardo Valentin >> <edubezval@gmail.com>; Rob Herring <robh+dt@kernel.org>; Mark Rutland >> <mark.rutland@arm.com>; Doug Berger <opendmb@gmail.com>; Brian >> Norris <computersforpeace@gmail.com>; Gregory Fong >> <gregory.0xf0@gmail.com>; Russell King <linux@armlinux.org.uk>; Catalin >> Marinas <catalin.marinas@arm.com>; Will Deacon <will.deacon@arm.com>; >> Arnd Bergmann <arnd@arndb.de>; Olof Johansson <olof@lixom.net>; >> Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com>; Power >> Management List <linux-pm@vger.kernel.org>; Device Tree List >> <devicetree@vger.kernel.org>; ARM Kernel List <linux-arm- >> kernel@lists.infradead.org>; Linux Kernel Mailing List <linux- >> kernel@vger.kernel.org>; Markus Mayer <mmayer@broadcom.com> >> Subject: Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver >> Importance: High >> >> On 09/25/2017 08:02 PM, Zhang, Rui wrote: >> > Hi, Florian, >> > >> > This patch set was dropped in the last minute because of this >> > discussion https://patchwork.kernel.org/patch/9936325/ >> > as I don’t want to rebase the patch before sending the pull request. >> >> Ah, you wanted to squash that patch into the initial submission? >> >> > >> > I don’t think we can make it for 4.14. >> > Eduardo will be back and pick the soc patches for 4.15. >> >> I assume you would want to get that particular patch squashed into a clean >> submission targeting 4.15 now, right? >> > Yes. As the patch in this thread has not been in upstream yet, I'd prefer the > fix/cleanup meld into the original patch before sending upstream. I sent out v5 a few minutes ago. See https://lkml.org/lkml/2017/9/26/746. Regards, -Markus > Thanks, > Rui > >> Thanks >> >> > >> > Thanks, >> > rui >> > >> > >> > >> > -----Original Message----- >> > From: Florian Fainelli [mailto:f.fainelli@gmail.com] >> > Sent: Monday, September 25, 2017 5:11 AM >> > To: Zhang, Rui <rui.zhang@intel.com>; Rafał Miłecki <rafal@milecki.pl> >> > Cc: Markus Mayer <code@mmayer.net>; Eduardo Valentin >> > <edubezval@gmail.com>; Rob Herring <robh+dt@kernel.org>; Mark >> Rutland >> > <mark.rutland@arm.com>; Doug Berger <opendmb@gmail.com>; Brian >> Norris >> > <computersforpeace@gmail.com>; Gregory Fong >> <gregory.0xf0@gmail.com>; >> > Russell King <linux@armlinux.org.uk>; Catalin Marinas >> > <catalin.marinas@arm.com>; Will Deacon <will.deacon@arm.com>; Arnd >> > Bergmann <arnd@arndb.de>; Olof Johansson <olof@lixom.net>; >> Broadcom >> > Kernel List <bcm-kernel-feedback-list@broadcom.com>; Power >> Management >> > List <linux-pm@vger.kernel.org>; Device Tree List >> > <devicetree@vger.kernel.org>; ARM Kernel List >> > <linux-arm-kernel@lists.infradead.org>; Linux Kernel Mailing List >> > <linux-kernel@vger.kernel.org>; Markus Mayer <mmayer@broadcom.com> >> > Subject: Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver >> > Importance: High >> > >> > Le 08/14/17 à 23:48, Zhang Rui a écrit : >> >> On Tue, 2017-08-15 at 08:42 +0200, Rafał Miłecki wrote: >> >>> On 2017-08-15 08:08, Zhang Rui wrote: >> >>>> >> >>>>> >> >>>>> diff --git a/drivers/thermal/broadcom/Kconfig >> >>>>> b/drivers/thermal/broadcom/Kconfig >> >>>>> index 42c098e..c106a15 100644 >> >>>>> --- a/drivers/thermal/broadcom/Kconfig >> >>>>> +++ b/drivers/thermal/broadcom/Kconfig >> >>>>> @@ -6,6 +6,13 @@ config BCM2835_THERMAL >> >>>>> help >> >>>>> Support for thermal sensors on Broadcom bcm2835 SoCs. >> >>>>> >> >>>>> +config BRCMSTB_THERMAL >> >>>>> + tristate "Broadcom STB AVS TMON thermal driver" >> >>>>> + depends on ARCH_BRCMSTB || COMPILE_TEST >> >>>>> + help >> >>>>> + Enable this driver if you have a Broadcom STB SoC and >> >>>>> would like >> >>>>> + thermal framework support. >> >>>>> + >> >>>> I don't understand why I got the following checkpatch warning >> >>>> >> >>>> WARNING: please write a paragraph that describes the config symbol >> >>>> fully >> >>>> #73: FILE: drivers/thermal/broadcom/Kconfig:9: >> >>>> +config BRCMSTB_THERMAL >> >>>> >> >>>> I didn't see this for other Kconfig changes. >> >>> It's because your help message is only 2 lines long (instead of 3). >> >>> >> >>> Some (many?) maintainers aren't pedantic about that, a common sense >> >>> should be applied ;) >> >> >> >> thanks for explaining. >> >> Patch 1 and 2 queued for next merge window. >> > >> > Humm, I don't see this driver in your latest 4.14 pull request to Linus, so >> what happened here exactly? Can we expect this driver to be submitted for >> 4.14 or we just happened to have missed this window now? >> > -- >> > Florian >> > >> >> -- >> Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver @ 2017-09-26 21:36 ` Markus Mayer 0 siblings, 0 replies; 44+ messages in thread From: Markus Mayer @ 2017-09-26 21:36 UTC (permalink / raw) To: linux-arm-kernel On 25 September 2017 at 23:17, Zhang, Rui <rui.zhang@intel.com> wrote: > Hi, Florian, > >> -----Original Message----- >> From: Florian Fainelli [mailto:f.fainelli at gmail.com] >> Sent: Tuesday, September 26, 2017 12:14 PM >> To: Zhang, Rui <rui.zhang@intel.com>; Rafal Milecki <rafal@milecki.pl> >> Cc: Markus Mayer <code@mmayer.net>; Eduardo Valentin >> <edubezval@gmail.com>; Rob Herring <robh+dt@kernel.org>; Mark Rutland >> <mark.rutland@arm.com>; Doug Berger <opendmb@gmail.com>; Brian >> Norris <computersforpeace@gmail.com>; Gregory Fong >> <gregory.0xf0@gmail.com>; Russell King <linux@armlinux.org.uk>; Catalin >> Marinas <catalin.marinas@arm.com>; Will Deacon <will.deacon@arm.com>; >> Arnd Bergmann <arnd@arndb.de>; Olof Johansson <olof@lixom.net>; >> Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com>; Power >> Management List <linux-pm@vger.kernel.org>; Device Tree List >> <devicetree@vger.kernel.org>; ARM Kernel List <linux-arm- >> kernel at lists.infradead.org>; Linux Kernel Mailing List <linux- >> kernel at vger.kernel.org>; Markus Mayer <mmayer@broadcom.com> >> Subject: Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver >> Importance: High >> >> On 09/25/2017 08:02 PM, Zhang, Rui wrote: >> > Hi, Florian, >> > >> > This patch set was dropped in the last minute because of this >> > discussion https://patchwork.kernel.org/patch/9936325/ >> > as I don?t want to rebase the patch before sending the pull request. >> >> Ah, you wanted to squash that patch into the initial submission? >> >> > >> > I don?t think we can make it for 4.14. >> > Eduardo will be back and pick the soc patches for 4.15. >> >> I assume you would want to get that particular patch squashed into a clean >> submission targeting 4.15 now, right? >> > Yes. As the patch in this thread has not been in upstream yet, I'd prefer the > fix/cleanup meld into the original patch before sending upstream. I sent out v5 a few minutes ago. See https://lkml.org/lkml/2017/9/26/746. Regards, -Markus > Thanks, > Rui > >> Thanks >> >> > >> > Thanks, >> > rui >> > >> > >> > >> > -----Original Message----- >> > From: Florian Fainelli [mailto:f.fainelli at gmail.com] >> > Sent: Monday, September 25, 2017 5:11 AM >> > To: Zhang, Rui <rui.zhang@intel.com>; Rafa? Mi?ecki <rafal@milecki.pl> >> > Cc: Markus Mayer <code@mmayer.net>; Eduardo Valentin >> > <edubezval@gmail.com>; Rob Herring <robh+dt@kernel.org>; Mark >> Rutland >> > <mark.rutland@arm.com>; Doug Berger <opendmb@gmail.com>; Brian >> Norris >> > <computersforpeace@gmail.com>; Gregory Fong >> <gregory.0xf0@gmail.com>; >> > Russell King <linux@armlinux.org.uk>; Catalin Marinas >> > <catalin.marinas@arm.com>; Will Deacon <will.deacon@arm.com>; Arnd >> > Bergmann <arnd@arndb.de>; Olof Johansson <olof@lixom.net>; >> Broadcom >> > Kernel List <bcm-kernel-feedback-list@broadcom.com>; Power >> Management >> > List <linux-pm@vger.kernel.org>; Device Tree List >> > <devicetree@vger.kernel.org>; ARM Kernel List >> > <linux-arm-kernel@lists.infradead.org>; Linux Kernel Mailing List >> > <linux-kernel@vger.kernel.org>; Markus Mayer <mmayer@broadcom.com> >> > Subject: Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver >> > Importance: High >> > >> > Le 08/14/17 ? 23:48, Zhang Rui a ?crit : >> >> On Tue, 2017-08-15 at 08:42 +0200, Rafa? Mi?ecki wrote: >> >>> On 2017-08-15 08:08, Zhang Rui wrote: >> >>>> >> >>>>> >> >>>>> diff --git a/drivers/thermal/broadcom/Kconfig >> >>>>> b/drivers/thermal/broadcom/Kconfig >> >>>>> index 42c098e..c106a15 100644 >> >>>>> --- a/drivers/thermal/broadcom/Kconfig >> >>>>> +++ b/drivers/thermal/broadcom/Kconfig >> >>>>> @@ -6,6 +6,13 @@ config BCM2835_THERMAL >> >>>>> help >> >>>>> Support for thermal sensors on Broadcom bcm2835 SoCs. >> >>>>> >> >>>>> +config BRCMSTB_THERMAL >> >>>>> + tristate "Broadcom STB AVS TMON thermal driver" >> >>>>> + depends on ARCH_BRCMSTB || COMPILE_TEST >> >>>>> + help >> >>>>> + Enable this driver if you have a Broadcom STB SoC and >> >>>>> would like >> >>>>> + thermal framework support. >> >>>>> + >> >>>> I don't understand why I got the following checkpatch warning >> >>>> >> >>>> WARNING: please write a paragraph that describes the config symbol >> >>>> fully >> >>>> #73: FILE: drivers/thermal/broadcom/Kconfig:9: >> >>>> +config BRCMSTB_THERMAL >> >>>> >> >>>> I didn't see this for other Kconfig changes. >> >>> It's because your help message is only 2 lines long (instead of 3). >> >>> >> >>> Some (many?) maintainers aren't pedantic about that, a common sense >> >>> should be applied ;) >> >> >> >> thanks for explaining. >> >> Patch 1 and 2 queued for next merge window. >> > >> > Humm, I don't see this driver in your latest 4.14 pull request to Linus, so >> what happened here exactly? Can we expect this driver to be submitted for >> 4.14 or we just happened to have missed this window now? >> > -- >> > Florian >> > >> >> -- >> Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver @ 2017-09-26 21:36 ` Markus Mayer 0 siblings, 0 replies; 44+ messages in thread From: Markus Mayer @ 2017-09-26 21:36 UTC (permalink / raw) To: Zhang, Rui Cc: Florian Fainelli, Rafal Milecki, Markus Mayer, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List On 25 September 2017 at 23:17, Zhang, Rui <rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote: > Hi, Florian, > >> -----Original Message----- >> From: Florian Fainelli [mailto:f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org] >> Sent: Tuesday, September 26, 2017 12:14 PM >> To: Zhang, Rui <rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; Rafal Milecki <rafal-g1n6cQUeyibVItvQsEIGlw@public.gmane.org> >> Cc: Markus Mayer <code-7CzEARzsJhSsTnJN9+BGXg@public.gmane.org>; Eduardo Valentin >> <edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>; Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>; Mark Rutland >> <mark.rutland-5wv7dgnIgG8@public.gmane.org>; Doug Berger <opendmb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>; Brian >> Norris <computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>; Gregory Fong >> <gregory.0xf0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>; Russell King <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>; Catalin >> Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>; Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>; >> Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>; Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>; >> Broadcom Kernel List <bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>; Power >> Management List <linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>; Device Tree List >> <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>; ARM Kernel List <linux-arm- >> kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>; Linux Kernel Mailing List <linux- >> kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>; Markus Mayer <mmayer-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> >> Subject: Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver >> Importance: High >> >> On 09/25/2017 08:02 PM, Zhang, Rui wrote: >> > Hi, Florian, >> > >> > This patch set was dropped in the last minute because of this >> > discussion https://patchwork.kernel.org/patch/9936325/ >> > as I don’t want to rebase the patch before sending the pull request. >> >> Ah, you wanted to squash that patch into the initial submission? >> >> > >> > I don’t think we can make it for 4.14. >> > Eduardo will be back and pick the soc patches for 4.15. >> >> I assume you would want to get that particular patch squashed into a clean >> submission targeting 4.15 now, right? >> > Yes. As the patch in this thread has not been in upstream yet, I'd prefer the > fix/cleanup meld into the original patch before sending upstream. I sent out v5 a few minutes ago. See https://lkml.org/lkml/2017/9/26/746. Regards, -Markus > Thanks, > Rui > >> Thanks >> >> > >> > Thanks, >> > rui >> > >> > >> > >> > -----Original Message----- >> > From: Florian Fainelli [mailto:f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org] >> > Sent: Monday, September 25, 2017 5:11 AM >> > To: Zhang, Rui <rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; Rafał Miłecki <rafal@milecki.pl> >> > Cc: Markus Mayer <code-7CzEARzsJhSsTnJN9+BGXg@public.gmane.org>; Eduardo Valentin >> > <edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>; Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>; Mark >> Rutland >> > <mark.rutland-5wv7dgnIgG8@public.gmane.org>; Doug Berger <opendmb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>; Brian >> Norris >> > <computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>; Gregory Fong >> <gregory.0xf0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>; >> > Russell King <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>; Catalin Marinas >> > <catalin.marinas-5wv7dgnIgG8@public.gmane.org>; Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>; Arnd >> > Bergmann <arnd-r2nGTMty4D4@public.gmane.org>; Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>; >> Broadcom >> > Kernel List <bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>; Power >> Management >> > List <linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>; Device Tree List >> > <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>; ARM Kernel List >> > <linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>; Linux Kernel Mailing List >> > <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>; Markus Mayer <mmayer-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> >> > Subject: Re: [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver >> > Importance: High >> > >> > Le 08/14/17 à 23:48, Zhang Rui a écrit : >> >> On Tue, 2017-08-15 at 08:42 +0200, Rafał Miłecki wrote: >> >>> On 2017-08-15 08:08, Zhang Rui wrote: >> >>>> >> >>>>> >> >>>>> diff --git a/drivers/thermal/broadcom/Kconfig >> >>>>> b/drivers/thermal/broadcom/Kconfig >> >>>>> index 42c098e..c106a15 100644 >> >>>>> --- a/drivers/thermal/broadcom/Kconfig >> >>>>> +++ b/drivers/thermal/broadcom/Kconfig >> >>>>> @@ -6,6 +6,13 @@ config BCM2835_THERMAL >> >>>>> help >> >>>>> Support for thermal sensors on Broadcom bcm2835 SoCs. >> >>>>> >> >>>>> +config BRCMSTB_THERMAL >> >>>>> + tristate "Broadcom STB AVS TMON thermal driver" >> >>>>> + depends on ARCH_BRCMSTB || COMPILE_TEST >> >>>>> + help >> >>>>> + Enable this driver if you have a Broadcom STB SoC and >> >>>>> would like >> >>>>> + thermal framework support. >> >>>>> + >> >>>> I don't understand why I got the following checkpatch warning >> >>>> >> >>>> WARNING: please write a paragraph that describes the config symbol >> >>>> fully >> >>>> #73: FILE: drivers/thermal/broadcom/Kconfig:9: >> >>>> +config BRCMSTB_THERMAL >> >>>> >> >>>> I didn't see this for other Kconfig changes. >> >>> It's because your help message is only 2 lines long (instead of 3). >> >>> >> >>> Some (many?) maintainers aren't pedantic about that, a common sense >> >>> should be applied ;) >> >> >> >> thanks for explaining. >> >> Patch 1 and 2 queued for next merge window. >> > >> > Humm, I don't see this driver in your latest 4.14 pull request to Linus, so >> what happened here exactly? Can we expect this driver to be submitted for >> 4.14 or we just happened to have missed this window now? >> > -- >> > Florian >> > >> >> -- >> Florian -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 3/4] ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL 2017-08-09 22:02 ` Markus Mayer @ 2017-08-09 22:02 ` Markus Mayer -1 siblings, 0 replies; 44+ messages in thread From: Markus Mayer @ 2017-08-09 22:02 UTC (permalink / raw) To: Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Rafał Miłecki, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson Cc: Markus Mayer, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List From: Markus Mayer <mmayer@broadcom.com> Turn on CONFIG_BRCMSTB_THERMAL as module. Signed-off-by: Markus Mayer <mmayer@broadcom.com> --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 4d19c1b..230f7fa 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -455,6 +455,7 @@ CONFIG_SENSORS_NTC_THERMISTOR=m CONFIG_SENSORS_PWM_FAN=m CONFIG_SENSORS_INA2XX=m CONFIG_CPU_THERMAL=y +CONFIG_BRCMSTB_THERMAL=m CONFIG_ROCKCHIP_THERMAL=y CONFIG_RCAR_THERMAL=y CONFIG_ARMADA_THERMAL=y -- 2.7.4 ^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH v4 3/4] ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL @ 2017-08-09 22:02 ` Markus Mayer 0 siblings, 0 replies; 44+ messages in thread From: Markus Mayer @ 2017-08-09 22:02 UTC (permalink / raw) To: linux-arm-kernel From: Markus Mayer <mmayer@broadcom.com> Turn on CONFIG_BRCMSTB_THERMAL as module. Signed-off-by: Markus Mayer <mmayer@broadcom.com> --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 4d19c1b..230f7fa 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -455,6 +455,7 @@ CONFIG_SENSORS_NTC_THERMISTOR=m CONFIG_SENSORS_PWM_FAN=m CONFIG_SENSORS_INA2XX=m CONFIG_CPU_THERMAL=y +CONFIG_BRCMSTB_THERMAL=m CONFIG_ROCKCHIP_THERMAL=y CONFIG_RCAR_THERMAL=y CONFIG_ARMADA_THERMAL=y -- 2.7.4 ^ permalink raw reply related [flat|nested] 44+ messages in thread
* Re: [PATCH v4 3/4] ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL @ 2017-08-15 17:23 ` Florian Fainelli 0 siblings, 0 replies; 44+ messages in thread From: Florian Fainelli @ 2017-08-15 17:23 UTC (permalink / raw) To: Markus Mayer, Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Rafał Miłecki, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson Cc: Markus Mayer, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List On 08/09/2017 03:02 PM, Markus Mayer wrote: > From: Markus Mayer <mmayer@broadcom.com> > > Turn on CONFIG_BRCMSTB_THERMAL as module. > > Signed-off-by: Markus Mayer <mmayer@broadcom.com> Applied to defconfig/next, thanks! -- Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 3/4] ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL @ 2017-08-15 17:23 ` Florian Fainelli 0 siblings, 0 replies; 44+ messages in thread From: Florian Fainelli @ 2017-08-15 17:23 UTC (permalink / raw) To: linux-arm-kernel On 08/09/2017 03:02 PM, Markus Mayer wrote: > From: Markus Mayer <mmayer@broadcom.com> > > Turn on CONFIG_BRCMSTB_THERMAL as module. > > Signed-off-by: Markus Mayer <mmayer@broadcom.com> Applied to defconfig/next, thanks! -- Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH v4 3/4] ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL @ 2017-08-15 17:23 ` Florian Fainelli 0 siblings, 0 replies; 44+ messages in thread From: Florian Fainelli @ 2017-08-15 17:23 UTC (permalink / raw) To: Markus Mayer, Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Rafał Miłecki, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson Cc: Markus Mayer, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List On 08/09/2017 03:02 PM, Markus Mayer wrote: > From: Markus Mayer <mmayer-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> > > Turn on CONFIG_BRCMSTB_THERMAL as module. > > Signed-off-by: Markus Mayer <mmayer-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> Applied to defconfig/next, thanks! -- Florian -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 4/4] arm64: defconfig: add CONFIG_BRCMSTB_THERMAL 2017-08-09 22:02 ` Markus Mayer @ 2017-08-09 22:02 ` Markus Mayer -1 siblings, 0 replies; 44+ messages in thread From: Markus Mayer @ 2017-08-09 22:02 UTC (permalink / raw) To: Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Rafał Miłecki, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson Cc: Markus Mayer, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List From: Markus Mayer <mmayer@broadcom.com> Turn on CONFIG_BRCMSTB_THERMAL as module. Signed-off-by: Markus Mayer <mmayer@broadcom.com> --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 6c7d147..2449064 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -304,6 +304,7 @@ CONFIG_SENSORS_INA2XX=m CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y CONFIG_CPU_THERMAL=y CONFIG_THERMAL_EMULATION=y +CONFIG_BRCMSTB_THERMAL=m CONFIG_EXYNOS_THERMAL=y CONFIG_ROCKCHIP_THERMAL=m CONFIG_WATCHDOG=y -- 2.7.4 ^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH v4 4/4] arm64: defconfig: add CONFIG_BRCMSTB_THERMAL @ 2017-08-09 22:02 ` Markus Mayer 0 siblings, 0 replies; 44+ messages in thread From: Markus Mayer @ 2017-08-09 22:02 UTC (permalink / raw) To: linux-arm-kernel From: Markus Mayer <mmayer@broadcom.com> Turn on CONFIG_BRCMSTB_THERMAL as module. Signed-off-by: Markus Mayer <mmayer@broadcom.com> --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 6c7d147..2449064 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -304,6 +304,7 @@ CONFIG_SENSORS_INA2XX=m CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y CONFIG_CPU_THERMAL=y CONFIG_THERMAL_EMULATION=y +CONFIG_BRCMSTB_THERMAL=m CONFIG_EXYNOS_THERMAL=y CONFIG_ROCKCHIP_THERMAL=m CONFIG_WATCHDOG=y -- 2.7.4 ^ permalink raw reply related [flat|nested] 44+ messages in thread
* Re: [PATCH v4 4/4] arm64: defconfig: add CONFIG_BRCMSTB_THERMAL 2017-08-09 22:02 ` Markus Mayer @ 2017-08-15 17:24 ` Florian Fainelli -1 siblings, 0 replies; 44+ messages in thread From: Florian Fainelli @ 2017-08-15 17:24 UTC (permalink / raw) To: Markus Mayer, Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Rafał Miłecki, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson Cc: Markus Mayer, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List On 08/09/2017 03:02 PM, Markus Mayer wrote: > From: Markus Mayer <mmayer@broadcom.com> > > Turn on CONFIG_BRCMSTB_THERMAL as module. Applied to defconfig-arm64/next, thanks! -- Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 4/4] arm64: defconfig: add CONFIG_BRCMSTB_THERMAL @ 2017-08-15 17:24 ` Florian Fainelli 0 siblings, 0 replies; 44+ messages in thread From: Florian Fainelli @ 2017-08-15 17:24 UTC (permalink / raw) To: linux-arm-kernel On 08/09/2017 03:02 PM, Markus Mayer wrote: > From: Markus Mayer <mmayer@broadcom.com> > > Turn on CONFIG_BRCMSTB_THERMAL as module. Applied to defconfig-arm64/next, thanks! -- Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH v4 0/4] thermal: add brcmstb AVS TMON driver @ 2017-08-11 5:35 ` Zhang Rui 0 siblings, 0 replies; 44+ messages in thread From: Zhang Rui @ 2017-08-11 5:35 UTC (permalink / raw) To: Markus Mayer, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Rafał Miłecki, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson Cc: Markus Mayer, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List On Wed, 2017-08-09 at 15:02 -0700, Markus Mayer wrote: > From: Markus Mayer <mmayer@broadcom.com> > > This series adds the brcmstb AVS TMON driver. > > The driver was originally written by Brian Norris. > > This series is also available at > https://github.com/mmayer/linux/tree/brcmstb-thermal-4.13-v4. > > v1 of this series can be found at https://lkml.org/lkml/2017/6/5/921 > v2 of this series can be found at https://lkml.org/lkml/2017/7/21/585 > v3 of this series can be found at https://lkml.org/lkml/2017/7/31/710 > > Changes since v3: > - Rebased on v4.13-rc3 to resolve conflicts in the MAINTAINERS file > thanks, will apply this if we have ACK for patch 3 and 4. thanks, rui > Changes since v2: > - replaced calls to pr_debug() with calls to dev_dbg() [PATCH 2/4 > only] > - all other patches are unchanged from v2 > > Changes since v1: > - Fixed wording in binding document > - Fixed lincensing to consistently mention GPL v2 > - Use thermal_zone_get_slope() and thermal_zone_get_offset() > - Some minor clean-ups > > Brian Norris (2): > Documentation: devicetree: add binding for Broadcom STB AVS TMON > thermal: add brcmstb AVS TMON driver > > Markus Mayer (2): > ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL > arm64: defconfig: add CONFIG_BRCMSTB_THERMAL > > .../devicetree/bindings/thermal/brcm,avs-tmon.txt | 20 ++ > MAINTAINERS | 8 + > arch/arm/configs/multi_v7_defconfig | 1 + > arch/arm64/configs/defconfig | 1 + > drivers/thermal/Kconfig | 2 +- > drivers/thermal/broadcom/Kconfig | 7 + > drivers/thermal/broadcom/Makefile | 1 + > drivers/thermal/broadcom/brcmstb_thermal.c | 386 > +++++++++++++++++++++ > 8 files changed, 425 insertions(+), 1 deletion(-) > create mode 100644 > Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt > create mode 100644 drivers/thermal/broadcom/brcmstb_thermal.c > ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 0/4] thermal: add brcmstb AVS TMON driver @ 2017-08-11 5:35 ` Zhang Rui 0 siblings, 0 replies; 44+ messages in thread From: Zhang Rui @ 2017-08-11 5:35 UTC (permalink / raw) To: linux-arm-kernel On Wed, 2017-08-09 at 15:02 -0700, Markus Mayer wrote: > From: Markus Mayer <mmayer@broadcom.com> > > This series adds the brcmstb AVS TMON driver. > > The driver was originally written by Brian Norris. > > This series is also available at > https://github.com/mmayer/linux/tree/brcmstb-thermal-4.13-v4. > > v1 of this series can be found at https://lkml.org/lkml/2017/6/5/921 > v2 of this series can be found at https://lkml.org/lkml/2017/7/21/585 > v3 of this series can be found at https://lkml.org/lkml/2017/7/31/710 > > Changes since v3: > - Rebased on v4.13-rc3 to resolve conflicts in the MAINTAINERS file > thanks, will apply this if we have ACK for patch 3 and 4. thanks, rui > Changes since v2: > - replaced calls to pr_debug() with calls to dev_dbg() [PATCH 2/4 > only] > - all other patches are unchanged from v2 > > Changes since v1: > - Fixed wording in binding document > - Fixed lincensing to consistently mention GPL v2 > - Use thermal_zone_get_slope() and thermal_zone_get_offset() > - Some minor clean-ups > > Brian Norris (2): > ? Documentation: devicetree: add binding for Broadcom STB AVS TMON > ? thermal: add brcmstb AVS TMON driver > > Markus Mayer (2): > ? ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL > ? arm64: defconfig: add CONFIG_BRCMSTB_THERMAL > > ?.../devicetree/bindings/thermal/brcm,avs-tmon.txt??|??20 ++ > ?MAINTAINERS????????????????????????????????????????|???8 + > ?arch/arm/configs/multi_v7_defconfig????????????????|???1 + > ?arch/arm64/configs/defconfig???????????????????????|???1 + > ?drivers/thermal/Kconfig????????????????????????????|???2 +- > ?drivers/thermal/broadcom/Kconfig???????????????????|???7 + > ?drivers/thermal/broadcom/Makefile??????????????????|???1 + > ?drivers/thermal/broadcom/brcmstb_thermal.c?????????| 386 > +++++++++++++++++++++ > ?8 files changed, 425 insertions(+), 1 deletion(-) > ?create mode 100644 > Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt > ?create mode 100644 drivers/thermal/broadcom/brcmstb_thermal.c > ^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH v4 0/4] thermal: add brcmstb AVS TMON driver @ 2017-08-11 5:35 ` Zhang Rui 0 siblings, 0 replies; 44+ messages in thread From: Zhang Rui @ 2017-08-11 5:35 UTC (permalink / raw) To: Markus Mayer, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Florian Fainelli, Rafał Miłecki, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson Cc: Markus Mayer, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List On Wed, 2017-08-09 at 15:02 -0700, Markus Mayer wrote: > From: Markus Mayer <mmayer-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> > > This series adds the brcmstb AVS TMON driver. > > The driver was originally written by Brian Norris. > > This series is also available at > https://github.com/mmayer/linux/tree/brcmstb-thermal-4.13-v4. > > v1 of this series can be found at https://lkml.org/lkml/2017/6/5/921 > v2 of this series can be found at https://lkml.org/lkml/2017/7/21/585 > v3 of this series can be found at https://lkml.org/lkml/2017/7/31/710 > > Changes since v3: > - Rebased on v4.13-rc3 to resolve conflicts in the MAINTAINERS file > thanks, will apply this if we have ACK for patch 3 and 4. thanks, rui > Changes since v2: > - replaced calls to pr_debug() with calls to dev_dbg() [PATCH 2/4 > only] > - all other patches are unchanged from v2 > > Changes since v1: > - Fixed wording in binding document > - Fixed lincensing to consistently mention GPL v2 > - Use thermal_zone_get_slope() and thermal_zone_get_offset() > - Some minor clean-ups > > Brian Norris (2): > Documentation: devicetree: add binding for Broadcom STB AVS TMON > thermal: add brcmstb AVS TMON driver > > Markus Mayer (2): > ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL > arm64: defconfig: add CONFIG_BRCMSTB_THERMAL > > .../devicetree/bindings/thermal/brcm,avs-tmon.txt | 20 ++ > MAINTAINERS | 8 + > arch/arm/configs/multi_v7_defconfig | 1 + > arch/arm64/configs/defconfig | 1 + > drivers/thermal/Kconfig | 2 +- > drivers/thermal/broadcom/Kconfig | 7 + > drivers/thermal/broadcom/Makefile | 1 + > drivers/thermal/broadcom/brcmstb_thermal.c | 386 > +++++++++++++++++++++ > 8 files changed, 425 insertions(+), 1 deletion(-) > create mode 100644 > Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt > create mode 100644 drivers/thermal/broadcom/brcmstb_thermal.c > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH v4 0/4] thermal: add brcmstb AVS TMON driver @ 2017-08-13 4:57 ` Florian Fainelli 0 siblings, 0 replies; 44+ messages in thread From: Florian Fainelli @ 2017-08-13 4:57 UTC (permalink / raw) To: Zhang Rui, Markus Mayer, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Rafał Miłecki, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson Cc: Markus Mayer, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List On August 10, 2017 10:35:56 PM PDT, Zhang Rui <rui.zhang@intel.com> wrote: >On Wed, 2017-08-09 at 15:02 -0700, Markus Mayer wrote: >> From: Markus Mayer <mmayer@broadcom.com> >> >> This series adds the brcmstb AVS TMON driver. >> >> The driver was originally written by Brian Norris. >> >> This series is also available at >> https://github.com/mmayer/linux/tree/brcmstb-thermal-4.13-v4. >> >> v1 of this series can be found at https://lkml.org/lkml/2017/6/5/921 >> v2 of this series can be found at https://lkml.org/lkml/2017/7/21/585 >> v3 of this series can be found at https://lkml.org/lkml/2017/7/31/710 >> >> Changes since v3: >> - Rebased on v4.13-rc3 to resolve conflicts in the MAINTAINERS file >> >thanks, will apply this if we have ACK for patch 3 and 4. You can take patches 1-2 through your tree and I can take patches 3-4 thought the Broadcom ARM/ARM64 pull requests if that works for you, or FWIW: Acked-by: Florian Fainelli <f.fainelli@gmail.com> Thanks! -- Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH v4 0/4] thermal: add brcmstb AVS TMON driver @ 2017-08-13 4:57 ` Florian Fainelli 0 siblings, 0 replies; 44+ messages in thread From: Florian Fainelli @ 2017-08-13 4:57 UTC (permalink / raw) To: linux-arm-kernel On August 10, 2017 10:35:56 PM PDT, Zhang Rui <rui.zhang@intel.com> wrote: >On Wed, 2017-08-09 at 15:02 -0700, Markus Mayer wrote: >> From: Markus Mayer <mmayer@broadcom.com> >> >> This series adds the brcmstb AVS TMON driver. >> >> The driver was originally written by Brian Norris. >> >> This series is also available at >> https://github.com/mmayer/linux/tree/brcmstb-thermal-4.13-v4. >> >> v1 of this series can be found at https://lkml.org/lkml/2017/6/5/921 >> v2 of this series can be found at https://lkml.org/lkml/2017/7/21/585 >> v3 of this series can be found at https://lkml.org/lkml/2017/7/31/710 >> >> Changes since v3: >> - Rebased on v4.13-rc3 to resolve conflicts in the MAINTAINERS file >> >thanks, will apply this if we have ACK for patch 3 and 4. You can take patches 1-2 through your tree and I can take patches 3-4 thought the Broadcom ARM/ARM64 pull requests if that works for you, or FWIW: Acked-by: Florian Fainelli <f.fainelli@gmail.com> Thanks! -- Florian ^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH v4 0/4] thermal: add brcmstb AVS TMON driver @ 2017-08-13 4:57 ` Florian Fainelli 0 siblings, 0 replies; 44+ messages in thread From: Florian Fainelli @ 2017-08-13 4:57 UTC (permalink / raw) To: Zhang Rui, Markus Mayer, Eduardo Valentin, Rob Herring, Mark Rutland, Doug Berger, Brian Norris, Gregory Fong, Rafał Miłecki, Russell King, Catalin Marinas, Will Deacon, Arnd Bergmann, Olof Johansson Cc: Markus Mayer, Broadcom Kernel List, Power Management List, Device Tree List, ARM Kernel List, Linux Kernel Mailing List On August 10, 2017 10:35:56 PM PDT, Zhang Rui <rui.zhang@intel.com> wrote: >On Wed, 2017-08-09 at 15:02 -0700, Markus Mayer wrote: >> From: Markus Mayer <mmayer@broadcom.com> >> >> This series adds the brcmstb AVS TMON driver. >> >> The driver was originally written by Brian Norris. >> >> This series is also available at >> https://github.com/mmayer/linux/tree/brcmstb-thermal-4.13-v4. >> >> v1 of this series can be found at https://lkml.org/lkml/2017/6/5/921 >> v2 of this series can be found at https://lkml.org/lkml/2017/7/21/585 >> v3 of this series can be found at https://lkml.org/lkml/2017/7/31/710 >> >> Changes since v3: >> - Rebased on v4.13-rc3 to resolve conflicts in the MAINTAINERS file >> >thanks, will apply this if we have ACK for patch 3 and 4. You can take patches 1-2 through your tree and I can take patches 3-4 thought the Broadcom ARM/ARM64 pull requests if that works for you, or FWIW: Acked-by: Florian Fainelli <f.fainelli@gmail.com> Thanks! -- Florian -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 44+ messages in thread
end of thread, other threads:[~2017-09-26 21:37 UTC | newest] Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-08-09 22:02 [PATCH v4 0/4] thermal: add brcmstb AVS TMON driver Markus Mayer 2017-08-09 22:02 ` Markus Mayer 2017-08-09 22:02 ` [PATCH v4 1/4] Documentation: devicetree: add binding for Broadcom STB AVS TMON Markus Mayer 2017-08-09 22:02 ` Markus Mayer 2017-08-17 15:10 ` Rob Herring 2017-08-17 15:10 ` Rob Herring 2017-08-17 15:10 ` Rob Herring 2017-08-09 22:02 ` [PATCH v4 2/4] thermal: add brcmstb AVS TMON driver Markus Mayer 2017-08-09 22:02 ` Markus Mayer 2017-08-15 6:08 ` Zhang Rui 2017-08-15 6:08 ` Zhang Rui 2017-08-15 6:42 ` Rafał Miłecki 2017-08-15 6:42 ` Rafał Miłecki 2017-08-15 6:42 ` Rafał Miłecki 2017-08-15 6:48 ` Zhang Rui 2017-08-15 6:48 ` Zhang Rui 2017-08-15 6:48 ` Zhang Rui 2017-09-24 21:11 ` Florian Fainelli 2017-09-24 21:11 ` Florian Fainelli 2017-09-26 3:02 ` Zhang, Rui 2017-09-26 3:02 ` Zhang, Rui 2017-09-26 3:02 ` Zhang, Rui 2017-09-26 4:13 ` Florian Fainelli 2017-09-26 4:13 ` Florian Fainelli 2017-09-26 6:17 ` Zhang, Rui 2017-09-26 6:17 ` Zhang, Rui 2017-09-26 21:36 ` Markus Mayer 2017-09-26 21:36 ` Markus Mayer 2017-09-26 21:36 ` Markus Mayer 2017-08-09 22:02 ` [PATCH v4 3/4] ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL Markus Mayer 2017-08-09 22:02 ` Markus Mayer 2017-08-15 17:23 ` Florian Fainelli 2017-08-15 17:23 ` Florian Fainelli 2017-08-15 17:23 ` Florian Fainelli 2017-08-09 22:02 ` [PATCH v4 4/4] arm64: defconfig: " Markus Mayer 2017-08-09 22:02 ` Markus Mayer 2017-08-15 17:24 ` Florian Fainelli 2017-08-15 17:24 ` Florian Fainelli 2017-08-11 5:35 ` [PATCH v4 0/4] thermal: add brcmstb AVS TMON driver Zhang Rui 2017-08-11 5:35 ` Zhang Rui 2017-08-11 5:35 ` Zhang Rui 2017-08-13 4:57 ` Florian Fainelli 2017-08-13 4:57 ` Florian Fainelli 2017-08-13 4:57 ` Florian Fainelli
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.