2ed8402379
There is a problem with the Mic GPIO. This isnt comming.. This has to be fixed.
62 lines
1.5 KiB
C
62 lines
1.5 KiB
C
/* arch/arm/mach-msm/board-supersonic-microp.c
|
|
* Copyright (C) 2009 HTC Corporation.
|
|
*
|
|
* 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.
|
|
*/
|
|
#ifdef CONFIG_MICROP_COMMON
|
|
#include <linux/kernel.h>
|
|
#include <linux/delay.h>
|
|
#include <linux/gpio.h>
|
|
#include <linux/i2c.h>
|
|
#include <linux/platform_device.h>
|
|
#include <asm/mach-types.h>
|
|
#include <mach/atmega_microp.h>
|
|
#include <linux/input.h>
|
|
#include <linux/uaccess.h>
|
|
#include <linux/miscdevice.h>
|
|
#include <mach/vreg.h>
|
|
#include <linux/wakelock.h>
|
|
#include <linux/workqueue.h>
|
|
|
|
#include "board-htcleo.h"
|
|
|
|
static int htcleo_microp_function_init(struct i2c_client *client)
|
|
{
|
|
struct microp_i2c_platform_data *pdata;
|
|
struct microp_i2c_client_data *cdata;
|
|
uint8_t data[20];
|
|
int i, j;
|
|
int ret;
|
|
|
|
pdata = client->dev.platform_data;
|
|
cdata = i2c_get_clientdata(client);
|
|
|
|
/* Reset button interrupt */
|
|
ret = microp_write_interrupt(client, (1<<8), 1);
|
|
if (ret)
|
|
goto exit;
|
|
|
|
|
|
return 0;
|
|
|
|
exit:
|
|
return ret;
|
|
}
|
|
|
|
static struct microp_ops ops = {
|
|
.init_microp_func = htcleo_microp_function_init,
|
|
};
|
|
|
|
void __init htcleo_microp_init(void)
|
|
{
|
|
microp_register_ops(&ops);
|
|
}
|
|
#endif
|