diff options
author | Maciej S. Szmigiero <mail@maciej.szmigiero.name> | 2019-04-29 12:16:52 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-05-28 15:29:53 -0400 |
commit | ccf7a31f1ed96ee211f660c488d49a85f586417c (patch) | |
tree | d8e5cbfe2cb53a51575c4bb244b191ff3cbf0b6d /include/media | |
parent | 39cb46751e2fbb72e0698f80e339db1fd4e1f50e (diff) | |
download | linux-ccf7a31f1ed96ee211f660c488d49a85f586417c.tar.gz linux-ccf7a31f1ed96ee211f660c488d49a85f586417c.tar.bz2 linux-ccf7a31f1ed96ee211f660c488d49a85f586417c.zip |
media: cx25840: don't open-code cx25840_reset() inside cx25840_load_fw()
cx25840_load_fw() does the same thing as cx25840_reset(), only keeps
"is_initialized" flag so any further invocation of this function besides
the first one is a NOP.
Let's just call cx25840_reset() directly from cx25840_load_fw() instead of
open coding it there.
While we are at it, let's also improve comments about cx25840_load_fw()
so they are current and in the proper style (one of them even referred to a
non-existing cx25840 init operation).
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/drv-intf/cx25840.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/include/media/drv-intf/cx25840.h b/include/media/drv-intf/cx25840.h index 328ddb359fdf..4eae27c163ba 100644 --- a/include/media/drv-intf/cx25840.h +++ b/include/media/drv-intf/cx25840.h @@ -9,17 +9,23 @@ #ifndef _CX25840_H_ #define _CX25840_H_ -/* Note that the cx25840 driver requires that the bridge driver calls the - v4l2_subdev's init operation in order to load the driver's firmware. - Without this the audio standard detection will fail and you will - only get mono. - - Since loading the firmware is often problematic when the driver is - compiled into the kernel I recommend postponing calling this function - until the first open of the video device. Another reason for - postponing it is that loading this firmware takes a long time (seconds) - due to the slow i2c bus speed. So it will speed up the boot process if - you can avoid loading the fw as long as the video device isn't used. */ +/* + * Note that the cx25840 driver requires that the bridge driver calls the + * v4l2_subdev's load_fw operation in order to load the driver's firmware. + * This will load the firmware on the first invocation (further ones are NOP). + * Without this the audio standard detection will fail and you will + * only get mono. + * Alternatively, you can call the reset operation (this can be done + * multiple times if needed, each invocation will fully reinitialize + * the device). + * + * Since loading the firmware is often problematic when the driver is + * compiled into the kernel I recommend postponing calling this function + * until the first open of the video device. Another reason for + * postponing it is that loading this firmware takes a long time (seconds) + * due to the slow i2c bus speed. So it will speed up the boot process if + * you can avoid loading the fw as long as the video device isn't used. + */ enum cx25840_video_input { /* Composite video inputs In1-In8 */ |