Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp607916lqb; Wed, 17 Apr 2024 06:15:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWqGugNjU4Y6u9JoOfjDPVX/NLsB2OKZxdvBUI98mrbbAUFGL8iBn54FnfphUFL8tiogcQKQf2FqndClCmdGl4mk2UFxwZVbVqBpqV6qw== X-Google-Smtp-Source: AGHT+IHgi9rfuorFV7OpuLmqKUKJDKkIIoDb+yFvKNBq3ddWLry5n2kbRkEyICBwHvP56pNNSY0i X-Received: by 2002:a50:c346:0:b0:568:145a:4a19 with SMTP id q6-20020a50c346000000b00568145a4a19mr3306479edb.4.1713359730276; Wed, 17 Apr 2024 06:15:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713359730; cv=pass; d=google.com; s=arc-20160816; b=iHwF6f5XRKt9tothI7r1rSVlECQVZq/PfaWrx03ia1ocCqX2nAF2T/mcp1SCmINb7M 5Cl0/T6s0kN/frwIiLSBApk987s0lKONgQMAGoUDhFysxJ1tuaS9mE5hwGZy8g+sXjd5 9tep5NJH61r+SY82i25CGStRgChQkPrrM0GKy8OuofpWuab/qNX/PJI96XzRJgkQ7XXH m7gzrYheaq2YLK4zHncuLkWBgDZoJPW2Or0CWexwnTTZfFhyDNJG68jM3TH7lf3vKNst HNqQ53h8l9l6Y1vnM9Kip5TE5cEt9+bTp5SjBITlnwUaoditezUvhZxKYsa+3vsD42JW u1+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=CDde0wsttTpmT1rs5I7RgFxRtoVm7icBZbq9s74cr+I=; fh=FZj11aeKx1vcDVhVQexDLdsekTqFE2R0jGfcoPUYaIc=; b=mjp1IxwfUaEaXElWwVp80rw21pDdM3KHusP+MW4OBdxrgsfsPtbLONyAdnMPSZt9Mz bpnmoNByMtnjy2jvlyoWoKz8clC+Vmz0gKeaHzEGODoASBMDReQ9MtU1vN47NQCs74N2 0M+b/TgtaJsFr2IJeU+km3u4J71bpsBr1Xw8SeliE8Dw8/ruJ35obp+2eQteriDDfUQQ PfVkeEWky0UrG8EeL1YQ8y7FC1ubR6dc4L7FlzGhhk9drRtTlMRm4hifMkRr1lmUDxDR HrumJ/7k2GzrYr7okudfoN/q7rFV4GL0fkeH9kKh0Tn6hKaQeLAeuGAbQDivSBW46zRS MPyA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iJAsU7AL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-6451-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6451-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v23-20020a50d597000000b005700360750bsi5065061edi.297.2024.04.17.06.15.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 06:15:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6451-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iJAsU7AL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-6451-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6451-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D0C2D1F25B42 for ; Wed, 17 Apr 2024 13:15:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88D6813D8AE; Wed, 17 Apr 2024 13:15:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iJAsU7AL" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E79A13D61A; Wed, 17 Apr 2024 13:15:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713359722; cv=none; b=b6V8Q31PZ1toXj6gAbEIzEH+qKelMxBvDQD/8Z5CIJDTojv16iVROpFce8Ewg8k2bgaRKnQOVIoh0dWdByFdB2f3m0YG+Ez43+I/qFSvXlbf7etzfAEHUIHbF8YyZ2qhUA7j8g/wqLd3S2LRYYvTPe3M+eRP4f1ilTpjagnoD5w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713359722; c=relaxed/simple; bh=51JP3zFmO8LduqnRmpjjtDDoWC+4X1OXwmn7YXUfOww=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=tjk6b4p1T5fZaKG9SpMYJD5d9BYhJ4tUXUIgU50HgK0zk7DvX83w1pJKpV9+F9jJrpfFmx9vgVt4rVOYyMzYQJsbGgKAqC8hPLff8tVt5KlTa/AuXRaKLWXk27dMcfTsAI8y5R9gdIq7MbrvUPjNgUFCE/BEsR+p9fhL0gNT7ag= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iJAsU7AL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5426C072AA; Wed, 17 Apr 2024 13:15:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713359721; bh=51JP3zFmO8LduqnRmpjjtDDoWC+4X1OXwmn7YXUfOww=; h=Date:Subject:To:References:From:In-Reply-To:From; b=iJAsU7ALIg3r8x8WZhS5rQyQ4D1mOfHq17v4Xc2tWpGxx2nmpIQ1TvTKO/cliV2I6 rYHvBhNmOLipj1i9s1AI+HAAiGnlfToqyZ/4PW9Q0V5nWGiRvT665PRllh5HyFKkQa bCWa9aJZknXSMGwZQ9Gwzy5vIt4swl1BFCK5zlhRi8RjEK4suQ8jac8uYcaiMwAnZt m9I4SYGZbP6eoC03DsRJbqxFZn11WS6rsarixZ7MpInqA3hu4KlCCucF6JDZYz+3s/ MrQFAGsFNz8Zl3BmquSs0YOk8qKaJclIFYoc6Gk2A3HtG8PIizPp6vvkIPUczqOfjR XG8LPyUq86KwA== Message-ID: <64ca6d41-8173-4e0e-9467-4fa32db812ec@kernel.org> Date: Wed, 17 Apr 2024 15:15:21 +0200 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] NFC: trf7970a: disable all regulators on removal To: Paul Geurts , mgreer@animalcreek.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: Content-Language: en-US From: Krzysztof Kozlowski Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4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qY+NaFahT0lRPjYtrTa1v3tem/ JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu 4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmA872oFCRRflLYACgkQG5NDfTtBYpvScw/9GrqBrVLuJoJ52qBBKUBDo4E+5fU1bjt0 Gv0nh/hNJuecuRY6aemU6HOPNc2t8QHMSvwbSF+Vp9ZkOvrM36yUOufctoqON+wXrliEY0J4 ksR89ZILRRAold9Mh0YDqEJc1HmuxYLJ7lnbLYH1oui8bLbMBM8S2Uo9RKqV2GROLi44enVt vdrDvo+CxKj2K+d4cleCNiz5qbTxPUW/cgkwG0lJc4I4sso7l4XMDKn95c7JtNsuzqKvhEVS oic5by3fbUnuI0cemeizF4QdtX2uQxrP7RwHFBd+YUia7zCcz0//rv6FZmAxWZGy5arNl6Vm lQqNo7/Poh8WWfRS+xegBxc6hBXahpyUKphAKYkah+m+I0QToCfnGKnPqyYIMDEHCS/RfqA5 t8F+O56+oyLBAeWX7XcmyM6TGeVfb+OZVMJnZzK0s2VYAuI0Rl87FBFYgULdgqKV7R7WHzwD uZwJCLykjad45hsWcOGk3OcaAGQS6NDlfhM6O9aYNwGL6tGt/6BkRikNOs7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 16/04/2024 22:28, Paul Geurts wrote: > During module probe, regulator 'vin' and 'vdd-io' are used and enabled, > but the vdd-io regulator overwrites the 'vin' regulator pointer. During > remove, only the vdd-io is disabled, as the vin regulator pointer is not > available anymore. When regulator_put() is called during resource > cleanup a kernel warning is given, as the regulator is still enabled. > > Store the two regulators in separate pointers and disable both the > regulators on module remove. > > Fixes: 49d22c70aaf0 ("NFC: trf7970a: Add device tree option of 1.8 Volt IO voltage") > > Signed-off-by: Paul Geurts No blank lines between tags. Please look at existing commits (git log). > --- > drivers/nfc/trf7970a.c | 42 +++++++++++++++++++++++------------------- > 1 file changed, 23 insertions(+), 19 deletions(-) > > diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c > index 7eb17f46a815..9e1a34e23af2 100644 > --- a/drivers/nfc/trf7970a.c > +++ b/drivers/nfc/trf7970a.c > @@ -424,7 +424,8 @@ struct trf7970a { > enum trf7970a_state state; > struct device *dev; > struct spi_device *spi; > - struct regulator *regulator; > + struct regulator *vin_regulator; > + struct regulator *vddio_regulator; > struct nfc_digital_dev *ddev; > u32 quirks; > bool is_initiator; > @@ -1883,7 +1884,7 @@ static int trf7970a_power_up(struct trf7970a *trf) > if (trf->state != TRF7970A_ST_PWR_OFF) > return 0; > > - ret = regulator_enable(trf->regulator); > + ret = regulator_enable(trf->vin_regulator); That does not look like equivalent code. Previously this was vddio, right? Best regards, Krzysztof