aboutsummaryrefslogtreecommitdiffstats
path: root/package/ucmb/driver/ucmb.h
diff options
context:
space:
mode:
authorMichael Büsch <mb@bu3sch.de>2009-02-18 11:54:09 +0000
committerMichael Büsch <mb@bu3sch.de>2009-02-18 11:54:09 +0000
commit1328bf9395360656f9de5c980b1aea62b73bf91e (patch)
treea06daa09712f367b2f791231c1fc62b3292cf64a /package/ucmb/driver/ucmb.h
parent87a2d3888c857b14f0942cab13e02bc7f3764d4f (diff)
downloadupstream-1328bf9395360656f9de5c980b1aea62b73bf91e.tar.gz
upstream-1328bf9395360656f9de5c980b1aea62b73bf91e.tar.bz2
upstream-1328bf9395360656f9de5c980b1aea62b73bf91e.zip
ucmb: Fix the lowlevel protocol
SVN-Revision: 14549
Diffstat (limited to 'package/ucmb/driver/ucmb.h')
-rw-r--r--package/ucmb/driver/ucmb.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/package/ucmb/driver/ucmb.h b/package/ucmb/driver/ucmb.h
new file mode 100644
index 0000000000..94fdc6420e
--- /dev/null
+++ b/package/ucmb/driver/ucmb.h
@@ -0,0 +1,38 @@
+#ifndef LINUX_UCMB_H_
+#define LINUX_UCMB_H_
+
+#include <linux/types.h>
+
+/**
+ * struct ucmb_platform_data - UCMB device descriptor
+ *
+ * @name: The name of the device. This will also be the name of
+ * the misc char device.
+ *
+ * @gpio_cs: The chipselect GPIO pin. Can be SPI_GPIO_NO_CHIPSELECT.
+ * @gpio_sck: The clock GPIO pin.
+ * @gpio_miso: The master-in slave-out GPIO pin.
+ * @gpio_mosi: The master-out slave-in GPIO pin.
+ *
+ * @mode: The SPI bus mode. SPI_MODE_*
+ * @max_speed_hz: The bus speed, in Hz. If zero the speed is not limited.
+ * @msg_delay_ms: The message delay time, in milliseconds.
+ * This is the time the microcontroller takes to process
+ * one message.
+ */
+struct ucmb_platform_data {
+ const char *name;
+
+ unsigned long gpio_cs;
+ unsigned int gpio_sck;
+ unsigned int gpio_miso;
+ unsigned int gpio_mosi;
+
+ u8 mode;
+ u32 max_speed_hz;
+ unsigned int msg_delay_ms;
+
+ struct platform_device *pdev; /* internal */
+};
+
+#endif /* LINUX_UCMB_H_ */