/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Driver for Nuvoton Technology Corporation w83667hg/w83677hg-i CIR * * Copyright (C) 2010 Jarod Wilson <jarod@redhat.com> * Copyright (C) 2009 Nuvoton PS Team * * Special thanks to Nuvoton for providing hardware, spec sheets and * sample code upon which portions of this driver are based. Indirect * thanks also to Maxim Levitsky, whose ene_ir driver this driver is * modeled after.
*/
/* FIXME/jarod: make this a runtime option */ /* select a same sample period like cir register */ #define CIR_WAKE_IRCON_SAMPLE_PERIOD_SEL CIR_IRCON_SAMPLE_PERIOD_SEL_50
/* FIXME: make this a runtime option */ /* select WAKE UP RX trigger level as 67 */ #define CIR_WAKE_FIFOCON_RX_TRIGGER_LEV CIR_WAKE_FIFOCON_RX_TRIGGER_LEV_67
/* * The CIR Wake FIFO buffer is 67 bytes long, but the stock remote wakes * the system comparing only 65 bytes (fails with this set to 67)
*/ #define CIR_WAKE_FIFO_CMP_BYTES 65 /* CIR Wake byte comparison tolerance */ #define CIR_WAKE_CMP_TOLERANCE 5
/* * Extended Function Enable Registers: * Extended Function Index Register * Extended Function Data Register
*/ #define CR_EFIR 0x2e #define CR_EFDR 0x2f
/* Possible alternate EFER values, depends on how the chip is wired */ #define CR_EFIR2 0x4e #define CR_EFDR2 0x4f
/* Config regs we need to care about */ #define CR_SOFTWARE_RESET 0x02 #define CR_LOGICAL_DEV_SEL 0x07 #define CR_CHIP_ID_HI 0x20 #define CR_CHIP_ID_LO 0x21 #define CR_DEV_POWER_DOWN 0x22 /* bit 2 is CIR power, default power on */ #define CR_OUTPUT_PIN_SEL 0x27 #define CR_MULTIFUNC_PIN_SEL 0x2c #define CR_LOGICAL_DEV_EN 0x30 /* valid for all logical devices */ /* next three regs valid for both the CIR and CIR_WAKE logical devices */ #define CR_CIR_BASE_ADDR_HI 0x60 #define CR_CIR_BASE_ADDR_LO 0x61 #define CR_CIR_IRQ_RSRC 0x70 /* next three regs valid only for ACPI logical dev */ #define CR_ACPI_CIR_WAKE 0xe0 #define CR_ACPI_IRQ_EVENTS 0xf6 #define CR_ACPI_IRQ_EVENTS2 0xf7
/* Logical devices that we need to care about */ #define LOGICAL_DEV_LPT 0x01 #define LOGICAL_DEV_CIR 0x06 #define LOGICAL_DEV_ACPI 0x0a #define LOGICAL_DEV_CIR_WAKE 0x0e
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.