[PATCH 02/10] pwm: Add SI-EN SN3112 PWM support
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Thu Apr 25 06:14:39 UTC 2024
Hello,
On Wed, Apr 24, 2024 at 09:37:25PM +0200, Konrad Dybcio wrote:
> On 4/24/24 17:29, Xilin Wu via B4 Relay wrote:
> > +
> > + /* use random value to apply changes */
> > + ret = sn3112_write_reg(priv, SN3112_REG_APPLY, 0x66);
>
> "a random value"? sounds suspicious..
I smiled about that one, too, remembering https://xkcd.com/221/
> [...]
> > +#if IS_ENABLED(CONFIG_GPIOLIB)
> > + /* enable hardware shutdown pin */
> > + if (priv->sdb)
> > + gpiod_set_value(priv->sdb, 1);
> > +#endif
> > +
> > + /* power-off sn5112 power vdd */
> > + regulator_disable(priv->vdd);
> > +
> > + pwmchip_remove(chip);
>
> devm_pwmchip_add?
Note using devm_xyz only works if all requests before are also using
devm. (There are a few exceptions, but these need proper thinking and
extensive commenting.)
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/20240425/b026190a/attachment.sig>
More information about the dri-devel
mailing list