summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends/lnbh29.h
diff options
context:
space:
mode:
authorKatsuhiro Suzuki <suzuki.katsuhiro@socionext.com>2018-08-02 22:08:39 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-12 09:24:41 -0400
commit1b09dd9ff8a59b945fe8b5c4e4b8416a63252cac (patch)
treee0e419107c7a0c39d1c262069622772c4a84f0ec /drivers/media/dvb-frontends/lnbh29.h
parent447d66855391f702493cbbc8b8bdcc5a75d71f52 (diff)
media: dvb-frontends: add LNBH29 LNB supply driver
Add support for STMicroelectronics LNBH29 LNB supply driver. Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/dvb-frontends/lnbh29.h')
-rw-r--r--drivers/media/dvb-frontends/lnbh29.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/lnbh29.h b/drivers/media/dvb-frontends/lnbh29.h
new file mode 100644
index 000000000000..6179921520d9
--- /dev/null
+++ b/drivers/media/dvb-frontends/lnbh29.h
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Driver for LNB supply and control IC STMicroelectronics LNBH29
+ *
+ * Copyright (c) 2018 Socionext Inc.
+ */
+
+#ifndef LNBH29_H
+#define LNBH29_H
+
+#include <linux/i2c.h>
+#include <linux/dvb/frontend.h>
+
+/* Using very low E.S.R. capacitors or ceramic caps */
+#define LNBH29_DATA_COMP BIT(3)
+
+struct lnbh29_config {
+ u8 i2c_address;
+ u8 data_config;
+};
+
+#if IS_REACHABLE(CONFIG_DVB_LNBH29)
+struct dvb_frontend *lnbh29_attach(struct dvb_frontend *fe,
+ struct lnbh29_config *cfg,
+ struct i2c_adapter *i2c);
+#else
+static inline struct dvb_frontend *lnbh29_attach(struct dvb_frontend *fe,
+ struct lnbh29_config *cfg,
+ struct i2c_adapter *i2c)
+{
+ printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
+ return NULL;
+}
+#endif
+
+#endif