Drivers IBM Port Devices

Posted on

See <linux/platform_device.h> for the driver model interface to theplatform bus: platform_device, and platform_driver. This pseudo-busis used to connect devices on busses with minimal infrastructure,like those used to integrate peripherals on many system-on-chipprocessors, or some “legacy” PC interconnects; as opposed to largeformally specified ones like PCI or USB.

Platform devices¶

Platform devices are devices that typically appear as autonomousentities in the system. This includes legacy port-based devices andhost bridges to peripheral buses, and most controllers integratedinto system-on-chip platforms. What they usually have in commonis direct addressing from a CPU bus. Rarely, a platform_device willbe connected through a segment of some other kind of bus; but itsregisters will still be directly addressable.

Platform devices are devices that typically appear as autonomous entities in the system. This includes legacy port-based devices and host bridges to peripheral buses, and most controllers integrated into system-on-chip platforms. What they usually have in common is direct addressing from a CPU bus. When you plug the device into your USB, Windows will look for the associated driver, if it cannot find this driver then you will be prompted to insert the driver disc that came with your device. Common USB Device errors are ‘ usb port not working ‘, ‘device descriptor request failed error’ or ‘bugcodeusbdriver’ issues. After reinstalling the operating system, there is a yellow exclamation mark before PCI Simple Communications controller or PCI Serial Port listed under Other devices in Device Manager. The information for the Driver ID may include: PCI VEN8086&DEV1C3A&SUBSYS04AD1028&REV04 PCI VEN8086&DEV1C3A&SUBSYS04AD1028.

Platform devices are given a name, used in driver binding, and alist of resources such as addresses and IRQs:

Platform drivers¶

Platform drivers follow the standard driver model convention, wherediscovery/enumeration is handled outside the drivers, and driversprovide probe() and remove() methods. They support power managementand shutdown notifications using the standard conventions:

Note that probe() should in general verify that the specified device hardwareactually exists; sometimes platform setup code can’t be sure. The probingcan use device resources, including clocks, and device platform_data.

Platform drivers register themselves the normal way:

Or, in common situations where the device is known not to be hot-pluggable,the probe() routine can live in an init section to reduce the driver’sruntime memory footprint:

Kernel modules can be composed of several platform drivers. The platform coreprovides helpers to register and unregister an array of drivers:

If one of the drivers fails to register, all drivers registered up to thatpoint will be unregistered in reverse order. Note that there is a conveniencemacro that passes THIS_MODULE as owner parameter:

Device Enumeration¶

As a rule, platform specific (and often board-specific) setup code willregister platform devices:

The general rule is to register only those devices that actually exist,but in some cases extra devices might be registered. For example, a kernelmight be configured to work with an external network adapter that might notbe populated on all boards, or likewise to work with an integrated controllerthat some boards might not hook up to any peripherals.

In some cases, boot firmware will export tables describing the devicesthat are populated on a given board. Without such tables, often theonly way for system setup code to set up the correct devices is to builda kernel for a specific target board. Such board-specific kernels arecommon with embedded and custom systems development.

In many cases, the memory and IRQ resources associated with the platformdevice are not enough to let the device’s driver work. Board setup codewill often provide additional information using the device’s platform_datafield to hold additional information.

Embedded systems frequently need one or more clocks for platform devices,which are normally kept off until they’re actively needed (to save power).System setup also associates those clocks with the device, so thatcalls to clk_get(&pdev->dev, clock_name) return them as needed.

Legacy Drivers: Device Probing¶

Some drivers are not fully converted to the driver model, because they takeon a non-driver role: the driver registers its platform device, rather thanleaving that for system infrastructure. Such drivers can’t be hotpluggedor coldplugged, since those mechanisms require device creation to be in adifferent system component than the driver.

The only “good” reason for this is to handle older system designs which, likeoriginal IBM PCs, rely on error-prone “probe-the-hardware” models for hardwareconfiguration. Newer systems have largely abandoned that model, in favor ofbus-level support for dynamic configuration (PCI, USB), or device tablesprovided by the boot firmware (e.g. PNPACPI on x86). There are too manyconflicting options about what might be where, and even educated guesses byan operating system will be wrong often enough to make trouble.

This style of driver is discouraged. If you’re updating such a driver,please try to move the device enumeration to a more appropriate location,outside the driver. This will usually be cleanup, since such driverstend to already have “normal” modes, such as ones using device nodes thatwere created by PNP or by platform device setup.

None the less, there are some APIs to support such legacy drivers. Avoidusing these calls except with such hotplug-deficient drivers:

You can use platform_device_alloc() to dynamically allocate a device, whichyou will then initialize with resources and platform_device_register().A better solution is usually:

You can use platform_device_register_simple() as a one-step call to allocateand register a device.

Device Naming and Driver Binding¶

The is the canonical name for the devices.It’s built from two components:

  • … which is also used to for driver matching.
  • … the device instance number, or else “-1”to indicate there’s only one.

These are concatenated, so name/id “serial”/0 indicates bus_id “serial.0”, and“serial/3” indicates bus_id “serial.3”; both would use the platform_drivernamed “serial”. While “my_rtc”/-1 would be bus_id “my_rtc” (no instance id)and use the platform_driver called “my_rtc”.

Driver binding is performed automatically by the driver core, invokingdriver probe() after finding a match between device and driver. If theprobe() succeeds, the driver and device are bound as usual. There arethree different ways to find such a match:

  • Whenever a device is registered, the drivers for that bus arechecked for matches. Platform devices should be registered veryearly during system boot.
  • When a driver is registered using platform_driver_register(), allunbound devices on that bus are checked for matches. Driversusually register later during booting, or by module loading.
  • Registering a driver using platform_driver_probe() works just likeusing platform_driver_register(), except that the driver won’tbe probed later if another device registers. (Which is OK, sincethis interface is only for use with non-hotpluggable devices.)

Early Platform Devices and Drivers¶

The early platform interfaces provide platform data to platform devicedrivers early on during the system boot. The code is built on top of theearly_param() command line parsing and can be executed very early on.

Example: “earlyprintk” class early serial console in 6 steps

1. Registering early platform device data¶

Drivers Ibm Port Devices Gigabit

The architecture code registers platform device data using the functionearly_platform_add_devices(). In the case of early serial console thisshould be hardware configuration for the serial port. Devices registeredat this point will later on be matched against early platform drivers.

2. Parsing kernel command line¶

The architecture code calls parse_early_param() to parse the kernelcommand line. This will execute all matching early_param() callbacks.User specified early platform devices will be registered at this point.For the early serial console case the user can specify port on thekernel command line as “earlyprintk=serial.0” where “earlyprintk” isthe class string, “serial” is the name of the platform driver and0 is the platform device id. If the id is -1 then the dot and theid can be omitted.

3. Installing early platform drivers belonging to a certain class¶

The architecture code may optionally force registration of all earlyplatform drivers belonging to a certain class using the functionearly_platform_driver_register_all(). User specified devices fromstep 2 have priority over these. This step is omitted by the serialdriver example since the early serial driver code should be disabledunless the user has specified port on the kernel command line.

4. Early platform driver registration¶

Compiled-in platform drivers making use of early_platform_init() areautomatically registered during step 2 or 3. The serial driver exampleshould use early_platform_init(“earlyprintk”, &platform_driver).

5. Probing of early platform drivers belonging to a certain class¶

The architecture code calls early_platform_driver_probe() to matchregistered early platform devices associated with a certain class withregistered early platform drivers. Matched devices will get probed().This step can be executed at any point during the early boot. As soonas possible may be good for the serial port case.

6. Inside the early platform driver probe()¶

The driver code needs to take special care during early boot, especiallywhen it comes to memory allocation and interrupt registration. The codein the probe() function can use is_early_platform_device() to check ifit is called at early platform device or at the regular platform devicetime. The early serial driver performs register_console() at this point.

For further information, see <linux/platform_device.h>.

In computers, a printer driver or a print processor is a piece of software on a computer that converts the data to be printed to a format that a printer can understand. The purpose of printer drivers is to allow applications to do printing without being aware of the technical details of each printer model.

Printer drivers should not be confused with print spoolers, which queue print jobs and send them successively to a printer.

Printer drivers in different operating systems[edit]

Unix and Unix-like[edit]

Unix and other Unix-like systems such as Linux and OS X use CUPS (short for Common Unix Printing System), a modular printing system for Unix-like computer operating systems, which allows a computer to act as a print server. A computer running CUPS is a host that can accept print jobs from client computers, process them, and send them to the appropriate printer. Printer drivers are typically implemented as filters. They are usually named the front end of the printing system, while the printer spoolers constitute the back end.

Backends are also used to determine the available devices. On startup, each backend is asked for a list of devices it supports, and any information that is available.


DOS supports predefined character devices PRN:, LPT1:, LPT2: and LPT3: associated with parallel printers supported in the system. Similarly, serial printers can be used with AUX:, COM1:, COM2:, COM3: and COM4:.

Users can use commands like, for example, 'COPY file1 LPT1:' to print the content of a file to a printer. The contents is transferred to the printer without any interpretation. Therefore, this method of printing is either for files already stored in the corresponding printer's language or for generic text files without more than simple line-oriented formatting.

Drivers IBM Port Devices

DOS also provides a dynamically loadable print spooler named PRINT as well as optional support to support screen captures also in graphics mode through GRAPHICS. If the optional character device driver PRINTER.SYS is loaded, DOS provides its code page switching support also for the associated printers—different types of dot matrix and ink jet printers are supported by default.

Beyond this, there are no system-wide printer-specific drivers for use at application level under MS-DOS/PC DOS. Under DR-DOS, however, the SCRIPT command can be loaded to run in the background in order to intercept and convert printer output from applications into PostScript to support PS-capable printers also by applications not supporting them directly.

In order to support more complex printing for different models of printers, each application (e.g. a word processor) may be shipped with its own printer drivers, which were essentially descriptions of printer escape sequences. Printers, too, have been supplied with drivers for the most popular applications. In addition, it's possible for applications to include tools for editing printer description, in case there was no ready driver. In the days when DOS was widely used, many printers had emulation modes for Epson FX-80[1] and IBMProprinter commands. Many more recent laser printers also have emulation modes for HPPCL (HP LaserJet) or PostScript printers which will work in DOS. It appears that these are also compatible with Windows 3.x.[2]


On Microsoft Windows systems, printer drivers make use of GDI (Unidrv or PScript-based) or XPS (XPSDrv). Programs then use the same standard APIs to draw text and pictures both on screen and on paper. Printers which use GDI natively are commonly referred to as Winprinters and are considered incompatible with other operating systems, although there is software (such as PrintFil) which will make these printers work in a DOS prompt within Windows.

Drivers Ibm Port Devices Bluetooth

Win32 APIs also allow applications to send data directly to the spooler, bypassing the printer driver; however, few applications actually use this option.

The printer driver is usually located on the C:WindowsSystem32DriverStoreFileRepository folder on a Windows machine.[3]


The original AmigaOS up to 1.3 supported printers through a standard series of drivers stored at the required path 'DEVS:Printers'. All printer drivers were stored in that directory, and covered the standard printers in 1985-1989 circa, included Epson FX standard driver, Xerox 4020, HP, etcetera.

Any Amiga printer driver had to communicate though the standard Amiga printer.device (the default standard hardware device of Amiga dealing with printers), and the standard parallel.device (which controlled parallel port) and the driver would then control the printer on its own.

Amiga printer drivers were an innovation for their time. They spared users from individually configuring each of their applications. They had the ability to print up to 4096 colors.

Through the use of the Printer Preferences program printers could be connected to the serial port as well.


Amiga also had support for a virtual device 'PRT:' to refer to printer.device so, for example the command 'COPY file TO PRT:' caused the file to be printed directly bypassing parallel.device and the default printer driver. Amiga used ANSI escape codes, not the special ones defined by the various printer manufacturers. This way every application on the Amiga could use the same standard set of control sequences and wouldn't need to know which printer is actually connected. The printer driver then translated these standard sequences into the special sequences a certain printer understands.

Amiga internal function 'PWrite' of printer.device writes 'length' bytes directly to the printer. This function is generally called on by printer drivers to send their buffer(s) to the printer. Number of buffers are decided by the persons who created the driver. Amiga lacked a standard Printer Spooler.

Since AmigaOS 2.0 a standard printer.device was changed to control various printers at same time. The Printer preferences were divided in three main panels: Prefs:Printer which selects main printer and other basic elements such as 'Print Spacing' and 'Paper Size'. PrinterGFX controlled features like Dithering and Scaling. PrinterPS controlled Postscript Printers. The printer drivers surprisingly remained almost same of Workbench 1.3, with 4096 limits.

This fact led Amiga users to prefer third party Printer Systems with their own drivers, like TurboPrint and PrintStudio, which introduced not only recent drivers, but also featured a functioning Printer Spooler into Amiga, and featured 16 million colors printing. MorphOS uses a special version of TurboPrint to pilot recent printers.

Many Amiga programs like DTP programs as PageStream featured in the past its own printer drivers.

USB printers are automatically recognized by the Poseidon USB Stack. This stack is capable of detecting any USB device by its class, but printers still require a driver to be controlled.

Types of drivers[edit]

In addition to being install-able on a computer, drivers could also be present in the embedded firmware of printers and made available through a networking protocol (e.g. IPP). The embedded firmware of a printer could thus eliminate the need to install any driver on a computer, by accepting print data in a general purpose format (e.g. PDF) via a networking protocol. Despite some efforts to standardize various stages of the printing pipeline, printer interfaces are largely still very proprietary and manufacturer-specific. Hence, nature of functions performed by drivers can vary. Nonetheless, based on the function performed, drivers can be classified as follows.

Device-independent converters[edit]

These drivers can convert print data from one general purpose format (e.g. PDF, DVI etc) to another general purpose format (e.g. PS). Examples include Ghostscript, etc.

Converters to device-specific format[edit]

These drivers convert print data from one format (e.g. PS) to a final device-specific format that the printer hardware can process and create a print. These drivers act as the last stage in delivering a print job to the printer. These drivers are more likely to be embedded in printer firmware.

Examples of manufacturer specific formats include:

  • Printer Command Language (PCL) (Hewlett-Packard)
  • PS:-(poscript) Adobe
  • Ink Jet Printer Data Stream (Kodak)
  • Samsung Printer Language
  • Ultra Fast Rendering (Canon)

Packaging formats[edit]

Install-able drivers can be packaged in various formats. PPD is a popular packaging format for drivers that accept Postscript data or PDF data as input. Due to dominance of select operating systems, the operating system–driver interface is more standardized than driver–printer interfaces. Hence there is more standardization in packaging formats of drivers than the actual functions performed by drivers.

  • PostScript Printer Description file Usually the operating system needs to know the characteristics of a printer. The PPD files are the normal way to supply this information. They have the advantage of being system independent, and there is a freely available large database of them, Foomatic.
  • CUPS filter This format is used by CUPS on Linux systems.

Drivers Ibm Port Devices Terminal

See also[edit]

Drivers Ibm Port Devices Lucie

  • HP Universal Print Driver (HP UPD)
  • PostScript Printer Description (PPD)
  • Printer Command Language (PCL)
  • XML Paper Specification (XPS)
  • Portable Document Format (PDF)


Drivers Ibm Port Devices Replicator

  1. ^list of Epson FX printer codes
  2. ^Citizen Printer Emulation Modes for Microsoft Windows 3.0
  3. ^'Which Folder Has the Printer Driver Files in Windows 7?'.

Drivers Ibm Port Devices Lucie

Retrieved from ''