From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4A173BED31 for ; Fri, 29 May 2026 09:58:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780048685; cv=none; b=cHl0nMf092LrGTp1sDl5876URklvW7AmapjVHWLhpH86krWr1Mi5HjnvF2Lb4N5iZHoal0QvlsaiQvPcGCjUBiCUpLYLBRspml/BR4nW4pwe1UwWXv+IXy9dN67OyY9PoxRva8RZNVIrdTNovf6SJp13S7jjV6fcFhU6V0nv9+Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780048685; c=relaxed/simple; bh=EsX8BJXonXmxKe8VeJHaPTpWzq4BxTNfxX+5jJKa5G8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TQoXIyqHnMDgARzHa+1JYtunDqsTt1nevYQyGgodazo8n+XgV1slAt0LypTdy6mYIroDTN9ATmEgsrhEOMGnyYrhFvrW6hzAIzhGh98MrBjL6td8hvE5b6KpsoXlbTdGkq3lhDpe7t1+7O/OQUGSbJJloD/wTi/I3ey+BYmwNwo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=GSwGWEK7; arc=none smtp.client-ip=209.85.167.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GSwGWEK7" Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-5a86cb123e0so1387666e87.1 for ; Fri, 29 May 2026 02:58:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780048682; x=1780653482; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EsX8BJXonXmxKe8VeJHaPTpWzq4BxTNfxX+5jJKa5G8=; b=GSwGWEK7Pxcyza63CU7yu3vXJKHF0aN7OPcXu85WuP3WQaGzUXhG9J4KsEtPpAIRNq K48TLYCYoK3BPtbeH2zG60PSKp6ygm8RXCggw0aRx47YS2UOTALhrJqoO0vJJ7OHyrOR T/oOIBmh86r66MaZ/WbZTD43J26bGjzd1TC5y+f8r4r6CkoQnjIQdeOpKoydqnny5jkl yubMZ4NYx7DuZDPo4kwVtzCDZ4PCwEDMbRMxxlTCzXrED0tsam+kh9Mx/xUmKISiCknP qSDilqRTFMroz58ZRozmQh99Tdz9MZi9UjCbyKD09ARK+Bl3o0qqvBv+vkZ6BNVGgSpT 6pLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780048682; x=1780653482; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=EsX8BJXonXmxKe8VeJHaPTpWzq4BxTNfxX+5jJKa5G8=; b=Da5ikgmIb7/jrgFzoj/UkaqnxZF7tW2m+/te8r/sDM5JSQaH320MtBpHFO2RMyE83h 51LMP9iFWGRUZEluTvIkSsSitdCwLFl/BHoj3QuuO1lV5lkskO4nOWncsHAJHj++I2Z+ sP9TjvBCmCXFqInzB+cEBsAsuK+Khk2hwfmycl2PQ9G0WQWwz1tEqfCWMHoUOUKPAy11 KsnQj1l7CUMaeCouW6hXWamahnD3hLjs0kn1Wz0ZbwlOiWF1i0bUvV3rvMYlaX1dlR3T NzooABGWwpbiIXIQ+hWZStKlrTv3IMudfTtoHnpWyGNTNea70F7EGp2/VrixnLOEN7CB b1GQ== X-Forwarded-Encrypted: i=1; AFNElJ9CbcfqRzUGg233D2QFtwmiWEpHk/aVa9DRoWWIROQdMIVtYl6GU0KnmR7i3imnDtSUb3DRbJzt193gKjE=@vger.kernel.org X-Gm-Message-State: AOJu0YyLhTCuJnXlxzaSl1aqrgWH+PKNH11watsxhmim2zCKTCtrHNqQ kgBwaBiSEbPoCFt1SCfZNBkHnE2dyBpecUg6j8sswFUD2mFa40f+cDq5 X-Gm-Gg: Acq92OEB+kfvRs5NPPwlrheDMNqIP7lVK3fALbXf+ueW+7PPZtdoRXScjdT6+UvEYS6 MMIe0QqmAv9oV1ZbR7ETiFd8FLQlSSIn6el6FedAI5G+l0RnS/hTFU2etAuTKi9nczGNLfZLSsK xSx082cVPogcjFQ7GBXdBIwZ6/2WvmSzcBfZx8qTA0L2Ew3Qrr3RIWkA13jbSpE4sMzFyXT25Bi Zu+vM/jKd4uovutXM05Rlzn0Eh+lGG8Qt4+yaHIZOcPFtsP7oyPk5ZXc98joHELv5JPedRJFiI5 EI68XL40M/kNaoAm2ycA2UQG/83YUzmmjfhIkEv76H89QghbGhoa93bR6NGbkTIsZ9Qy++OJp3I m+s0v3iAVxMs/C1dMHfWvGGzVwiO30ylIB2LnBo8E7yUs44w25bm6ACPvH6uYbFPC830wYFzGFD nasPZuCfSJOZTWs+rf8VisW4hnnzY60VemobH/EgIePCR6pZuyZyKG1KY= X-Received: by 2002:a05:6512:3996:b0:5a8:7218:47b9 with SMTP id 2adb3069b0e04-5aa594c30edmr331032e87.8.1780048681807; Fri, 29 May 2026 02:58:01 -0700 (PDT) Received: from localhost.localdomain ([94.158.61.193]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5aa5b79f6absm167299e87.84.2026.05.29.02.57.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 02:58:01 -0700 (PDT) From: Stepan Ionichev To: andy.shevchenko@gmail.com, wbg@kernel.org Cc: m32285159@gmail.com, dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] counter: ti-eqep: balance pm_runtime on devm_clk_get_enabled() failure Date: Fri, 29 May 2026 14:57:55 +0500 Message-Id: <20260529095755.2533-1-sozdayvek@gmail.com> X-Mailer: git-send-email 2.33.0.windows.2 In-Reply-To: References: <20260525152137.7428-1-sozdayvek@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Wed, May 27, 2026 at 10:29 AM Andy Shevchenko wrote: > > I'll revert for now. Would the proper fix be to replace all > > pm_runtime_*() with their respective devm_pm_*() calls? > > Not all, but the ones that are opposite to > pm_runtime_put*()/pm_runtime_disable(). It should be done carefully as > well as PM runtime may be required before final registering of the > device to access the registers (I haven't checked the driver, so I > don't know if simple use devm_pm_*() will be enough). The eqep driver has no runtime suspend/resume callbacks - it only resumes in probe so that devm_clk_get_enabled() and counter_add() can reach the registers. So devm_pm_runtime_enable() plus pm_runtime_resume_and_get() before the clock get, with a devm action for the put, keeps the device resumed across registration and unwinds in reverse order on the error paths and on unbind. I'll send a v3 along those lines. Stepan