Re: [PATCH v3 2/2] iio: time: capture-tiecap: capture driver support for ECAP

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

 





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@xxxxxxxxxxxxxxxx>

[...]

+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;
+}
+




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux