Re: [PATCH v2 03/11] drm/bridge: ti-sn65dsi86: Propagate errors in .get_state() to the caller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 04, 2022 at 10:09:40PM +0100, Uwe Kleine-König wrote:
> 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@xxxxxxxxxxxxxx>

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx>

> > ---
> >  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.)

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux