linux/drivers/media/dvb-frontends/stb0899_drv.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
	STB0899 Multistandard Frontend driver
	Copyright (C) Manu Abraham ([email protected])

	Copyright (C) ST Microelectronics

*/

#ifndef __STB0899_DRV_H
#define __STB0899_DRV_H

#include <linux/kernel.h>
#include <linux/module.h>

#include <media/dvb_frontend.h>

#define STB0899_TSMODE_SERIAL
#define STB0899_CLKPOL_FALLING
#define STB0899_CLKNULL_PARITY
#define STB0899_SYNC_FORCED
#define STB0899_FECMODE_DSS

struct stb0899_s1_reg {};

struct stb0899_s2_reg {};

enum stb0899_inversion {};

#define STB0899_GPIO00
#define STB0899_GPIO01
#define STB0899_GPIO02
#define STB0899_GPIO03
#define STB0899_GPIO04
#define STB0899_GPIO05
#define STB0899_GPIO06
#define STB0899_GPIO07
#define STB0899_GPIO08
#define STB0899_GPIO09
#define STB0899_GPIO10
#define STB0899_GPIO11
#define STB0899_GPIO12
#define STB0899_GPIO13
#define STB0899_GPIO14
#define STB0899_GPIO15
#define STB0899_GPIO16
#define STB0899_GPIO17
#define STB0899_GPIO18
#define STB0899_GPIO19
#define STB0899_GPIO20

#define STB0899_GPIOPULLUP
#define STB0899_GPIOPULLDN

#define STB0899_POSTPROC_GPIO_POWER
#define STB0899_POSTPROC_GPIO_LOCK

/*
 * Post process output configuration control
 * 1. POWER ON/OFF		(index 0)
 * 2. FE_HAS_LOCK/LOCK_LOSS	(index 1)
 *
 * @gpio	= one of the above listed GPIO's
 * @level	= output state: pulled up or low
 */
struct stb0899_postproc {};

struct stb0899_config {};

#if IS_REACHABLE(CONFIG_DVB_STB0899)

extern struct dvb_frontend *stb0899_attach(struct stb0899_config *config,
					   struct i2c_adapter *i2c);

#else

static inline struct dvb_frontend *stb0899_attach(struct stb0899_config *config,
						  struct i2c_adapter *i2c)
{
	printk(KERN_WARNING "%s: Driver disabled by Kconfig\n", __func__);
	return NULL;
}

#endif //CONFIG_DVB_STB0899


#endif