From 855d6a6c1f7c54ef073caac3f6c5f9b1ed72eb4d Mon Sep 17 00:00:00 2001 From: Daniel Hillenbrand Date: Tue, 18 Jun 2013 17:55:27 +0200 Subject: u1: port sensors and modem interface from smdk4210 kernel Change-Id: Ifa0a332a0413f4ceb3c70e96573786ae576a2ae0 --- drivers/misc/modem_if_u1/modem_link_device_c2c.c | 61 ++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 drivers/misc/modem_if_u1/modem_link_device_c2c.c (limited to 'drivers/misc/modem_if_u1/modem_link_device_c2c.c') diff --git a/drivers/misc/modem_if_u1/modem_link_device_c2c.c b/drivers/misc/modem_if_u1/modem_link_device_c2c.c new file mode 100644 index 00000000000..acbaadf0f93 --- /dev/null +++ b/drivers/misc/modem_if_u1/modem_link_device_c2c.c @@ -0,0 +1,61 @@ +/* /linux/drivers/new_modem_if/link_dev_c2c.c + * + * Copyright (C) 2010 Google, Inc. + * Copyright (C) 2010 Samsung Electronics. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "modem_prj.h" +#include "modem_link_device_c2c.h" + +struct link_device *c2c_create_link_device(struct platform_device *pdev) +{ + struct c2c_link_device *dpld; + struct link_device *ld; + struct modem_data *pdata; + + pdata = pdev->dev.platform_data; + + dpld = kzalloc(sizeof(struct c2c_link_device), GFP_KERNEL); + if (!dpld) { + mif_err("dpld == NULL\n"); + return NULL; + } + + wake_lock_init(&dpld->c2c_wake_lock, WAKE_LOCK_SUSPEND, "c2c_wakelock"); + wake_lock(&dpld->c2c_wake_lock); + + ld = &dpld->ld; + dpld->pdata = pdata; + + ld->name = "c2c"; + + mif_info("%s is created!!!\n", dpld->ld.name); + + return ld; +} -- cgit v1.2.3