Linux I2C development
 help / color / mirror / Atom feed
* [PATCH] i2c: qcom-geni: Use modern PM operation macros
@ 2026-07-29  7:30 Mukesh Kumar Savaliya
  2026-08-05  9:43 ` Viken Dadhaniya
  0 siblings, 1 reply; 2+ messages in thread
From: Mukesh Kumar Savaliya @ 2026-07-29  7:30 UTC (permalink / raw)
  To: mukesh.savaliya, viken.dadhaniya, andi.shyti, linux-arm-msm,
	linux-i2c, linux-kernel

The driver uses the legacy SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() and
SET_RUNTIME_PM_OPS() helpers to initialize struct dev_pm_ops.

Switch to the modern NOIRQ_SYSTEM_SLEEP_PM_OPS() and RUNTIME_PM_OPS()
macros instead. These macros keep PM callbacks referenced by the
compiler and help avoid potential unused-function warnings in
configurations where PM support is disabled or partially enabled.

No functional change intended.

Signed-off-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
---
 drivers/i2c/busses/i2c-qcom-geni.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index d5c977e34994..71ae821dd147 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -1163,7 +1163,7 @@ static void geni_i2c_shutdown(struct platform_device *pdev)
 	i2c_mark_adapter_suspended(&gi2c->adap);
 }
 
-static int __maybe_unused geni_i2c_runtime_suspend(struct device *dev)
+static int geni_i2c_runtime_suspend(struct device *dev)
 {
 	int ret = 0;
 	struct geni_i2c_dev *gi2c = dev_get_drvdata(dev);
@@ -1181,7 +1181,7 @@ static int __maybe_unused geni_i2c_runtime_suspend(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused geni_i2c_runtime_resume(struct device *dev)
+static int geni_i2c_runtime_resume(struct device *dev)
 {
 	int ret = 0;
 	struct geni_i2c_dev *gi2c = dev_get_drvdata(dev);
@@ -1197,7 +1197,7 @@ static int __maybe_unused geni_i2c_runtime_resume(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused geni_i2c_suspend_noirq(struct device *dev)
+static int geni_i2c_suspend_noirq(struct device *dev)
 {
 	struct geni_i2c_dev *gi2c = dev_get_drvdata(dev);
 	int ret;
@@ -1211,7 +1211,7 @@ static int __maybe_unused geni_i2c_suspend_noirq(struct device *dev)
 	return ret;
 }
 
-static int __maybe_unused geni_i2c_resume_noirq(struct device *dev)
+static int geni_i2c_resume_noirq(struct device *dev)
 {
 	struct geni_i2c_dev *gi2c = dev_get_drvdata(dev);
 	int ret;
@@ -1225,9 +1225,10 @@ static int __maybe_unused geni_i2c_resume_noirq(struct device *dev)
 }
 
 static const struct dev_pm_ops geni_i2c_pm_ops = {
-	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(geni_i2c_suspend_noirq, geni_i2c_resume_noirq)
-	SET_RUNTIME_PM_OPS(geni_i2c_runtime_suspend, geni_i2c_runtime_resume,
-									NULL)
+	NOIRQ_SYSTEM_SLEEP_PM_OPS(geni_i2c_suspend_noirq,
+				  geni_i2c_resume_noirq)
+	RUNTIME_PM_OPS(geni_i2c_runtime_suspend, geni_i2c_runtime_resume,
+		       NULL)
 };
 
 static const struct geni_i2c_desc geni_i2c = {
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] i2c: qcom-geni: Use modern PM operation macros
  2026-07-29  7:30 [PATCH] i2c: qcom-geni: Use modern PM operation macros Mukesh Kumar Savaliya
@ 2026-08-05  9:43 ` Viken Dadhaniya
  0 siblings, 0 replies; 2+ messages in thread
From: Viken Dadhaniya @ 2026-08-05  9:43 UTC (permalink / raw)
  To: Mukesh Kumar Savaliya, andi.shyti, linux-arm-msm, linux-i2c,
	linux-kernel

Reviewed-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>

On 7/29/2026 1:00 PM, Mukesh Kumar Savaliya wrote:
> The driver uses the legacy SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() and
> SET_RUNTIME_PM_OPS() helpers to initialize struct dev_pm_ops.
> 
> Switch to the modern NOIRQ_SYSTEM_SLEEP_PM_OPS() and RUNTIME_PM_OPS()
> macros instead. These macros keep PM callbacks referenced by the
> compiler and help avoid potential unused-function warnings in
> configurations where PM support is disabled or partially enabled.
> 
> No functional change intended.
> 
> Signed-off-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
> ---
>  drivers/i2c/busses/i2c-qcom-geni.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
> index d5c977e34994..71ae821dd147 100644
> --- a/drivers/i2c/busses/i2c-qcom-geni.c
> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
> @@ -1163,7 +1163,7 @@ static void geni_i2c_shutdown(struct platform_device *pdev)
>  	i2c_mark_adapter_suspended(&gi2c->adap);
>  }
>  
> -static int __maybe_unused geni_i2c_runtime_suspend(struct device *dev)
> +static int geni_i2c_runtime_suspend(struct device *dev)
>  {
>  	int ret = 0;
>  	struct geni_i2c_dev *gi2c = dev_get_drvdata(dev);
> @@ -1181,7 +1181,7 @@ static int __maybe_unused geni_i2c_runtime_suspend(struct device *dev)
>  	return 0;
>  }
>  
> -static int __maybe_unused geni_i2c_runtime_resume(struct device *dev)
> +static int geni_i2c_runtime_resume(struct device *dev)
>  {
>  	int ret = 0;
>  	struct geni_i2c_dev *gi2c = dev_get_drvdata(dev);
> @@ -1197,7 +1197,7 @@ static int __maybe_unused geni_i2c_runtime_resume(struct device *dev)
>  	return 0;
>  }
>  
> -static int __maybe_unused geni_i2c_suspend_noirq(struct device *dev)
> +static int geni_i2c_suspend_noirq(struct device *dev)
>  {
>  	struct geni_i2c_dev *gi2c = dev_get_drvdata(dev);
>  	int ret;
> @@ -1211,7 +1211,7 @@ static int __maybe_unused geni_i2c_suspend_noirq(struct device *dev)
>  	return ret;
>  }
>  
> -static int __maybe_unused geni_i2c_resume_noirq(struct device *dev)
> +static int geni_i2c_resume_noirq(struct device *dev)
>  {
>  	struct geni_i2c_dev *gi2c = dev_get_drvdata(dev);
>  	int ret;
> @@ -1225,9 +1225,10 @@ static int __maybe_unused geni_i2c_resume_noirq(struct device *dev)
>  }
>  
>  static const struct dev_pm_ops geni_i2c_pm_ops = {
> -	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(geni_i2c_suspend_noirq, geni_i2c_resume_noirq)
> -	SET_RUNTIME_PM_OPS(geni_i2c_runtime_suspend, geni_i2c_runtime_resume,
> -									NULL)
> +	NOIRQ_SYSTEM_SLEEP_PM_OPS(geni_i2c_suspend_noirq,
> +				  geni_i2c_resume_noirq)
> +	RUNTIME_PM_OPS(geni_i2c_runtime_suspend, geni_i2c_runtime_resume,
> +		       NULL)
>  };
>  
>  static const struct geni_i2c_desc geni_i2c = {


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-05  9:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29  7:30 [PATCH] i2c: qcom-geni: Use modern PM operation macros Mukesh Kumar Savaliya
2026-08-05  9:43 ` Viken Dadhaniya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox