4 #include <linux/types.h>
5 #include <linux/ioctl.h>
9 #define __UCMB_IOCTL ('U'|'C'|'M'|'B')
11 /** UCMB_IOCTL_RESETUC - Reset the microcontroller. */
12 #define UCMB_IOCTL_RESETUC _IO(__UCMB_IOCTL, 0)
18 * struct ucmb_platform_data - UCMB device descriptor
20 * @name: The name of the device. This will also be the name of
21 * the misc char device.
23 * @gpio_cs: The chipselect GPIO pin. Can be SPI_GPIO_NO_CHIPSELECT,
24 * if chipselect is not used.
25 * @gpio_sck: The clock GPIO pin.
26 * @gpio_miso: The master-in slave-out GPIO pin.
27 * @gpio_mosi: The master-out slave-in GPIO pin.
29 * @gpio_reset: The GPIO pin to the microcontroller reset line.
30 * Can be UCMB_NO_RESET, if reset GPIO is not used.
31 * @reset_activelow: If true, @gpio_reset is considered to be active
32 * on logical 0 (inverted).
34 * @mode: The SPI bus mode. SPI_MODE_*
35 * @max_speed_hz: The bus speed, in Hz. If zero the speed is not limited.
36 * @msg_delay_ms: The message delay time, in milliseconds.
37 * This is the time the microcontroller takes to process
40 struct ucmb_platform_data
{
43 unsigned long gpio_cs
;
44 unsigned int gpio_sck
;
45 unsigned int gpio_miso
;
46 unsigned int gpio_mosi
;
48 unsigned int gpio_reset
;
53 unsigned int msg_delay_ms
;
55 struct platform_device
*pdev
; /* internal */
58 #define UCMB_NO_RESET ((unsigned int)-1)
61 #endif /* __KERNEL__ */
62 #endif /* LINUX_UCMB_H_ */