Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3216136pxb; Mon, 16 Nov 2020 08:39:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzB+E6ZLrJ4QbjTYdcWG+B9myjG0PyGQZblgFS09MCE3/+wHQyMHFdtkdVoYPUYd3ITbU5 X-Received: by 2002:a17:907:250b:: with SMTP id y11mr14906278ejl.21.1605544747767; Mon, 16 Nov 2020 08:39:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605544747; cv=none; d=google.com; s=arc-20160816; b=X8m2bUp0wZeQnLbOX5I7saGWdg42eqTIc/TUgqcasy378R2QTYPzsgqzLy8oIza/Ga 3KysXuATKlCRphmQ66lND7XL/DErOHDxV74d6uNxW7ON/HD63rMsDSOl7VsGLHz+Yhps x0AORf749aVBDoNLQ7ZG2UflrMJouhtMXAG6qTFk5VtQETprsKRvZym4DmyaIKpnmUUN DowR5CrV8/tLCVgGftBTCc/i7qh2YjKp6wUuVvIPTXH/RXd4W+W8T6CO/hu1p45GsIM5 mjy0z2oTbnFCVw8GXkAvm5OvkIRmN9YBJq9vWJugxrWoW6evQaZp7OJ+qbG/SaInufB6 OAtQ== 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=25i59HOvIUYQ9iOLKytZO9qHBn7kQgkrRBc9/ZJhK+g=; b=b6Cn9bD7bHaU6kN3CfjhFtr6bWtzM+j+ZP4k2YOHKHJthevDGJ1Gds/qWYXvBq686R Rqoz6zPww+YyjEXtRnhl+nxic3z3A2E+H+7qlK93rQG7s21ym8iNk0nQTUy69Dj4OmF2 HBNwrfVeVkxPNoWODuAhwE6A5kQPeTHV9huKXT/kqOo9tcTfMVOARwrjQk6LBw7PWevI jh+OeWT6/tJF7hIhM18qGCJGUECJhBhVuEKF5EqmrF0DIzxQYc3ANlRdoUC/yVYsk/CS qqOf8EUidqVXg1hDqSeBfmAHQad3VQRFpMrHzqsufGZs/bbWHTvxTqZKB3p4Th/fmoVu BqEw== 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 u12si12534976edx.393.2020.11.16.08.38.42; Mon, 16 Nov 2020 08:39:07 -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 S1732169AbgKPQgT convert rfc822-to-8bit (ORCPT + 99 others); Mon, 16 Nov 2020 11:36:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730661AbgKPQgS (ORCPT ); Mon, 16 Nov 2020 11:36:18 -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 1DF98C0613CF for ; Mon, 16 Nov 2020 08:36:18 -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 1kehUG-0005k5-BS; Mon, 16 Nov 2020 17:36:16 +0100 Received: from pza by lupine with local (Exim 4.92) (envelope-from ) id 1kehUF-00028h-EU; Mon, 16 Nov 2020 17:36:15 +0100 Message-ID: <48332a44241f3c06966420277060b6048c1f77d0.camel@pengutronix.de> Subject: Re: [PATCH v2] reset: make shared pulsed reset controls re-triggerable From: Philipp Zabel To: Jerome Brunet , Amjad Ouled-Ameur , Jim Quinlan Cc: linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org, Kevin Hilman Date: Mon, 16 Nov 2020 17:36:15 +0100 In-Reply-To: <1jima91e92.fsf@starbuckisacylon.baylibre.com> References: <20201112230043.28987-1-aouledameur@baylibre.com> <0f679c62aa48603ea43a8fa4819d688baa802d73.camel@pengutronix.de> <1jima91e92.fsf@starbuckisacylon.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 16:13 +0100, Jerome Brunet wrote: > On Fri 13 Nov 2020 at 16:04, Philipp Zabel wrote: > > > 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. > > Hi Philipp, > > Would it be possible to get an immutable branch/tag with this ? > It would allow to move forward on the USB side, without waiting for the > next rc1. Here you go, The following changes since commit 3650b228f83adda7e5ee532e2b90429c03f7b9ec: Linux 5.10-rc1 (2020-10-25 15:14:11 -0700) are available in the Git repository at: git://git.pengutronix.de/git/pza/linux.git reset/shared-retrigger for you to fetch changes up to 557acb3d2cd9c82de19f944f6cc967a347735385: reset: make shared pulsed reset controls re-triggerable (2020-11-16 17:05:28 +0100) ---------------------------------------------------------------- Amjad Ouled-Ameur (1): reset: make shared pulsed reset controls re-triggerable drivers/reset/core.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/reset.h | 1 + 2 files changed, 74 insertions(+) regards Philipp