58 lines · c
1/* SPDX-License-Identifier: GPL-2.0-or-later */2/*3 * lnbp21.h - driver for lnb supply and control ic lnbp214 *5 * Copyright (C) 2006 Oliver Endriss6 *7 * the project's page is at https://linuxtv.org8 */9 10#ifndef _LNBP21_H11#define _LNBP21_H12 13/* system register bits */14/* [RO] 0=OK; 1=over current limit flag */15#define LNBP21_OLF 0x0116/* [RO] 0=OK; 1=over temperature flag (150 C) */17#define LNBP21_OTF 0x0218/* [RW] 0=disable LNB power, enable loopthrough19 1=enable LNB power, disable loopthrough */20#define LNBP21_EN 0x0421/* [RW] 0=low voltage (13/14V, vert pol)22 1=high voltage (18/19V,horiz pol) */23#define LNBP21_VSEL 0x0824/* [RW] increase LNB voltage by 1V:25 0=13/18V; 1=14/19V */26#define LNBP21_LLC 0x1027/* [RW] 0=tone controlled by DSQIN pin28 1=tone enable, disable DSQIN */29#define LNBP21_TEN 0x2030/* [RW] current limit select:31 0:Iout=500-650mA Isc=300mA32 1:Iout=400-550mA Isc=200mA */33#define LNBP21_ISEL 0x4034/* [RW] short-circuit protect:35 0=pulsed (dynamic) curr limiting36 1=static curr limiting */37#define LNBP21_PCL 0x8038 39#include <linux/dvb/frontend.h>40 41#if IS_REACHABLE(CONFIG_DVB_LNBP21)42/* override_set and override_clear control which43 system register bits (above) to always set & clear */44extern struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe,45 struct i2c_adapter *i2c, u8 override_set,46 u8 override_clear);47#else48static inline struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe,49 struct i2c_adapter *i2c, u8 override_set,50 u8 override_clear)51{52 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);53 return NULL;54}55#endif56 57#endif58