aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorPavan Savoy <pavan_savoy@ti.com>2011-08-10 11:18:31 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-22 17:13:32 -0400
commit0d7c5f2572ccfa7bf83292b1506926663f2d164a (patch)
tree7ad38fe6af0fd468aa7c1af654ce2d7addbea622 /include/linux
parent5926cef26c72cd121266b000b8975e6373cbf2b3 (diff)
drivers:misc:ti-st: platform hooks for chip states
Certain platform specific or Host-WiLink Interface specific actions would be required to be taken when the chip is being enabled and after the chip is disabled such as configuration of the mux modes for the GPIO of host connected to the nshutdown of the chip or relinquishing UART after the chip is disabled. Similar actions can also be taken when the chip is in deep sleep or when the chip is awake. Performance enhancements such as configuring the host to run faster when chip is awake and slower when chip is asleep can also be made here. Signed-off-by: Pavan Savoy <pavan_savoy@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ti_wilink_st.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/include/linux/ti_wilink_st.h b/include/linux/ti_wilink_st.h
index b004e557caa9..2ef4385da6bf 100644
--- a/include/linux/ti_wilink_st.h
+++ b/include/linux/ti_wilink_st.h
@@ -410,7 +410,28 @@ struct gps_event_hdr {
410 u16 plen; 410 u16 plen;
411} __attribute__ ((packed)); 411} __attribute__ ((packed));
412 412
413/* platform data */ 413/**
414 * struct ti_st_plat_data - platform data shared between ST driver and
415 * platform specific board file which adds the ST device.
416 * @nshutdown_gpio: Host's GPIO line to which chip's BT_EN is connected.
417 * @dev_name: The UART/TTY name to which chip is interfaced. (eg: /dev/ttyS1)
418 * @flow_cntrl: Should always be 1, since UART's CTS/RTS is used for PM
419 * purposes.
420 * @baud_rate: The baud rate supported by the Host UART controller, this will
421 * be shared across with the chip via a HCI VS command from User-Space Init
422 * Mgr application.
423 * @suspend:
424 * @resume: legacy PM routines hooked to platform specific board file, so as
425 * to take chip-host interface specific action.
426 * @chip_enable:
427 * @chip_disable: Platform/Interface specific mux mode setting, GPIO
428 * configuring, Host side PM disabling etc.. can be done here.
429 * @chip_asleep:
430 * @chip_awake: Chip specific deep sleep states is communicated to Host
431 * specific board-xx.c to take actions such as cut UART clocks when chip
432 * asleep or run host faster when chip awake etc..
433 *
434 */
414struct ti_st_plat_data { 435struct ti_st_plat_data {
415 long nshutdown_gpio; 436 long nshutdown_gpio;
416 unsigned char dev_name[UART_DEV_NAME_LEN]; /* uart name */ 437 unsigned char dev_name[UART_DEV_NAME_LEN]; /* uart name */
@@ -418,6 +439,10 @@ struct ti_st_plat_data {
418 unsigned long baud_rate; 439 unsigned long baud_rate;
419 int (*suspend)(struct platform_device *, pm_message_t); 440 int (*suspend)(struct platform_device *, pm_message_t);
420 int (*resume)(struct platform_device *); 441 int (*resume)(struct platform_device *);
442 int (*chip_enable) (struct kim_data_s *);
443 int (*chip_disable) (struct kim_data_s *);
444 int (*chip_asleep) (struct kim_data_s *);
445 int (*chip_awake) (struct kim_data_s *);
421}; 446};
422 447
423#endif /* TI_WILINK_ST_H */ 448#endif /* TI_WILINK_ST_H */