[PATCH 3/5] ath10k: add thermal cooling device support
Kalle Valo
kvalo at qca.qualcomm.com
Mon Dec 15 23:45:32 PST 2014
A heads up for the backports project:
Rajkumar Manoharan <rmanohar at qti.qualcomm.com> writes:
> Thermal cooling device support is added to control the temperature
> by throttling the data transmission for the given duration. Throttling
> is done using hw MAC quiet time setting. Period, duration and offset
> from TBTT can be set up to quiet the MAC transmits for the required duty
> cycle (% of quiet duration). The thermal device allows user to configure
> duty cycle.
>
> The quiet params are derived as follows.
> period = max(25TU, beacon interval / number of bss)
> duration = period * duty cycle / 100
>
> Quiet mode can be disabled by setting the duty cycle to 0. The cooling
> device can be found under /sys/class/thermal/cooling_deviceX/.
> Corresponding soft link to this device can be found under phy folder.
>
> /sys/class/ieee80211/phy*/device/cooling_device.
>
> To set duty cycle as 40%,
>
> echo 40 >/sys/class/ieee80211/phy*/device/cooling_device/cur_state
>
> Signed-off-by: Rajkumar Manoharan <rmanohar at qti.qualcomm.com>
[...]
> +int ath10k_thermal_register(struct ath10k *ar)
> +{
> + struct thermal_cooling_device *cdev;
> + int ret;
> +
> + cdev = thermal_cooling_device_register("ath10k_thermal", ar,
> + &ath10k_thermal_ops);
> +
> + if (IS_ERR(cdev)) {
> + ath10k_err(ar, "failed to setup thermal device result: %ld\n",
> + PTR_ERR(cdev));
> + return -EINVAL;
> + }
Will this break the backports build? We have the below in Makefile, is
it enough or what's the best way to handle this?
+ath10k_core-$(CONFIG_THERMAL) += thermal.o
--
Kalle Valo
More information about the ath10k
mailing list