Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp706194imn; Thu, 28 Jul 2022 13:17:53 -0700 (PDT) X-Google-Smtp-Source: AGRyM1toY80V3lfGtQWFhUvKV5lBPOZBOnWeWrKBXyxqs+710wPBHqQxZcZhqXRZKwKd0cIIRXJj X-Received: by 2002:a05:6402:26c2:b0:43b:e542:9f68 with SMTP id x2-20020a05640226c200b0043be5429f68mr599874edd.227.1659039473488; Thu, 28 Jul 2022 13:17:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659039473; cv=none; d=google.com; s=arc-20160816; b=aXVKxisQKHkI3sMIBpWINdckTfTF0W6mS/Vu95a23HttUmVhM2xnVriCOrIKHOrYLX mQf8yohmtCtNhhWS44Smz49L1YjoEe9b32OvpocoRKfoOhJvG2IrrX5hjaY7Ywryr+yH +tqHHNb8/Az0o42ZDQd1LtQc72jVsTQOpwE8n2mPuozZPzb060WL9dtOXhSleM4ZLK9f lRRWKz5GzVw/2RXbzN/1gQM7r93F4d1+x7Y1AhWmtOr1hO6PgF8b++YlKxjlyw0oPzWm d0VT1SdXURDOdu0Q1ueWz7sJ0W9i0fDSdClZjYyGYR7a+rF5IsWdbIPIUW6/K+0fRE6W r3rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=hg88OE0RLjNPo0Pc1TByrZ+OZK8WLNcTXXyuHh3v0fA=; b=Sd82bVVaxPpMvkClVYssv54msr+18hwPYRWb4Bi3T8IYPFbAb+0s5GG8CfhSYXE1F7 NOo6WbTMziifhIYIiWJ60LohALNfu98qsRUuP9+gf2WaYfvIkhtZUbn6k4ucuBRJDboF 5iaELfW70479P52L36ua41Ef3u+s7lh6okfXJ6FpbuSHKVZZSePK8D7uPld0ia9fZEN4 Pft9/5n2RaXrqQlpvfeDewDCSZakyRK9tmeq/4s+OfR55YldoSRC1SWXpBFfHbEIT/4u WPuMzXrdNa08rYaRm65TyAl1/0o8XJb6NxWui22o95uFbhvYrZVlF+JVZuAapBWZ2z5M rL5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x96-20020a50bae9000000b0043bcb538bbcsi1418842ede.250.2022.07.28.13.17.26; Thu, 28 Jul 2022 13:17:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229568AbiG1UCM (ORCPT + 99 others); Thu, 28 Jul 2022 16:02:12 -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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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; > +} > +