[PATCH v2 03/11] drm/bridge: ti-sn65dsi86: Propagate errors in .get_state() to the caller
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Sun Dec 4 21:09:40 UTC 2022
Hello,
my initial Cc-list wasn't optimal. So I added a few people here.
On Wed, Nov 30, 2022 at 04:21:40PM +0100, Uwe Kleine-König wrote:
> .get_state() can return an error indication. Make use of it to propagate
> failing hardware accesses.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> ---
> drivers/gpu/drm/bridge/ti-sn65dsi86.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> index 6826d2423ae9..9671071490d8 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> @@ -1512,19 +1512,19 @@ static int ti_sn_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
>
> ret = regmap_read(pdata->regmap, SN_PWM_EN_INV_REG, &pwm_en_inv);
> if (ret)
> - return 0;
> + return ret;
>
> ret = ti_sn65dsi86_read_u16(pdata, SN_BACKLIGHT_SCALE_REG, &scale);
> if (ret)
> - return 0;
> + return ret;
>
> ret = ti_sn65dsi86_read_u16(pdata, SN_BACKLIGHT_REG, &backlight);
> if (ret)
> - return 0;
> + return ret;
>
> ret = regmap_read(pdata->regmap, SN_PWM_PRE_DIV_REG, &pre_div);
> if (ret)
> - return 0;
> + return ret;
>
> state->enabled = FIELD_GET(SN_PWM_EN_MASK, pwm_en_inv);
> if (FIELD_GET(SN_PWM_INV_MASK, pwm_en_inv))
It would be great to get an Ack to take this patch and patch #1 via the
PWM tree. (Both got an Ack by Douglas Anderson, I'm unsure if that is
already enough.)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20221204/f0dc1d0a/attachment.sig>
More information about the dri-devel
mailing list