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

Commit 622b828a authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (13238): v4l2_subdev: rename tuner s_standby operation to core s_power



Upcoming I2C v4l2_subdev drivers need a way to control the subdevice
power state from the core. This use case is already partially covered by
the tuner s_standby operation, but no way to explicitly come back from
the standby state is available.

Rename the tuner s_standby operation to core s_power, and fix tuner
drivers accordingly. The tuner core will call s_power(0) instead of
s_standby(). No explicit call to s_power(1) is required for tuners as
they are supposed to wake up from standby automatically.

[mchehab@redhat.com: CodingStyle fix]
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 7ef68e60
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -830,7 +830,7 @@ static int au0828_v4l2_close(struct file *filp)
		au0828_uninit_isoc(dev);

		/* Save some power by putting tuner to sleep */
		v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_standby);
		v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_power, 0);

		/* When close the device, set the usb intf0 into alt0 to free
		   USB bandwidth */
+1 −1
Original line number Diff line number Diff line
@@ -2106,7 +2106,7 @@ static int cx231xx_v4l2_close(struct file *filp)
		}

		/* Save some power by putting tuner to sleep */
		call_all(dev, tuner, s_standby);
		call_all(dev, core, s_power, 0);

		/* do this before setting alternate! */
		cx231xx_uninit_isoc(dev);
+1 −1
Original line number Diff line number Diff line
@@ -919,7 +919,7 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
	cx23885_i2c_register(&dev->i2c_bus[1]);
	cx23885_i2c_register(&dev->i2c_bus[2]);
	cx23885_card_setup(dev);
	call_all(dev, tuner, s_standby);
	call_all(dev, core, s_power, 0);
	cx23885_ir_init(dev);

	if (cx23885_boards[dev->board].porta == CX23885_ANALOG_VIDEO) {
+1 −1
Original line number Diff line number Diff line
@@ -920,7 +920,7 @@ static int dvb_register(struct cx23885_tsport *port)
	fe0->dvb.frontend->callback = cx23885_tuner_callback;

	/* Put the analog decoder in standby to keep it quiet */
	call_all(dev, tuner, s_standby);
	call_all(dev, core, s_power, 0);

	if (fe0->dvb.frontend->ops.analog_ops.standby)
		fe0->dvb.frontend->ops.analog_ops.standby(fe0->dvb.frontend);
+1 −1
Original line number Diff line number Diff line
@@ -3267,7 +3267,7 @@ static void cx88_card_setup(struct cx88_core *core)
			    ctl.fname);
		call_all(core, tuner, s_config, &xc2028_cfg);
	}
	call_all(core, tuner, s_standby);
	call_all(core, core, s_power, 0);
}

/* ------------------------------------------------------------------ */
Loading