char: vcio: Rewrite as a firmware node child
authorPhil Elwell <phil@raspberrypi.com>
Mon, 11 Oct 2021 16:33:05 +0000 (17:33 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 21 Mar 2022 16:04:26 +0000 (16:04 +0000)
commit9304b87f9d9533ff617aada12610f3046c5047a7
treea48928a78719a9327757323d2bf1e02852a61a15
parent6f58bc8778b86b340bef6b95af1a7fa7be280ab2
char: vcio: Rewrite as a firmware node child

The old vcio driver is a simple character device that manually locates
the firmware driver. Initialising it before the firmware driver causes
a failure, and no retries are attempted.

Rewrite vcio as a platform driver that depends on a DT node for its
instantiation and the location of the firmware driver, making use of
the miscdevice framework to reduce the code size.

N.B. Using miscdevice changes the udev SUBSYSTEM string, so a change
to the companion udev rule is required in order to continue to set
the correct device permissions, e.g.:

    KERNEL="vcio", GROUP="video", MODE="0660"

See: https://github.com/raspberrypi/linux/issues/4620

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
drivers/char/broadcom/vcio.c