Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp590549pxh; Tue, 9 Nov 2021 15:48:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPJ9zrFyFDUYs3SSQPz1YX0vNTT4dyKuhPoU2c/Li3GmBf8K1XuE9Q00XOUbwUE7aJO6Nj X-Received: by 2002:a05:6638:22d6:: with SMTP id j22mr8970159jat.97.1636501691111; Tue, 09 Nov 2021 15:48:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636501691; cv=none; d=google.com; s=arc-20160816; b=kQ4vxN0CeQrhoir7D/+XvOJI7Hbv7cGm2JdyDMVFnZDQBvdghrARSPAcTzwaz9MQ1H bF6a7Ui2awE4Zlk7hlOKBZAPHBAxU28Dbhu99yZhANyYEpU7C5oSo7iB7ALvnto+0UZP ZqrLIIvm1TPS8fzDE7ovSd2p4LORTctDBJKjrutGTLOQ2lvSndUbLa6hYvLRHLibk2BH lGB3G29dXMX91uXYJPXICLiI/Xpaa3hvBYM49a5eXOJ7MUKEyV7ZLbayhtouR0VeV+Bm /kLJRfN/QZpR3sO6qtApf1lKcrfIdFE1FUqgkOKnwZnjJrMQONQrO5mn6hWx5uCpyrWL Am2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=TFdiWXXNkqqYOwO/HL9oP+T9KD2epSmj2Ij5svMzwXU=; b=BG20KYEH6gl4RN0SRZHhiyofdp4zz8h0Kfc9K08j28dnHj6OCWWnzHnb7T+cxaUvLj fTLNP/iH5ZUTtgm8+Lr/AnJ/MkWKUtT8H9zpS8kszoHclwrvORcviLGvII8dGM33fNAy RDnms3qCpG+kFgT5J5L5zZK6b61lRVa53Qn60PsN08UZqWWVeA1kF4qKogHRqj4s1xi6 deWhuC9tndrO3YR24edMVdb7wBJ5WTY2uNZaQPP+xrwXDvqEvfbJVTqvSqTvSpCh4wWS 2ec2WJqWTuxx46HJQRdK2+dESMadeRyOdFTRUzcXJQQs43qmEkfDNIpR/gi7tan26kzz DvQg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 1si27799675ilz.178.2021.11.09.15.47.58; Tue, 09 Nov 2021 15:48:11 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234736AbhKIM66 (ORCPT + 97 others); Tue, 9 Nov 2021 07:58:58 -0500 Received: from comms.puri.sm ([159.203.221.185]:46434 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233652AbhKIM65 (ORCPT ); Tue, 9 Nov 2021 07:58:57 -0500 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 90DB7DFE04; Tue, 9 Nov 2021 04:55:41 -0800 (PST) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WNnYO0huJ9K0; Tue, 9 Nov 2021 04:55:41 -0800 (PST) From: Martin Kepplinger To: sakari.ailus@linux.intel.com, mchehab@kernel.org Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@puri.sm, linux-pm@vger.kernel.org, Martin Kepplinger Subject: [PATCH] media: i2c: dw9714: use pm_runtime_force_suspend/resume for system suspend Date: Tue, 9 Nov 2021 13:55:05 +0100 Message-Id: <20211109125505.2682553-1-martin.kepplinger@puri.sm> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using the same suspend function for runtime and system suspend doesn't work in this case (when controlling regulators and clocks). suspend() and resume() are clearly meant to stay balanced. Use the pm_runtime_force_* helpers for system suspend and fix error like the following when transitioning to system suspend: [ 559.685921] dw9714 3-000c: I2C write fail [ 559.685941] dw9714 3-000c: dw9714_vcm_suspend I2C failure: -5 Signed-off-by: Martin Kepplinger --- drivers/media/i2c/dw9714.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c index fcbebb3558b5..f6ddd7c4a1ff 100644 --- a/drivers/media/i2c/dw9714.c +++ b/drivers/media/i2c/dw9714.c @@ -267,7 +267,8 @@ static const struct of_device_id dw9714_of_table[] = { MODULE_DEVICE_TABLE(of, dw9714_of_table); static const struct dev_pm_ops dw9714_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(dw9714_vcm_suspend, dw9714_vcm_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) SET_RUNTIME_PM_OPS(dw9714_vcm_suspend, dw9714_vcm_resume, NULL) }; -- 2.30.2