All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: Andrew Davis <afd@ti.com>,
	Andre Przywara <andre.przywara@arm.com>,
	Russell King <linux@armlinux.org.uk>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Daniel Mack <daniel@zonque.org>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	Andrew Davis <afd@ti.com>
Subject: Re: [PATCH v2 3/7] ARM: orion5x: Switch to new sys-off handler API
Date: Mon, 02 Sep 2024 16:28:08 +0200	[thread overview]
Message-ID: <87mskqf7uv.fsf@BLaptop.bootlin.com> (raw)
In-Reply-To: <20240729123538.175704-4-afd@ti.com>

Hi Andrew,

> Kernel now supports chained power-off handlers. Use
> register_platform_power_off() that registers a platform level power-off
> handler. Legacy pm_power_off() will be removed once all drivers and archs
> are converted to the new sys-off API.
>
> Signed-off-by: Andrew Davis <afd@ti.com>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Applied on mvebu/arm

Thanks,

Gregory

> ---
>  arch/arm/mach-orion5x/board-mss2.c             | 2 +-
>  arch/arm/mach-orion5x/dns323-setup.c           | 6 +++---
>  arch/arm/mach-orion5x/kurobox_pro-setup.c      | 2 +-
>  arch/arm/mach-orion5x/mv2120-setup.c           | 2 +-
>  arch/arm/mach-orion5x/net2big-setup.c          | 2 +-
>  arch/arm/mach-orion5x/terastation_pro2-setup.c | 2 +-
>  arch/arm/mach-orion5x/ts209-setup.c            | 2 +-
>  arch/arm/mach-orion5x/ts409-setup.c            | 2 +-
>  8 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-orion5x/board-mss2.c b/arch/arm/mach-orion5x/board-mss2.c
> index b0f16d223adf5..9e3d69891d2f6 100644
> --- a/arch/arm/mach-orion5x/board-mss2.c
> +++ b/arch/arm/mach-orion5x/board-mss2.c
> @@ -82,5 +82,5 @@ static void mss2_power_off(void)
>  void __init mss2_init(void)
>  {
>  	/* register mss2 specific power-off method */
> -	pm_power_off = mss2_power_off;
> +	register_platform_power_off(mss2_power_off);
>  }
> diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
> index 062109efa0ecc..fcd38ff7ca459 100644
> --- a/arch/arm/mach-orion5x/dns323-setup.c
> +++ b/arch/arm/mach-orion5x/dns323-setup.c
> @@ -700,7 +700,7 @@ static void __init dns323_init(void)
>  		if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
>  		    gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
>  			pr_err("DNS-323: failed to setup power-off GPIO\n");
> -		pm_power_off = dns323a_power_off;
> +		register_platform_power_off(dns323a_power_off);
>  		break;
>  	case DNS323_REV_B1:
>  		/* 5182 built-in SATA init */
> @@ -717,7 +717,7 @@ static void __init dns323_init(void)
>  		if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
>  		    gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
>  			pr_err("DNS-323: failed to setup power-off GPIO\n");
> -		pm_power_off = dns323b_power_off;
> +		register_platform_power_off(dns323b_power_off);
>  		break;
>  	case DNS323_REV_C1:
>  		/* 5182 built-in SATA init */
> @@ -727,7 +727,7 @@ static void __init dns323_init(void)
>  		if (gpio_request(DNS323C_GPIO_POWER_OFF, "POWEROFF") != 0 ||
>  		    gpio_direction_output(DNS323C_GPIO_POWER_OFF, 0) != 0)
>  			pr_err("DNS-323: failed to setup power-off GPIO\n");
> -		pm_power_off = dns323c_power_off;
> +		register_platform_power_off(dns323c_power_off);
>  
>  		/* Now, -this- should theoretically be done by the sata_mv driver
>  		 * once I figure out what's going on there. Maybe the behaviour
> diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c
> index acba066180801..339b10891808f 100644
> --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c
> +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c
> @@ -373,7 +373,7 @@ static void __init kurobox_pro_init(void)
>  	i2c_register_board_info(0, &kurobox_pro_i2c_rtc, 1);
>  
>  	/* register Kurobox Pro specific power-off method */
> -	pm_power_off = kurobox_pro_power_off;
> +	register_platform_power_off(kurobox_pro_power_off);
>  }
>  
>  #ifdef CONFIG_MACH_KUROBOX_PRO
> diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion5x/mv2120-setup.c
> index b7327a6128353..5b0249f109cde 100644
> --- a/arch/arm/mach-orion5x/mv2120-setup.c
> +++ b/arch/arm/mach-orion5x/mv2120-setup.c
> @@ -238,7 +238,7 @@ static void __init mv2120_init(void)
>  	if (gpio_request(MV2120_GPIO_POWER_OFF, "POWEROFF") != 0 ||
>  	    gpio_direction_output(MV2120_GPIO_POWER_OFF, 1) != 0)
>  		pr_err("mv2120: failed to setup power-off GPIO\n");
> -	pm_power_off = mv2120_power_off;
> +	register_platform_power_off(mv2120_power_off);
>  }
>  
>  /* Warning: HP uses a wrong mach-type (=526) in their bootloader */
> diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion5x/net2big-setup.c
> index 6ad9740b426b6..4afd9b4c71a94 100644
> --- a/arch/arm/mach-orion5x/net2big-setup.c
> +++ b/arch/arm/mach-orion5x/net2big-setup.c
> @@ -423,7 +423,7 @@ static void __init net2big_init(void)
>  
>  	if (gpio_request(NET2BIG_GPIO_POWER_OFF, "power-off") == 0 &&
>  	    gpio_direction_output(NET2BIG_GPIO_POWER_OFF, 0) == 0)
> -		pm_power_off = net2big_power_off;
> +		register_platform_power_off(net2big_power_off);
>  	else
>  		pr_err("net2big: failed to configure power-off GPIO\n");
>  
> diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c
> index 23a5521c68336..a9f01859d1012 100644
> --- a/arch/arm/mach-orion5x/terastation_pro2-setup.c
> +++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c
> @@ -349,7 +349,7 @@ static void __init tsp2_init(void)
>  	i2c_register_board_info(0, &tsp2_i2c_rtc, 1);
>  
>  	/* register Terastation Pro II specific power-off method */
> -	pm_power_off = tsp2_power_off;
> +	register_platform_power_off(tsp2_power_off);
>  }
>  
>  MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live")
> diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c
> index bab8ba0e01ab9..de9092e992c56 100644
> --- a/arch/arm/mach-orion5x/ts209-setup.c
> +++ b/arch/arm/mach-orion5x/ts209-setup.c
> @@ -314,7 +314,7 @@ static void __init qnap_ts209_init(void)
>  	i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1);
>  
>  	/* register tsx09 specific power-off method */
> -	pm_power_off = qnap_tsx09_power_off;
> +	register_platform_power_off(qnap_tsx09_power_off);
>  }
>  
>  MACHINE_START(TS209, "QNAP TS-109/TS-209")
> diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c
> index 8131982c10d97..725688aa5cba7 100644
> --- a/arch/arm/mach-orion5x/ts409-setup.c
> +++ b/arch/arm/mach-orion5x/ts409-setup.c
> @@ -312,7 +312,7 @@ static void __init qnap_ts409_init(void)
>  	platform_device_register(&ts409_leds);
>  
>  	/* register tsx09 specific power-off method */
> -	pm_power_off = qnap_tsx09_power_off;
> +	register_platform_power_off(qnap_tsx09_power_off);
>  }
>  
>  MACHINE_START(TS409, "QNAP TS-409")
> -- 
> 2.39.2

  reply	other threads:[~2024-09-02 14:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-29 12:35 [PATCH v2 0/7] Switch more ARM plats to sys-off handler API Andrew Davis
2024-07-29 12:35 ` [PATCH v2 1/7] ARM: highbank: Switch to new " Andrew Davis
2024-07-29 12:35 ` [PATCH v2 2/7] ARM: imx: " Andrew Davis
2024-07-29 12:35 ` [PATCH v2 3/7] ARM: orion5x: " Andrew Davis
2024-09-02 14:28   ` Gregory CLEMENT [this message]
2024-07-29 12:35 ` [PATCH v2 4/7] ARM: pxa: " Andrew Davis
2024-07-29 12:35 ` [PATCH v2 5/7] ARM: sa1100: " Andrew Davis
2024-07-29 12:35 ` [PATCH v2 6/7] ARM: vt8500: " Andrew Davis
2024-07-29 12:35 ` [PATCH v2 7/7] arm/xen: " Andrew Davis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mskqf7uv.fsf@BLaptop.bootlin.com \
    --to=gregory.clement@bootlin.com \
    --cc=afd@ti.com \
    --cc=andre.przywara@arm.com \
    --cc=andrew@lunn.ch \
    --cc=daniel@zonque.org \
    --cc=festevam@gmail.com \
    --cc=haojian.zhuang@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=robert.jarzmik@free.fr \
    --cc=s.hauer@pengutronix.de \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.