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) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) #ifndef __TDA8290_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) #define __TDA8290_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #include <linux/i2c.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #include <media/dvb_frontend.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include "tda18271.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) enum tda8290_lna {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 	TDA8290_LNA_OFF = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 	TDA8290_LNA_GP0_HIGH_ON = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 	TDA8290_LNA_GP0_HIGH_OFF = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 	TDA8290_LNA_ON_BRIDGE = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) struct tda829x_config {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 	enum tda8290_lna lna_cfg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 	unsigned int probe_tuner:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #define TDA829X_PROBE_TUNER 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #define TDA829X_DONT_PROBE  1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 	unsigned int no_i2c_gate:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 	struct tda18271_std_map *tda18271_std_map;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #if IS_REACHABLE(CONFIG_MEDIA_TUNER_TDA8290)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) extern int tda829x_probe(struct i2c_adapter *i2c_adap, u8 i2c_addr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) extern struct dvb_frontend *tda829x_attach(struct dvb_frontend *fe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 					   struct i2c_adapter *i2c_adap,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 					   u8 i2c_addr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 					   struct tda829x_config *cfg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) static inline int tda829x_probe(struct i2c_adapter *i2c_adap, u8 i2c_addr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 	return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) static inline struct dvb_frontend *tda829x_attach(struct dvb_frontend *fe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 						  struct i2c_adapter *i2c_adap,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 						  u8 i2c_addr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 						  struct tda829x_config *cfg)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 	printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 	       __func__);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 	return NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) #endif /* __TDA8290_H__ */