18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * ImgTec IR Raw Decoder found in PowerDown Controller. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright 2010-2014 Imagination Technologies Ltd. 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef _IMG_IR_RAW_H_ 98c2ecf20Sopenharmony_ci#define _IMG_IR_RAW_H_ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_cistruct img_ir_priv; 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#ifdef CONFIG_IR_IMG_RAW 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci/** 168c2ecf20Sopenharmony_ci * struct img_ir_priv_raw - Private driver data for raw decoder. 178c2ecf20Sopenharmony_ci * @rdev: Raw remote control device 188c2ecf20Sopenharmony_ci * @timer: Timer to echo samples to keep soft decoders happy. 198c2ecf20Sopenharmony_ci * @last_status: Last raw status bits. 208c2ecf20Sopenharmony_ci */ 218c2ecf20Sopenharmony_cistruct img_ir_priv_raw { 228c2ecf20Sopenharmony_ci struct rc_dev *rdev; 238c2ecf20Sopenharmony_ci struct timer_list timer; 248c2ecf20Sopenharmony_ci u32 last_status; 258c2ecf20Sopenharmony_ci}; 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_cistatic inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw) 288c2ecf20Sopenharmony_ci{ 298c2ecf20Sopenharmony_ci return raw->rdev; 308c2ecf20Sopenharmony_ci}; 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_civoid img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status); 338c2ecf20Sopenharmony_civoid img_ir_setup_raw(struct img_ir_priv *priv); 348c2ecf20Sopenharmony_ciint img_ir_probe_raw(struct img_ir_priv *priv); 358c2ecf20Sopenharmony_civoid img_ir_remove_raw(struct img_ir_priv *priv); 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#else 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_cistruct img_ir_priv_raw { 408c2ecf20Sopenharmony_ci}; 418c2ecf20Sopenharmony_cistatic inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw) 428c2ecf20Sopenharmony_ci{ 438c2ecf20Sopenharmony_ci return false; 448c2ecf20Sopenharmony_ci}; 458c2ecf20Sopenharmony_cistatic inline void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status) 468c2ecf20Sopenharmony_ci{ 478c2ecf20Sopenharmony_ci} 488c2ecf20Sopenharmony_cistatic inline void img_ir_setup_raw(struct img_ir_priv *priv) 498c2ecf20Sopenharmony_ci{ 508c2ecf20Sopenharmony_ci} 518c2ecf20Sopenharmony_cistatic inline int img_ir_probe_raw(struct img_ir_priv *priv) 528c2ecf20Sopenharmony_ci{ 538c2ecf20Sopenharmony_ci return -ENODEV; 548c2ecf20Sopenharmony_ci} 558c2ecf20Sopenharmony_cistatic inline void img_ir_remove_raw(struct img_ir_priv *priv) 568c2ecf20Sopenharmony_ci{ 578c2ecf20Sopenharmony_ci} 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci#endif /* CONFIG_IR_IMG_RAW */ 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci#endif /* _IMG_IR_RAW_H_ */ 62