最終更新:2014-06-03 (火) 21:02:00 (3613d)
platform_device
Top / platform_device
represents the device with members to identify the device and fields to represent sets of resources such as IRQ and memory allocated to the device.
struct platform_device { const char *name; int id; bool id_auto; struct device dev; u32 num_resources; struct resource *resource; const struct platform_device_id *id_entry; /* MFD cell pointer */ struct mfd_cell *mfd_cell; /* arch specific additions */ struct pdev_archdata archdata; };
メンバ
- device platform_device.dev?
- resource platform_device.resource
- platform_device_id? platform_device.id_entry?
- pdev_archdata? platform_device.archdata?
ドキュメント
メモ
- platform_driver.probeの引数として渡される
- platform_deviceは,name, id, resource (ともちろん dev へのポインタ) だけの構造体で,これがbus? に相当する。
- platform_device.resource構造体の中にIRQ,メモリマップ、レジスタなどのアドレス情報などを入れる.
例
使われ所
- dwc3_probe(platform_device *pdev) //platform_driver.probe
- hidg_plat_driver_probe(platform_device *pdev)
変換
関連関数
- platform_device_alloc?
- platform_device_add_resources?
- platform_device_add_data?
- platform_device_add