<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux-stable.git/drivers/thermal/mediatek, branch linux-6.10.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/atom?h=linux-6.10.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/atom?h=linux-6.10.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/'/>
<updated>2024-06-12T17:07:34+00:00</updated>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Return error in case of invalid efuse data</title>
<updated>2024-06-12T17:07:34+00:00</updated>
<author>
<name>Julien Panis</name>
<email>jpanis@baylibre.com</email>
</author>
<published>2024-06-04T16:46:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=72cacd06e47d86d89b0e7179fbc9eb3a0f39cd93'/>
<id>urn:sha1:72cacd06e47d86d89b0e7179fbc9eb3a0f39cd93</id>
<content type='text'>
This patch prevents from registering thermal entries and letting the
driver misbehave if efuse data is invalid. A device is not properly
calibrated if the golden temperature is zero.

Fixes: f5f633b18234 ("thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver")
Signed-off-by: Julien Panis &lt;jpanis@baylibre.com&gt;
Reviewed-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20240604-mtk-thermal-calib-check-v2-1-8f258254051d@baylibre.com
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Remove filtered mode for mt8188</title>
<updated>2024-06-04T17:40:51+00:00</updated>
<author>
<name>Julien Panis</name>
<email>jpanis@baylibre.com</email>
</author>
<published>2024-05-16T10:44:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=d9fef76e89498bf99cdb03f77b7091d7e95d7edd'/>
<id>urn:sha1:d9fef76e89498bf99cdb03f77b7091d7e95d7edd</id>
<content type='text'>
Filtered mode is not supported on mt8188 SoC and is the source of bad
results. Move to immediate mode which provides good temperatures.

Fixes: f4745f546e60 ("thermal/drivers/mediatek/lvts_thermal: Add MT8188 support")
Reviewed-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Julien Panis &lt;jpanis@baylibre.com&gt;
Link: https://lore.kernel.org/r/20240516-mtk-thermal-mt8188-mode-fix-v2-1-40a317442c62@baylibre.com
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Fix wrong lvts_ctrl index</title>
<updated>2024-05-06T08:33:26+00:00</updated>
<author>
<name>Julien Panis</name>
<email>jpanis@baylibre.com</email>
</author>
<published>2024-05-03T15:35:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=b66c079aabdff3954e93fdd7f52bd8f9ad6482c7'/>
<id>urn:sha1:b66c079aabdff3954e93fdd7f52bd8f9ad6482c7</id>
<content type='text'>
In 'lvts_should_update_thresh()' and 'lvts_ctrl_start()' functions,
the parameter passed to 'lvts_for_each_valid_sensor()' macro is always
'lvts_ctrl-&gt;lvts_data-&gt;lvts_ctrl'. In other words, the array index 0
is systematically passed as 'struct lvts_ctrl_data' type item, even
when another item should be consumed instead.

Hence, the 'valid_sensor_mask' value which is selected can be wrong
because unrelated to the 'struct lvts_ctrl_data' type item that should
be used. Hence, some thermal zone can be registered for a sensor 'i'
that does not actually exist. Because of the invalid address used
as 'lvts_sensor[i].msr', this situation ends up with a crash in
'lvts_get_temp()' function, where this 'msr' pointer is passed to
'readl_poll_timeout()' function. The following message is output:
"Unable to handle kernel NULL pointer dereference at virtual
address &lt;msr&gt;", with &lt;msr&gt; = 0.

This patch fixes the issue.

Fixes: 11e6f4c31447 ("thermal/drivers/mediatek/lvts_thermal: Allow early empty sensor slots")
Signed-off-by: Julien Panis &lt;jpanis@baylibre.com&gt;
Reviewed-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20240503-mtk-thermal-lvts-ctrl-idx-fix-v1-2-f605c50ca117@baylibre.com
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Remove unused members from struct lvts_ctrl_data</title>
<updated>2024-05-06T08:33:26+00:00</updated>
<author>
<name>Julien Panis</name>
<email>jpanis@baylibre.com</email>
</author>
<published>2024-05-03T15:35:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=e2d2266a2ac1da67a74c855c24ed3acb54a1e410'/>
<id>urn:sha1:e2d2266a2ac1da67a74c855c24ed3acb54a1e410</id>
<content type='text'>
In struct lvts_ctrl_data, num_lvts_sensor and cal_offset[] are not used.

Signed-off-by: Julien Panis &lt;jpanis@baylibre.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20240503-mtk-thermal-lvts-ctrl-idx-fix-v1-1-f605c50ca117@baylibre.com
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Check NULL ptr on lvts_data</title>
<updated>2024-05-02T13:56:41+00:00</updated>
<author>
<name>Julien Panis</name>
<email>jpanis@baylibre.com</email>
</author>
<published>2024-05-02T13:46:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=a1191a77351e25ddf091bb1a231cae12ee598b5d'/>
<id>urn:sha1:a1191a77351e25ddf091bb1a231cae12ee598b5d</id>
<content type='text'>
Verify that lvts_data is not NULL before using it.

Signed-off-by: Julien Panis &lt;jpanis@baylibre.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20240502-mtk-thermal-lvts-data-v1-1-65f1b0bfad37@baylibre.com
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Add MT8188 support</title>
<updated>2024-04-23T10:40:30+00:00</updated>
<author>
<name>Nicolas Pitre</name>
<email>npitre@baylibre.com</email>
</author>
<published>2024-04-02T03:25:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=f4745f546e6077e3ed2bab90e931154519e96ae0'/>
<id>urn:sha1:f4745f546e6077e3ed2bab90e931154519e96ae0</id>
<content type='text'>
Various values extracted from the vendor's kernel driver.

Signed-off-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20240402032729.2736685-15-nico@fluxnic.net
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Allow early empty sensor slots</title>
<updated>2024-04-23T10:40:30+00:00</updated>
<author>
<name>Nicolas Pitre</name>
<email>npitre@baylibre.com</email>
</author>
<published>2024-04-02T03:25:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=11e6f4c3144743b2b2c26a5cd58ae3696379b3ab'/>
<id>urn:sha1:11e6f4c3144743b2b2c26a5cd58ae3696379b3ab</id>
<content type='text'>
Some systems don't always populate sensor controller slots starting
at slot 0. Use a bitmap instead of a count to indicate valid sensor
slots. Also create a pretty iterator for that.

About that iterator: it causes checkpatch to complain with "ERROR:
Macros with multiple statements should be enclosed in a do - while
loop". However this is not possible here. And many similar iterators
do exist using the same form in the tree already.

Signed-off-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20240402032729.2736685-12-nico@fluxnic.net
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Provision for gt variable location</title>
<updated>2024-04-23T10:40:30+00:00</updated>
<author>
<name>Nicolas Pitre</name>
<email>npitre@baylibre.com</email>
</author>
<published>2024-04-02T03:25:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=684cbb49f9ceed6be0f33dac9d62089e7cd1c032'/>
<id>urn:sha1:684cbb49f9ceed6be0f33dac9d62089e7cd1c032</id>
<content type='text'>
The golden temperature calibration value in nvram is not always the
3rd byte. A future commit will prove this assumption wrong.

Signed-off-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20240402032729.2736685-11-nico@fluxnic.net
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Add MT8186 support</title>
<updated>2024-04-23T10:40:30+00:00</updated>
<author>
<name>Nicolas Pitre</name>
<email>npitre@baylibre.com</email>
</author>
<published>2024-04-02T03:25:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=a4c1ab2f4c6c94edfc6481edf37e141079e24f1d'/>
<id>urn:sha1:a4c1ab2f4c6c94edfc6481edf37e141079e24f1d</id>
<content type='text'>
Various values extracted from the vendor's kernel driver.

Signed-off-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20240402032729.2736685-9-nico@fluxnic.net
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Guard against efuse data buffer overflow</title>
<updated>2024-04-23T10:40:29+00:00</updated>
<author>
<name>Nicolas Pitre</name>
<email>npitre@baylibre.com</email>
</author>
<published>2024-04-02T03:25:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=2cc0b1a2169b0f4af83cc5a52a1693c8ab2e2f1d'/>
<id>urn:sha1:2cc0b1a2169b0f4af83cc5a52a1693c8ab2e2f1d</id>
<content type='text'>
We don't want to silently fetch garbage past the actual buffer.

Signed-off-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20240402032729.2736685-6-nico@fluxnic.net
</content>
</entry>
</feed>
