Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1213647pxb; Fri, 13 Nov 2020 07:06:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxciHO2MTggUadmd30axPt7x3KdMzXky18T1A6zM1Lduc06yRK3NwtiITcQt8xHaXo6f2Zl X-Received: by 2002:a17:906:170f:: with SMTP id c15mr2360922eje.347.1605279996536; Fri, 13 Nov 2020 07:06:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605279996; cv=none; d=google.com; s=arc-20160816; b=Lcrb0Ri9/iVgEXq1oGKw/v1oUnPavMc1ir0qh3b/Rp+GvLqD5eh2CXOghOqh36Qm92 7Isahu++FkNp3kcbWQ+e9kQ/iwGSjP6aun1gk2vT2jYx2Uk4Kz+xX/kmYaZCy6pkIbEF yKbhhNQdyMtd7SGJpn5Esk7y09RGNLa+hzJpyTo3DMU8VgZacfggAJTe0GnAnSb6bXZ4 nWO/5d7645+J9ROpyENO3NHCx0t/t+tWBB3aEAnhCxsXtO/6/EAB6RkiSDNrhFhmKRKz cNe4o/m0W4v8+ZMx2D0arC6s55fuWKksJx5lrI3KVe4zRmbSMozwqcSLYgvxIDpxuTmE 0QTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=FmcejEksYTaH4rhQj4jxoBj3g0q8HxAqMBCyhoDDZ9U=; b=LM+Q8hbrywizp6QuxZw5eZt7OFXEingNM4+Lrwkcxu4eigpBjuF/TPJvBSj5/urRvj RUhNaKmlgYo5u2Xp5S8llOfv2pSXQTneEKlmHp6bHdZhgBrg8HhIJYso6w1uL6Yxl6he rfR4LiomaJgFVQAyOF+M8H1l7OeZGep+8dwqtAWrs49Hkbn1lBhQkeQ5AD6IJkaSJ5Mb le42OIemD3ZK5RKCv+6WggwKtm568HhcBT/d2kx+ke6lLMNp6MD6XFGpryiHBHFCbxki 75PeQwLw2EgT1fRjt8RZkerY+Ik0+8iJwGihf+MYq+7e2DxRPOJKVlCR//AZKsUTlM0Y v1eg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p22si5742317ejw.31.2020.11.13.07.06.11; Fri, 13 Nov 2020 07:06:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726324AbgKMPEM convert rfc822-to-8bit (ORCPT + 99 others); Fri, 13 Nov 2020 10:04:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726520AbgKMPEL (ORCPT ); Fri, 13 Nov 2020 10:04:11 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 233EAC0617A7 for ; Fri, 13 Nov 2020 07:04:11 -0800 (PST) Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdacT-00023V-Kn; Fri, 13 Nov 2020 16:04:09 +0100 Received: from pza by lupine with local (Exim 4.92) (envelope-from ) id 1kdacT-0004cD-49; Fri, 13 Nov 2020 16:04:09 +0100 Message-ID: <0f679c62aa48603ea43a8fa4819d688baa802d73.camel@pengutronix.de> Subject: Re: [PATCH v2] reset: make shared pulsed reset controls re-triggerable From: Philipp Zabel To: Amjad Ouled-Ameur Cc: linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org, Jerome Brunet , Kevin Hilman , Jim Quinlan Date: Fri, 13 Nov 2020 16:04:09 +0100 In-Reply-To: <20201112230043.28987-1-aouledameur@baylibre.com> References: <20201112230043.28987-1-aouledameur@baylibre.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2020-11-13 at 00:00 +0100, Amjad Ouled-Ameur wrote: > The current reset framework API does not allow to release what is done by > reset_control_reset(), IOW decrement triggered_count. Add the new > reset_control_rearm() call to do so. > > When reset_control_reset() has been called once, the counter > triggered_count, in the reset framework, is incremented i.e the resource > under the reset is in-use and the reset should not be done again. > reset_control_rearm() would be the way to state that the resource is > no longer used and, that from the caller's perspective, the reset can be > fired again if necessary. > > Signed-off-by: Amjad Ouled-Ameur > Reported-by: Jerome Brunet > --- > Change since v1: [0] > * Renamed the new call from reset_control_(array_)resettable to > reset_control_(array_)rearm > * Open-coded reset_control_array_rearm to check for errors before > decrementing triggered_count because we cannot roll back in case an > error occurs while decrementing one of the rstc. > * Reworded the new call's description. Thank you, applied to reset/next. regards Philipp