]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/bridge: ti-sn65dsi86: Check for CONFIG_PWM using IS_REACHABLE()
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Mon, 17 Feb 2025 17:49:36 +0000 (18:49 +0100)
committerDouglas Anderson <dianders@chromium.org>
Tue, 25 Feb 2025 00:23:50 +0000 (16:23 -0800)
commited531feda7852de0aa702fbe3d23a0f743ccc77b
tree916a78df66f3bd2aee50ba510d0f1c07b7a27428
parent27d4815149ba0c80ef2db2a82f0512f647e76d62
drm/bridge: ti-sn65dsi86: Check for CONFIG_PWM using IS_REACHABLE()

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@baylibre.com>
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250217174936.758420-2-u.kleine-koenig@baylibre.com
drivers/gpu/drm/bridge/ti-sn65dsi86.c