18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * ACPI support for PNP bus type 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2014, Intel Corporation 68c2ecf20Sopenharmony_ci * Authors: Zhang Rui <rui.zhang@intel.com> 78c2ecf20Sopenharmony_ci * Rafael J. Wysocki <rafael.j.wysocki@intel.com> 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#include <linux/acpi.h> 118c2ecf20Sopenharmony_ci#include <linux/module.h> 128c2ecf20Sopenharmony_ci#include <linux/ctype.h> 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#include "internal.h" 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_cistatic const struct acpi_device_id acpi_pnp_device_ids[] = { 178c2ecf20Sopenharmony_ci /* pata_isapnp */ 188c2ecf20Sopenharmony_ci {"PNP0600"}, /* Generic ESDI/IDE/ATA compatible hard disk controller */ 198c2ecf20Sopenharmony_ci /* floppy */ 208c2ecf20Sopenharmony_ci {"PNP0700"}, 218c2ecf20Sopenharmony_ci /* tpm_inf_pnp */ 228c2ecf20Sopenharmony_ci {"IFX0101"}, /* Infineon TPMs */ 238c2ecf20Sopenharmony_ci {"IFX0102"}, /* Infineon TPMs */ 248c2ecf20Sopenharmony_ci /*tpm_tis */ 258c2ecf20Sopenharmony_ci {"PNP0C31"}, /* TPM */ 268c2ecf20Sopenharmony_ci {"ATM1200"}, /* Atmel */ 278c2ecf20Sopenharmony_ci {"IFX0102"}, /* Infineon */ 288c2ecf20Sopenharmony_ci {"BCM0101"}, /* Broadcom */ 298c2ecf20Sopenharmony_ci {"BCM0102"}, /* Broadcom */ 308c2ecf20Sopenharmony_ci {"NSC1200"}, /* National */ 318c2ecf20Sopenharmony_ci {"ICO0102"}, /* Intel */ 328c2ecf20Sopenharmony_ci /* ide */ 338c2ecf20Sopenharmony_ci {"PNP0600"}, /* Generic ESDI/IDE/ATA compatible hard disk controller */ 348c2ecf20Sopenharmony_ci /* ns558 */ 358c2ecf20Sopenharmony_ci {"ASB16fd"}, /* AdLib NSC16 */ 368c2ecf20Sopenharmony_ci {"AZT3001"}, /* AZT1008 */ 378c2ecf20Sopenharmony_ci {"CDC0001"}, /* Opl3-SAx */ 388c2ecf20Sopenharmony_ci {"CSC0001"}, /* CS4232 */ 398c2ecf20Sopenharmony_ci {"CSC000f"}, /* CS4236 */ 408c2ecf20Sopenharmony_ci {"CSC0101"}, /* CS4327 */ 418c2ecf20Sopenharmony_ci {"CTL7001"}, /* SB16 */ 428c2ecf20Sopenharmony_ci {"CTL7002"}, /* AWE64 */ 438c2ecf20Sopenharmony_ci {"CTL7005"}, /* Vibra16 */ 448c2ecf20Sopenharmony_ci {"ENS2020"}, /* SoundscapeVIVO */ 458c2ecf20Sopenharmony_ci {"ESS0001"}, /* ES1869 */ 468c2ecf20Sopenharmony_ci {"ESS0005"}, /* ES1878 */ 478c2ecf20Sopenharmony_ci {"ESS6880"}, /* ES688 */ 488c2ecf20Sopenharmony_ci {"IBM0012"}, /* CS4232 */ 498c2ecf20Sopenharmony_ci {"OPT0001"}, /* OPTi Audio16 */ 508c2ecf20Sopenharmony_ci {"YMH0006"}, /* Opl3-SA */ 518c2ecf20Sopenharmony_ci {"YMH0022"}, /* Opl3-SAx */ 528c2ecf20Sopenharmony_ci {"PNPb02f"}, /* Generic */ 538c2ecf20Sopenharmony_ci /* i8042 kbd */ 548c2ecf20Sopenharmony_ci {"PNP0300"}, 558c2ecf20Sopenharmony_ci {"PNP0301"}, 568c2ecf20Sopenharmony_ci {"PNP0302"}, 578c2ecf20Sopenharmony_ci {"PNP0303"}, 588c2ecf20Sopenharmony_ci {"PNP0304"}, 598c2ecf20Sopenharmony_ci {"PNP0305"}, 608c2ecf20Sopenharmony_ci {"PNP0306"}, 618c2ecf20Sopenharmony_ci {"PNP0309"}, 628c2ecf20Sopenharmony_ci {"PNP030a"}, 638c2ecf20Sopenharmony_ci {"PNP030b"}, 648c2ecf20Sopenharmony_ci {"PNP0320"}, 658c2ecf20Sopenharmony_ci {"PNP0343"}, 668c2ecf20Sopenharmony_ci {"PNP0344"}, 678c2ecf20Sopenharmony_ci {"PNP0345"}, 688c2ecf20Sopenharmony_ci {"CPQA0D7"}, 698c2ecf20Sopenharmony_ci /* i8042 aux */ 708c2ecf20Sopenharmony_ci {"AUI0200"}, 718c2ecf20Sopenharmony_ci {"FJC6000"}, 728c2ecf20Sopenharmony_ci {"FJC6001"}, 738c2ecf20Sopenharmony_ci {"PNP0f03"}, 748c2ecf20Sopenharmony_ci {"PNP0f0b"}, 758c2ecf20Sopenharmony_ci {"PNP0f0e"}, 768c2ecf20Sopenharmony_ci {"PNP0f12"}, 778c2ecf20Sopenharmony_ci {"PNP0f13"}, 788c2ecf20Sopenharmony_ci {"PNP0f19"}, 798c2ecf20Sopenharmony_ci {"PNP0f1c"}, 808c2ecf20Sopenharmony_ci {"SYN0801"}, 818c2ecf20Sopenharmony_ci /* fcpnp */ 828c2ecf20Sopenharmony_ci {"AVM0900"}, 838c2ecf20Sopenharmony_ci /* radio-cadet */ 848c2ecf20Sopenharmony_ci {"MSM0c24"}, /* ADS Cadet AM/FM Radio Card */ 858c2ecf20Sopenharmony_ci /* radio-gemtek */ 868c2ecf20Sopenharmony_ci {"ADS7183"}, /* AOpen FX-3D/Pro Radio */ 878c2ecf20Sopenharmony_ci /* radio-sf16fmr2 */ 888c2ecf20Sopenharmony_ci {"MFRad13"}, /* tuner subdevice of SF16-FMD2 */ 898c2ecf20Sopenharmony_ci /* ene_ir */ 908c2ecf20Sopenharmony_ci {"ENE0100"}, 918c2ecf20Sopenharmony_ci {"ENE0200"}, 928c2ecf20Sopenharmony_ci {"ENE0201"}, 938c2ecf20Sopenharmony_ci {"ENE0202"}, 948c2ecf20Sopenharmony_ci /* fintek-cir */ 958c2ecf20Sopenharmony_ci {"FIT0002"}, /* CIR */ 968c2ecf20Sopenharmony_ci /* ite-cir */ 978c2ecf20Sopenharmony_ci {"ITE8704"}, /* Default model */ 988c2ecf20Sopenharmony_ci {"ITE8713"}, /* CIR found in EEEBox 1501U */ 998c2ecf20Sopenharmony_ci {"ITE8708"}, /* Bridged IT8512 */ 1008c2ecf20Sopenharmony_ci {"ITE8709"}, /* SRAM-Bridged IT8512 */ 1018c2ecf20Sopenharmony_ci /* nuvoton-cir */ 1028c2ecf20Sopenharmony_ci {"WEC0530"}, /* CIR */ 1038c2ecf20Sopenharmony_ci {"NTN0530"}, /* CIR for new chip's pnp id */ 1048c2ecf20Sopenharmony_ci /* Winbond CIR */ 1058c2ecf20Sopenharmony_ci {"WEC1022"}, 1068c2ecf20Sopenharmony_ci /* wbsd */ 1078c2ecf20Sopenharmony_ci {"WEC0517"}, 1088c2ecf20Sopenharmony_ci {"WEC0518"}, 1098c2ecf20Sopenharmony_ci /* Winbond CIR */ 1108c2ecf20Sopenharmony_ci {"TCM5090"}, /* 3Com Etherlink III (TP) */ 1118c2ecf20Sopenharmony_ci {"TCM5091"}, /* 3Com Etherlink III */ 1128c2ecf20Sopenharmony_ci {"TCM5094"}, /* 3Com Etherlink III (combo) */ 1138c2ecf20Sopenharmony_ci {"TCM5095"}, /* 3Com Etherlink III (TPO) */ 1148c2ecf20Sopenharmony_ci {"TCM5098"}, /* 3Com Etherlink III (TPC) */ 1158c2ecf20Sopenharmony_ci {"PNP80f7"}, /* 3Com Etherlink III compatible */ 1168c2ecf20Sopenharmony_ci {"PNP80f8"}, /* 3Com Etherlink III compatible */ 1178c2ecf20Sopenharmony_ci /* nsc-ircc */ 1188c2ecf20Sopenharmony_ci {"NSC6001"}, 1198c2ecf20Sopenharmony_ci {"HWPC224"}, 1208c2ecf20Sopenharmony_ci {"IBM0071"}, 1218c2ecf20Sopenharmony_ci /* smsc-ircc2 */ 1228c2ecf20Sopenharmony_ci {"SMCf010"}, 1238c2ecf20Sopenharmony_ci /* sb1000 */ 1248c2ecf20Sopenharmony_ci {"GIC1000"}, 1258c2ecf20Sopenharmony_ci /* parport_pc */ 1268c2ecf20Sopenharmony_ci {"PNP0400"}, /* Standard LPT Printer Port */ 1278c2ecf20Sopenharmony_ci {"PNP0401"}, /* ECP Printer Port */ 1288c2ecf20Sopenharmony_ci /* apple-gmux */ 1298c2ecf20Sopenharmony_ci {"APP000B"}, 1308c2ecf20Sopenharmony_ci /* system */ 1318c2ecf20Sopenharmony_ci {"PNP0c02"}, /* General ID for reserving resources */ 1328c2ecf20Sopenharmony_ci {"PNP0c01"}, /* memory controller */ 1338c2ecf20Sopenharmony_ci /* rtc_cmos */ 1348c2ecf20Sopenharmony_ci {"PNP0b00"}, 1358c2ecf20Sopenharmony_ci {"PNP0b01"}, 1368c2ecf20Sopenharmony_ci {"PNP0b02"}, 1378c2ecf20Sopenharmony_ci /* c6xdigio */ 1388c2ecf20Sopenharmony_ci {"PNP0400"}, /* Standard LPT Printer Port */ 1398c2ecf20Sopenharmony_ci {"PNP0401"}, /* ECP Printer Port */ 1408c2ecf20Sopenharmony_ci /* ni_atmio.c */ 1418c2ecf20Sopenharmony_ci {"NIC1900"}, 1428c2ecf20Sopenharmony_ci {"NIC2400"}, 1438c2ecf20Sopenharmony_ci {"NIC2500"}, 1448c2ecf20Sopenharmony_ci {"NIC2600"}, 1458c2ecf20Sopenharmony_ci {"NIC2700"}, 1468c2ecf20Sopenharmony_ci /* serial */ 1478c2ecf20Sopenharmony_ci {"AAC000F"}, /* Archtek America Corp. Archtek SmartLink Modem 3334BT Plug & Play */ 1488c2ecf20Sopenharmony_ci {"ADC0001"}, /* Anchor Datacomm BV. SXPro 144 External Data Fax Modem Plug & Play */ 1498c2ecf20Sopenharmony_ci {"ADC0002"}, /* SXPro 288 External Data Fax Modem Plug & Play */ 1508c2ecf20Sopenharmony_ci {"AEI0250"}, /* PROLiNK 1456VH ISA PnP K56flex Fax Modem */ 1518c2ecf20Sopenharmony_ci {"AEI1240"}, /* Actiontec ISA PNP 56K X2 Fax Modem */ 1528c2ecf20Sopenharmony_ci {"AKY1021"}, /* Rockwell 56K ACF II Fax+Data+Voice Modem */ 1538c2ecf20Sopenharmony_ci {"ALI5123"}, /* ALi Fast Infrared Controller */ 1548c2ecf20Sopenharmony_ci {"AZT4001"}, /* AZT3005 PnP SOUND DEVICE */ 1558c2ecf20Sopenharmony_ci {"BDP3336"}, /* Best Data Products Inc. Smart One 336F PnP Modem */ 1568c2ecf20Sopenharmony_ci {"BRI0A49"}, /* Boca Complete Ofc Communicator 14.4 Data-FAX */ 1578c2ecf20Sopenharmony_ci {"BRI1400"}, /* Boca Research 33,600 ACF Modem */ 1588c2ecf20Sopenharmony_ci {"BRI3400"}, /* Boca 33.6 Kbps Internal FD34FSVD */ 1598c2ecf20Sopenharmony_ci {"BRI0A49"}, /* Boca 33.6 Kbps Internal FD34FSVD */ 1608c2ecf20Sopenharmony_ci {"BDP3336"}, /* Best Data Products Inc. Smart One 336F PnP Modem */ 1618c2ecf20Sopenharmony_ci {"CPI4050"}, /* Computer Peripherals Inc. EuroViVa CommCenter-33.6 SP PnP */ 1628c2ecf20Sopenharmony_ci {"CTL3001"}, /* Creative Labs Phone Blaster 28.8 DSVD PnP Voice */ 1638c2ecf20Sopenharmony_ci {"CTL3011"}, /* Creative Labs Modem Blaster 28.8 DSVD PnP Voice */ 1648c2ecf20Sopenharmony_ci {"DAV0336"}, /* Davicom ISA 33.6K Modem */ 1658c2ecf20Sopenharmony_ci {"DMB1032"}, /* Creative Modem Blaster Flash56 DI5601-1 */ 1668c2ecf20Sopenharmony_ci {"DMB2001"}, /* Creative Modem Blaster V.90 DI5660 */ 1678c2ecf20Sopenharmony_ci {"ETT0002"}, /* E-Tech CyberBULLET PC56RVP */ 1688c2ecf20Sopenharmony_ci {"FUJ0202"}, /* Fujitsu 33600 PnP-I2 R Plug & Play */ 1698c2ecf20Sopenharmony_ci {"FUJ0205"}, /* Fujitsu FMV-FX431 Plug & Play */ 1708c2ecf20Sopenharmony_ci {"FUJ0206"}, /* Fujitsu 33600 PnP-I4 R Plug & Play */ 1718c2ecf20Sopenharmony_ci {"FUJ0209"}, /* Fujitsu Fax Voice 33600 PNP-I5 R Plug & Play */ 1728c2ecf20Sopenharmony_ci {"GVC000F"}, /* Archtek SmartLink Modem 3334BT Plug & Play */ 1738c2ecf20Sopenharmony_ci {"GVC0303"}, /* Archtek SmartLink Modem 3334BRV 33.6K Data Fax Voice */ 1748c2ecf20Sopenharmony_ci {"HAY0001"}, /* Hayes Optima 288 V.34-V.FC + FAX + Voice Plug & Play */ 1758c2ecf20Sopenharmony_ci {"HAY000C"}, /* Hayes Optima 336 V.34 + FAX + Voice PnP */ 1768c2ecf20Sopenharmony_ci {"HAY000D"}, /* Hayes Optima 336B V.34 + FAX + Voice PnP */ 1778c2ecf20Sopenharmony_ci {"HAY5670"}, /* Hayes Accura 56K Ext Fax Modem PnP */ 1788c2ecf20Sopenharmony_ci {"HAY5674"}, /* Hayes Accura 56K Ext Fax Modem PnP */ 1798c2ecf20Sopenharmony_ci {"HAY5675"}, /* Hayes Accura 56K Fax Modem PnP */ 1808c2ecf20Sopenharmony_ci {"HAYF000"}, /* Hayes 288, V.34 + FAX */ 1818c2ecf20Sopenharmony_ci {"HAYF001"}, /* Hayes Optima 288 V.34 + FAX + Voice, Plug & Play */ 1828c2ecf20Sopenharmony_ci {"IBM0033"}, /* IBM Thinkpad 701 Internal Modem Voice */ 1838c2ecf20Sopenharmony_ci {"PNP4972"}, /* Intermec CV60 touchscreen port */ 1848c2ecf20Sopenharmony_ci {"IXDC801"}, /* Intertex 28k8 33k6 Voice EXT PnP */ 1858c2ecf20Sopenharmony_ci {"IXDC901"}, /* Intertex 33k6 56k Voice EXT PnP */ 1868c2ecf20Sopenharmony_ci {"IXDD801"}, /* Intertex 28k8 33k6 Voice SP EXT PnP */ 1878c2ecf20Sopenharmony_ci {"IXDD901"}, /* Intertex 33k6 56k Voice SP EXT PnP */ 1888c2ecf20Sopenharmony_ci {"IXDF401"}, /* Intertex 28k8 33k6 Voice SP INT PnP */ 1898c2ecf20Sopenharmony_ci {"IXDF801"}, /* Intertex 28k8 33k6 Voice SP EXT PnP */ 1908c2ecf20Sopenharmony_ci {"IXDF901"}, /* Intertex 33k6 56k Voice SP EXT PnP */ 1918c2ecf20Sopenharmony_ci {"KOR4522"}, /* KORTEX 28800 Externe PnP */ 1928c2ecf20Sopenharmony_ci {"KORF661"}, /* KXPro 33.6 Vocal ASVD PnP */ 1938c2ecf20Sopenharmony_ci {"LAS4040"}, /* LASAT Internet 33600 PnP */ 1948c2ecf20Sopenharmony_ci {"LAS4540"}, /* Lasat Safire 560 PnP */ 1958c2ecf20Sopenharmony_ci {"LAS5440"}, /* Lasat Safire 336 PnP */ 1968c2ecf20Sopenharmony_ci {"MNP0281"}, /* Microcom TravelPorte FAST V.34 Plug & Play */ 1978c2ecf20Sopenharmony_ci {"MNP0336"}, /* Microcom DeskPorte V.34 FAST or FAST+ Plug & Play */ 1988c2ecf20Sopenharmony_ci {"MNP0339"}, /* Microcom DeskPorte FAST EP 28.8 Plug & Play */ 1998c2ecf20Sopenharmony_ci {"MNP0342"}, /* Microcom DeskPorte 28.8P Plug & Play */ 2008c2ecf20Sopenharmony_ci {"MNP0500"}, /* Microcom DeskPorte FAST ES 28.8 Plug & Play */ 2018c2ecf20Sopenharmony_ci {"MNP0501"}, /* Microcom DeskPorte FAST ES 28.8 Plug & Play */ 2028c2ecf20Sopenharmony_ci {"MNP0502"}, /* Microcom DeskPorte 28.8S Internal Plug & Play */ 2038c2ecf20Sopenharmony_ci {"MOT1105"}, /* Motorola BitSURFR Plug & Play */ 2048c2ecf20Sopenharmony_ci {"MOT1111"}, /* Motorola TA210 Plug & Play */ 2058c2ecf20Sopenharmony_ci {"MOT1114"}, /* Motorola HMTA 200 (ISDN) Plug & Play */ 2068c2ecf20Sopenharmony_ci {"MOT1115"}, /* Motorola BitSURFR Plug & Play */ 2078c2ecf20Sopenharmony_ci {"MOT1190"}, /* Motorola Lifestyle 28.8 Internal */ 2088c2ecf20Sopenharmony_ci {"MOT1501"}, /* Motorola V.3400 Plug & Play */ 2098c2ecf20Sopenharmony_ci {"MOT1502"}, /* Motorola Lifestyle 28.8 V.34 Plug & Play */ 2108c2ecf20Sopenharmony_ci {"MOT1505"}, /* Motorola Power 28.8 V.34 Plug & Play */ 2118c2ecf20Sopenharmony_ci {"MOT1509"}, /* Motorola ModemSURFR External 28.8 Plug & Play */ 2128c2ecf20Sopenharmony_ci {"MOT150A"}, /* Motorola Premier 33.6 Desktop Plug & Play */ 2138c2ecf20Sopenharmony_ci {"MOT150F"}, /* Motorola VoiceSURFR 56K External PnP */ 2148c2ecf20Sopenharmony_ci {"MOT1510"}, /* Motorola ModemSURFR 56K External PnP */ 2158c2ecf20Sopenharmony_ci {"MOT1550"}, /* Motorola ModemSURFR 56K Internal PnP */ 2168c2ecf20Sopenharmony_ci {"MOT1560"}, /* Motorola ModemSURFR Internal 28.8 Plug & Play */ 2178c2ecf20Sopenharmony_ci {"MOT1580"}, /* Motorola Premier 33.6 Internal Plug & Play */ 2188c2ecf20Sopenharmony_ci {"MOT15B0"}, /* Motorola OnlineSURFR 28.8 Internal Plug & Play */ 2198c2ecf20Sopenharmony_ci {"MOT15F0"}, /* Motorola VoiceSURFR 56K Internal PnP */ 2208c2ecf20Sopenharmony_ci {"MVX00A1"}, /* Deskline K56 Phone System PnP */ 2218c2ecf20Sopenharmony_ci {"MVX00F2"}, /* PC Rider K56 Phone System PnP */ 2228c2ecf20Sopenharmony_ci {"nEC8241"}, /* NEC 98NOTE SPEAKER PHONE FAX MODEM(33600bps) */ 2238c2ecf20Sopenharmony_ci {"PMC2430"}, /* Pace 56 Voice Internal Plug & Play Modem */ 2248c2ecf20Sopenharmony_ci {"PNP0500"}, /* Generic standard PC COM port */ 2258c2ecf20Sopenharmony_ci {"PNP0501"}, /* Generic 16550A-compatible COM port */ 2268c2ecf20Sopenharmony_ci {"PNPC000"}, /* Compaq 14400 Modem */ 2278c2ecf20Sopenharmony_ci {"PNPC001"}, /* Compaq 2400/9600 Modem */ 2288c2ecf20Sopenharmony_ci {"PNPC031"}, /* Dial-Up Networking Serial Cable between 2 PCs */ 2298c2ecf20Sopenharmony_ci {"PNPC032"}, /* Dial-Up Networking Parallel Cable between 2 PCs */ 2308c2ecf20Sopenharmony_ci {"PNPC100"}, /* Standard 9600 bps Modem */ 2318c2ecf20Sopenharmony_ci {"PNPC101"}, /* Standard 14400 bps Modem */ 2328c2ecf20Sopenharmony_ci {"PNPC102"}, /* Standard 28800 bps Modem */ 2338c2ecf20Sopenharmony_ci {"PNPC103"}, /* Standard Modem */ 2348c2ecf20Sopenharmony_ci {"PNPC104"}, /* Standard 9600 bps Modem */ 2358c2ecf20Sopenharmony_ci {"PNPC105"}, /* Standard 14400 bps Modem */ 2368c2ecf20Sopenharmony_ci {"PNPC106"}, /* Standard 28800 bps Modem */ 2378c2ecf20Sopenharmony_ci {"PNPC107"}, /* Standard Modem */ 2388c2ecf20Sopenharmony_ci {"PNPC108"}, /* Standard 9600 bps Modem */ 2398c2ecf20Sopenharmony_ci {"PNPC109"}, /* Standard 14400 bps Modem */ 2408c2ecf20Sopenharmony_ci {"PNPC10A"}, /* Standard 28800 bps Modem */ 2418c2ecf20Sopenharmony_ci {"PNPC10B"}, /* Standard Modem */ 2428c2ecf20Sopenharmony_ci {"PNPC10C"}, /* Standard 9600 bps Modem */ 2438c2ecf20Sopenharmony_ci {"PNPC10D"}, /* Standard 14400 bps Modem */ 2448c2ecf20Sopenharmony_ci {"PNPC10E"}, /* Standard 28800 bps Modem */ 2458c2ecf20Sopenharmony_ci {"PNPC10F"}, /* Standard Modem */ 2468c2ecf20Sopenharmony_ci {"PNP2000"}, /* Standard PCMCIA Card Modem */ 2478c2ecf20Sopenharmony_ci {"ROK0030"}, /* Rockwell 33.6 DPF Internal PnP, Modular Technology 33.6 Internal PnP */ 2488c2ecf20Sopenharmony_ci {"ROK0100"}, /* KORTEX 14400 Externe PnP */ 2498c2ecf20Sopenharmony_ci {"ROK4120"}, /* Rockwell 28.8 */ 2508c2ecf20Sopenharmony_ci {"ROK4920"}, /* Viking 28.8 INTERNAL Fax+Data+Voice PnP */ 2518c2ecf20Sopenharmony_ci {"RSS00A0"}, /* Rockwell 33.6 DPF External PnP, BT Prologue 33.6 External PnP, Modular Technology 33.6 External PnP */ 2528c2ecf20Sopenharmony_ci {"RSS0262"}, /* Viking 56K FAX INT */ 2538c2ecf20Sopenharmony_ci {"RSS0250"}, /* K56 par,VV,Voice,Speakphone,AudioSpan,PnP */ 2548c2ecf20Sopenharmony_ci {"SUP1310"}, /* SupraExpress 28.8 Data/Fax PnP modem */ 2558c2ecf20Sopenharmony_ci {"SUP1381"}, /* SupraExpress 336i PnP Voice Modem */ 2568c2ecf20Sopenharmony_ci {"SUP1421"}, /* SupraExpress 33.6 Data/Fax PnP modem */ 2578c2ecf20Sopenharmony_ci {"SUP1590"}, /* SupraExpress 33.6 Data/Fax PnP modem */ 2588c2ecf20Sopenharmony_ci {"SUP1620"}, /* SupraExpress 336i Sp ASVD */ 2598c2ecf20Sopenharmony_ci {"SUP1760"}, /* SupraExpress 33.6 Data/Fax PnP modem */ 2608c2ecf20Sopenharmony_ci {"SUP2171"}, /* SupraExpress 56i Sp Intl */ 2618c2ecf20Sopenharmony_ci {"TEX0011"}, /* Phoebe Micro 33.6 Data Fax 1433VQH Plug & Play */ 2628c2ecf20Sopenharmony_ci {"UAC000F"}, /* Archtek SmartLink Modem 3334BT Plug & Play */ 2638c2ecf20Sopenharmony_ci {"USR0000"}, /* 3Com Corp. Gateway Telepath IIvi 33.6 */ 2648c2ecf20Sopenharmony_ci {"USR0002"}, /* U.S. Robotics Sporster 33.6K Fax INT PnP */ 2658c2ecf20Sopenharmony_ci {"USR0004"}, /* Sportster Vi 14.4 PnP FAX Voicemail */ 2668c2ecf20Sopenharmony_ci {"USR0006"}, /* U.S. Robotics 33.6K Voice INT PnP */ 2678c2ecf20Sopenharmony_ci {"USR0007"}, /* U.S. Robotics 33.6K Voice EXT PnP */ 2688c2ecf20Sopenharmony_ci {"USR0009"}, /* U.S. Robotics Courier V.Everything INT PnP */ 2698c2ecf20Sopenharmony_ci {"USR2002"}, /* U.S. Robotics 33.6K Voice INT PnP */ 2708c2ecf20Sopenharmony_ci {"USR2070"}, /* U.S. Robotics 56K Voice INT PnP */ 2718c2ecf20Sopenharmony_ci {"USR2080"}, /* U.S. Robotics 56K Voice EXT PnP */ 2728c2ecf20Sopenharmony_ci {"USR3031"}, /* U.S. Robotics 56K FAX INT */ 2738c2ecf20Sopenharmony_ci {"USR3050"}, /* U.S. Robotics 56K FAX INT */ 2748c2ecf20Sopenharmony_ci {"USR3070"}, /* U.S. Robotics 56K Voice INT PnP */ 2758c2ecf20Sopenharmony_ci {"USR3080"}, /* U.S. Robotics 56K Voice EXT PnP */ 2768c2ecf20Sopenharmony_ci {"USR3090"}, /* U.S. Robotics 56K Voice INT PnP */ 2778c2ecf20Sopenharmony_ci {"USR9100"}, /* U.S. Robotics 56K Message */ 2788c2ecf20Sopenharmony_ci {"USR9160"}, /* U.S. Robotics 56K FAX EXT PnP */ 2798c2ecf20Sopenharmony_ci {"USR9170"}, /* U.S. Robotics 56K FAX INT PnP */ 2808c2ecf20Sopenharmony_ci {"USR9180"}, /* U.S. Robotics 56K Voice EXT PnP */ 2818c2ecf20Sopenharmony_ci {"USR9190"}, /* U.S. Robotics 56K Voice INT PnP */ 2828c2ecf20Sopenharmony_ci {"WACFXXX"}, /* Wacom tablets */ 2838c2ecf20Sopenharmony_ci {"FPI2002"}, /* Compaq touchscreen */ 2848c2ecf20Sopenharmony_ci {"FUJ02B2"}, /* Fujitsu Stylistic touchscreens */ 2858c2ecf20Sopenharmony_ci {"FUJ02B3"}, 2868c2ecf20Sopenharmony_ci {"FUJ02B4"}, /* Fujitsu Stylistic LT touchscreens */ 2878c2ecf20Sopenharmony_ci {"FUJ02B6"}, /* Passive Fujitsu Stylistic touchscreens */ 2888c2ecf20Sopenharmony_ci {"FUJ02B7"}, 2898c2ecf20Sopenharmony_ci {"FUJ02B8"}, 2908c2ecf20Sopenharmony_ci {"FUJ02B9"}, 2918c2ecf20Sopenharmony_ci {"FUJ02BC"}, 2928c2ecf20Sopenharmony_ci {"FUJ02E5"}, /* Fujitsu Wacom Tablet PC device */ 2938c2ecf20Sopenharmony_ci {"FUJ02E6"}, /* Fujitsu P-series tablet PC device */ 2948c2ecf20Sopenharmony_ci {"FUJ02E7"}, /* Fujitsu Wacom 2FGT Tablet PC device */ 2958c2ecf20Sopenharmony_ci {"FUJ02E9"}, /* Fujitsu Wacom 1FGT Tablet PC device */ 2968c2ecf20Sopenharmony_ci {"LTS0001"}, /* LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6 in disguise) */ 2978c2ecf20Sopenharmony_ci {"WCI0003"}, /* Rockwell's (PORALiNK) 33600 INT PNP */ 2988c2ecf20Sopenharmony_ci {"WEC1022"}, /* Winbond CIR port, should not be probed. We should keep track of it to prevent the legacy serial driver from probing it */ 2998c2ecf20Sopenharmony_ci /* scl200wdt */ 3008c2ecf20Sopenharmony_ci {"NSC0800"}, /* National Semiconductor PC87307/PC97307 watchdog component */ 3018c2ecf20Sopenharmony_ci /* mpu401 */ 3028c2ecf20Sopenharmony_ci {"PNPb006"}, 3038c2ecf20Sopenharmony_ci /* cs423x-pnpbios */ 3048c2ecf20Sopenharmony_ci {"CSC0100"}, 3058c2ecf20Sopenharmony_ci {"CSC0103"}, 3068c2ecf20Sopenharmony_ci {"CSC0110"}, 3078c2ecf20Sopenharmony_ci {"CSC0000"}, 3088c2ecf20Sopenharmony_ci {"GIM0100"}, /* Guillemot Turtlebeach something appears to be cs4232 compatible */ 3098c2ecf20Sopenharmony_ci /* es18xx-pnpbios */ 3108c2ecf20Sopenharmony_ci {"ESS1869"}, 3118c2ecf20Sopenharmony_ci {"ESS1879"}, 3128c2ecf20Sopenharmony_ci /* snd-opl3sa2-pnpbios */ 3138c2ecf20Sopenharmony_ci {"YMH0021"}, 3148c2ecf20Sopenharmony_ci {"NMX2210"}, /* Gateway Solo 2500 */ 3158c2ecf20Sopenharmony_ci {""}, 3168c2ecf20Sopenharmony_ci}; 3178c2ecf20Sopenharmony_ci 3188c2ecf20Sopenharmony_cistatic bool matching_id(const char *idstr, const char *list_id) 3198c2ecf20Sopenharmony_ci{ 3208c2ecf20Sopenharmony_ci int i; 3218c2ecf20Sopenharmony_ci 3228c2ecf20Sopenharmony_ci if (strlen(idstr) != strlen(list_id)) 3238c2ecf20Sopenharmony_ci return false; 3248c2ecf20Sopenharmony_ci 3258c2ecf20Sopenharmony_ci if (memcmp(idstr, list_id, 3)) 3268c2ecf20Sopenharmony_ci return false; 3278c2ecf20Sopenharmony_ci 3288c2ecf20Sopenharmony_ci for (i = 3; i < 7; i++) { 3298c2ecf20Sopenharmony_ci char c = toupper(idstr[i]); 3308c2ecf20Sopenharmony_ci 3318c2ecf20Sopenharmony_ci if (!isxdigit(c) 3328c2ecf20Sopenharmony_ci || (list_id[i] != 'X' && c != toupper(list_id[i]))) 3338c2ecf20Sopenharmony_ci return false; 3348c2ecf20Sopenharmony_ci } 3358c2ecf20Sopenharmony_ci return true; 3368c2ecf20Sopenharmony_ci} 3378c2ecf20Sopenharmony_ci 3388c2ecf20Sopenharmony_cistatic bool acpi_pnp_match(const char *idstr, const struct acpi_device_id **matchid) 3398c2ecf20Sopenharmony_ci{ 3408c2ecf20Sopenharmony_ci const struct acpi_device_id *devid; 3418c2ecf20Sopenharmony_ci 3428c2ecf20Sopenharmony_ci for (devid = acpi_pnp_device_ids; devid->id[0]; devid++) 3438c2ecf20Sopenharmony_ci if (matching_id(idstr, (char *)devid->id)) { 3448c2ecf20Sopenharmony_ci if (matchid) 3458c2ecf20Sopenharmony_ci *matchid = devid; 3468c2ecf20Sopenharmony_ci 3478c2ecf20Sopenharmony_ci return true; 3488c2ecf20Sopenharmony_ci } 3498c2ecf20Sopenharmony_ci 3508c2ecf20Sopenharmony_ci return false; 3518c2ecf20Sopenharmony_ci} 3528c2ecf20Sopenharmony_ci 3538c2ecf20Sopenharmony_cistatic int acpi_pnp_attach(struct acpi_device *adev, 3548c2ecf20Sopenharmony_ci const struct acpi_device_id *id) 3558c2ecf20Sopenharmony_ci{ 3568c2ecf20Sopenharmony_ci return 1; 3578c2ecf20Sopenharmony_ci} 3588c2ecf20Sopenharmony_ci 3598c2ecf20Sopenharmony_cistatic struct acpi_scan_handler acpi_pnp_handler = { 3608c2ecf20Sopenharmony_ci .ids = acpi_pnp_device_ids, 3618c2ecf20Sopenharmony_ci .match = acpi_pnp_match, 3628c2ecf20Sopenharmony_ci .attach = acpi_pnp_attach, 3638c2ecf20Sopenharmony_ci}; 3648c2ecf20Sopenharmony_ci 3658c2ecf20Sopenharmony_ci/* 3668c2ecf20Sopenharmony_ci * For CMOS RTC devices, the PNP ACPI scan handler does not work, because 3678c2ecf20Sopenharmony_ci * there is a CMOS RTC ACPI scan handler installed already, so we need to 3688c2ecf20Sopenharmony_ci * check those devices and enumerate them to the PNP bus directly. 3698c2ecf20Sopenharmony_ci */ 3708c2ecf20Sopenharmony_cistatic int is_cmos_rtc_device(struct acpi_device *adev) 3718c2ecf20Sopenharmony_ci{ 3728c2ecf20Sopenharmony_ci static const struct acpi_device_id ids[] = { 3738c2ecf20Sopenharmony_ci { "PNP0B00" }, 3748c2ecf20Sopenharmony_ci { "PNP0B01" }, 3758c2ecf20Sopenharmony_ci { "PNP0B02" }, 3768c2ecf20Sopenharmony_ci {""}, 3778c2ecf20Sopenharmony_ci }; 3788c2ecf20Sopenharmony_ci return !acpi_match_device_ids(adev, ids); 3798c2ecf20Sopenharmony_ci} 3808c2ecf20Sopenharmony_ci 3818c2ecf20Sopenharmony_cibool acpi_is_pnp_device(struct acpi_device *adev) 3828c2ecf20Sopenharmony_ci{ 3838c2ecf20Sopenharmony_ci return adev->handler == &acpi_pnp_handler || is_cmos_rtc_device(adev); 3848c2ecf20Sopenharmony_ci} 3858c2ecf20Sopenharmony_ciEXPORT_SYMBOL_GPL(acpi_is_pnp_device); 3868c2ecf20Sopenharmony_ci 3878c2ecf20Sopenharmony_civoid __init acpi_pnp_init(void) 3888c2ecf20Sopenharmony_ci{ 3898c2ecf20Sopenharmony_ci acpi_scan_add_handler(&acpi_pnp_handler); 3908c2ecf20Sopenharmony_ci} 391