コード例 #1
0
ファイル: mx2_spt_modemctl.c プロジェクト: WenBinWu/m040
	
	int modem_crash_irq;
	int cp_flag;
	int cp_user_reset;
	int cp_usb_download;
	
	wait_queue_head_t  read_wq;
	struct completion done;
#ifdef CONFIG_HAS_WAKELOCK
	struct wake_lock   spt_modem_wakelock;
#endif
};

static bool spt_modem_debug = 0;
static struct spt_modem_ctl *spt_modem_global_mc = NULL;
static struct blocking_notifier_head mc_notifier_list = BLOCKING_NOTIFIER_INIT(mc_notifier_list);

DEFINE_SEMAPHORE(spt_modem_downlock);

static int __init spt_modem_debug_setup(char *args)
{
	int error;
	unsigned long val;

	error = strict_strtoul(args, 0, &val);
	if (!error)
		spt_modem_debug = val;

	return error;
}
__setup("spt_modem_debug=", spt_modem_debug_setup);
コード例 #2
0
static struct sfi_gpio_table_entry *gpio_table;
static struct sfi_timer_table_entry sfi_mtimer_array[SFI_MTMR_MAX_NUM];
static int ipc_next_dev;
static int spi_next_dev;
static int i2c_next_dev;
static int i2c_bus[MAX_SCU_I2C];
static int gpio_num_entry;
static u32 sfi_mtimer_usage[SFI_MTMR_MAX_NUM];
int sfi_mrtc_num;
int sfi_mtimer_num;

struct sfi_rtc_table_entry sfi_mrtc_array[SFI_MRTC_MAX];
EXPORT_SYMBOL_GPL(sfi_mrtc_array);

struct blocking_notifier_head intel_scu_notifier =
			BLOCKING_NOTIFIER_INIT(intel_scu_notifier);
EXPORT_SYMBOL_GPL(intel_scu_notifier);

/* parse all the mtimer info to a static mtimer array */
int __init sfi_parse_mtmr(struct sfi_table_header *table)
{
	struct sfi_table_simple *sb;
	struct sfi_timer_table_entry *pentry;
	struct mpc_intsrc mp_irq;
	int totallen;

	sb = (struct sfi_table_simple *)table;
	if (!sfi_mtimer_num) {
		sfi_mtimer_num = SFI_GET_NUM_ENTRIES(sb,
					struct sfi_timer_table_entry);
		pentry = (struct sfi_timer_table_entry *) sb->pentry;
コード例 #3
0
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/mfd/abx500.h>
#include <linux/mfd/ab8500.h>
#include <linux/mfd/dbx500-prcmu.h>
#include <linux/kernel_stat.h>
#include <linux/pm_qos_params.h>
#include <linux/wakelock.h>
#include <linux/usb/ab8500-otg.h>

static struct wake_lock ab8500_musb_wakelock;
/* For notification to usb switch driver */
struct blocking_notifier_head micro_usb_switch_notifier =
	BLOCKING_NOTIFIER_INIT(micro_usb_switch_notifier);

#define AB8500_MAIN_WD_CTRL_REG 0x01
#define AB8500_USB_LINE_STAT_REG 0x80
#define AB8500_USB_PHY_CTRL_REG 0x8A
#define AB8500_VBUS_CTRL_REG 0x82
#define AB8500_IT_SOURCE2_REG 0x01
#define AB8500_IT_SOURCE20_REG 0x13
#define AB8500_SRC_INT_USB_HOST 0x04
#define AB8500_SRC_INT_USB_DEVICE 0x80

#define AB8500_BIT_OTG_STAT_ID (1 << 0)
#define AB8500_BIT_PHY_CTRL_HOST_EN (1 << 0)
#define AB8500_BIT_PHY_CTRL_DEVICE_EN (1 << 1)
#define AB8500_BIT_WD_CTRL_ENABLE (1 << 0)
#define AB8500_BIT_WD_CTRL_KICK (1 << 1)