media: allegro: encode bit fields separately
authorMichael Tretter <m.tretter@pengutronix.de>
Mon, 13 Jul 2020 14:42:24 +0000 (16:42 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Jul 2020 12:00:31 +0000 (14:00 +0200)
commitd30e841216411cb95ffbb56252f8431fd752c54d
treed72f703d897fbf4745fca3b989d0819e4b644a48
parent62ed97df7dc1bbb564fcd1c4f795aaa74245c63f
media: allegro: encode bit fields separately

Even bits in bitfields do not keep their position, but move around or
move to other bitfields. Therefore, the driver has to handle bitfields
differently depending on the firmware version.

Create separate fields for the options that have been in bitfields and
handle the bitfields when encoding the message.

As a side effect, this makes the messages a bit more readable.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/allegro-dvt/allegro-core.c
drivers/staging/media/allegro-dvt/allegro-mail.c
drivers/staging/media/allegro-dvt/allegro-mail.h