^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) * Elonics R820T silicon tuner driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Copyright (C) 2012 Antti Palosaari <crope@iki.fi>
^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 R820T_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #define R820T_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <media/dvb_frontend.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) enum r820t_chip {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) CHIP_R820T,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) CHIP_R620D,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) CHIP_R828D,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) CHIP_R828,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) CHIP_R828S,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) CHIP_R820C,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) struct r820t_config {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) u8 i2c_addr; /* 0x34 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) u32 xtal;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) enum r820t_chip rafael_chip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) unsigned max_i2c_msg_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) bool use_diplexer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) bool use_predetect;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) #if IS_REACHABLE(CONFIG_MEDIA_TUNER_R820T)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) struct dvb_frontend *r820t_attach(struct dvb_frontend *fe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) struct i2c_adapter *i2c,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) const struct r820t_config *cfg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) static inline struct dvb_frontend *r820t_attach(struct dvb_frontend *fe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) struct i2c_adapter *i2c,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) const struct r820t_config *cfg)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) pr_warn("%s: driver disabled by Kconfig\n", __func__);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) return NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) #endif