blob: 5eacf39f425e9f570e6d3700231e816a3315ec47 [file] [log] [blame]
Thomas Gleixner74ba9202019-05-20 09:19:02 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
3 Driver for Spase SP8870 demodulator
4
5 Copyright (C) 1999 Juergen Peitz
6
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
8*/
9
10#ifndef SP8870_H
11#define SP8870_H
12
13#include <linux/dvb/frontend.h>
14#include <linux/firmware.h>
15
16struct sp8870_config
17{
18 /* the demodulator's i2c address */
19 u8 demod_address;
20
Linus Torvalds1da177e2005-04-16 15:20:36 -070021 /* request firmware for device */
22 int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name);
23};
24
Arnd Bergmann9b174522015-02-18 14:12:42 -030025#if IS_REACHABLE(CONFIG_DVB_SP8870)
Linus Torvalds1da177e2005-04-16 15:20:36 -070026extern struct dvb_frontend* sp8870_attach(const struct sp8870_config* config,
27 struct i2c_adapter* i2c);
Andrew de Quincey102a3422006-08-08 09:10:08 -030028#else
29static inline struct dvb_frontend* sp8870_attach(const struct sp8870_config* config,
30 struct i2c_adapter* i2c)
31{
Harvey Harrison271ddbf2008-04-08 23:20:00 -030032 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
Andrew de Quincey102a3422006-08-08 09:10:08 -030033 return NULL;
34}
35#endif // CONFIG_DVB_SP8870
Linus Torvalds1da177e2005-04-16 15:20:36 -070036
37#endif // SP8870_H