[PATCH 1/3] drm/bridge: ti-sn65dsi86: Simplify refclk handling

Stephen Boyd swboyd at chromium.org
Sat Mar 13 20:23:23 UTC 2021


Quoting Douglas Anderson (2021-03-04 15:51:59)
> The clock framework makes it simple to deal with an optional clock.
> You can call clk_get_optional() and if the clock isn't specified it'll
> just return NULL without complaint. It's valid to pass NULL to
> enable/disable/prepare/unprepare. Let's make use of this to simplify
> things a tiny bit.
> 
> NOTE: this makes things look a tad bit asymmetric now since we check
> for NULL before clk_prepare_enable() but not for
> clk_disable_unprepare(). This seemed OK to me. We already have to
> check for NULL in the enable case anyway so why not avoid the extra
> call?
> 
> Signed-off-by: Douglas Anderson <dianders at chromium.org>
> ---

Reviewed-by: Stephen Boyd <swboyd at chromium.org>


More information about the dri-devel mailing list