Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0-or-later */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  *  Driver for Xceive XC4000 "QAM/8VSB single chip tuner"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  *  Copyright (c) 2007 Steven Toth <stoth@linuxtv.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #ifndef __XC4000_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #define __XC4000_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/firmware.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) struct dvb_frontend;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) struct i2c_adapter;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) struct xc4000_config {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 	u8	i2c_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 	/* if non-zero, power management is enabled by default */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 	u8	default_pm;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 	/* value to be written to XREG_AMPLITUDE in DVB-T mode (0: no write) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 	u8	dvb_amplitude;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 	/* if non-zero, register 0x0E is set to filter analog TV video output */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 	u8	set_smoothedcvbs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	/* IF for DVB-T */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 	u32	if_khz;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) /* xc4000 callback command */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #define XC4000_TUNER_RESET		0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) /* For each bridge framework, when it attaches either analog or digital,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)  * it has to store a reference back to its _core equivalent structure,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)  * so that it can service the hardware by steering gpio's etc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)  * Each bridge implementation is different so cast devptr accordingly.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)  * The xc4000 driver cares not for this value, other than ensuring
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)  * it's passed back to a bridge during tuner_callback().
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) #if IS_REACHABLE(CONFIG_MEDIA_TUNER_XC4000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) extern struct dvb_frontend *xc4000_attach(struct dvb_frontend *fe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 					  struct i2c_adapter *i2c,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 					  struct xc4000_config *cfg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) static inline struct dvb_frontend *xc4000_attach(struct dvb_frontend *fe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 						 struct i2c_adapter *i2c,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 						 struct xc4000_config *cfg)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 	return NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) #endif