Messages in this thread | | | Date | Fri, 29 Jul 2022 09:50:13 +0200 | Subject | Re: [PATCH v3 2/2] iio: time: capture-tiecap: capture driver support for ECAP | From | Julien Panis <> |
| |
On 28/07/2022 22:02, Christophe JAILLET wrote: > Le 28/07/2022 à 19:51, Julien Panis a écrit : >> ECAP hardware on AM62x SoC supports capture feature. It can be used >> to timestamp events (falling/rising edges) detected on signal input pin. >> >> This commit adds capture driver support for ECAP hardware on AM62x SoC. >> >> In the ECAP hardware, capture pin can also be configured to be in >> PWM mode. Current implementation only supports capture operating mode. >> Hardware also supports timebase sync between multiple instances, but >> this driver supports simple independent capture functionality. >> >> Signed-off-by: Julien Panis >> <jpanis-rdvid1DuHRBWk0Htik3J/w@public.gmane.org> > > [...] > >> +static int ecap_iio_remove(struct platform_device *pdev) >> +{ >> + struct iio_dev *indio_dev = platform_get_drvdata(pdev); >> + struct ecap_iio_dev *ecap_dev = iio_priv(indio_dev); >> + >> + if (ecap_dev->enabled) >> + ecap_iio_capture_disable(indio_dev); >> + >> + regmap_exit(ecap_dev->regmap); >> + >> + pm_runtime_disable(&pdev->dev); > > Hi, > > should these 2 functions be part of an error handling path of the > probe, or handled with a devm_add_action_or_reset()? > > Just my 2c, > > CJ
Hi Christophe, That's right, that will be cleaner. Thank you for your suggestion, that will be done in next version. Julien
> >> + >> + return 0; >> +} >> +
| |