1

If we take an ahci driver as an example. In ahci_platform.c there are some driver functions described under:

static struct platform_driver ahci_driver = {...functions...}. 

The question is: What's the difference between functions described under platform_driver structure and functions described under *_ops (ahci_ops as an example)?

From my understanding, functions in the platform_driver structure are usually called automatically when loading/unloading the driver as an example. Functions described in *_ops are more user-accessible functions. Is that correct?

Andrius
  • 11
  • 2
  • They are completely independent features. `struct platform_driver` tells Linux driver model, that certain driver is *class* of *platform*. ACHI operations are local to the AHCI library. They may or may not be user visible (what do you mean by this, btw?). – 0andriy Apr 22 '20 at 16:42

0 Answers0