#ifndef TDA10024_H
#define TDA10024_H


#include <linux/dvb/frontend.h>
#include <linux/firmware.h>

typedef enum
{
    TDA10024_tuner_CD1616 = 1,
    TDA10024_tuner_TDA18252 = 2
}tda10024_tuner_type;

struct tda10024_config
{
	/* the demodulator's i2c address */
	u8 demod_address;
	u8 invert;
       tda10024_tuner_type tunerType;
};


struct tda10024_state {
	struct i2c_adapter* i2c;
	/* configuration settings */
	const struct tda10024_config* config;
	struct dvb_frontend frontend;

	u8 pwm;
	u8 reg0;
};

#if defined(CONFIG_DVB_TDA10024) || (defined(CONFIG_DVB_TDA10024_MODULE) && defined(MODULE))
extern struct dvb_frontend* tda10024_attach(const struct tda10024_config* config,
				     struct i2c_adapter* i2c,
				     u8 pwm);

#else
static inline struct dvb_frontend* tda10024_attach(const struct tda10024_config* config,
				     struct i2c_adapter* i2c,
				     u8 pwm)
{
    printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
    return NULL;
}
#endif // CONFIG_DVB_TDA10024

#endif // TDA10024_H
