Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8418804e authored by Michael Ellerman's avatar Michael Ellerman
Browse files

Merge branch 'topic/pm-power-off' into next

parents 8a97577a 9178ba29
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -142,7 +142,6 @@ struct machdep_calls {
#endif

	void		(*restart)(char *cmd);
	void		(*power_off)(void);
	void		(*halt)(void);
	void		(*panic)(char *str);
	void		(*cpu_die)(void);
+3 −3
Original line number Diff line number Diff line
@@ -139,8 +139,8 @@ void machine_restart(char *cmd)
void machine_power_off(void)
{
	machine_shutdown();
	if (ppc_md.power_off)
		ppc_md.power_off();
	if (pm_power_off)
		pm_power_off();
#ifdef CONFIG_SMP
	smp_send_stop();
#endif
@@ -151,7 +151,7 @@ void machine_power_off(void)
/* Used by the G5 thermal driver */
EXPORT_SYMBOL_GPL(machine_power_off);

void (*pm_power_off)(void) = machine_power_off;
void (*pm_power_off)(void);
EXPORT_SYMBOL_GPL(pm_power_off);

void machine_halt(void)
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ static int avr_probe(struct i2c_client *client,
{
	avr_i2c_client = client;
	ppc_md.restart = avr_reset_system;
	ppc_md.power_off = avr_power_off_system;
	pm_power_off = avr_power_off_system;
	return 0;
}

+2 −1
Original line number Diff line number Diff line
@@ -212,6 +212,8 @@ static int __init efika_probe(void)
	DMA_MODE_READ = 0x44;
	DMA_MODE_WRITE = 0x48;

	pm_power_off = rtas_power_off;

	return 1;
}

@@ -225,7 +227,6 @@ define_machine(efika)
	.init_IRQ		= mpc52xx_init_irq,
	.get_irq		= mpc52xx_get_irq,
	.restart		= rtas_restart,
	.power_off		= rtas_power_off,
	.halt			= rtas_halt,
	.set_rtc_time		= rtas_set_rtc_time,
	.get_rtc_time		= rtas_get_rtc_time,
+4 −4
Original line number Diff line number Diff line
@@ -167,10 +167,10 @@ static int mcu_probe(struct i2c_client *client, const struct i2c_device_id *id)
	if (ret)
		goto err;

	/* XXX: this is potentially racy, but there is no lock for ppc_md */
	if (!ppc_md.power_off) {
	/* XXX: this is potentially racy, but there is no lock for pm_power_off */
	if (!pm_power_off) {
		glob_mcu = mcu;
		ppc_md.power_off = mcu_power_off;
		pm_power_off = mcu_power_off;
		dev_info(&client->dev, "will provide power-off service\n");
	}

@@ -197,7 +197,7 @@ static int mcu_remove(struct i2c_client *client)
	device_remove_file(&client->dev, &dev_attr_status);

	if (glob_mcu == mcu) {
		ppc_md.power_off = NULL;
		pm_power_off = NULL;
		glob_mcu = NULL;
	}

Loading