staging: vchiq: Make creation of vchiq cdev optional
Before this commit, vchiq cdev (/dev/vchiq) was always created during platform initialization. Introduce a new Kconfig option CONFIG_VCHIQ_CDEV which determines if the cdev will be created or not. Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Ojaswin Mujoo <ojaswin98@gmail.com> Link: https://lore.kernel.org/r/846c424dd4aae14d1cc28c8f30877a06e2b7dd10.1626882325.git.ojaswin98@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f05916281f
commit
2b5930fb3d
@ -19,6 +19,16 @@ config BCM2835_VCHIQ
|
|||||||
Defaults to Y when the Broadcom Videocore services
|
Defaults to Y when the Broadcom Videocore services
|
||||||
are included in the build, N otherwise.
|
are included in the build, N otherwise.
|
||||||
|
|
||||||
|
if BCM2835_VCHIQ
|
||||||
|
|
||||||
|
config VCHIQ_CDEV
|
||||||
|
bool "VCHIQ Character Driver"
|
||||||
|
help
|
||||||
|
Enable the creation of VCHIQ character driver to help
|
||||||
|
communicate with the Videocore platform.
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
source "drivers/staging/vc04_services/bcm2835-audio/Kconfig"
|
source "drivers/staging/vc04_services/bcm2835-audio/Kconfig"
|
||||||
|
|
||||||
source "drivers/staging/vc04_services/bcm2835-camera/Kconfig"
|
source "drivers/staging/vc04_services/bcm2835-camera/Kconfig"
|
||||||
|
@ -7,7 +7,10 @@ vchiq-objs := \
|
|||||||
interface/vchiq_arm/vchiq_2835_arm.o \
|
interface/vchiq_arm/vchiq_2835_arm.o \
|
||||||
interface/vchiq_arm/vchiq_debugfs.o \
|
interface/vchiq_arm/vchiq_debugfs.o \
|
||||||
interface/vchiq_arm/vchiq_connected.o \
|
interface/vchiq_arm/vchiq_connected.o \
|
||||||
interface/vchiq_arm/vchiq_dev.o \
|
|
||||||
|
ifdef CONFIG_VCHIQ_CDEV
|
||||||
|
vchiq-objs += interface/vchiq_arm/vchiq_dev.o
|
||||||
|
endif
|
||||||
|
|
||||||
obj-$(CONFIG_SND_BCM2835) += bcm2835-audio/
|
obj-$(CONFIG_SND_BCM2835) += bcm2835-audio/
|
||||||
obj-$(CONFIG_VIDEO_BCM2835) += bcm2835-camera/
|
obj-$(CONFIG_VIDEO_BCM2835) += bcm2835-camera/
|
||||||
|
@ -174,12 +174,21 @@ vchiq_instance_get_trace(struct vchiq_instance *instance);
|
|||||||
extern void
|
extern void
|
||||||
vchiq_instance_set_trace(struct vchiq_instance *instance, int trace);
|
vchiq_instance_set_trace(struct vchiq_instance *instance, int trace);
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_VCHIQ_CDEV)
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
vchiq_deregister_chrdev(void);
|
vchiq_deregister_chrdev(void);
|
||||||
|
|
||||||
extern int
|
extern int
|
||||||
vchiq_register_chrdev(struct device *parent);
|
vchiq_register_chrdev(struct device *parent);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
static inline void vchiq_deregister_chrdev(void) { }
|
||||||
|
static inline int vchiq_register_chrdev(struct device *parent) { return 0; }
|
||||||
|
|
||||||
|
#endif /* IS_ENABLED(CONFIG_VCHIQ_CDEV) */
|
||||||
|
|
||||||
extern enum vchiq_status
|
extern enum vchiq_status
|
||||||
service_callback(enum vchiq_reason reason, struct vchiq_header *header,
|
service_callback(enum vchiq_reason reason, struct vchiq_header *header,
|
||||||
unsigned int handle, void *bulk_userdata);
|
unsigned int handle, void *bulk_userdata);
|
||||||
|
Reference in New Issue
Block a user