![]() |
|
|||
0001 // SPDX-License-Identifier: GPL-2.0-only 0002 /* 0003 * ACPI support for PNP bus type 0004 * 0005 * Copyright (C) 2014, Intel Corporation 0006 * Authors: Zhang Rui <rui.zhang@intel.com> 0007 * Rafael J. Wysocki <rafael.j.wysocki@intel.com> 0008 */ 0009 0010 #include <linux/acpi.h> 0011 #include <linux/module.h> 0012 #include <linux/ctype.h> 0013 0014 #include "internal.h" 0015 0016 static const struct acpi_device_id acpi_pnp_device_ids[] = { 0017 /* pata_isapnp */ 0018 {"PNP0600"}, /* Generic ESDI/IDE/ATA compatible hard disk controller */ 0019 /* floppy */ 0020 {"PNP0700"}, 0021 /* tpm_inf_pnp */ 0022 {"IFX0101"}, /* Infineon TPMs */ 0023 {"IFX0102"}, /* Infineon TPMs */ 0024 /*tpm_tis */ 0025 {"PNP0C31"}, /* TPM */ 0026 {"ATM1200"}, /* Atmel */ 0027 {"IFX0102"}, /* Infineon */ 0028 {"BCM0101"}, /* Broadcom */ 0029 {"BCM0102"}, /* Broadcom */ 0030 {"NSC1200"}, /* National */ 0031 {"ICO0102"}, /* Intel */ 0032 /* ide */ 0033 {"PNP0600"}, /* Generic ESDI/IDE/ATA compatible hard disk controller */ 0034 /* ns558 */ 0035 {"ASB16fd"}, /* AdLib NSC16 */ 0036 {"AZT3001"}, /* AZT1008 */ 0037 {"CDC0001"}, /* Opl3-SAx */ 0038 {"CSC0001"}, /* CS4232 */ 0039 {"CSC000f"}, /* CS4236 */ 0040 {"CSC0101"}, /* CS4327 */ 0041 {"CTL7001"}, /* SB16 */ 0042 {"CTL7002"}, /* AWE64 */ 0043 {"CTL7005"}, /* Vibra16 */ 0044 {"ENS2020"}, /* SoundscapeVIVO */ 0045 {"ESS0001"}, /* ES1869 */ 0046 {"ESS0005"}, /* ES1878 */ 0047 {"ESS6880"}, /* ES688 */ 0048 {"IBM0012"}, /* CS4232 */ 0049 {"OPT0001"}, /* OPTi Audio16 */ 0050 {"YMH0006"}, /* Opl3-SA */ 0051 {"YMH0022"}, /* Opl3-SAx */ 0052 {"PNPb02f"}, /* Generic */ 0053 /* i8042 kbd */ 0054 {"PNP0300"}, 0055 {"PNP0301"}, 0056 {"PNP0302"}, 0057 {"PNP0303"}, 0058 {"PNP0304"}, 0059 {"PNP0305"}, 0060 {"PNP0306"}, 0061 {"PNP0309"}, 0062 {"PNP030a"}, 0063 {"PNP030b"}, 0064 {"PNP0320"}, 0065 {"PNP0343"}, 0066 {"PNP0344"}, 0067 {"PNP0345"}, 0068 {"CPQA0D7"}, 0069 /* i8042 aux */ 0070 {"AUI0200"}, 0071 {"FJC6000"}, 0072 {"FJC6001"}, 0073 {"PNP0f03"}, 0074 {"PNP0f0b"}, 0075 {"PNP0f0e"}, 0076 {"PNP0f12"}, 0077 {"PNP0f13"}, 0078 {"PNP0f19"}, 0079 {"PNP0f1c"}, 0080 {"SYN0801"}, 0081 /* fcpnp */ 0082 {"AVM0900"}, 0083 /* radio-cadet */ 0084 {"MSM0c24"}, /* ADS Cadet AM/FM Radio Card */ 0085 /* radio-gemtek */ 0086 {"ADS7183"}, /* AOpen FX-3D/Pro Radio */ 0087 /* radio-sf16fmr2 */ 0088 {"MFRad13"}, /* tuner subdevice of SF16-FMD2 */ 0089 /* ene_ir */ 0090 {"ENE0100"}, 0091 {"ENE0200"}, 0092 {"ENE0201"}, 0093 {"ENE0202"}, 0094 /* fintek-cir */ 0095 {"FIT0002"}, /* CIR */ 0096 /* ite-cir */ 0097 {"ITE8704"}, /* Default model */ 0098 {"ITE8713"}, /* CIR found in EEEBox 1501U */ 0099 {"ITE8708"}, /* Bridged IT8512 */ 0100 {"ITE8709"}, /* SRAM-Bridged IT8512 */ 0101 /* nuvoton-cir */ 0102 {"WEC0530"}, /* CIR */ 0103 {"NTN0530"}, /* CIR for new chip's pnp id */ 0104 /* Winbond CIR */ 0105 {"WEC1022"}, 0106 /* wbsd */ 0107 {"WEC0517"}, 0108 {"WEC0518"}, 0109 /* Winbond CIR */ 0110 {"TCM5090"}, /* 3Com Etherlink III (TP) */ 0111 {"TCM5091"}, /* 3Com Etherlink III */ 0112 {"TCM5094"}, /* 3Com Etherlink III (combo) */ 0113 {"TCM5095"}, /* 3Com Etherlink III (TPO) */ 0114 {"TCM5098"}, /* 3Com Etherlink III (TPC) */ 0115 {"PNP80f7"}, /* 3Com Etherlink III compatible */ 0116 {"PNP80f8"}, /* 3Com Etherlink III compatible */ 0117 /* nsc-ircc */ 0118 {"NSC6001"}, 0119 {"HWPC224"}, 0120 {"IBM0071"}, 0121 /* smsc-ircc2 */ 0122 {"SMCf010"}, 0123 /* sb1000 */ 0124 {"GIC1000"}, 0125 /* parport_pc */ 0126 {"PNP0400"}, /* Standard LPT Printer Port */ 0127 {"PNP0401"}, /* ECP Printer Port */ 0128 /* apple-gmux */ 0129 {"APP000B"}, 0130 /* system */ 0131 {"PNP0c02"}, /* General ID for reserving resources */ 0132 {"PNP0c01"}, /* memory controller */ 0133 /* rtc_cmos */ 0134 {"PNP0b00"}, 0135 {"PNP0b01"}, 0136 {"PNP0b02"}, 0137 /* c6xdigio */ 0138 {"PNP0400"}, /* Standard LPT Printer Port */ 0139 {"PNP0401"}, /* ECP Printer Port */ 0140 /* ni_atmio.c */ 0141 {"NIC1900"}, 0142 {"NIC2400"}, 0143 {"NIC2500"}, 0144 {"NIC2600"}, 0145 {"NIC2700"}, 0146 /* serial */ 0147 {"AAC000F"}, /* Archtek America Corp. Archtek SmartLink Modem 3334BT Plug & Play */ 0148 {"ADC0001"}, /* Anchor Datacomm BV. SXPro 144 External Data Fax Modem Plug & Play */ 0149 {"ADC0002"}, /* SXPro 288 External Data Fax Modem Plug & Play */ 0150 {"AEI0250"}, /* PROLiNK 1456VH ISA PnP K56flex Fax Modem */ 0151 {"AEI1240"}, /* Actiontec ISA PNP 56K X2 Fax Modem */ 0152 {"AKY1021"}, /* Rockwell 56K ACF II Fax+Data+Voice Modem */ 0153 {"ALI5123"}, /* ALi Fast Infrared Controller */ 0154 {"AZT4001"}, /* AZT3005 PnP SOUND DEVICE */ 0155 {"BDP3336"}, /* Best Data Products Inc. Smart One 336F PnP Modem */ 0156 {"BRI0A49"}, /* Boca Complete Ofc Communicator 14.4 Data-FAX */ 0157 {"BRI1400"}, /* Boca Research 33,600 ACF Modem */ 0158 {"BRI3400"}, /* Boca 33.6 Kbps Internal FD34FSVD */ 0159 {"CPI4050"}, /* Computer Peripherals Inc. EuroViVa CommCenter-33.6 SP PnP */ 0160 {"CTL3001"}, /* Creative Labs Phone Blaster 28.8 DSVD PnP Voice */ 0161 {"CTL3011"}, /* Creative Labs Modem Blaster 28.8 DSVD PnP Voice */ 0162 {"DAV0336"}, /* Davicom ISA 33.6K Modem */ 0163 {"DMB1032"}, /* Creative Modem Blaster Flash56 DI5601-1 */ 0164 {"DMB2001"}, /* Creative Modem Blaster V.90 DI5660 */ 0165 {"ETT0002"}, /* E-Tech CyberBULLET PC56RVP */ 0166 {"FUJ0202"}, /* Fujitsu 33600 PnP-I2 R Plug & Play */ 0167 {"FUJ0205"}, /* Fujitsu FMV-FX431 Plug & Play */ 0168 {"FUJ0206"}, /* Fujitsu 33600 PnP-I4 R Plug & Play */ 0169 {"FUJ0209"}, /* Fujitsu Fax Voice 33600 PNP-I5 R Plug & Play */ 0170 {"GVC000F"}, /* Archtek SmartLink Modem 3334BT Plug & Play */ 0171 {"GVC0303"}, /* Archtek SmartLink Modem 3334BRV 33.6K Data Fax Voice */ 0172 {"HAY0001"}, /* Hayes Optima 288 V.34-V.FC + FAX + Voice Plug & Play */ 0173 {"HAY000C"}, /* Hayes Optima 336 V.34 + FAX + Voice PnP */ 0174 {"HAY000D"}, /* Hayes Optima 336B V.34 + FAX + Voice PnP */ 0175 {"HAY5670"}, /* Hayes Accura 56K Ext Fax Modem PnP */ 0176 {"HAY5674"}, /* Hayes Accura 56K Ext Fax Modem PnP */ 0177 {"HAY5675"}, /* Hayes Accura 56K Fax Modem PnP */ 0178 {"HAYF000"}, /* Hayes 288, V.34 + FAX */ 0179 {"HAYF001"}, /* Hayes Optima 288 V.34 + FAX + Voice, Plug & Play */ 0180 {"IBM0033"}, /* IBM Thinkpad 701 Internal Modem Voice */ 0181 {"PNP4972"}, /* Intermec CV60 touchscreen port */ 0182 {"IXDC801"}, /* Intertex 28k8 33k6 Voice EXT PnP */ 0183 {"IXDC901"}, /* Intertex 33k6 56k Voice EXT PnP */ 0184 {"IXDD801"}, /* Intertex 28k8 33k6 Voice SP EXT PnP */ 0185 {"IXDD901"}, /* Intertex 33k6 56k Voice SP EXT PnP */ 0186 {"IXDF401"}, /* Intertex 28k8 33k6 Voice SP INT PnP */ 0187 {"IXDF801"}, /* Intertex 28k8 33k6 Voice SP EXT PnP */ 0188 {"IXDF901"}, /* Intertex 33k6 56k Voice SP EXT PnP */ 0189 {"KOR4522"}, /* KORTEX 28800 Externe PnP */ 0190 {"KORF661"}, /* KXPro 33.6 Vocal ASVD PnP */ 0191 {"LAS4040"}, /* LASAT Internet 33600 PnP */ 0192 {"LAS4540"}, /* Lasat Safire 560 PnP */ 0193 {"LAS5440"}, /* Lasat Safire 336 PnP */ 0194 {"MNP0281"}, /* Microcom TravelPorte FAST V.34 Plug & Play */ 0195 {"MNP0336"}, /* Microcom DeskPorte V.34 FAST or FAST+ Plug & Play */ 0196 {"MNP0339"}, /* Microcom DeskPorte FAST EP 28.8 Plug & Play */ 0197 {"MNP0342"}, /* Microcom DeskPorte 28.8P Plug & Play */ 0198 {"MNP0500"}, /* Microcom DeskPorte FAST ES 28.8 Plug & Play */ 0199 {"MNP0501"}, /* Microcom DeskPorte FAST ES 28.8 Plug & Play */ 0200 {"MNP0502"}, /* Microcom DeskPorte 28.8S Internal Plug & Play */ 0201 {"MOT1105"}, /* Motorola BitSURFR Plug & Play */ 0202 {"MOT1111"}, /* Motorola TA210 Plug & Play */ 0203 {"MOT1114"}, /* Motorola HMTA 200 (ISDN) Plug & Play */ 0204 {"MOT1115"}, /* Motorola BitSURFR Plug & Play */ 0205 {"MOT1190"}, /* Motorola Lifestyle 28.8 Internal */ 0206 {"MOT1501"}, /* Motorola V.3400 Plug & Play */ 0207 {"MOT1502"}, /* Motorola Lifestyle 28.8 V.34 Plug & Play */ 0208 {"MOT1505"}, /* Motorola Power 28.8 V.34 Plug & Play */ 0209 {"MOT1509"}, /* Motorola ModemSURFR External 28.8 Plug & Play */ 0210 {"MOT150A"}, /* Motorola Premier 33.6 Desktop Plug & Play */ 0211 {"MOT150F"}, /* Motorola VoiceSURFR 56K External PnP */ 0212 {"MOT1510"}, /* Motorola ModemSURFR 56K External PnP */ 0213 {"MOT1550"}, /* Motorola ModemSURFR 56K Internal PnP */ 0214 {"MOT1560"}, /* Motorola ModemSURFR Internal 28.8 Plug & Play */ 0215 {"MOT1580"}, /* Motorola Premier 33.6 Internal Plug & Play */ 0216 {"MOT15B0"}, /* Motorola OnlineSURFR 28.8 Internal Plug & Play */ 0217 {"MOT15F0"}, /* Motorola VoiceSURFR 56K Internal PnP */ 0218 {"MVX00A1"}, /* Deskline K56 Phone System PnP */ 0219 {"MVX00F2"}, /* PC Rider K56 Phone System PnP */ 0220 {"nEC8241"}, /* NEC 98NOTE SPEAKER PHONE FAX MODEM(33600bps) */ 0221 {"PMC2430"}, /* Pace 56 Voice Internal Plug & Play Modem */ 0222 {"PNP0500"}, /* Generic standard PC COM port */ 0223 {"PNP0501"}, /* Generic 16550A-compatible COM port */ 0224 {"PNPC000"}, /* Compaq 14400 Modem */ 0225 {"PNPC001"}, /* Compaq 2400/9600 Modem */ 0226 {"PNPC031"}, /* Dial-Up Networking Serial Cable between 2 PCs */ 0227 {"PNPC032"}, /* Dial-Up Networking Parallel Cable between 2 PCs */ 0228 {"PNPC100"}, /* Standard 9600 bps Modem */ 0229 {"PNPC101"}, /* Standard 14400 bps Modem */ 0230 {"PNPC102"}, /* Standard 28800 bps Modem */ 0231 {"PNPC103"}, /* Standard Modem */ 0232 {"PNPC104"}, /* Standard 9600 bps Modem */ 0233 {"PNPC105"}, /* Standard 14400 bps Modem */ 0234 {"PNPC106"}, /* Standard 28800 bps Modem */ 0235 {"PNPC107"}, /* Standard Modem */ 0236 {"PNPC108"}, /* Standard 9600 bps Modem */ 0237 {"PNPC109"}, /* Standard 14400 bps Modem */ 0238 {"PNPC10A"}, /* Standard 28800 bps Modem */ 0239 {"PNPC10B"}, /* Standard Modem */ 0240 {"PNPC10C"}, /* Standard 9600 bps Modem */ 0241 {"PNPC10D"}, /* Standard 14400 bps Modem */ 0242 {"PNPC10E"}, /* Standard 28800 bps Modem */ 0243 {"PNPC10F"}, /* Standard Modem */ 0244 {"PNP2000"}, /* Standard PCMCIA Card Modem */ 0245 {"ROK0030"}, /* Rockwell 33.6 DPF Internal PnP, Modular Technology 33.6 Internal PnP */ 0246 {"ROK0100"}, /* KORTEX 14400 Externe PnP */ 0247 {"ROK4120"}, /* Rockwell 28.8 */ 0248 {"ROK4920"}, /* Viking 28.8 INTERNAL Fax+Data+Voice PnP */ 0249 {"RSS00A0"}, /* Rockwell 33.6 DPF External PnP, BT Prologue 33.6 External PnP, Modular Technology 33.6 External PnP */ 0250 {"RSS0262"}, /* Viking 56K FAX INT */ 0251 {"RSS0250"}, /* K56 par,VV,Voice,Speakphone,AudioSpan,PnP */ 0252 {"SUP1310"}, /* SupraExpress 28.8 Data/Fax PnP modem */ 0253 {"SUP1381"}, /* SupraExpress 336i PnP Voice Modem */ 0254 {"SUP1421"}, /* SupraExpress 33.6 Data/Fax PnP modem */ 0255 {"SUP1590"}, /* SupraExpress 33.6 Data/Fax PnP modem */ 0256 {"SUP1620"}, /* SupraExpress 336i Sp ASVD */ 0257 {"SUP1760"}, /* SupraExpress 33.6 Data/Fax PnP modem */ 0258 {"SUP2171"}, /* SupraExpress 56i Sp Intl */ 0259 {"TEX0011"}, /* Phoebe Micro 33.6 Data Fax 1433VQH Plug & Play */ 0260 {"UAC000F"}, /* Archtek SmartLink Modem 3334BT Plug & Play */ 0261 {"USR0000"}, /* 3Com Corp. Gateway Telepath IIvi 33.6 */ 0262 {"USR0002"}, /* U.S. Robotics Sporster 33.6K Fax INT PnP */ 0263 {"USR0004"}, /* Sportster Vi 14.4 PnP FAX Voicemail */ 0264 {"USR0006"}, /* U.S. Robotics 33.6K Voice INT PnP */ 0265 {"USR0007"}, /* U.S. Robotics 33.6K Voice EXT PnP */ 0266 {"USR0009"}, /* U.S. Robotics Courier V.Everything INT PnP */ 0267 {"USR2002"}, /* U.S. Robotics 33.6K Voice INT PnP */ 0268 {"USR2070"}, /* U.S. Robotics 56K Voice INT PnP */ 0269 {"USR2080"}, /* U.S. Robotics 56K Voice EXT PnP */ 0270 {"USR3031"}, /* U.S. Robotics 56K FAX INT */ 0271 {"USR3050"}, /* U.S. Robotics 56K FAX INT */ 0272 {"USR3070"}, /* U.S. Robotics 56K Voice INT PnP */ 0273 {"USR3080"}, /* U.S. Robotics 56K Voice EXT PnP */ 0274 {"USR3090"}, /* U.S. Robotics 56K Voice INT PnP */ 0275 {"USR9100"}, /* U.S. Robotics 56K Message */ 0276 {"USR9160"}, /* U.S. Robotics 56K FAX EXT PnP */ 0277 {"USR9170"}, /* U.S. Robotics 56K FAX INT PnP */ 0278 {"USR9180"}, /* U.S. Robotics 56K Voice EXT PnP */ 0279 {"USR9190"}, /* U.S. Robotics 56K Voice INT PnP */ 0280 {"WACFXXX"}, /* Wacom tablets */ 0281 {"FPI2002"}, /* Compaq touchscreen */ 0282 {"FUJ02B2"}, /* Fujitsu Stylistic touchscreens */ 0283 {"FUJ02B3"}, 0284 {"FUJ02B4"}, /* Fujitsu Stylistic LT touchscreens */ 0285 {"FUJ02B6"}, /* Passive Fujitsu Stylistic touchscreens */ 0286 {"FUJ02B7"}, 0287 {"FUJ02B8"}, 0288 {"FUJ02B9"}, 0289 {"FUJ02BC"}, 0290 {"FUJ02E5"}, /* Fujitsu Wacom Tablet PC device */ 0291 {"FUJ02E6"}, /* Fujitsu P-series tablet PC device */ 0292 {"FUJ02E7"}, /* Fujitsu Wacom 2FGT Tablet PC device */ 0293 {"FUJ02E9"}, /* Fujitsu Wacom 1FGT Tablet PC device */ 0294 {"LTS0001"}, /* LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6 in disguise) */ 0295 {"WCI0003"}, /* Rockwell's (PORALiNK) 33600 INT PNP */ 0296 {"WEC1022"}, /* Winbond CIR port, should not be probed. We should keep track of it to prevent the legacy serial driver from probing it */ 0297 /* scl200wdt */ 0298 {"NSC0800"}, /* National Semiconductor PC87307/PC97307 watchdog component */ 0299 /* mpu401 */ 0300 {"PNPb006"}, 0301 /* cs423x-pnpbios */ 0302 {"CSC0100"}, 0303 {"CSC0103"}, 0304 {"CSC0110"}, 0305 {"CSC0000"}, 0306 {"GIM0100"}, /* Guillemot Turtlebeach something appears to be cs4232 compatible */ 0307 /* es18xx-pnpbios */ 0308 {"ESS1869"}, 0309 {"ESS1879"}, 0310 /* snd-opl3sa2-pnpbios */ 0311 {"YMH0021"}, 0312 {"NMX2210"}, /* Gateway Solo 2500 */ 0313 {""}, 0314 }; 0315 0316 static bool matching_id(const char *idstr, const char *list_id) 0317 { 0318 int i; 0319 0320 if (strlen(idstr) != strlen(list_id)) 0321 return false; 0322 0323 if (memcmp(idstr, list_id, 3)) 0324 return false; 0325 0326 for (i = 3; i < 7; i++) { 0327 char c = toupper(idstr[i]); 0328 0329 if (!isxdigit(c) 0330 || (list_id[i] != 'X' && c != toupper(list_id[i]))) 0331 return false; 0332 } 0333 return true; 0334 } 0335 0336 static bool acpi_pnp_match(const char *idstr, const struct acpi_device_id **matchid) 0337 { 0338 const struct acpi_device_id *devid; 0339 0340 for (devid = acpi_pnp_device_ids; devid->id[0]; devid++) 0341 if (matching_id(idstr, (char *)devid->id)) { 0342 if (matchid) 0343 *matchid = devid; 0344 0345 return true; 0346 } 0347 0348 return false; 0349 } 0350 0351 static int acpi_pnp_attach(struct acpi_device *adev, 0352 const struct acpi_device_id *id) 0353 { 0354 return 1; 0355 } 0356 0357 static struct acpi_scan_handler acpi_pnp_handler = { 0358 .ids = acpi_pnp_device_ids, 0359 .match = acpi_pnp_match, 0360 .attach = acpi_pnp_attach, 0361 }; 0362 0363 /* 0364 * For CMOS RTC devices, the PNP ACPI scan handler does not work, because 0365 * there is a CMOS RTC ACPI scan handler installed already, so we need to 0366 * check those devices and enumerate them to the PNP bus directly. 0367 */ 0368 static int is_cmos_rtc_device(struct acpi_device *adev) 0369 { 0370 static const struct acpi_device_id ids[] = { 0371 { "PNP0B00" }, 0372 { "PNP0B01" }, 0373 { "PNP0B02" }, 0374 {""}, 0375 }; 0376 return !acpi_match_device_ids(adev, ids); 0377 } 0378 0379 bool acpi_is_pnp_device(struct acpi_device *adev) 0380 { 0381 return adev->handler == &acpi_pnp_handler || is_cmos_rtc_device(adev); 0382 } 0383 EXPORT_SYMBOL_GPL(acpi_is_pnp_device); 0384 0385 void __init acpi_pnp_init(void) 0386 { 0387 acpi_scan_add_handler(&acpi_pnp_handler); 0388 }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |