aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mod_devicetable.h
diff options
context:
space:
mode:
authorJens Taprogge <jens.taprogge@taprogge.org>2012-09-04 11:01:13 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-04 17:43:26 -0400
commit849e0ad257d259b8443c63d74e3bcc32ebf336af (patch)
tree905b37114e2df32fc1c99634188d40a4921796f5 /include/linux/mod_devicetable.h
parent1f43d7bfac880f63320c4dcbb8f864112946337f (diff)
Staging: ipack: implement ipack device table.
The modaliases look like ipack:fXvNdM, where X is the format version (8 bit) and N and M are the vendor and device ID represented as 32 bit hexadecimal numbers each. Using 32 bits allows us to define IPACK_ANY_ID as (~0) without interfering with the valid ids. The resulting modalias string for ipoctal.ko looks like this (once ipoctal provides a device table): alias: ipack:f01v000000F0d00000048* alias: ipack:f01v000000F0d0000002A* alias: ipack:f01v000000F0d00000022* (output from modinfo) Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/mod_devicetable.h')
-rw-r--r--include/linux/mod_devicetable.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 6955045199b0..999c4c25fbf7 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -600,4 +600,11 @@ struct x86_cpu_id {
600#define X86_MODEL_ANY 0 600#define X86_MODEL_ANY 0
601#define X86_FEATURE_ANY 0 /* Same as FPU, you can't test for that */ 601#define X86_FEATURE_ANY 0 /* Same as FPU, you can't test for that */
602 602
603#define IPACK_ANY_ID (~0)
604struct ipack_device_id {
605 __u8 format; /* Format version or IPACK_ANY_ID */
606 __u32 vendor; /* Vendor ID or IPACK_ANY_ID */
607 __u32 device; /* Device ID or IPACK_ANY_ID */
608};
609
603#endif /* LINUX_MOD_DEVICETABLE_H */ 610#endif /* LINUX_MOD_DEVICETABLE_H */