Hi, On Mon, Feb 17, 2025 at 9:49 AM Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx> wrote: > > Currently CONFIG_PWM is a bool but I intend to change it to tristate. If > CONFIG_PWM=m in the configuration, the cpp symbol CONFIG_PWM isn't > defined and so the PWM code paths in the ti-sn65dsi86 driver are not > used. > > The correct way to check for CONFIG_PWM is using IS_REACHABLE which does > the right thing for all cases > CONFIG_DRM_TI_SN65DSI86 ∈ { y, m } x CONFIG_PWM ∈ { y, m, n }. > > There is no change until CONFIG_PWM actually becomes tristate. > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx> > --- > Hello, > > even without the change to make CONFIG_PWM tristate using IS_REACHABLE() > is the more idiomatic way to check for CONFIG_PWM. > > Note that IS_ENABLED() is wrong in the case CONFIG_DRM_TI_SN65DSI86=y + > CONFIG_PWM=m. > > Best regards > Uwe > > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx> This has already been on the lists for a while and nothing here is controversial, so pushed to drm-misc-next: [1/1] drm/bridge: ti-sn65dsi86: Check for CONFIG_PWM using IS_REACHABLE() commit: ed531feda7852de0aa702fbe3d23a0f743ccc77b -Doug