最終更新:2014-06-04 (水) 02:46:39 (3586d)
platform_driver
Top / platform_driver
struct platform_driver { int (*probe)(struct platform_device *); int (*remove)(struct platform_device *); void (*shutdown)(struct platform_device *); int (*suspend)(struct platform_device *, pm_message_t state); int (*resume)(struct platform_device *); struct device_driver driver; const struct platform_device_id *id_table; bool prevent_deferred_probe; };
メンバ
- platform_driver.probe(platform_device);
- platform_driver.remove?(platform_device);
- platform_driver.shutdown?(platform_device);
- platform_driver.suspend?(platform_device,pm_message_t?);
- platform_driver.resume?(platform_device);
- device_driver platform_driver.driver?
- platform_device_id? platform_driver.id_table?
- platform_driver.prevent_deferred_probe?
ドキュメント
module_init
- module_platform_driver - Helper macro for drivers that don't do anything special in module init/exit.
- module_driver(__platform_driver, platform_driver_register, platform_driver_unregister?)
登録
register
- register a driver for platform-level devices
- platform_driver_register(platform_driver)
- __platform_driver_register(platform_driver *drv, module *owner)
probe
- register driver for non-hotpluggable device
- When the hardware is not hot pluggable and needs detection during the booting of the kernel, you must use this method.
- platform_driver_probe(platform_driver *drv, int (*probe)(struct platform_device *))
- probe用のコールバックを引数に渡す
- platform_driver_register
例
hidg_plat_driver
- hidg_init
dwc3_driver
dwc2_platform_driver?
関連
メモ
- pcspkr?