X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=utils%2Fucmb%2Fdriver%2Fucmb.h;h=d64f2e4f66f65103628c134f21ad830a14fb9e4a;hp=8455dd00257b168ab5ba78f760063264a667e7e4;hb=0c5c0d9ade3e93d194bb96b889b4a4331ecfbd4f;hpb=4591f2d71184714b067c3a07971a52075bb5dabf;ds=sidebyside diff --git a/utils/ucmb/driver/ucmb.h b/utils/ucmb/driver/ucmb.h index 8455dd0025..d64f2e4f66 100644 --- a/utils/ucmb/driver/ucmb.h +++ b/utils/ucmb/driver/ucmb.h @@ -10,10 +10,18 @@ /** UCMB_IOCTL_RESETUC - Reset the microcontroller. */ #define UCMB_IOCTL_RESETUC _IO(__UCMB_IOCTL, 0) +/** UCMB_IOCTL_GMSGDELAY - Get the delay to wait before fetching the status. */ +#define UCMB_IOCTL_GMSGDELAY _IOR(__UCMB_IOCTL, 1, unsigned int) +/** UCMB_IOCTL_SMSGDELAY - Set the delay to wait before fetching the status. */ +#define UCMB_IOCTL_SMSGDELAY _IOW(__UCMB_IOCTL, 2, unsigned int) #ifdef __KERNEL__ +#include +#include +#include + /** * struct ucmb_platform_data - UCMB device descriptor * @@ -33,9 +41,6 @@ * * @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; @@ -50,13 +55,15 @@ struct ucmb_platform_data { u8 mode; u32 max_speed_hz; - unsigned int msg_delay_ms; struct platform_device *pdev; /* internal */ }; #define UCMB_NO_RESET ((unsigned int)-1) +int ucmb_device_register(struct ucmb_platform_data *pdata); +void ucmb_device_unregister(struct ucmb_platform_data *pdata); + #endif /* __KERNEL__ */ #endif /* LINUX_UCMB_H_ */