• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/staging/ti-st/
1/*
2 *  Shared Transport Low Level (ST LL)
3 *
4 *  Copyright (C) 2009 Texas Instruments
5 *
6 *  This program is free software; you can redistribute it and/or modify
7 *  it under the terms of the GNU General Public License version 2 as
8 *  published by the Free Software Foundation.
9 *
10 *  This program is distributed in the hope that it will be useful,
11 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 *  GNU General Public License for more details.
14 *
15 *  You should have received a copy of the GNU General Public License
16 *  along with this program; if not, write to the Free Software
17 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18 *
19 */
20
21#ifndef ST_LL_H
22#define ST_LL_H
23
24#include <linux/skbuff.h>
25#include "st.h"
26#include "st_core.h"
27
28/* ST LL receiver states */
29#define ST_W4_PACKET_TYPE       0
30#define ST_BT_W4_EVENT_HDR      1
31#define ST_BT_W4_ACL_HDR        2
32#define ST_BT_W4_SCO_HDR        3
33#define ST_BT_W4_DATA           4
34#define ST_FM_W4_EVENT_HDR      5
35#define ST_GPS_W4_EVENT_HDR	6
36
37/* ST LL state machines */
38#define ST_LL_ASLEEP               0
39#define ST_LL_ASLEEP_TO_AWAKE      1
40#define ST_LL_AWAKE                2
41#define ST_LL_AWAKE_TO_ASLEEP      3
42#define ST_LL_INVALID		   4
43
44/* different PM notifications coming from chip */
45#define LL_SLEEP_IND	0x30
46#define LL_SLEEP_ACK	0x31
47#define LL_WAKE_UP_IND	0x32
48#define LL_WAKE_UP_ACK	0x33
49
50/* initialize and de-init ST LL */
51long st_ll_init(struct st_data_s *);
52long st_ll_deinit(struct st_data_s *);
53
54/**
55 * enable/disable ST LL along with KIM start/stop
56 * called by ST Core
57 */
58void st_ll_enable(struct st_data_s *);
59void st_ll_disable(struct st_data_s *);
60
61/**
62 * various funcs used by ST core to set/get the various PM states
63 * of the chip.
64 */
65unsigned long st_ll_getstate(struct st_data_s *);
66unsigned long st_ll_sleep_state(struct st_data_s *, unsigned char);
67void st_ll_wakeup(struct st_data_s *);
68
69#endif /* ST_LL_H */
70