What is platform device?

Source: Internet
Author: User

1 in order to realize the separation of device and drive, Linux introduced the platform model . Devices that use the model are typically devices that cannot be "discovered" (it is not enumerated like USB,PCI), such as I2C,SPI devices. For platform devices, we must have a clear understanding of their addresses.

Excerpt from: Kernel-xxx\documentation\driver-model\platform.txt

as in the system.  This includes legacy port-based devices andhost bridges to peripheral buses, and most controllers Integratedinto Syste M-on-chip platforms.  inch Common  is  from a CPU bus.  Rarely, a platform_device willbe connected through a segment of some other kind of bus; But itsregisters'll still be directly addressable.

2 platform Devices are usually important devices in the system, and they are registered and loaded as early as the system starts, such as a power management chip.

3 platform devices usually have IO configuration, power management and other requirements. As mobile devices running the Linux kernel increase, power management becomes increasingly important.

4 platform device and drivers through the name to binding, of course, we follow the first registration device, then register the driver order.

struct Platform_device {    constchar    *name;    U32        ID;     struct device    Dev;    U32        num_resources;     struct Resource    *resource;};
structPlatform_driver {int(*probe) (structPlatform_device *); int(*remove) (structPlatform_device *); void(*shutdown) (structPlatform_device *); int(*suspend) (structPlatform_device *, pm_message_t State); int(*resume) (structPlatform_device *); structDevice_driver driver; Const structPLATFORM_DEVICE_ID *id_table;};//No Name? Then look down.structDevice_driver {Const Char* name; structBus_type *bus; structModule *owner; Const Char*mod_name;/*used for built-in modules*/    BOOLSuppress_bind_attrs;/*disables Bind/unbind via Sysfs*/    Const structOF_DEVICE_ID *of_match_table; Const structACPI_DEVICE_ID *acpi_match_table; int(*probe) (structDevice *Dev); int(*remove) (structDevice *Dev); void(*shutdown) (structDevice *Dev); int(*suspend) (structDevice *Dev, pm_message_t State); int(*resume) (structDevice *Dev); Const structAttribute_group * *groups; Const structDev_pm_ops *pm; structDriver_private *p;};

What is platform device?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.