1/* 2 * ImgTec IR Raw Decoder found in PowerDown Controller. 3 * 4 * Copyright 2010-2014 Imagination Technologies Ltd. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by the 8 * Free Software Foundation; either version 2 of the License, or (at your 9 * option) any later version. 10 */ 11 12#ifndef _IMG_IR_RAW_H_ 13#define _IMG_IR_RAW_H_ 14 15struct img_ir_priv; 16 17#ifdef CONFIG_IR_IMG_RAW 18 19/** 20 * struct img_ir_priv_raw - Private driver data for raw decoder. 21 * @rdev: Raw remote control device 22 * @timer: Timer to echo samples to keep soft decoders happy. 23 * @last_status: Last raw status bits. 24 */ 25struct img_ir_priv_raw { 26 struct rc_dev *rdev; 27 struct timer_list timer; 28 u32 last_status; 29}; 30 31static inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw) 32{ 33 return raw->rdev; 34}; 35 36void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status); 37void img_ir_setup_raw(struct img_ir_priv *priv); 38int img_ir_probe_raw(struct img_ir_priv *priv); 39void img_ir_remove_raw(struct img_ir_priv *priv); 40 41#else 42 43struct img_ir_priv_raw { 44}; 45static inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw) 46{ 47 return false; 48}; 49static inline void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status) 50{ 51} 52static inline void img_ir_setup_raw(struct img_ir_priv *priv) 53{ 54} 55static inline int img_ir_probe_raw(struct img_ir_priv *priv) 56{ 57 return -ENODEV; 58} 59static inline void img_ir_remove_raw(struct img_ir_priv *priv) 60{ 61} 62 63#endif /* CONFIG_IR_IMG_RAW */ 64 65#endif /* _IMG_IR_RAW_H_ */ 66