| /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ |
| * Copyright (c) 2019 Amlogic, Inc. All rights reserved. |
| #include <linux/bitops.h> |
| REG_LDR_ACTIVE = 0x00 << 2, |
| REG_LDR_IDLE = 0x01 << 2, |
| REG_LDR_REPEAT = 0x02 << 2, |
| REG_FRAME_RSV0 = 0x0f << 2, |
| REG_FRAME_RSV1 = 0x10 << 2, |
| REG_FIFO_CTL = 0x13 << 2, |
| REG_WIDTH_NEW = 0x14 << 2, |
| REG_REPEAT_DET = 0x15 << 2, |
| int (*get_framecode)(struct meson_ir_chip *chip); |
| struct meson_ir_contr ir_contr[IR_ID_MAX]; |
| #define MULTI_IR_TYPE_MASK(type) (type & 0xff) /*8bit*/ |
| #define LEGACY_IR_TYPE_MASK(type) ((type >> 8) & 0xff) /*8bit*/ |
| #define ENABLE_LEGACY_IR(type) (LEGACY_IR_TYPE_MASK(type) == 0xff) |
| #define FRAME_STATUS_VALID BIT(3) |
| #define FRAME_STATUS_REPEAT BIT(0) |
| int meson_ir_register_default_config(struct meson_ir_chip *chip, int type); |