Re: [PATCH v2 2/3] wifi: iwlwifi: dt: add Device Tree BIOS configuration infrastructure
From: Krzysztof Kozlowski
Date: Tue May 05 2026 - 05:22:34 EST
On Mon, May 04, 2026 at 12:53:26PM +0300, Avinash Bhatt wrote:
> +
> +/*
> + * Mapping from DSM function index to Device Tree property name.
> + * Returns the DT property name for a given DSM function, or NULL if the
> + * function has no Device Tree representation.
> + */
> +static const char *dsm_func_to_prop_name(enum iwl_dsm_funcs func)
> +{
> + switch (func) {
> + case DSM_FUNC_DISABLE_SRD: return IWL_DT_PROP_SRD;
> + case DSM_FUNC_ENABLE_6E: return IWL_DT_PROP_6E_UHB;
> + case DSM_FUNC_REGULATORY_CONFIG: return IWL_DT_PROP_REG_SPECIAL;
> + case DSM_FUNC_ACTIVATE_CHANNEL: return IWL_DT_PROP_ACTIVATE_CH;
> + case DSM_FUNC_FORCE_DISABLE_CHANNELS:
> + return IWL_DT_PROP_FORCE_DISABLE_CH;
> + case DSM_FUNC_ENABLE_11BE: return IWL_DT_PROP_11BE;
> + default: return NULL;
Pointless function and only making DT ABI checks difficult. Drop.
Don't invent API wrappers or other HAL over simple calls to OF or device
API.
Drop also ALL defines and use OF API like EVERY other driver. This is
not a special place.
Best regards,
Krzysztof