cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

img-ir-raw.h (1353B)


      1/* SPDX-License-Identifier: GPL-2.0-or-later */
      2/*
      3 * ImgTec IR Raw Decoder found in PowerDown Controller.
      4 *
      5 * Copyright 2010-2014 Imagination Technologies Ltd.
      6 */
      7
      8#ifndef _IMG_IR_RAW_H_
      9#define _IMG_IR_RAW_H_
     10
     11struct img_ir_priv;
     12
     13#ifdef CONFIG_IR_IMG_RAW
     14
     15/**
     16 * struct img_ir_priv_raw - Private driver data for raw decoder.
     17 * @rdev:		Raw remote control device
     18 * @timer:		Timer to echo samples to keep soft decoders happy.
     19 * @last_status:	Last raw status bits.
     20 */
     21struct img_ir_priv_raw {
     22	struct rc_dev		*rdev;
     23	struct timer_list	timer;
     24	u32			last_status;
     25};
     26
     27static inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw)
     28{
     29	return raw->rdev;
     30};
     31
     32void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status);
     33void img_ir_setup_raw(struct img_ir_priv *priv);
     34int img_ir_probe_raw(struct img_ir_priv *priv);
     35void img_ir_remove_raw(struct img_ir_priv *priv);
     36
     37#else
     38
     39struct img_ir_priv_raw {
     40};
     41static inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw)
     42{
     43	return false;
     44};
     45static inline void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status)
     46{
     47}
     48static inline void img_ir_setup_raw(struct img_ir_priv *priv)
     49{
     50}
     51static inline int img_ir_probe_raw(struct img_ir_priv *priv)
     52{
     53	return -ENODEV;
     54}
     55static inline void img_ir_remove_raw(struct img_ir_priv *priv)
     56{
     57}
     58
     59#endif /* CONFIG_IR_IMG_RAW */
     60
     61#endif /* _IMG_IR_RAW_H_ */