Merge tag 'docs-5.0' of git://git.lwn.net/linux
[linux-2.6-block.git] / drivers / media / dvb-frontends / sp887x.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
1da177e4
LT
2/*
3 Driver for the Spase sp887x demodulator
4*/
5
6#ifndef SP887X_H
7#define SP887X_H
8
9#include <linux/dvb/frontend.h>
10#include <linux/firmware.h>
11
12struct sp887x_config
13{
14 /* the demodulator's i2c address */
15 u8 demod_address;
16
1da177e4
LT
17 /* request firmware for device */
18 int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name);
19};
20
9b174527 21#if IS_REACHABLE(CONFIG_DVB_SP887X)
1da177e4
LT
22extern struct dvb_frontend* sp887x_attach(const struct sp887x_config* config,
23 struct i2c_adapter* i2c);
102a342b
AQ
24#else
25static inline struct dvb_frontend* sp887x_attach(const struct sp887x_config* config,
26 struct i2c_adapter* i2c)
27{
271ddbf7 28 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
102a342b
AQ
29 return NULL;
30}
31#endif // CONFIG_DVB_SP887X
1da177e4
LT
32
33#endif // SP887X_H