18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci Intersil ISL6423 SEC and LNB Power supply controller 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci Copyright (C) Manu Abraham <abraham.manu@gmail.com> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci*/ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef __ISL_6423_H 108c2ecf20Sopenharmony_ci#define __ISL_6423_H 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include <linux/dvb/frontend.h> 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_cienum isl6423_current { 158c2ecf20Sopenharmony_ci SEC_CURRENT_275m = 0, 168c2ecf20Sopenharmony_ci SEC_CURRENT_515m, 178c2ecf20Sopenharmony_ci SEC_CURRENT_635m, 188c2ecf20Sopenharmony_ci SEC_CURRENT_800m, 198c2ecf20Sopenharmony_ci}; 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_cienum isl6423_curlim { 228c2ecf20Sopenharmony_ci SEC_CURRENT_LIM_ON = 1, 238c2ecf20Sopenharmony_ci SEC_CURRENT_LIM_OFF 248c2ecf20Sopenharmony_ci}; 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_cistruct isl6423_config { 278c2ecf20Sopenharmony_ci enum isl6423_current current_max; 288c2ecf20Sopenharmony_ci enum isl6423_curlim curlim; 298c2ecf20Sopenharmony_ci u8 addr; 308c2ecf20Sopenharmony_ci u8 mod_extern; 318c2ecf20Sopenharmony_ci}; 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#if IS_REACHABLE(CONFIG_DVB_ISL6423) 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ciextern struct dvb_frontend *isl6423_attach(struct dvb_frontend *fe, 378c2ecf20Sopenharmony_ci struct i2c_adapter *i2c, 388c2ecf20Sopenharmony_ci const struct isl6423_config *config); 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#else 418c2ecf20Sopenharmony_cistatic inline struct dvb_frontend *isl6423_attach(struct dvb_frontend *fe, 428c2ecf20Sopenharmony_ci struct i2c_adapter *i2c, 438c2ecf20Sopenharmony_ci const struct isl6423_config *config) 448c2ecf20Sopenharmony_ci{ 458c2ecf20Sopenharmony_ci printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 468c2ecf20Sopenharmony_ci return NULL; 478c2ecf20Sopenharmony_ci} 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci#endif /* CONFIG_DVB_ISL6423 */ 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci#endif /* __ISL_6423_H */ 52