diff options
author | Aleksandrs Vinarskis <alex.vinarskis@gmail.com> | 2023-12-21 21:51:42 +0300 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2024-02-23 17:58:00 +0300 |
commit | 1d8c51ed2ddcc4161e6496cf14fcd83921c50ec8 (patch) | |
tree | 7e2776dee4639015985b296f997c6bc9d0b2b587 /drivers/mfd/intel-lpss.c | |
parent | ac9538f6007e1c80f1b8a62db7ecc391b4d78ae5 (diff) | |
download | linux-1d8c51ed2ddcc4161e6496cf14fcd83921c50ec8.tar.xz |
mfd: intel-lpss: Introduce QUIRK_CLOCK_DIVIDER_UNITY for XPS 9530
Some devices (eg. Dell XPS 9530, 2023) due to a firmware bug have a
misconfigured clock divider, which should've been 1:1. This introduces
quirk which conditionally re-configures the clock divider to 1:1.
Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231221185142.9224-3-alex.vinarskis@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd/intel-lpss.c')
-rw-r--r-- | drivers/mfd/intel-lpss.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c index aafa0da5f8db..2a9018112dfc 100644 --- a/drivers/mfd/intel-lpss.c +++ b/drivers/mfd/intel-lpss.c @@ -300,6 +300,7 @@ static int intel_lpss_register_clock_divider(struct intel_lpss *lpss, { char name[32]; struct clk *tmp = *clk; + int ret; snprintf(name, sizeof(name), "%s-enable", devname); tmp = clk_register_gate(NULL, name, __clk_get_name(tmp), 0, @@ -316,6 +317,12 @@ static int intel_lpss_register_clock_divider(struct intel_lpss *lpss, return PTR_ERR(tmp); *clk = tmp; + if (lpss->info->quirks & QUIRK_CLOCK_DIVIDER_UNITY) { + ret = clk_set_rate(tmp, lpss->info->clk_rate); + if (ret) + return ret; + } + snprintf(name, sizeof(name), "%s-update", devname); tmp = clk_register_gate(NULL, name, __clk_get_name(tmp), CLK_SET_RATE_PARENT, lpss->priv, 31, 0, NULL); |