aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ti_wilink_st.h
diff options
context:
space:
mode:
authorPavan Savoy <pavan_savoy@ti.com>2011-02-04 03:23:10 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-04 15:41:20 -0500
commitec60d0ad20ff8796dc41b30a9dce485478ccd263 (patch)
tree9a0a96e59fb0f193ad25177a54fe16612e2f8545 /include/linux/ti_wilink_st.h
parent5c88b02196a99332dacf305c8757674dd7a303ff (diff)
drivers:misc: ti-st: move from rfkill to sysfs
The communication between ST KIM and UIM was interfaced over the /dev/rfkill device node. Move the interface to a simpler less abusive sysfs entry mechanism and document it in Documentation/ABI/testing/ under sysfs-platform-kim. Shared transport driver would now read the UART details originally received by bootloader or firmware as platform data. The data read will be shared over sysfs entries for the user-space UIM or other n/w manager/plugins to be read, and assist the driver by opening up the UART, setting the baud-rate and installing the line discipline. Signed-off-by: Pavan Savoy <pavan_savoy@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/ti_wilink_st.h')
-rw-r--r--include/linux/ti_wilink_st.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/linux/ti_wilink_st.h b/include/linux/ti_wilink_st.h
index 1674ca7ab86d..010cda7287a0 100644
--- a/include/linux/ti_wilink_st.h
+++ b/include/linux/ti_wilink_st.h
@@ -206,8 +206,8 @@ void gps_chrdrv_stub_init(void);
206/* time in msec to wait for 206/* time in msec to wait for
207 * line discipline to be installed 207 * line discipline to be installed
208 */ 208 */
209#define LDISC_TIME 500 209#define LDISC_TIME 1000
210#define CMD_RESP_TIME 500 210#define CMD_RESP_TIME 800
211#define MAKEWORD(a, b) ((unsigned short)(((unsigned char)(a)) \ 211#define MAKEWORD(a, b) ((unsigned short)(((unsigned char)(a)) \
212 | ((unsigned short)((unsigned char)(b))) << 8)) 212 | ((unsigned short)((unsigned char)(b))) << 8))
213 213
@@ -230,6 +230,7 @@ struct chip_version {
230 unsigned short maj_ver; 230 unsigned short maj_ver;
231}; 231};
232 232
233#define UART_DEV_NAME_LEN 32
233/** 234/**
234 * struct kim_data_s - the KIM internal data, embedded as the 235 * struct kim_data_s - the KIM internal data, embedded as the
235 * platform's drv data. One for each ST device in the system. 236 * platform's drv data. One for each ST device in the system.
@@ -271,6 +272,10 @@ struct kim_data_s {
271 enum proto_type rf_protos[ST_MAX_CHANNELS]; 272 enum proto_type rf_protos[ST_MAX_CHANNELS];
272 struct st_data_s *core_data; 273 struct st_data_s *core_data;
273 struct chip_version version; 274 struct chip_version version;
275 unsigned char ldisc_install;
276 unsigned char dev_name[UART_DEV_NAME_LEN];
277 unsigned char flow_cntrl;
278 unsigned long baud_rate;
274}; 279};
275 280
276/** 281/**
@@ -413,4 +418,14 @@ struct gps_event_hdr {
413 u16 plen; 418 u16 plen;
414} __attribute__ ((packed)); 419} __attribute__ ((packed));
415 420
421/* platform data */
422struct ti_st_plat_data {
423 long gpios[ST_MAX_CHANNELS]; /* BT, FM and GPS */
424 unsigned char dev_name[UART_DEV_NAME_LEN]; /* uart name */
425 unsigned char flow_cntrl; /* flow control flag */
426 unsigned long baud_rate;
427 int (*suspend)(struct platform_device *, pm_message_t);
428 int (*resume)(struct platform_device *);
429};
430
416#endif /* TI_WILINK_ST_H */ 431#endif /* TI_WILINK_ST_H */