blob: 35810d9d09de4fd13fa7b3bbf463271bbb715423 [file] [log] [blame]
Thomas Gleixnera0c70562019-05-23 11:14:50 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Igor M. Liplianin4e2c53f2011-09-23 18:33:50 -03002/*
3 * lnbp22.h - driver for lnb supply and control ic lnbp22
4 *
5 * Copyright (C) 2006 Dominik Kuhlen
6 * Based on lnbp21.h
7 *
Mauro Carvalho Chehab991ce922015-12-04 10:38:59 -02008 * the project's page is at https://linuxtv.org
Igor M. Liplianin4e2c53f2011-09-23 18:33:50 -03009 */
10
11#ifndef _LNBP22_H
12#define _LNBP22_H
13
14/* Enable */
15#define LNBP22_EN 0x10
16/* Voltage selection */
17#define LNBP22_VSEL 0x02
18/* Plus 1 Volt Bit */
19#define LNBP22_LLC 0x01
20
21#include <linux/dvb/frontend.h>
22
Arnd Bergmann9b174522015-02-18 14:12:42 -030023#if IS_REACHABLE(CONFIG_DVB_LNBP22)
Igor M. Liplianin4e2c53f2011-09-23 18:33:50 -030024/*
25 * override_set and override_clear control which system register bits (above)
26 * to always set & clear
27 */
28extern struct dvb_frontend *lnbp22_attach(struct dvb_frontend *fe,
29 struct i2c_adapter *i2c);
30#else
31static inline struct dvb_frontend *lnbp22_attach(struct dvb_frontend *fe,
32 struct i2c_adapter *i2c)
33{
34 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
35 return NULL;
36}
37#endif /* CONFIG_DVB_LNBP22 */
38
39#endif /* _LNBP22_H */