summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2016-05-03 09:46:23 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-05-03 15:07:35 -0700
commit803f1ca60d5c0107adfbce4e2d70488598b03a80 (patch)
tree763936d780406f59bef75b19d91f674a855345ba /include/linux
parent18d28819809909c3f24bb72183a901c5e332a63d (diff)
mcb: export bus information via sysfs
Export information about the bus stored in the FPGA's header to userspace via sysfs, instead of hiding it in pr_debug()s from everyone. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Andreas Werner <andreas.werner@men.de> Tested-by: Andreas Werner <andreas.werner@men.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mcb.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/mcb.h b/include/linux/mcb.h
index 3efafbca166d..ead13d233a97 100644
--- a/include/linux/mcb.h
+++ b/include/linux/mcb.h
@@ -15,6 +15,8 @@
#include <linux/device.h>
#include <linux/irqreturn.h>
+#define CHAMELEON_FILENAME_LEN 12
+
struct mcb_driver;
struct mcb_device;
@@ -25,11 +27,18 @@ struct mcb_device;
* @carrier: pointer to carrier device
* @bus_nr: mcb bus number
* @get_irq: callback to get IRQ number
+ * @revision: the FPGA's revision number
+ * @model: the FPGA's model number
+ * @filename: the FPGA's name
*/
struct mcb_bus {
struct device dev;
struct device *carrier;
int bus_nr;
+ u8 revision;
+ char model;
+ u8 minor;
+ char name[CHAMELEON_FILENAME_LEN + 1];
int (*get_irq)(struct mcb_device *dev);
};
#define to_mcb_bus(b) container_of((b), struct mcb_bus, dev)