Re: [PATCH v1 2/2] mfd: intel-lpss: Introduce QUIRK_CLOCK_DIVIDER_UNITY for XPS 9530

From: Andy Shevchenko
Date: Wed Dec 20 2023 - 10:31:12 EST


On Wed, Dec 20, 2023 at 08:31:48AM +0100, Aleksandrs Vinarskis wrote:
> 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.

(Btw, do you use --histogram when preparing patches? Use it in v2.)

...

> + }, { /* Dell XPS 9530 (2023) */
> + PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, 0x51fb, 0x1028, 0x0beb),
> + .driver_data = (kernel_ulong_t)&quirk_skip_clock_divider,
> },

Should be

}, { /* Dell XPS 9530 (2023) */
PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, 0x51fb, 0x1028, 0x0beb),
.driver_data = QUIRK_CLOCK_DIVIDER_UNITY,
},

...

> #define QUIRK_IGNORE_RESOURCE_CONFLICTS BIT(0)
> +#define QUIRK_CLOCK_DIVIDER_UNITY BIT(1)

Each quirk should be documented, see, for example,
https://elixir.bootlin.com/linux/latest/source/include/linux/gpio/consumer.h#L593

--
With Best Regards,
Andy Shevchenko