From patchwork Mon Aug 25 13:53:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 1149 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 289C72F60D8; Mon, 25 Aug 2025 13:54:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756130073; cv=none; b=f6D3bxHIQ2krqmHn8Y6eXTOCWxRnpc2Wp+IgNl0h4VLuC1HLlIsvZrOytwztoJr0CZkLZuJNwPXg8c3N6CWHy2aj4Ne9dLisJHTPcD37FVgnRuDO8TTxlMxgwmlpGsushk+CeJUwVacDk3oV066x8Dz7CaTgQojvtSmfoNa+3gk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756130073; c=relaxed/simple; bh=Y6BmQsoHEXKtoNEql38zgrbM5vjoAf3tiVb+ccRW6lQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cjpAH5hCgEya/dvBv2F2O1AM2t/dUII3hBvLEvtPJwcClVUw/EnVP/CD04PEi9JVYqGlh95CgRpMmaTOXLr7GsxA0Jxdg6hV1IPV1ssX30e9SGqNt1gq9YMHF0JcMVD355GI+SRC99edMmxBOkFwCh/P/yu21+hSbcaaWf11WU0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=E1a2hW7c; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="E1a2hW7c" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1756130070; x=1787666070; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Y6BmQsoHEXKtoNEql38zgrbM5vjoAf3tiVb+ccRW6lQ=; b=E1a2hW7cBNEG1u2rNL6Hh2FMu3nbPANoUGKwUA9VRfxd3O62GQJGkQF7 i8mhM68livGkiRtUzDwkHGklfnJAY68dSiWOIVw/rjZ5TzzhHHhVatGT2 MmmPQMVbi17zKTZNJYCXtUk8bSB25HB4WclSpYYgv2A1wbIN22JUpMqkt au5Q9j7GgNvgTfjltqpkl+rDx+U6rtQvbHtmEs+CZb3TpzPHgs0WHynm+ 23kHswzanPg3jrObwI9iI1Oe0Ow8RLYd9ACL1kETOQIBZCSg/dIvfhSKF 1li0eipw/pCgDfW0+pgx94gHgbRZJK5AyatexnHuoeEg2aUkDPC4osYKu Q==; X-CSE-ConnectionGUID: snyz6/BAQi66TzB6P+DCWg== X-CSE-MsgGUID: PnALeboFQjKgmTPwTjaRRQ== X-IronPort-AV: E=McAfee;i="6800,10657,11533"; a="68936759" X-IronPort-AV: E=Sophos;i="6.18,213,1751266800"; d="scan'208";a="68936759" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2025 06:54:28 -0700 X-CSE-ConnectionGUID: Um2xtZD8R26bkv+LFzbVDA== X-CSE-MsgGUID: XKFhhgNWSReXhDEJmopKUw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.18,213,1751266800"; d="scan'208";a="168547678" Received: from vpanait-mobl.ger.corp.intel.com (HELO kekkonen.fi.intel.com) ([10.245.245.7]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2025 06:54:18 -0700 Received: from punajuuri.localdomain (unknown [192.168.240.130]) by kekkonen.fi.intel.com (Postfix) with ESMTP id C755E121F6F; Mon, 25 Aug 2025 16:54:01 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.98.2) (envelope-from ) id 1uqXe5-00000007PON-3Hj0; Mon, 25 Aug 2025 16:54:01 +0300 Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo From: Sakari Ailus To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Linus Walleij , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Cai Huoqing , Haibo Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Marek Vasut , Geert Uytterhoeven , Magnus Damm , Lad Prabhakar , Maxime Coquelin , Alexandre Torgue , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Francesco Dolcini , =?utf-8?q?Jo=C3=A3o_Paulo_Gon?= =?utf-8?q?=C3=A7alves?= , Rui Miguel Silva , Jean-Baptiste Maneyrol , Subhajit Ghosh , Gerald Loacker , Andreas Klinger , Crt Mori , Waqar Hameed , Julien Stephan , Peter Zijlstra , Sakari Ailus , Greg KH , Bo Liu , Al Viro , Sean Nyekjaer , Frank Li , Han Xu , Rayyan Ansari , Gustavo Vaz , Matti Vaittinen , Alexandru Ardelean , "Jiri Slaby (SUSE)" , "Rob Herring (Arm)" , Fabrice Gasnier , =?utf-8?q?Uwe_Kleine-K=C3=B6?= =?utf-8?q?nig?= , Olivier Moysan , Christophe JAILLET , Marcelo Schmitt , Vasileios Amoiridis , Srinivas Pandruvada , Hans de Goede , Javier Carrasco , Abhash Jha , chuguangqing , Shreeya Patel , Per-Daniel Olsson , =?utf-8?b?QmFybmFiw6FzIEN6?= =?utf-8?b?w6ltw6Fu?= , Neil Armstrong , David Laight , Jakob Hauser Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-renesas-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@lists.linux.dev Subject: [PATCH v3 06/12] iio: gyro: Remove redundant pm_runtime_mark_last_busy() calls Date: Mon, 25 Aug 2025 16:53:55 +0300 Message-ID: <20250825135401.1765847-7-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250825135401.1765847-1-sakari.ailus@linux.intel.com> References: <20250825135401.1765847-1-sakari.ailus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Status: O pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy(). Signed-off-by: Sakari Ailus Reviewed-by: Linus Walleij Reviewed-by: Rui Miguel Silva --- drivers/iio/gyro/bmg160_core.c | 4 +--- drivers/iio/gyro/fxas21002c_core.c | 2 -- drivers/iio/gyro/mpu3050-core.c | 3 --- drivers/iio/gyro/mpu3050-i2c.c | 1 - 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/iio/gyro/bmg160_core.c b/drivers/iio/gyro/bmg160_core.c index 781d3e96645f..38394b5f3275 100644 --- a/drivers/iio/gyro/bmg160_core.c +++ b/drivers/iio/gyro/bmg160_core.c @@ -309,10 +309,8 @@ static int bmg160_set_power_state(struct bmg160_data *data, bool on) if (on) ret = pm_runtime_get_sync(dev); - else { - pm_runtime_mark_last_busy(dev); + else ret = pm_runtime_put_autosuspend(dev); - } if (ret < 0) { dev_err(dev, "Failed: bmg160_set_power_state for %d\n", on); diff --git a/drivers/iio/gyro/fxas21002c_core.c b/drivers/iio/gyro/fxas21002c_core.c index 754c8a564ba4..a88670207cec 100644 --- a/drivers/iio/gyro/fxas21002c_core.c +++ b/drivers/iio/gyro/fxas21002c_core.c @@ -373,8 +373,6 @@ static int fxas21002c_pm_put(struct fxas21002c_data *data) { struct device *dev = regmap_get_device(data->regmap); - pm_runtime_mark_last_busy(dev); - return pm_runtime_put_autosuspend(dev); } diff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c index 16553948c5c3..67ae7d1012bc 100644 --- a/drivers/iio/gyro/mpu3050-core.c +++ b/drivers/iio/gyro/mpu3050-core.c @@ -370,7 +370,6 @@ static int mpu3050_read_raw(struct iio_dev *indio_dev, out_read_raw_unlock: mutex_unlock(&mpu3050->lock); - pm_runtime_mark_last_busy(mpu3050->dev); pm_runtime_put_autosuspend(mpu3050->dev); return ret; @@ -662,7 +661,6 @@ static int mpu3050_buffer_postdisable(struct iio_dev *indio_dev) { struct mpu3050 *mpu3050 = iio_priv(indio_dev); - pm_runtime_mark_last_busy(mpu3050->dev); pm_runtime_put_autosuspend(mpu3050->dev); return 0; @@ -976,7 +974,6 @@ static int mpu3050_drdy_trigger_set_state(struct iio_trigger *trig, if (ret) dev_err(mpu3050->dev, "error resetting FIFO\n"); - pm_runtime_mark_last_busy(mpu3050->dev); pm_runtime_put_autosuspend(mpu3050->dev); mpu3050->hw_irq_trigger = false; diff --git a/drivers/iio/gyro/mpu3050-i2c.c b/drivers/iio/gyro/mpu3050-i2c.c index 8e284f47242c..092878f2c886 100644 --- a/drivers/iio/gyro/mpu3050-i2c.c +++ b/drivers/iio/gyro/mpu3050-i2c.c @@ -27,7 +27,6 @@ static int mpu3050_i2c_bypass_deselect(struct i2c_mux_core *mux, u32 chan_id) { struct mpu3050 *mpu3050 = i2c_mux_priv(mux); - pm_runtime_mark_last_busy(mpu3050->dev); pm_runtime_put_autosuspend(mpu3050->dev); return 0; }