| 1 | // SPDX-License-Identifier: GPL-2.0-only | 
|---|
| 2 | /* | 
|---|
| 3 | * ACPI support for PNP bus type | 
|---|
| 4 | * | 
|---|
| 5 | * Copyright (C) 2014, Intel Corporation | 
|---|
| 6 | * Authors: Zhang Rui <rui.zhang@intel.com> | 
|---|
| 7 | *          Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 
|---|
| 8 | */ | 
|---|
| 9 |  | 
|---|
| 10 | #include <linux/acpi.h> | 
|---|
| 11 | #include <linux/module.h> | 
|---|
| 12 | #include <linux/ctype.h> | 
|---|
| 13 |  | 
|---|
| 14 | #include "internal.h" | 
|---|
| 15 |  | 
|---|
| 16 | static const struct acpi_device_id acpi_pnp_device_ids[] = { | 
|---|
| 17 | /* pata_isapnp */ | 
|---|
| 18 | { "PNP0600"},		/* Generic ESDI/IDE/ATA compatible hard disk controller */ | 
|---|
| 19 | /* floppy */ | 
|---|
| 20 | {.id: "PNP0700"}, | 
|---|
| 21 | /* tpm_inf_pnp */ | 
|---|
| 22 | {.id: "IFX0101"},		/* Infineon TPMs */ | 
|---|
| 23 | {.id: "IFX0102"},		/* Infineon TPMs */ | 
|---|
| 24 | /*tpm_tis */ | 
|---|
| 25 | {.id: "PNP0C31"},		/* TPM */ | 
|---|
| 26 | {.id: "ATM1200"},		/* Atmel */ | 
|---|
| 27 | {.id: "IFX0102"},		/* Infineon */ | 
|---|
| 28 | {.id: "BCM0101"},		/* Broadcom */ | 
|---|
| 29 | {.id: "BCM0102"},		/* Broadcom */ | 
|---|
| 30 | {.id: "NSC1200"},		/* National */ | 
|---|
| 31 | {.id: "ICO0102"},		/* Intel */ | 
|---|
| 32 | /* ide   */ | 
|---|
| 33 | {.id: "PNP0600"},		/* Generic ESDI/IDE/ATA compatible hard disk controller */ | 
|---|
| 34 | /* ns558 */ | 
|---|
| 35 | {.id: "ASB16fd"},		/* AdLib NSC16 */ | 
|---|
| 36 | {.id: "AZT3001"},		/* AZT1008 */ | 
|---|
| 37 | {.id: "CDC0001"},		/* Opl3-SAx */ | 
|---|
| 38 | {.id: "CSC0001"},		/* CS4232 */ | 
|---|
| 39 | {.id: "CSC000f"},		/* CS4236 */ | 
|---|
| 40 | {.id: "CSC0101"},		/* CS4327 */ | 
|---|
| 41 | {.id: "CTL7001"},		/* SB16 */ | 
|---|
| 42 | {.id: "CTL7002"},		/* AWE64 */ | 
|---|
| 43 | {.id: "CTL7005"},		/* Vibra16 */ | 
|---|
| 44 | {.id: "ENS2020"},		/* SoundscapeVIVO */ | 
|---|
| 45 | {.id: "ESS0001"},		/* ES1869 */ | 
|---|
| 46 | {.id: "ESS0005"},		/* ES1878 */ | 
|---|
| 47 | {.id: "ESS6880"},		/* ES688 */ | 
|---|
| 48 | {.id: "IBM0012"},		/* CS4232 */ | 
|---|
| 49 | {.id: "OPT0001"},		/* OPTi Audio16 */ | 
|---|
| 50 | {.id: "YMH0006"},		/* Opl3-SA */ | 
|---|
| 51 | {.id: "YMH0022"},		/* Opl3-SAx */ | 
|---|
| 52 | {.id: "PNPb02f"},		/* Generic */ | 
|---|
| 53 | /* i8042 kbd */ | 
|---|
| 54 | {.id: "PNP0300"}, | 
|---|
| 55 | {.id: "PNP0301"}, | 
|---|
| 56 | {.id: "PNP0302"}, | 
|---|
| 57 | {.id: "PNP0303"}, | 
|---|
| 58 | {.id: "PNP0304"}, | 
|---|
| 59 | {.id: "PNP0305"}, | 
|---|
| 60 | {.id: "PNP0306"}, | 
|---|
| 61 | {.id: "PNP0309"}, | 
|---|
| 62 | {.id: "PNP030a"}, | 
|---|
| 63 | {.id: "PNP030b"}, | 
|---|
| 64 | {.id: "PNP0320"}, | 
|---|
| 65 | {.id: "PNP0343"}, | 
|---|
| 66 | {.id: "PNP0344"}, | 
|---|
| 67 | {.id: "PNP0345"}, | 
|---|
| 68 | {.id: "CPQA0D7"}, | 
|---|
| 69 | /* i8042 aux */ | 
|---|
| 70 | {.id: "AUI0200"}, | 
|---|
| 71 | {.id: "FJC6000"}, | 
|---|
| 72 | {.id: "FJC6001"}, | 
|---|
| 73 | {.id: "PNP0f03"}, | 
|---|
| 74 | {.id: "PNP0f0b"}, | 
|---|
| 75 | {.id: "PNP0f0e"}, | 
|---|
| 76 | {.id: "PNP0f12"}, | 
|---|
| 77 | {.id: "PNP0f13"}, | 
|---|
| 78 | {.id: "PNP0f19"}, | 
|---|
| 79 | {.id: "PNP0f1c"}, | 
|---|
| 80 | {.id: "SYN0801"}, | 
|---|
| 81 | /* fcpnp */ | 
|---|
| 82 | {.id: "AVM0900"}, | 
|---|
| 83 | /* radio-cadet */ | 
|---|
| 84 | {.id: "MSM0c24"},		/* ADS Cadet AM/FM Radio Card */ | 
|---|
| 85 | /* radio-gemtek */ | 
|---|
| 86 | {.id: "ADS7183"},		/* AOpen FX-3D/Pro Radio */ | 
|---|
| 87 | /* radio-sf16fmr2 */ | 
|---|
| 88 | {.id: "MFRad13"},		/* tuner subdevice of SF16-FMD2 */ | 
|---|
| 89 | /* ene_ir */ | 
|---|
| 90 | {.id: "ENE0100"}, | 
|---|
| 91 | {.id: "ENE0200"}, | 
|---|
| 92 | {.id: "ENE0201"}, | 
|---|
| 93 | {.id: "ENE0202"}, | 
|---|
| 94 | /* fintek-cir */ | 
|---|
| 95 | {.id: "FIT0002"},		/* CIR */ | 
|---|
| 96 | /* ite-cir */ | 
|---|
| 97 | {.id: "ITE8704"},		/* Default model */ | 
|---|
| 98 | {.id: "ITE8713"},		/* CIR found in EEEBox 1501U */ | 
|---|
| 99 | {.id: "ITE8708"},		/* Bridged IT8512 */ | 
|---|
| 100 | {.id: "ITE8709"},		/* SRAM-Bridged IT8512 */ | 
|---|
| 101 | /* nuvoton-cir */ | 
|---|
| 102 | {.id: "WEC0530"},		/* CIR */ | 
|---|
| 103 | {.id: "NTN0530"},		/* CIR for new chip's pnp id */ | 
|---|
| 104 | /* Winbond CIR */ | 
|---|
| 105 | {.id: "WEC1022"}, | 
|---|
| 106 | /* wbsd */ | 
|---|
| 107 | {.id: "WEC0517"}, | 
|---|
| 108 | {.id: "WEC0518"}, | 
|---|
| 109 | /* Winbond CIR */ | 
|---|
| 110 | {.id: "TCM5090"},		/* 3Com Etherlink III (TP) */ | 
|---|
| 111 | {.id: "TCM5091"},		/* 3Com Etherlink III */ | 
|---|
| 112 | {.id: "TCM5094"},		/* 3Com Etherlink III (combo) */ | 
|---|
| 113 | {.id: "TCM5095"},		/* 3Com Etherlink III (TPO) */ | 
|---|
| 114 | {.id: "TCM5098"},		/* 3Com Etherlink III (TPC) */ | 
|---|
| 115 | {.id: "PNP80f7"},		/* 3Com Etherlink III compatible */ | 
|---|
| 116 | {.id: "PNP80f8"},		/* 3Com Etherlink III compatible */ | 
|---|
| 117 | /* nsc-ircc */ | 
|---|
| 118 | {.id: "NSC6001"}, | 
|---|
| 119 | {.id: "HWPC224"}, | 
|---|
| 120 | {.id: "IBM0071"}, | 
|---|
| 121 | /* smsc-ircc2 */ | 
|---|
| 122 | {.id: "SMCf010"}, | 
|---|
| 123 | /* parport_pc */ | 
|---|
| 124 | {.id: "PNP0400"},		/* Standard LPT Printer Port */ | 
|---|
| 125 | {.id: "PNP0401"},		/* ECP Printer Port */ | 
|---|
| 126 | /* apple-gmux */ | 
|---|
| 127 | {.id: "APP000B"}, | 
|---|
| 128 | /* system */ | 
|---|
| 129 | {.id: "PNP0c02"},		/* General ID for reserving resources */ | 
|---|
| 130 | {.id: "PNP0c01"},		/* memory controller */ | 
|---|
| 131 | /* rtc_cmos */ | 
|---|
| 132 | {.id: "PNP0b00"}, | 
|---|
| 133 | {.id: "PNP0b01"}, | 
|---|
| 134 | {.id: "PNP0b02"}, | 
|---|
| 135 | /* c6xdigio */ | 
|---|
| 136 | {.id: "PNP0400"},		/* Standard LPT Printer Port */ | 
|---|
| 137 | {.id: "PNP0401"},		/* ECP Printer Port */ | 
|---|
| 138 | /* ni_atmio.c */ | 
|---|
| 139 | {.id: "NIC1900"}, | 
|---|
| 140 | {.id: "NIC2400"}, | 
|---|
| 141 | {.id: "NIC2500"}, | 
|---|
| 142 | {.id: "NIC2600"}, | 
|---|
| 143 | {.id: "NIC2700"}, | 
|---|
| 144 | /* serial */ | 
|---|
| 145 | {.id: "AAC000F"},		/* Archtek America Corp. Archtek SmartLink Modem 3334BT Plug & Play */ | 
|---|
| 146 | {.id: "ADC0001"},		/* Anchor Datacomm BV. SXPro 144 External Data Fax Modem Plug & Play */ | 
|---|
| 147 | {.id: "ADC0002"},		/* SXPro 288 External Data Fax Modem Plug & Play */ | 
|---|
| 148 | {.id: "AEI0250"},		/* PROLiNK 1456VH ISA PnP K56flex Fax Modem */ | 
|---|
| 149 | {.id: "AEI1240"},		/* Actiontec ISA PNP 56K X2 Fax Modem */ | 
|---|
| 150 | {.id: "AKY1021"},		/* Rockwell 56K ACF II Fax+Data+Voice Modem */ | 
|---|
| 151 | {.id: "ALI5123"},		/* ALi Fast Infrared Controller */ | 
|---|
| 152 | {.id: "AZT4001"},		/* AZT3005 PnP SOUND DEVICE */ | 
|---|
| 153 | {.id: "BDP3336"},		/* Best Data Products Inc. Smart One 336F PnP Modem */ | 
|---|
| 154 | {.id: "BRI0A49"},		/* Boca Complete Ofc Communicator 14.4 Data-FAX */ | 
|---|
| 155 | {.id: "BRI1400"},		/* Boca Research 33,600 ACF Modem */ | 
|---|
| 156 | {.id: "BRI3400"},		/* Boca 33.6 Kbps Internal FD34FSVD */ | 
|---|
| 157 | {.id: "CPI4050"},		/* Computer Peripherals Inc. EuroViVa CommCenter-33.6 SP PnP */ | 
|---|
| 158 | {.id: "CTL3001"},		/* Creative Labs Phone Blaster 28.8 DSVD PnP Voice */ | 
|---|
| 159 | {.id: "CTL3011"},		/* Creative Labs Modem Blaster 28.8 DSVD PnP Voice */ | 
|---|
| 160 | {.id: "DAV0336"},		/* Davicom ISA 33.6K Modem */ | 
|---|
| 161 | {.id: "DMB1032"},		/* Creative Modem Blaster Flash56 DI5601-1 */ | 
|---|
| 162 | {.id: "DMB2001"},		/* Creative Modem Blaster V.90 DI5660 */ | 
|---|
| 163 | {.id: "ETT0002"},		/* E-Tech CyberBULLET PC56RVP */ | 
|---|
| 164 | {.id: "FUJ0202"},		/* Fujitsu 33600 PnP-I2 R Plug & Play */ | 
|---|
| 165 | {.id: "FUJ0205"},		/* Fujitsu FMV-FX431 Plug & Play */ | 
|---|
| 166 | {.id: "FUJ0206"},		/* Fujitsu 33600 PnP-I4 R Plug & Play */ | 
|---|
| 167 | {.id: "FUJ0209"},		/* Fujitsu Fax Voice 33600 PNP-I5 R Plug & Play */ | 
|---|
| 168 | {.id: "GVC000F"},		/* Archtek SmartLink Modem 3334BT Plug & Play */ | 
|---|
| 169 | {.id: "GVC0303"},		/* Archtek SmartLink Modem 3334BRV 33.6K Data Fax Voice */ | 
|---|
| 170 | {.id: "HAY0001"},		/* Hayes Optima 288 V.34-V.FC + FAX + Voice Plug & Play */ | 
|---|
| 171 | {.id: "HAY000C"},		/* Hayes Optima 336 V.34 + FAX + Voice PnP */ | 
|---|
| 172 | {.id: "HAY000D"},		/* Hayes Optima 336B V.34 + FAX + Voice PnP */ | 
|---|
| 173 | {.id: "HAY5670"},		/* Hayes Accura 56K Ext Fax Modem PnP */ | 
|---|
| 174 | {.id: "HAY5674"},		/* Hayes Accura 56K Ext Fax Modem PnP */ | 
|---|
| 175 | {.id: "HAY5675"},		/* Hayes Accura 56K Fax Modem PnP */ | 
|---|
| 176 | {.id: "HAYF000"},		/* Hayes 288, V.34 + FAX */ | 
|---|
| 177 | {.id: "HAYF001"},		/* Hayes Optima 288 V.34 + FAX + Voice, Plug & Play */ | 
|---|
| 178 | {.id: "IBM0033"},		/* IBM Thinkpad 701 Internal Modem Voice */ | 
|---|
| 179 | {.id: "PNP4972"},		/* Intermec CV60 touchscreen port */ | 
|---|
| 180 | {.id: "IXDC801"},		/* Intertex 28k8 33k6 Voice EXT PnP */ | 
|---|
| 181 | {.id: "IXDC901"},		/* Intertex 33k6 56k Voice EXT PnP */ | 
|---|
| 182 | {.id: "IXDD801"},		/* Intertex 28k8 33k6 Voice SP EXT PnP */ | 
|---|
| 183 | {.id: "IXDD901"},		/* Intertex 33k6 56k Voice SP EXT PnP */ | 
|---|
| 184 | {.id: "IXDF401"},		/* Intertex 28k8 33k6 Voice SP INT PnP */ | 
|---|
| 185 | {.id: "IXDF801"},		/* Intertex 28k8 33k6 Voice SP EXT PnP */ | 
|---|
| 186 | {.id: "IXDF901"},		/* Intertex 33k6 56k Voice SP EXT PnP */ | 
|---|
| 187 | {.id: "KOR4522"},		/* KORTEX 28800 Externe PnP */ | 
|---|
| 188 | {.id: "KORF661"},		/* KXPro 33.6 Vocal ASVD PnP */ | 
|---|
| 189 | {.id: "LAS4040"},		/* LASAT Internet 33600 PnP */ | 
|---|
| 190 | {.id: "LAS4540"},		/* Lasat Safire 560 PnP */ | 
|---|
| 191 | {.id: "LAS5440"},		/* Lasat Safire 336  PnP */ | 
|---|
| 192 | {.id: "MNP0281"},		/* Microcom TravelPorte FAST V.34 Plug & Play */ | 
|---|
| 193 | {.id: "MNP0336"},		/* Microcom DeskPorte V.34 FAST or FAST+ Plug & Play */ | 
|---|
| 194 | {.id: "MNP0339"},		/* Microcom DeskPorte FAST EP 28.8 Plug & Play */ | 
|---|
| 195 | {.id: "MNP0342"},		/* Microcom DeskPorte 28.8P Plug & Play */ | 
|---|
| 196 | {.id: "MNP0500"},		/* Microcom DeskPorte FAST ES 28.8 Plug & Play */ | 
|---|
| 197 | {.id: "MNP0501"},		/* Microcom DeskPorte FAST ES 28.8 Plug & Play */ | 
|---|
| 198 | {.id: "MNP0502"},		/* Microcom DeskPorte 28.8S Internal Plug & Play */ | 
|---|
| 199 | {.id: "MOT1105"},		/* Motorola BitSURFR Plug & Play */ | 
|---|
| 200 | {.id: "MOT1111"},		/* Motorola TA210 Plug & Play */ | 
|---|
| 201 | {.id: "MOT1114"},		/* Motorola HMTA 200 (ISDN) Plug & Play */ | 
|---|
| 202 | {.id: "MOT1115"},		/* Motorola BitSURFR Plug & Play */ | 
|---|
| 203 | {.id: "MOT1190"},		/* Motorola Lifestyle 28.8 Internal */ | 
|---|
| 204 | {.id: "MOT1501"},		/* Motorola V.3400 Plug & Play */ | 
|---|
| 205 | {.id: "MOT1502"},		/* Motorola Lifestyle 28.8 V.34 Plug & Play */ | 
|---|
| 206 | {.id: "MOT1505"},		/* Motorola Power 28.8 V.34 Plug & Play */ | 
|---|
| 207 | {.id: "MOT1509"},		/* Motorola ModemSURFR External 28.8 Plug & Play */ | 
|---|
| 208 | {.id: "MOT150A"},		/* Motorola Premier 33.6 Desktop Plug & Play */ | 
|---|
| 209 | {.id: "MOT150F"},		/* Motorola VoiceSURFR 56K External PnP */ | 
|---|
| 210 | {.id: "MOT1510"},		/* Motorola ModemSURFR 56K External PnP */ | 
|---|
| 211 | {.id: "MOT1550"},		/* Motorola ModemSURFR 56K Internal PnP */ | 
|---|
| 212 | {.id: "MOT1560"},		/* Motorola ModemSURFR Internal 28.8 Plug & Play */ | 
|---|
| 213 | {.id: "MOT1580"},		/* Motorola Premier 33.6 Internal Plug & Play */ | 
|---|
| 214 | {.id: "MOT15B0"},		/* Motorola OnlineSURFR 28.8 Internal Plug & Play */ | 
|---|
| 215 | {.id: "MOT15F0"},		/* Motorola VoiceSURFR 56K Internal PnP */ | 
|---|
| 216 | {.id: "MVX00A1"},		/*  Deskline K56 Phone System PnP */ | 
|---|
| 217 | {.id: "MVX00F2"},		/* PC Rider K56 Phone System PnP */ | 
|---|
| 218 | {.id: "nEC8241"},		/* NEC 98NOTE SPEAKER PHONE FAX MODEM(33600bps) */ | 
|---|
| 219 | {.id: "PMC2430"},		/* Pace 56 Voice Internal Plug & Play Modem */ | 
|---|
| 220 | {.id: "PNP0500"},		/* Generic standard PC COM port     */ | 
|---|
| 221 | {.id: "PNP0501"},		/* Generic 16550A-compatible COM port */ | 
|---|
| 222 | {.id: "PNPC000"},		/* Compaq 14400 Modem */ | 
|---|
| 223 | {.id: "PNPC001"},		/* Compaq 2400/9600 Modem */ | 
|---|
| 224 | {.id: "PNPC031"},		/* Dial-Up Networking Serial Cable between 2 PCs */ | 
|---|
| 225 | {.id: "PNPC032"},		/* Dial-Up Networking Parallel Cable between 2 PCs */ | 
|---|
| 226 | {.id: "PNPC100"},		/* Standard 9600 bps Modem */ | 
|---|
| 227 | {.id: "PNPC101"},		/* Standard 14400 bps Modem */ | 
|---|
| 228 | {.id: "PNPC102"},		/*  Standard 28800 bps Modem */ | 
|---|
| 229 | {.id: "PNPC103"},		/*  Standard Modem */ | 
|---|
| 230 | {.id: "PNPC104"},		/*  Standard 9600 bps Modem */ | 
|---|
| 231 | {.id: "PNPC105"},		/*  Standard 14400 bps Modem */ | 
|---|
| 232 | {.id: "PNPC106"},		/*  Standard 28800 bps Modem */ | 
|---|
| 233 | {.id: "PNPC107"},		/*  Standard Modem */ | 
|---|
| 234 | {.id: "PNPC108"},		/* Standard 9600 bps Modem */ | 
|---|
| 235 | {.id: "PNPC109"},		/* Standard 14400 bps Modem */ | 
|---|
| 236 | {.id: "PNPC10A"},		/* Standard 28800 bps Modem */ | 
|---|
| 237 | {.id: "PNPC10B"},		/* Standard Modem */ | 
|---|
| 238 | {.id: "PNPC10C"},		/* Standard 9600 bps Modem */ | 
|---|
| 239 | {.id: "PNPC10D"},		/* Standard 14400 bps Modem */ | 
|---|
| 240 | {.id: "PNPC10E"},		/* Standard 28800 bps Modem */ | 
|---|
| 241 | {.id: "PNPC10F"},		/* Standard Modem */ | 
|---|
| 242 | {.id: "PNP2000"},		/* Standard PCMCIA Card Modem */ | 
|---|
| 243 | {.id: "ROK0030"},		/* Rockwell 33.6 DPF Internal PnP, Modular Technology 33.6 Internal PnP */ | 
|---|
| 244 | {.id: "ROK0100"},		/* KORTEX 14400 Externe PnP */ | 
|---|
| 245 | {.id: "ROK4120"},		/* Rockwell 28.8 */ | 
|---|
| 246 | {.id: "ROK4920"},		/* Viking 28.8 INTERNAL Fax+Data+Voice PnP */ | 
|---|
| 247 | {.id: "RSS00A0"},		/* Rockwell 33.6 DPF External PnP, BT Prologue 33.6 External PnP, Modular Technology 33.6 External PnP */ | 
|---|
| 248 | {.id: "RSS0262"},		/* Viking 56K FAX INT */ | 
|---|
| 249 | {.id: "RSS0250"},		/* K56 par,VV,Voice,Speakphone,AudioSpan,PnP */ | 
|---|
| 250 | {.id: "SUP1310"},		/* SupraExpress 28.8 Data/Fax PnP modem */ | 
|---|
| 251 | {.id: "SUP1381"},		/* SupraExpress 336i PnP Voice Modem */ | 
|---|
| 252 | {.id: "SUP1421"},		/* SupraExpress 33.6 Data/Fax PnP modem */ | 
|---|
| 253 | {.id: "SUP1590"},		/* SupraExpress 33.6 Data/Fax PnP modem */ | 
|---|
| 254 | {.id: "SUP1620"},		/* SupraExpress 336i Sp ASVD */ | 
|---|
| 255 | {.id: "SUP1760"},		/* SupraExpress 33.6 Data/Fax PnP modem */ | 
|---|
| 256 | {.id: "SUP2171"},		/* SupraExpress 56i Sp Intl */ | 
|---|
| 257 | {.id: "TEX0011"},		/* Phoebe Micro 33.6 Data Fax 1433VQH Plug & Play */ | 
|---|
| 258 | {.id: "UAC000F"},		/* Archtek SmartLink Modem 3334BT Plug & Play */ | 
|---|
| 259 | {.id: "USR0000"},		/* 3Com Corp. Gateway Telepath IIvi 33.6 */ | 
|---|
| 260 | {.id: "USR0002"},		/* U.S. Robotics Sporster 33.6K Fax INT PnP */ | 
|---|
| 261 | {.id: "USR0004"},		/*  Sportster Vi 14.4 PnP FAX Voicemail */ | 
|---|
| 262 | {.id: "USR0006"},		/* U.S. Robotics 33.6K Voice INT PnP */ | 
|---|
| 263 | {.id: "USR0007"},		/* U.S. Robotics 33.6K Voice EXT PnP */ | 
|---|
| 264 | {.id: "USR0009"},		/* U.S. Robotics Courier V.Everything INT PnP */ | 
|---|
| 265 | {.id: "USR2002"},		/* U.S. Robotics 33.6K Voice INT PnP */ | 
|---|
| 266 | {.id: "USR2070"},		/* U.S. Robotics 56K Voice INT PnP */ | 
|---|
| 267 | {.id: "USR2080"},		/* U.S. Robotics 56K Voice EXT PnP */ | 
|---|
| 268 | {.id: "USR3031"},		/* U.S. Robotics 56K FAX INT */ | 
|---|
| 269 | {.id: "USR3050"},		/* U.S. Robotics 56K FAX INT */ | 
|---|
| 270 | {.id: "USR3070"},		/* U.S. Robotics 56K Voice INT PnP */ | 
|---|
| 271 | {.id: "USR3080"},		/* U.S. Robotics 56K Voice EXT PnP */ | 
|---|
| 272 | {.id: "USR3090"},		/* U.S. Robotics 56K Voice INT PnP */ | 
|---|
| 273 | {.id: "USR9100"},		/* U.S. Robotics 56K Message  */ | 
|---|
| 274 | {.id: "USR9160"},		/* U.S. Robotics 56K FAX EXT PnP */ | 
|---|
| 275 | {.id: "USR9170"},		/* U.S. Robotics 56K FAX INT PnP */ | 
|---|
| 276 | {.id: "USR9180"},		/* U.S. Robotics 56K Voice EXT PnP */ | 
|---|
| 277 | {.id: "USR9190"},		/* U.S. Robotics 56K Voice INT PnP */ | 
|---|
| 278 | {.id: "WACFXXX"},		/* Wacom tablets */ | 
|---|
| 279 | {.id: "FPI2002"},		/* Compaq touchscreen */ | 
|---|
| 280 | {.id: "FUJ02B2"},		/* Fujitsu Stylistic touchscreens */ | 
|---|
| 281 | {.id: "FUJ02B3"}, | 
|---|
| 282 | {.id: "FUJ02B4"},		/* Fujitsu Stylistic LT touchscreens */ | 
|---|
| 283 | {.id: "FUJ02B6"},		/* Passive Fujitsu Stylistic touchscreens */ | 
|---|
| 284 | {.id: "FUJ02B7"}, | 
|---|
| 285 | {.id: "FUJ02B8"}, | 
|---|
| 286 | {.id: "FUJ02B9"}, | 
|---|
| 287 | {.id: "FUJ02BC"}, | 
|---|
| 288 | {.id: "FUJ02E5"},		/* Fujitsu Wacom Tablet PC device */ | 
|---|
| 289 | {.id: "FUJ02E6"},		/* Fujitsu P-series tablet PC device */ | 
|---|
| 290 | {.id: "FUJ02E7"},		/* Fujitsu Wacom 2FGT Tablet PC device */ | 
|---|
| 291 | {.id: "FUJ02E9"},		/* Fujitsu Wacom 1FGT Tablet PC device */ | 
|---|
| 292 | {.id: "LTS0001"},		/* LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6 in disguise) */ | 
|---|
| 293 | {.id: "WCI0003"},		/* Rockwell's (PORALiNK) 33600 INT PNP */ | 
|---|
| 294 | {.id: "WEC1022"},		/* Winbond CIR port, should not be probed. We should keep track of it to prevent the legacy serial driver from probing it */ | 
|---|
| 295 | /* scl200wdt */ | 
|---|
| 296 | {.id: "NSC0800"},		/* National Semiconductor PC87307/PC97307 watchdog component */ | 
|---|
| 297 | /* mpu401 */ | 
|---|
| 298 | {.id: "PNPb006"}, | 
|---|
| 299 | /* cs423x-pnpbios */ | 
|---|
| 300 | {.id: "CSC0100"}, | 
|---|
| 301 | {.id: "CSC0103"}, | 
|---|
| 302 | {.id: "CSC0110"}, | 
|---|
| 303 | {.id: "CSC0000"}, | 
|---|
| 304 | {.id: "GIM0100"},		/* Guillemot Turtlebeach something appears to be cs4232 compatible */ | 
|---|
| 305 | /* es18xx-pnpbios */ | 
|---|
| 306 | {.id: "ESS1869"}, | 
|---|
| 307 | {.id: "ESS1879"}, | 
|---|
| 308 | /* snd-opl3sa2-pnpbios */ | 
|---|
| 309 | {.id: "YMH0021"}, | 
|---|
| 310 | {.id: "NMX2210"},		/* Gateway Solo 2500 */ | 
|---|
| 311 | {.id: ""}, | 
|---|
| 312 | }; | 
|---|
| 313 |  | 
|---|
| 314 | static bool matching_id(const char *idstr, const char *list_id) | 
|---|
| 315 | { | 
|---|
| 316 | int i; | 
|---|
| 317 |  | 
|---|
| 318 | if (strlen(idstr) != strlen(list_id)) | 
|---|
| 319 | return false; | 
|---|
| 320 |  | 
|---|
| 321 | if (memcmp(idstr, list_id, 3)) | 
|---|
| 322 | return false; | 
|---|
| 323 |  | 
|---|
| 324 | for (i = 3; i < 7; i++) { | 
|---|
| 325 | char c = toupper(idstr[i]); | 
|---|
| 326 |  | 
|---|
| 327 | if (!isxdigit(c) | 
|---|
| 328 | || (list_id[i] != 'X' && c != toupper(list_id[i]))) | 
|---|
| 329 | return false; | 
|---|
| 330 | } | 
|---|
| 331 | return true; | 
|---|
| 332 | } | 
|---|
| 333 |  | 
|---|
| 334 | static bool acpi_pnp_match(const char *idstr, const struct acpi_device_id **matchid) | 
|---|
| 335 | { | 
|---|
| 336 | const struct acpi_device_id *devid; | 
|---|
| 337 |  | 
|---|
| 338 | for (devid = acpi_pnp_device_ids; devid->id[0]; devid++) | 
|---|
| 339 | if (matching_id(idstr, list_id: (char *)devid->id)) { | 
|---|
| 340 | if (matchid) | 
|---|
| 341 | *matchid = devid; | 
|---|
| 342 |  | 
|---|
| 343 | return true; | 
|---|
| 344 | } | 
|---|
| 345 |  | 
|---|
| 346 | return false; | 
|---|
| 347 | } | 
|---|
| 348 |  | 
|---|
| 349 | /* | 
|---|
| 350 | * If one of the device IDs below is present in the list of device IDs of a | 
|---|
| 351 | * given ACPI device object, the PNP scan handler will not attach to that | 
|---|
| 352 | * object, because there is a proper non-PNP driver in the kernel for the | 
|---|
| 353 | * device represented by it. | 
|---|
| 354 | */ | 
|---|
| 355 | static const struct acpi_device_id acpi_nonpnp_device_ids[] = { | 
|---|
| 356 | { "INT3F0D"}, | 
|---|
| 357 | {.id: "INTC1080"}, | 
|---|
| 358 | {.id: "INTC1081"}, | 
|---|
| 359 | {.id: "INTC1099"}, | 
|---|
| 360 | {.id: ""}, | 
|---|
| 361 | }; | 
|---|
| 362 |  | 
|---|
| 363 | static int acpi_pnp_attach(struct acpi_device *adev, | 
|---|
| 364 | const struct acpi_device_id *id) | 
|---|
| 365 | { | 
|---|
| 366 | return !!acpi_match_device_ids(device: adev, ids: acpi_nonpnp_device_ids); | 
|---|
| 367 | } | 
|---|
| 368 |  | 
|---|
| 369 | static struct acpi_scan_handler acpi_pnp_handler = { | 
|---|
| 370 | .ids = acpi_pnp_device_ids, | 
|---|
| 371 | .match = acpi_pnp_match, | 
|---|
| 372 | .attach = acpi_pnp_attach, | 
|---|
| 373 | }; | 
|---|
| 374 |  | 
|---|
| 375 | /* | 
|---|
| 376 | * For CMOS RTC devices, the PNP ACPI scan handler does not work, because | 
|---|
| 377 | * there is a CMOS RTC ACPI scan handler installed already, so we need to | 
|---|
| 378 | * check those devices and enumerate them to the PNP bus directly. | 
|---|
| 379 | */ | 
|---|
| 380 | static int is_cmos_rtc_device(struct acpi_device *adev) | 
|---|
| 381 | { | 
|---|
| 382 | static const struct acpi_device_id ids[] = { | 
|---|
| 383 | { "PNP0B00"}, | 
|---|
| 384 | { .id: "PNP0B01"}, | 
|---|
| 385 | { .id: "PNP0B02"}, | 
|---|
| 386 | {.id: ""}, | 
|---|
| 387 | }; | 
|---|
| 388 | return !acpi_match_device_ids(device: adev, ids); | 
|---|
| 389 | } | 
|---|
| 390 |  | 
|---|
| 391 | bool acpi_is_pnp_device(struct acpi_device *adev) | 
|---|
| 392 | { | 
|---|
| 393 | return adev->handler == &acpi_pnp_handler || is_cmos_rtc_device(adev); | 
|---|
| 394 | } | 
|---|
| 395 | EXPORT_SYMBOL_GPL(acpi_is_pnp_device); | 
|---|
| 396 |  | 
|---|
| 397 | void __init acpi_pnp_init(void) | 
|---|
| 398 | { | 
|---|
| 399 | acpi_scan_add_handler(handler: &acpi_pnp_handler); | 
|---|
| 400 | } | 
|---|
| 401 |  | 
|---|