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]

 



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

+
+	return 0;
+}
+



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux