From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E02B3C19F21 for ; Thu, 28 Jul 2022 20:02:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230049AbiG1UCN (ORCPT ); Thu, 28 Jul 2022 16:02:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbiG1UCK (ORCPT ); Thu, 28 Jul 2022 16:02:10 -0400 Received: from smtp.smtpout.orange.fr (smtp08.smtpout.orange.fr [80.12.242.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3031F76468 for ; Thu, 28 Jul 2022 13:02:09 -0700 (PDT) Received: from [192.168.1.18] ([90.11.190.129]) by smtp.orange.fr with ESMTPA id H9hto2P7UoEdDH9htogjBd; Thu, 28 Jul 2022 22:02:06 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Thu, 28 Jul 2022 22:02:06 +0200 X-ME-IP: 90.11.190.129 Message-ID: <3033c2bb-bfe7-459c-2a2b-e99bf33b28b5@wanadoo.fr> Date: Thu, 28 Jul 2022 22:02:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v3 2/2] iio: time: capture-tiecap: capture driver support for ECAP Content-Language: fr To: jpanis@baylibre.com Cc: devicetree@vger.kernel.org, jic23@kernel.org, krzysztof.kozlowski+dt@linaro.org, lars@metafoo.de, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, mranostay@ti.com, robh+dt@kernel.org References: <20220728175124.468461-1-jpanis@baylibre.com> <20220728175124.468461-3-jpanis@baylibre.com> From: Christophe JAILLET In-Reply-To: <20220728175124.468461-3-jpanis@baylibre.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 [...] > +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; > +} > +