Thomas Gleixner | 74ba920 | 2019-05-20 09:19:02 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Manu Abraham | e415c68 | 2009-04-06 15:45:20 -0300 | [diff] [blame] | 2 | /* |
| 3 | Intersil ISL6423 SEC and LNB Power supply controller |
| 4 | |
| 5 | Copyright (C) Manu Abraham <abraham.manu@gmail.com> |
| 6 | |
Manu Abraham | e415c68 | 2009-04-06 15:45:20 -0300 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef __ISL_6423_H |
| 10 | #define __ISL_6423_H |
| 11 | |
| 12 | #include <linux/dvb/frontend.h> |
| 13 | |
| 14 | enum isl6423_current { |
| 15 | SEC_CURRENT_275m = 0, |
| 16 | SEC_CURRENT_515m, |
| 17 | SEC_CURRENT_635m, |
| 18 | SEC_CURRENT_800m, |
| 19 | }; |
| 20 | |
| 21 | enum isl6423_curlim { |
| 22 | SEC_CURRENT_LIM_ON = 1, |
| 23 | SEC_CURRENT_LIM_OFF |
| 24 | }; |
| 25 | |
| 26 | struct isl6423_config { |
| 27 | enum isl6423_current current_max; |
| 28 | enum isl6423_curlim curlim; |
| 29 | u8 addr; |
| 30 | u8 mod_extern; |
| 31 | }; |
| 32 | |
Arnd Bergmann | 9b17452 | 2015-02-18 14:12:42 -0300 | [diff] [blame] | 33 | #if IS_REACHABLE(CONFIG_DVB_ISL6423) |
Manu Abraham | e415c68 | 2009-04-06 15:45:20 -0300 | [diff] [blame] | 34 | |
| 35 | |
| 36 | extern struct dvb_frontend *isl6423_attach(struct dvb_frontend *fe, |
| 37 | struct i2c_adapter *i2c, |
| 38 | const struct isl6423_config *config); |
| 39 | |
| 40 | #else |
| 41 | static inline struct dvb_frontend *isl6423_attach(struct dvb_frontend *fe, |
| 42 | struct i2c_adapter *i2c, |
| 43 | const struct isl6423_config *config) |
| 44 | { |
| 45 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
| 46 | return NULL; |
| 47 | } |
| 48 | |
| 49 | #endif /* CONFIG_DVB_ISL6423 */ |
| 50 | |
| 51 | #endif /* __ISL_6423_H */ |