summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vme/vme_api.txt
diff options
context:
space:
mode:
authorManohar Vanga <manohar.vanga@cern.ch>2011-09-26 11:27:17 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-17 15:43:13 -0700
commita916a391d3e19593a104a8c3c4779a3084f1ca5b (patch)
tree916dee131f0cb4914c73415a58b9652ee8881136 /drivers/staging/vme/vme_api.txt
parent5d6abf379d73efe390488e8edba972af4e93cb1c (diff)
downloadop-kernel-dev-a916a391d3e19593a104a8c3c4779a3084f1ca5b.zip
op-kernel-dev-a916a391d3e19593a104a8c3c4779a3084f1ca5b.tar.gz
staging: vme: get rid of struct vme_device_id and slots
Previously, the device-driver matching mechanism depended on the vme_device_id structure due to the need for a bind table per driver. This method of matching is no longer used so this patch merges the fields of struct vme_device_id into struct vme_dev. Since this also renders the slot field meaningless, it has also been removed in this patch. Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Cc: Martyn Welch <martyn.welch@ge.com> Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vme/vme_api.txt')
-rw-r--r--drivers/staging/vme/vme_api.txt27
1 files changed, 11 insertions, 16 deletions
diff --git a/drivers/staging/vme/vme_api.txt b/drivers/staging/vme/vme_api.txt
index 53abf7e..e8ff215 100644
--- a/drivers/staging/vme/vme_api.txt
+++ b/drivers/staging/vme/vme_api.txt
@@ -51,23 +51,16 @@ probe routine is passed a 'struct vme_dev' pointer as an argument. The
'struct vme_dev' structure looks like the following:
struct vme_dev {
- struct vme_device_id id;
+ int num;
struct vme_bridge *bridge;
struct device dev;
+ struct list_head drv_list;
+ struct list_head bridge_list;
};
-The 'bridge' field contains a pointer to the bridge device. The 'id' field
-contains information useful for the probe function:
-
- struct vme_device_id {
- int bus;
- int slot;
- int num;
- };
-
-Here, 'bus' is the number of the bus the device being probed is on. 'slot'
-refers to the specific slot on the VME bus. The 'num' field refers to the
-sequential device ID for this specific driver.
+Here, the 'num' field refers to the sequential device ID for this specific
+driver. The bridge number (or bus number) can be accessed using
+dev->bridge->num.
A function is also provided to unregister the driver from the VME core and is
usually called from the device driver's exit routine:
@@ -78,9 +71,11 @@ usually called from the device driver's exit routine:
Resource management
===================
-Once a driver has registered with the VME core the provided probe routine will
-be called for each of the bus/slot combination that becomes valid as VME buses
-are themselves registered. The probe routine is passed a pointer to the devices
+Once a driver has registered with the VME core the provided match routine will
+be called the number of times specified during the registration. If a match
+succeeds, a non-zero value should be returned. A zero return value indicates
+failure. For all successful matches, the probe routine of the corresponding
+driver is called. The probe routine is passed a pointer to the devices
device structure. This pointer should be saved, it will be required for
requesting VME resources.
OpenPOWER on IntegriCloud