From nobody Tue Aug 25 16:52:47 2026 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 04D7C44B67D for ; Wed, 8 Jul 2026 14:49:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783522172; cv=none; b=AV9GnJn+z9/mmBu+mrpIx1B4yxrviGMY9yg1AQTF5eb+iCBrECzU+tioGyOaNOk097dBhNIzmtuqAWO8VKFlB9fkZuRuc0/ZBaIGWdwId8bb0Zun/6P0Hef7aSr2g2sxWBHZEIVfiSDer22b7TdctBw8Jugk3LxmTJiOox5tvuQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783522172; c=relaxed/simple; bh=HkxE7QDh3kVaBT0axp9IR5qPsGPYXHxX+yr5prLaKjI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZxXebJpJ70P+MsbIzNyEKzNFvJ2zfsI2DqkQPMObEoSV64L0yfNLXeFOwcyfrM22YFpFjz97/45zrrdJ+wuRhiw42+odpBjkaT0X5sLKXbNpAsyEdIkx9mrH2nh3tXWiCAKICDf6yTR10wNT+2o4zGVSgEJAcHbdZHYftzVtZjY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=raspberrypi.com; spf=pass smtp.mailfrom=raspberrypi.com; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b=Hj37vLOj; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=raspberrypi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=raspberrypi.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Hj37vLOj" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-493c55d5c7aso8041365e9.1 for ; Wed, 08 Jul 2026 07:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1783522159; x=1784126959; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=eznbuB8Cf+t+hvmFqCai3LuNPnGzE5omPSOsh6CmaE0=; b=Hj37vLOjeZ7jbyWdqakFad9/Qbf8T+venr92kA+UQriuHPKJ6nwnB5cyVPsFF5/jJm rgVZfDLD4LgZNhjxQt0QQ3ExSu4LLP5qeQpeGfexMat67kNkmnZwTo0Dwr2hSgoB7jjF /ijKCWBmG+ZITrkcGm79A2QDYozr8BXK3pGhm857XKQjJvou1z3ZUiPqhm/PG6R4Ykuj yE9Wz3NrHLwmV14ruAo5S6oPsZRy3GzgsD5oRuz7CHBQ53orAaLtyXoyNL0wxAI8RKIf WLXDzOEja/rQeIMps2DmYQcrhgDbDFGqHahbpczGH9mqcrLL//k21c6WDqPsSD2ni/rw wlRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783522159; x=1784126959; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=eznbuB8Cf+t+hvmFqCai3LuNPnGzE5omPSOsh6CmaE0=; b=AGamMjD7yrdowwDZidylKvofp8A8YnGQhq1BxTo+QLPeqzR68OLNrZ5OmcrLdjthQS WeNZQk26ECzO+yZtWCyY0Wl9hIdZ9lLUM9ltEn8ndKtkt5v7s9qOFExN7jHUviXa0OVM u/16QAsHUqmy1qBDr8OJTJN8RXZ4W51x8GJP1UU5BQKia+aswnOWz8yXWAto00npPHse kgwfRCnLiu/zhbTIWpxPoiRoZDnbKO9JK3WNTnjvcbZYaDgfvZ1SM7w8sd40yin02BkO vMOKeYcFGY0aqlJMHXjoDokahqFRkEXE70wt8MZeJCMp0vznPeqRIwoMXLdPIesZl4mo eVeg== X-Forwarded-Encrypted: i=1; AHgh+RoJ/xv43VjsDU+6b1CKTKhTGCxtnCn8mHiuJCi5DmDSWpQjrclMVZzPi5E3nw93OHD9sX4j8q3bO+ra47g=@vger.kernel.org X-Gm-Message-State: AOJu0YzJCB2Ntqj4+T1Gn2ciWiLuDysK6dXkHCW5aCfKjEWwk3twRrgM T8f+ONnsXNDzYzxRu5f0spwYxVwzpIH9ynoC8WSbfzYMU9yzjbt+6gjDtiTkEaJnvKA= X-Gm-Gg: AfdE7cn8n2VdArKTawOAVImjzE+Rbgi9W6rcbeC0bIihwdkL0krjJp8+xjYq4IiwZGe R27ZjWpGoLbczTiTzjhKEYCqCJJ5muvYjye0qVd0w6CcHc1fRQLbnVc0FSBoIlisEN4IxFIjWiJ kPVGswlKdst3UKnvfrduS/BqcFzC6uYlpxgva70ByGic9MO7RqAItv4/8rs0bP+L7dPIUMA7CX2 m0xdXClSKDGjxZ5Dfs4vvlJ3CCw5ydQTeZiZFXLvxW5TIeyCLBCQ/258O17sisSKSVkd+A/bLPN cFwqlHA/KZCC3yT1tBgVCAKon0ogs0USmOkwf5aqdSFyhJCr/46HUageixmd3+KU5Uc0AizFVMw oOupHJ9cxB6dVCKXAdOnS4F1rHP+9HLnSO1R+/+rnC8UpM0SMbSnil+B1Xc4vcl85F5blS7h698 Y5B4aYth/MlJfPyNAht2xY/rvKdwvhN6t6k6UA2eScx/VZsiaOC9W9c6oelIYFKoLQXj3N7pFb3 O0= X-Received: by 2002:a05:600c:e558:10b0:493:e57e:7aa5 with SMTP id 5b1f17b1804b1-493e68c6e63mr19742845e9.22.1783522158971; Wed, 08 Jul 2026 07:49:18 -0700 (PDT) Received: from [127.0.1.1] ([2a00:1098:3142:e::8]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-493e0fbd355sm135363315e9.13.2026.07.08.07.49.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2026 07:49:18 -0700 (PDT) From: Dave Stevenson Date: Wed, 08 Jul 2026 15:48:48 +0100 Subject: [PATCH v3 12/20] media: imx355: Use pm_runtime autosuspend_delay Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260708-media-imx355-v3-12-9df386a623d7@raspberrypi.com> References: <20260708-media-imx355-v3-0-9df386a623d7@raspberrypi.com> In-Reply-To: <20260708-media-imx355-v3-0-9df386a623d7@raspberrypi.com> To: Sakari Ailus , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Richard Acayan Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, David Heidelberg , Jacopo Mondi , devicetree@vger.kernel.org, Dave Stevenson X-Mailer: b4 0.14.1 Avoid powering the sensor up and down unnecessarily by using pm_runtime's autosuspend_delay feature. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi --- drivers/media/i2c/imx355.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/imx355.c b/drivers/media/i2c/imx355.c index ee1f41a66a0b..f01a1a5ae7c9 100644 --- a/drivers/media/i2c/imx355.c +++ b/drivers/media/i2c/imx355.c @@ -1073,7 +1073,7 @@ static int imx355_set_stream(struct v4l2_subdev *sd, = int enable) goto err_rpm_put; } else { imx355_stop_streaming(imx355); - pm_runtime_put(imx355->dev); + pm_runtime_put_autosuspend(imx355->dev); } =20 /* vflip and hflip cannot change during streaming */ @@ -1085,7 +1085,7 @@ static int imx355_set_stream(struct v4l2_subdev *sd, = int enable) return ret; =20 err_rpm_put: - pm_runtime_put(imx355->dev); + pm_runtime_put_autosuspend(imx355->dev); err_unlock: mutex_unlock(&imx355->mutex); =20 @@ -1436,6 +1436,8 @@ static int imx355_probe(struct i2c_client *client) pm_runtime_set_active(imx355->dev); pm_runtime_enable(imx355->dev); pm_runtime_idle(imx355->dev); + pm_runtime_set_autosuspend_delay(imx355->dev, 1000); + pm_runtime_use_autosuspend(imx355->dev); =20 ret =3D v4l2_async_register_subdev_sensor(&imx355->sd); if (ret < 0) @@ -1446,6 +1448,7 @@ static int imx355_probe(struct i2c_client *client) error_media_entity_runtime_pm: pm_runtime_disable(imx355->dev); pm_runtime_set_suspended(imx355->dev); + pm_runtime_dont_use_autosuspend(imx355->dev); media_entity_cleanup(&imx355->sd.entity); =20 error_handler_free: @@ -1476,6 +1479,8 @@ static void imx355_remove(struct i2c_client *client) pm_runtime_set_suspended(imx355->dev); } =20 + pm_runtime_dont_use_autosuspend(imx355->dev); + mutex_destroy(&imx355->mutex); } =20 --=20 2.34.1