summaryrefslogtreecommitdiff
path: root/include/linux/pnp.h
AgeCommit message (Collapse)Author
2007-05-08PNP: notice whether we have PNP devices (PNPBIOS or PNPACPI)Bjorn Helgaas
This series converts i386 and x86_64 legacy serial ports to be platform devices and prevents probing for them if we have PNP. This prevents double discovery, where a device was found both by the legacy probe and by 8250_pnp. This also prevents the serial driver from claiming IRDA devices (unless they have a UART PNP ID). The serial legacy probe sometimes assumed the wrong IRQ, so the user had to use "setserial" to fix it. Removing the need for setserial to make IRDA devices work seems good, but it does break some things. In particular, you may need to keep setserial from poking legacy UART stuff back in by doing something like "dpkg-reconfigure setserial" with the "kernel" option. Otherwise, the setserial-discovered "UART" will claim resources and prevent the IRDA driver from loading. This patch: If we can discover devices using PNP, we can skip some legacy probes. This flag ("pnp_platform_devices") indicates that PNPBIOS or PNPACPI is enabled and should tell us about builtin devices. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Keith Owens <kaos@ocs.com.au> Cc: Len Brown <lenb@kernel.org> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Matthieu CASTET <castet.matthieu@free.fr> Cc: Jean Tourrilhes <jt@hpl.hp.com> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Cc: Ville Syrjala <syrjala@sci.fi> Cc: Russell King <rmk+serial@arm.linux.org.uk> Cc: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08init dma masks in pnp_devDavid Brownell
PNP now initializes device dma masks, which prevents oopses when generic dma calls are made using pnp device nodes. This assumes PNP only uses ISA DMA, with 24 bit addresses; and that it's safe to init those masks for all devices (rather than finding out which devices have been assigned DMA channels, and handling only those). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Adam Belay <abelay@novell.com> Cc: Jaroslav Kysela <perex@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] PNP: export pnp_bus_typeDavid Brownell
The PNP framework doesn't export "pnp_bus_type", which is an unfortunate exception to the policy followed by pretty much every other bus. I noticed this when I had to find a device in order to provide its platform_data. Note that per advice from Arjan, the "export" scope has been been minimized to avoid the hundred-plus bytes needed to support access from modules. In this case, the symbol is only needed by statically linked kernel code that lives outside the drivers/pnp directory. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-06-27[PATCH] 64bit resource: change pnp core to use resource_size_tGreg Kroah-Hartman
Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-03[ALSA] [PATCH] alsa: Improved PnP suspend supportPierre Ossman
Also use the PnP functions to start/stop the devices during the suspend so that drivers will not have to duplicate this code. Cc: Adam Belay <ambx1@neo.rr.com> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] PATCH] Add PM support to PnP driversTakashi Iwai
Add suspend/resume callback to pnp_driver and pnp_card_driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-07[PATCH] drivers/pnp/: cleanupsAdrian Bunk
This patch contains the following possible cleanups: - make needlessly global code static - #if 0 the following unused global function: - core.c: pnp_remove_device - #if 0 the following unneeded EXPORT_SYMBOL's: - card.c: pnp_add_card - card.c: pnp_remove_card - card.c: pnp_add_card_device - card.c: pnp_remove_card_device - card.c: pnp_add_card_id - core.c: pnp_register_protocol - core.c: pnp_unregister_protocol - core.c: pnp_add_device - core.c: pnp_remove_device - pnpacpi/core.c: pnpacpi_protocol - driver.c: pnp_add_id - isapnp/core.c: isapnp_read_byte - manager.c: pnp_auto_config_dev - resource.c: pnp_register_dependent_option - resource.c: pnp_register_independent_option - resource.c: pnp_register_irq_resource - resource.c: pnp_register_dma_resource - resource.c: pnp_register_port_resource - resource.c: pnp_register_mem_resource Note that this patch #if 0's exactly one functions and removes no functions. Most it does is the #if 0 of EXPORT_SYMBOL's, so if any modular code will use any of them, re-adding will be trivial. Modular ISAPnP might be interesting in some cases, but this is more legacy code. If someone would work on it to sort all the issues out (starting with the point that most users of __ISAPNP__ will have to be fixed) re-enabling the required EXPORT_SYMBOL's won't be hard for him. Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07[PATCH] PNP: make pnp_dbg conditional directly on CONFIG_PNP_DEBUGBjorn Helgaas
Seems pointless to require .c files to test CONFIG_PNP_DEBUG and conditionally define DEBUG before including <linux/pnp.h>. Just test CONFIG_PNP_DEBUG directly in pnp.h. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-03-13[PATCH] some PNP cleanupsAdrian Bunk
This patch makes the following changes to the PNP code: - make some needlessly global code static - remove the EXPORT_SYMBOL(pnp_assign_resources) since this function is only used in the file it is defined in Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-10-28[PNP] handler more than 16 IRQsLen Brown
Signed-off-by: David Shaohua Li <shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2004-10-27[ACPI] create ACPI-based PNP driver.Len Brown
With this driver, legacy device drivers (floppy ACPI driver, COM ACPI driver, and ACPI motherboard driver) which directly use ACPI can be removed, since now we have unified PNP interface for legacy ACPI enumerated devices. Originally by Matthieu Castet Signed-off-by: Li Shaohua <shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2004-02-08[PNP] Move ID declarationsAdam Belay
This patch moves the PnP ID declarations to mod_devicetable.h like most of the other buses. It is from Takashi Iwai <tiwai@suse.de>.
2004-02-08[PNP]: Resource flags updateAdam Belay
This patch reorganizes resource flags to ensure that manual resource settings are properly recognized. This fix is necessary for many ALSA drivers. It also prevents comparisons between unset resource structures. The bug was discovered by Rene Herman <rene.herman@keyaccess.nl>, who also wrote an initial version of this patch. I made further improvements to ensure that the pnp subsystem was compatible with this initial change.
2003-08-16[PATCH] Remove remaining usage of device.name in PnPAdam Belay
This removes three remaining instances of device.name. 1.) the isapnp driver 2.) the protocol management code 3.) the pnp serial driver A name field has been introduced to pnp_dev and pnp_card to store human readable names reported by pnp.
2003-08-05[PNPBIOS] Move Parsing Functions to the PnPBIOS driverAdam Belay
This patch moves the resource parsing functions from support.c to the pnpbios driver. Originally these functions were intended for other pnp protocols but in reality they are only used by the PnPBIOS driver. This patch greatly cleans up the code in both the parsing functions and their connection with the pnpbios driver. Also note that pnpbios.h has been added for local pnpbios functions.
2003-08-05[PNP] Remove protocol_data from pnp_dev and pnp_cardAdam Belay
This is not needed.
2003-06-24[PNP] pnp_init_resource_table compile fixAdam Belay
In the last release, this api was accidently changed and therefore affected some drivers. This patch corrects the issue by renaming the api back to pnp_init_resource_table.
2003-06-18[PNP] Resource Management Cleanups and UpdatesAdam Belay
This patch does the following... 1.) changes struct pnp_resources to pnp_option for clarity 2.) greatly cleans up resource option registration 3.) removes some of the current conflict prevention code in order to increase flexibility, (users will have more control) 4.) various manager cleanups, resulting code is more efficient 5.) fixes the locking bugs many have reported (now uses a mutex) 6.) removes the conflict displaying interface - it is better to handle such things in user space 7.) also many misc. cleanups
2003-04-10ALSA and PnP updateJaroslav Kysela
- compilation fixes - enhanced linux/pnp.h: pnp_device_is_isapnp(dev) pnp_device_is_pnpbios(dev) isapnp_card_number(dev) isapnp_csn_number(dev)
2003-03-25[PATCH 2.5] PnP changes to allow MODULE_DEVICE_TABLE()Adam Belay
This patch fixes the MODULE_DEVICE_TABLE problems, the correct code was accidentally lost a few merges back. It is from Daniel Ritz <daniel.ritz@gmx.ch>, below is the original message. hello adam, jaroslav, list this patch does: - rename struct pnp_card_id to pnp_card_device_id - fix all references to it this is needed for the MODULE_DEVICE_TABLE() macro to work with pnp_card's. jaroslav did this a while ago (changeset 1.879.79.1), but adam undid it a bit later (changeset 1.889.202.3). but why? w/o the patch gcc dies when compiling als100.c with the message 'storage size of __mod_pnp_card_device_table unknown' (this is from the macro). any reasons why i should not send this to linus? against 2.5.65-bk rgds -daniel
2003-03-24PnP Card Service CleanupsAdam Belay
Moves probing code to a central location and matches when new cards are added instead of only when new drivers are added.
2003-03-10[PATCH] pnp warning fixAndrew Morton
The pnp_request_card_device() stub should return NULL, not -ENODEV.
2003-03-09Aditional Card Service ChangesAdam Belay
Fixes many issues that were discovered after testing. Also cleans up the card service code and fixes the card_drvdata bug in which only one driver at a time could have driver data.
2003-03-09PnP Card Serivice RevisionsAdam Belay
This set of changes addresses the following issues with the existing card service implementation: 1.) Only one driver can be bound to a card. 2.) repetive code is required for pnp_request_card_device and other functions This patch will make the card services usable by ALSA.
2003-02-20[PATCH] pnp compile fixAndrew Morton
fix two tpyos
2003-02-19Preparations and CleanupsAdam Belay
Required for the remaining patches in this series.
2003-01-13PnP updateJaroslav Kysela
- ISA PnP - removed isapnp_card_protocol reference - NE1000/2000 - fixed exit sequence and bugs in PnP code - aironet4500 - fixed exit sequence - ISDN - hisax_fcpcipnp - fixed compilation - OSS sound drivers - ad1848, cs4232 - updated to latest PnP code
2003-01-11[PATCH] PnP update - driversJaroslav Kysela
this patch must be applied after PnP patch v0.94. It contains my small cleanups of PnP code and I tried to rewrite almost all ISA PnP drivers to new PnP subsystem except sound drivers (ALSA & OSS). PnP update - separated dev->resource to dev->io_resource and dev->mem_resource - added pnp_*_valid() macros - added status member to pnp_card structure - added pnp_device_attach/detach functions - added pnpc_attach/detach functions - moved pnp_find_card() and pnp_find_dev() functions to isapnp.h - updated IDE/gameport/ISDN/network/scsi/radio/telephone drivers to latest PnP code
2003-01-11Linux PnP Support 0.94Jaroslav Kysela
(Adam Belay) -use list_del instead of list_del_init in some areas -introduce pnp capability and status flags -remove static resource setting, I did some research and found that only PnPBIOS supports it, therefore it is better to implememt this in the PnPBIOS protocol itself. (it appears ACPI doesn't use this) -Remove pnp_dev_has_driver and use PNP_ATTACHED instead, this is necessary because a card driver only has rights over a device that it requests. -added card_for_each_dev macro -undo isapnp protocol changes, the pnp layer was designed to handle cards and devices on the same protocol and I feel they should not be seperated. (Pual Laufer) -Fix remove driver bug in pnp card services (Adam Richter) -Fix a potential oops in id registration functions
2002-12-26PnP updateJaroslav Kysela
- removed ISAPnP members from PCI structures - isapnp.h cleanups (removal of duplicates) - added compatible functions (pnp_find_dev and pnp_find_card) - i82365 (pcmcia driver) - ported to new PnP layer
2002-12-26PnP updateJaroslav Kysela
- added configuration templates - configuration can be changed from the probe() callback - new PnP ID - NSC6001 - fixes in PnP BIOS code - no more oopses - fixed typos and thinkos in 8250_pnp.c
2002-12-05[PATCH] PnP bugfixAdam Belay
I forgot the errno.h. Without this patch, things may not compile when pnp support or pnp card support is disabled. Hope you had a good trip. I noticed a small mistake in pnp 0.93 and I have a fix for it.
2002-12-05[PATCH] Linux PnP Support V0.93 - 2.5.50Adam Belay
Attached is a patch, that updates the 2.5.50 to the latest pnp version. It includes all 9 of the previously submitted patches. Highlights are as follows: -PnP BIOS fixes -Several new macros -PnP Card Services -Various bug fixes -more drivers converted to the new APIs
2002-10-28mergeGreg Kroah-Hartman
2002-10-28[PATCH] A couple of compile fixesAlexander Viro
2002-10-23[PATCH] Convert CS4236B driver - 2.5.44 (3/4)Adam Belay
This patch converts the CS4236B sound card driver to the new PnP APIs. Also it makes pnp_driver_register return the number of matches during the driver add. This should serve as a sample driver, along with the serial and parport_pc.
2002-10-20[PATCH] PnP Rewrite Fixes - 2.5.44Adam Belay
This patch addresses a few minor issues for the Linux Plug and Play Rewrite. It is against 2.5.44. They are as follows. 1.) fix Config.in file - from Adrian Bunk and Roman Zippel 2.) if unable to activate a device the match should fail. This can be done now that the driver model matching bug has been corrected. 3.) move compat.c to isapnp directory and fix everything accordingly - suggested by Stelian Pop. This fixes a compile error if ISAPNP is disabled. 4.) fix a typo in pnp.h - patch from Skip Ford Please Apply, Adam
2002-10-18[PATCH] PnP Rewrite V0.9 - 2.5.43Adam Belay
The included patch is essentially a Linux Plug and Play Support rewrite. It contains many significant improvements, including the following: 1.) A Global Plug and Play Layer - Now drivers do not have to worry about which plug and play protocol they are using. Calls are made directly to the Linux Plug and Play Layer and then forwarded to the appropriate protocol. - This will make it very easy to integrate ACPI PnP support when it's ready 2.) A complete Plug and Play BIOS driver - The Plug and Play BIOS now supports reading and writing of resource configurations. - It is now possible to enable disabled PNPBIOS devices. Therefore the user can safely enable PnP OS support in their BIOS. 3.) Driver Model Integration - The entire plug and play layer is integrated into the driver model - The user interface is housed here - PnP protocols are listed under the bus "pnp" 4.) A powerful global resource configuration interface - The user can use this to activate PnP devices for legacy and user-level drivers - See the documentation for how to configure devices. 5.) Automatic resource allocation for needed devices 6.) A PnP device name database And many more improvements. This patch also adds me to the maintainers list, considering the current PnP maintainer has been inactive for over 2 years now.