Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * ImgTec IR Raw Decoder found in PowerDown Controller.
0004  *
0005  * Copyright 2010-2014 Imagination Technologies Ltd.
0006  */
0007 
0008 #ifndef _IMG_IR_RAW_H_
0009 #define _IMG_IR_RAW_H_
0010 
0011 struct img_ir_priv;
0012 
0013 #ifdef CONFIG_IR_IMG_RAW
0014 
0015 /**
0016  * struct img_ir_priv_raw - Private driver data for raw decoder.
0017  * @rdev:       Raw remote control device
0018  * @timer:      Timer to echo samples to keep soft decoders happy.
0019  * @last_status:    Last raw status bits.
0020  */
0021 struct img_ir_priv_raw {
0022     struct rc_dev       *rdev;
0023     struct timer_list   timer;
0024     u32         last_status;
0025 };
0026 
0027 static inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw)
0028 {
0029     return raw->rdev;
0030 };
0031 
0032 void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status);
0033 void img_ir_setup_raw(struct img_ir_priv *priv);
0034 int img_ir_probe_raw(struct img_ir_priv *priv);
0035 void img_ir_remove_raw(struct img_ir_priv *priv);
0036 
0037 #else
0038 
0039 struct img_ir_priv_raw {
0040 };
0041 static inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw)
0042 {
0043     return false;
0044 };
0045 static inline void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status)
0046 {
0047 }
0048 static inline void img_ir_setup_raw(struct img_ir_priv *priv)
0049 {
0050 }
0051 static inline int img_ir_probe_raw(struct img_ir_priv *priv)
0052 {
0053     return -ENODEV;
0054 }
0055 static inline void img_ir_remove_raw(struct img_ir_priv *priv)
0056 {
0057 }
0058 
0059 #endif /* CONFIG_IR_IMG_RAW */
0060 
0061 #endif /* _IMG_IR_RAW_H_ */