~phablet-team/ofono/lp1545005

« back to all changes in this revision

Viewing changes to drivers/mtk2modem/mtk2modem.c

  • Committer: Bileto Bot
  • Date: 2016-07-01 17:31:10 UTC
  • mfrom: (6915.1.4 ubuntu)
  • Revision ID: ci-train-bot@canonical.com-20160701173110-by60wk3dg933fmzf
* qcommsimmodem: fix slot selection for cellular data
* gril: update requests to M
* ril: refactor management of radio power states
* mtk2: new driver to support midori
* Fix cellular data switch in turbo (LP: #1592258)
* Fix ofono re-starts on boot in turbo (LP: #1580908)
* voicecall: add emergency numbers required for China Market

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *
 
3
 *  oFono - Open Source Telephony - RIL Modem Support
 
4
 *
 
5
 *  Copyright (C) 2016  Canonical, Ltd. All rights reserved.
 
6
 *
 
7
 *  This program is free software; you can redistribute it and/or modify
 
8
 *  it under the terms of the GNU General Public License version 2 as
 
9
 *  published by the Free Software Foundation.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 *
 
20
 */
 
21
 
 
22
#ifdef HAVE_CONFIG_H
 
23
#include <config.h>
 
24
#endif
 
25
 
 
26
#include <glib.h>
 
27
#include <gril.h>
 
28
 
 
29
#define OFONO_API_SUBJECT_TO_CHANGE
 
30
#include <ofono/plugin.h>
 
31
#include <ofono/log.h>
 
32
#include <ofono/types.h>
 
33
 
 
34
#include "mtk2modem.h"
 
35
 
 
36
static int mtk2modem_init(void)
 
37
{
 
38
        DBG("");
 
39
 
 
40
        mtk2_voicecall_init();
 
41
        mtk2_gprs_init();
 
42
 
 
43
        return 0;
 
44
}
 
45
 
 
46
static void mtk2modem_exit(void)
 
47
{
 
48
        DBG("");
 
49
 
 
50
        mtk2_voicecall_exit();
 
51
        mtk2_gprs_exit();
 
52
}
 
53
 
 
54
OFONO_PLUGIN_DEFINE(mtk2modem, "MTK2 modem driver", VERSION,
 
55
                OFONO_PLUGIN_PRIORITY_DEFAULT, mtk2modem_init, mtk2modem_exit)