brintos

brintos / linux-shallow public Read only

0
0
Text · 1.5 KiB · 1e4f714 Raw
61 lines · c
1/* SPDX-License-Identifier: GPL-2.0-or-later */2/*3 *  Driver for Xceive XC5000 "QAM/8VSB single chip tuner"4 *5 *  Copyright (c) 2007 Steven Toth <stoth@linuxtv.org>6 */7 8#ifndef __XC5000_H__9#define __XC5000_H__10 11#include <linux/firmware.h>12 13struct dvb_frontend;14struct i2c_adapter;15 16#define XC5000A 117#define XC5000C 218 19struct xc5000_config {20	u8   i2c_address;21	u32  if_khz;22	u8   radio_input;23	u16  xtal_khz;24	u16  output_amp;25 26	int chip_id;27};28 29/* xc5000 callback command */30#define XC5000_TUNER_RESET		031 32/* Possible Radio inputs */33#define XC5000_RADIO_NOT_CONFIGURED		034#define XC5000_RADIO_FM1			135#define XC5000_RADIO_FM2			236#define XC5000_RADIO_FM1_MONO			337 38/* For each bridge framework, when it attaches either analog or digital,39 * it has to store a reference back to its _core equivalent structure,40 * so that it can service the hardware by steering gpio's etc.41 * Each bridge implementation is different so cast devptr accordingly.42 * The xc5000 driver cares not for this value, other than ensuring43 * it's passed back to a bridge during tuner_callback().44 */45 46#if IS_REACHABLE(CONFIG_MEDIA_TUNER_XC5000)47extern struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,48					  struct i2c_adapter *i2c,49					  const struct xc5000_config *cfg);50#else51static inline struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,52						 struct i2c_adapter *i2c,53						 const struct xc5000_config *cfg)54{55	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);56	return NULL;57}58#endif59 60#endif61