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 Microtune MT2060 "Single chip dual conversion broadband tuner"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  *  Copyright (c) 2006 Olivier DANET <odanet@caramail.com>
^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 MT2060_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #define MT2060_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) struct dvb_frontend;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) struct i2c_adapter;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)  * I2C address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)  * 0x60, ...
^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) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)  * struct mt2060_platform_data - Platform data for the mt2060 driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)  * @clock_out: Clock output setting. 0 = off, 1 = CLK/4, 2 = CLK/2, 3 = CLK/1.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)  * @if1: First IF used [MHz]. 0 defaults to 1220.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)  * @i2c_write_max: Maximum number of bytes I2C adapter can write at once.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)  *  0 defaults to maximum.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)  * @dvb_frontend: DVB frontend.
^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) struct mt2060_platform_data {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 	u8 clock_out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 	u16 if1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 	unsigned int i2c_write_max:5;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 	struct dvb_frontend *dvb_frontend;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) /* configuration struct for mt2060_attach() */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) struct mt2060_config {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 	u8 i2c_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 	u8 clock_out; /* 0 = off, 1 = CLK/4, 2 = CLK/2, 3 = CLK/1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) #if IS_REACHABLE(CONFIG_MEDIA_TUNER_MT2060)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) extern struct dvb_frontend * mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) static inline struct dvb_frontend * mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 	return NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) #endif // CONFIG_MEDIA_TUNER_MT2060
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) #endif