ucmb: Fix the lowlevel protocol
[openwrt/svn-archive/archive.git] / package / ucmb / driver / ucmb.h
1 #ifndef LINUX_UCMB_H_
2 #define LINUX_UCMB_H_
3
4 #include <linux/types.h>
5
6 /**
7 * struct ucmb_platform_data - UCMB device descriptor
8 *
9 * @name: The name of the device. This will also be the name of
10 * the misc char device.
11 *
12 * @gpio_cs: The chipselect GPIO pin. Can be SPI_GPIO_NO_CHIPSELECT.
13 * @gpio_sck: The clock GPIO pin.
14 * @gpio_miso: The master-in slave-out GPIO pin.
15 * @gpio_mosi: The master-out slave-in GPIO pin.
16 *
17 * @mode: The SPI bus mode. SPI_MODE_*
18 * @max_speed_hz: The bus speed, in Hz. If zero the speed is not limited.
19 * @msg_delay_ms: The message delay time, in milliseconds.
20 * This is the time the microcontroller takes to process
21 * one message.
22 */
23 struct ucmb_platform_data {
24 const char *name;
25
26 unsigned long gpio_cs;
27 unsigned int gpio_sck;
28 unsigned int gpio_miso;
29 unsigned int gpio_mosi;
30
31 u8 mode;
32 u32 max_speed_hz;
33 unsigned int msg_delay_ms;
34
35 struct platform_device *pdev; /* internal */
36 };
37
38 #endif /* LINUX_UCMB_H_ */