Skip to content

Commit

Permalink
Merge tag 'mtk-soc-fixes-for-v6.9' of https://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/mediatek/linux into for-next

MediaTek driver fixes for v6.9

This fixes the MediaTek SVS driver to look for the right thermal zone
names, and adds a missing Kconfig dependency for mtk-socinfo.
  • Loading branch information
Arnd Bergmann committed Apr 26, 2024
2 parents 14672a9 + ab6cd6b commit daa1bd4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions drivers/soc/mediatek/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ config MTK_SOCINFO
tristate "MediaTek SoC Information"
default y
depends on NVMEM_MTK_EFUSE
select SOC_BUS
help
The MediaTek SoC Information (mtk-socinfo) driver provides
information about the SoC to the userspace including the
Expand Down
7 changes: 5 additions & 2 deletions drivers/soc/mediatek/mtk-svs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1768,6 +1768,7 @@ static int svs_bank_resource_setup(struct svs_platform *svsp)
const struct svs_bank_pdata *bdata;
struct svs_bank *svsb;
struct dev_pm_opp *opp;
char tz_name_buf[20];
unsigned long freq;
int count, ret;
u32 idx, i;
Expand Down Expand Up @@ -1819,10 +1820,12 @@ static int svs_bank_resource_setup(struct svs_platform *svsp)
}

if (!IS_ERR_OR_NULL(bdata->tzone_name)) {
svsb->tzd = thermal_zone_get_zone_by_name(bdata->tzone_name);
snprintf(tz_name_buf, ARRAY_SIZE(tz_name_buf),
"%s-thermal", bdata->tzone_name);
svsb->tzd = thermal_zone_get_zone_by_name(tz_name_buf);
if (IS_ERR(svsb->tzd)) {
dev_err(svsb->dev, "cannot get \"%s\" thermal zone\n",
bdata->tzone_name);
tz_name_buf);
return PTR_ERR(svsb->tzd);
}
}
Expand Down

0 comments on commit daa1bd4

Please sign in to comment.