Merge tag 'trace-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[linux-block.git] / drivers / media / dvb-frontends / mb86a20s.h
CommitLineData
50acfb2b 1/* SPDX-License-Identifier: GPL-2.0-only */
b9ede79a
MCC
2/*
3 * Fujitsu mb86a20s driver
4 *
37e59f87 5 * Copyright (C) 2010 Mauro Carvalho Chehab
b9ede79a
MCC
6 */
7
8#ifndef MB86A20S_H
9#define MB86A20S_H
10
11#include <linux/dvb/frontend.h>
12
13/**
14 * struct mb86a20s_config - Define the per-device attributes of the frontend
15 *
0e4bbedd
MCC
16 * @fclk: Clock frequency. If zero, assumes the default
17 * (32.57142 Mhz)
b9ede79a 18 * @demod_address: the demodulator's i2c address
0e4bbedd 19 * @is_serial: if true, TS is serial. Otherwise, TS is parallel
b9ede79a 20 */
b9ede79a 21struct mb86a20s_config {
0e4bbedd
MCC
22 u32 fclk;
23 u8 demod_address;
24 bool is_serial;
b9ede79a
MCC
25};
26
9b174527 27#if IS_REACHABLE(CONFIG_DVB_MB86A20S)
be9b53c8 28/**
b0649455 29 * mb86a20s_attach - Attach a mb86a20s demod
be9b53c8
MCC
30 *
31 * @config: pointer to &struct mb86a20s_config with demod configuration.
32 * @i2c: i2c adapter to use.
33 *
34 * return: FE pointer on success, NULL on failure.
35 */
b9ede79a
MCC
36extern struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config,
37 struct i2c_adapter *i2c);
be9b53c8 38
b9ede79a
MCC
39#else
40static inline struct dvb_frontend *mb86a20s_attach(
41 const struct mb86a20s_config *config, struct i2c_adapter *i2c)
42{
43 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
44 return NULL;
45}
b9ede79a
MCC
46#endif
47
48#endif /* MB86A20S */