type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | int updateFirmware(void *arg)
{
int ret = 0;
u8 *ver_string = 0;
char version[10] = { 0 } |
functions | else if (ret) {
E("[FW] Request_firmware failed, ret = %d\n", ret);
goto HMX_FW_REQUEST_FAILURE;
} |
functions | int himax_touch_sysfs_init(void)
{
int ret;
android_touch_kobj = kobject_create_and_add("android_touch", NULL);
if (android_touch_kobj == NULL) {
E("%s: subsystem_register failed\n", __func__);
ret = -ENOMEM;
return ret;
} |
functions | void himax_touch_sysfs_deinit(void)
{
#ifdef HX_TP_SYS_DIAG
sysfs_remove_file(android_touch_kobj, &dev_attr_diag.attr);
#endif
#ifdef HX_TP_SYS_FLASH_DUMP
sysfs_remove_file(android_touch_kobj, &dev_attr_flash_dump.attr);
#endif
sysfs_remove_file(android_touch_kobj, &dev_attr_debug_level.attr);
#ifdef HX_TP_S... |
functions | int himax_parse_config(struct himax_ts_data *ts, struct himax_i2c_platform_data_config_type28 *pdata)
{
struct himax_config *cfg_table;
struct device_node *node, *pp = NULL;
struct property *prop;
uint8_t cnt = 0, i = 0;
u32 data = 0;
uint32_t coords[4] = {0} |
functions | else if (!len) {
D(" %s:Invalid length of configuration data in %s\n",
__func__, str);
return -EINVAL;
} |
functions | load
while (cfg_table[i].fw_ver> ts->vendor_fw_ver) {
i++;
} |
functions | void himax_vk_parser(struct device_node *dt,
struct himax_i2c_platform_data *pdata)
{
u32 data = 0;
uint8_t cnt = 0, i = 0;
uint32_t coords[4] = {0} |
functions | int himax_parse_dt(struct himax_ts_data *ts,
struct himax_i2c_platform_data *pdata)
{
int rc, coords_size = 0;
uint32_t coords[4] = {0} |
functions | void himax_ts_button_func(int tp_key_index,struct himax_ts_data *ts)
{
uint16_t x_position = 0, y_position = 0;
if ( tp_key_index != 0x00)
{
I("virtual key index =%x\n",tp_key_index);
if ( tp_key_index == 1) {
vk_press = 1;
I("back key pressed\n");
if (ts->button[0].index) {
x_position = (ts->button[... |
functions | else if (ts->protocol_type == PROTOCOL_TYPE_B) {
if (ts->event_htc_enable_type == INJECT_HTC_EVENT) {
input_report_abs(ts->input_dev, ABS_MT_AMPLITUDE,
100 << 16 | 100);
input_report_abs(ts->input_dev, ABS_MT_POSITION,
x_position << 16 | y_position);
} |
functions | else if ( tp_key_index == 2) {
vk_press = 1;
I("home key pressed\n");
if (ts->button[1].index) {
x_position = (ts->button[1].x_range_min + ts->button[1].x_range_max) / 2;
y_position = (ts->button[1].y_range_min + ts->button[1].y_range_max) / 2;
} |
functions | else if (ts->protocol_type == PROTOCOL_TYPE_B) {
if (ts->event_htc_enable_type == INJECT_HTC_EVENT) {
input_report_abs(ts->input_dev, ABS_MT_AMPLITUDE,
100 << 16 | 100);
input_report_abs(ts->input_dev, ABS_MT_POSITION,
x_position << 16 | y_position);
} |
functions | else if (ts->protocol_type == PROTOCOL_TYPE_B) {
if (ts->event_htc_enable_type == INJECT_HTC_EVENT) {
input_report_abs(ts->input_dev, ABS_MT_AMPLITUDE, 0);
input_report_abs(ts->input_dev, ABS_MT_POSITION, 1 << 31);
} |
functions | void himax_ts_work(struct himax_ts_data *ts)
{
int ret = 0;
uint8_t buf[128], finger_num, hw_reset_check[2];
uint16_t finger_pressed;
uint8_t finger_on = 0;
int32_t loop_i;
uint8_t coordInfoSize = ts->coord_data_size + ts->area_data_size + 4;
int i, temp1, temp2;
//unsigned int x=0, y=0;//, //area=0//, press=... |
functions | HX_ESD_WORKAROUND
for(i = 0; i < hx_touch_info_size; i++)
{
if (buf[i] == 0x00) //case 2 ESD recovery flow-Disable
{
check_sum_cal = 1;
} |
functions | Fail
if (ret == 2)
{
goto err_workqueue_out;
} |
functions | else if (check_sum_cal == 2)
{
I("[HIMAX TP MSG]: ESD event checked - ALL 0xED.\n");
ESD_HW_REST();
} |
functions | else if (ESD_RESET_ACTIVATE)
{
ESD_RESET_ACTIVATE = 0;/*drop 1st interrupts after chip reset*/
I("[HIMAX TP MSG]:%s: Back from reset, ready to serve.\n", __func__);
//----[ENABLE_CHIP_STATUS_MONITOR]----------------------------------------------------------------start
#ifdef ENABLE_CHIP_STATUS_MONI... |
functions | CRC
for (i = hx_touch_info_size, check_sum_cal = 0; i < 128; i++)
{
check_sum_cal += buf[i];
} |
functions | Header
if (buf[hx_touch_info_size] == buf[hx_touch_info_size+1] && buf[hx_touch_info_size+1] == buf[hx_touch_info_size+2]
&& buf[hx_touch_info_size+2] == buf[hx_touch_info_size+3] && buf[hx_touch_info_size] > 0)
{
index = (buf[hx_touch_info_size] - 1) * RawDataLen;
//I("Header[%d]: %x, %x, %x, %x, mutual: %... |
functions | self
if (IC_TYPE == HX_85XX_D_SERIES_PWON)
{
temp1 = i + index;
temp2 = self_num + mul_num;
} |
functions | else if (diag_cmd == 7)
{
memcpy(&(diag_coor[0]), &buf[0], 128);
} |
functions | start
if (coordinate_dump_enable == 1)
{
for(i=0; i<(15 + (HX_MAX_PT+5)*2*5); i++)
{
coordinate_char[i] = 0x20;
} |
functions | information
if (hx_point_num != 0 ) {
if(vk_press == 0x00)
{
uint16_t old_finger = ts->pre_finger_mask;
finger_num = buf[coordInfoSize - 4] & 0x0F;
finger_pressed = buf[coordInfoSize - 2] << 8 | buf[coordInfoSize - 3];
finger_on = 1;
AA_press = 1;
for (loop_i = 0; loop_i < ts->nFi... |
functions | end
if (ts->event_htc_enable_type != SWITCH_TO_HTC_EVENT_ONLY) {
input_report_key(ts->input_dev, BTN_TOUCH, finger_on);
input_sync(ts->input_dev);
} |
functions | else if (hx_point_num == 0){
if(AA_press){
// leave event
finger_on = 0;
AA_press = 0;
if (ts->event_htc_enable_type) {
input_report_abs(ts->input_dev, ABS_MT_AMPLITUDE, 0);
input_report_abs(ts->input_dev, ABS_MT_POSITION, 1 << 31);
} |
functions | start
if (coordinate_dump_enable == 1)
{
do_gettimeofday(&t);
time_to_tm(t.tv_sec, 0, &broken);
sprintf(&coordinate_char[0], "%2d:%2d:%2d:%lu,", broken.tm_hour, broken.tm_min, broken.tm_sec, t.tv_usec/1000);
sprintf(&coordinate_char[15], "Touch up!");
coordinate_fn->f_op->write(... |
functions | else if (tpd_key != 0x00) {
//report key
//temp_x[0] = 0xFFFF;
//temp_y[0] = 0xFFFF;
//temp_x[1] = 0xFFFF;
//temp_y[1] = 0xFFFF;
himax_ts_button_func(tpd_key,ts);
finger_on = 1;
} |
functions | end
if (ts->event_htc_enable_type != SWITCH_TO_HTC_EVENT_ONLY) {
input_report_key(ts->input_dev, BTN_TOUCH, finger_on);
input_sync(ts->input_dev);
} |
functions | irqreturn_t himax_ts_thread(int irq, void *ptr)
{
struct himax_ts_data *ts = ptr;
struct timespec timeStart, timeEnd, timeDelta;
if (ts->debug_log_level & BIT(2)) {
getnstimeofday(&timeStart);
/*I(" Irq start time = %ld.%06ld s\n",
timeStart.tv_sec, timeStart.tv_nsec/1000);*/
} |
functions | void himax_ts_work_func(struct work_struct *work)
{
struct himax_ts_data *ts = container_of(work, struct himax_ts_data, work);
himax_ts_work(ts);
} |
functions | hrtimer_restart himax_ts_timer_func(struct hrtimer *timer)
{
struct himax_ts_data *ts;
ts = container_of(timer, struct himax_ts_data, timer);
queue_work(ts->himax_wq, &ts->work);
hrtimer_start(&ts->timer, ktime_set(0, 12500000), HRTIMER_MODE_REL);
return HRTIMER_NORESTART;
} |
functions | void himax_cable_tp_status_handler_func(int connect_status)
{
struct himax_ts_data *ts;
I("Touch: cable change to %d\n", connect_status);
ts = private_ts;
if (ts->cable_config) {
if (!atomic_read(&ts->suspend_mode) || !atomic_read(&ts->in_flash)) {
if ((!!connect_status) != ts->usb_connected) {
if (!!conne... |
functions | int himax_read_flash(unsigned char *buf, unsigned int addr_start, unsigned int length)
{
u16 i = 0;
u16 j = 0;
u16 k = 0;
uint8_t cmd[4];
u16 local_start_addr = addr_start / 4;
u16 local_length = length;
u16 local_end_addr = (addr_start + length ) / 4 + 1;
u16 local_addr = addr_start % 4;
... |
functions | void himax_touch_information(void)
{
static unsigned char temp_buffer[6];
if (IC_TYPE == HX_85XX_A_SERIES_PWON) {
HX_RX_NUM = 0;
HX_TX_NUM = 0;
HX_BT_NUM = 0;
HX_X_RES = 0;
HX_Y_RES = 0;
HX_MAX_PT = 0;
HX_XY_REVERSE = false;
HX_INT_IS_EDGE = false;
} |
functions | else if (IC_TYPE == HX_85XX_B_SERIES_PWON) {
HX_RX_NUM = 0;
HX_TX_NUM = 0;
HX_BT_NUM = 0;
HX_X_RES = 0;
HX_Y_RES = 0;
HX_MAX_PT = 0;
HX_XY_REVERSE = false;
HX_INT_IS_EDGE = false;
} |
functions | else if (IC_TYPE == HX_85XX_C_SERIES_PWON) {
//RX,TX,BT Channel num
himax_read_flash( temp_buffer, 0x3D5, 3);
HX_RX_NUM = temp_buffer[0];
HX_TX_NUM = temp_buffer[1];
HX_BT_NUM = (temp_buffer[2]) & 0x1F;
//Interrupt is level or edge
himax_read_flash( temp_buffer, 0x3EE, 2);
if ((temp_buffer[0] && 0x04)... |
functions | else if (IC_TYPE == HX_85XX_D_SERIES_PWON) {
himax_read_flash( temp_buffer, 0x26E, 3);
HX_RX_NUM = temp_buffer[0];
HX_TX_NUM = temp_buffer[1];
HX_MAX_PT = (temp_buffer[2] & 0xF0) >> 4;
#ifdef HX_EN_SEL_BUTTON
HX_BT_NUM = (temp_buffer[2] & 0x0F);
#endif
#ifdef HX_EN_MUT_BUTTON
himax_read_flash( temp_... |
functions | bool himax_ic_package_check(struct himax_ts_data *ts)
{
uint8_t cmd[3];
uint8_t data[3];
memset(cmd, 0x00, sizeof(cmd));
memset(data, 0x00, sizeof(data));
if (i2c_himax_read(ts->client, 0xD1, cmd, 3, DEFAULT_RETRY_CNT) < 0)
return false ;
if (i2c_himax_read(ts->client, 0x31, data, 3, DEFAULT_RETRY_CNT) < 0)
... |
functions | void calculate_point_number(void)
{
HX_TOUCH_INFO_POINT_CNT = HX_MAX_PT * 4 ;
if ( (HX_MAX_PT % 4) == 0)
HX_TOUCH_INFO_POINT_CNT += (HX_MAX_PT / 4) * 4 ;
else
HX_TOUCH_INFO_POINT_CNT += ((HX_MAX_PT / 4) +1) * 4 ;
} |
functions | void himax_fb_register(struct work_struct *work)
{
int ret = 0;
struct himax_ts_data *ts = container_of(work, struct himax_ts_data,
work_att.work);
I(" %s in", __func__);
ts->fb_notif.notifier_call = fb_notifier_callback;
ret = fb_register_client(&ts->fb_notif);
if (ret)
E(" Unable to register fb_notifi... |
functions | int himax8528_probe(struct i2c_client *client, const struct i2c_device_id *id)
{
int ret = 0, err = 0;
uint8_t buf[2] = {0} |
functions | CONFIG_OF
if (client->dev.of_node) { /*DeviceTree Init Platform_data*/
pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
if (pdata == NULL) {
ret = -ENOMEM;
goto err_alloc_dt_pdata_failed;
} |
functions | endif
if (pdata->gpio_reset) {
ret = gpio_request(pdata->gpio_reset, "himax-reset");
if (ret < 0)
E("%s: request reset pin failed\n", __func__);
} |
functions | CONFIG_OF
if (pdata->power) {
ret = pdata->power(1);
if (ret < 0) {
E("%s: power on failed\n", __func__);
goto err_power_failed;
} |
functions | Config
if (pdata->loadSensorConfig) {
if (pdata->loadSensorConfig(client, pdata, &(ts->i2c_api)) < 0) {
E("%s: Load Sesnsor configuration failed, unload driver.\n", __func__);
goto err_detect_failed;
} |
functions | functon
if (client->irq) {
ts->use_irq = 1;
#if defined (CONFIG_UX500_SOC_DB8500)
I("%s defined CONFIG_UX500_SOC_DB8500\n ",__func__);
ret = request_threaded_irq(client->irq, NULL, himax_ts_thread,IRQF_TRIGGER_FALLING | IRQF_ONESHOT, client->name, ts);
#else/* Qualcomm */
I("%s don't defined CONFIG_UX50... |
functions | int himax8528_remove(struct i2c_client *client)
{
struct himax_ts_data *ts = i2c_get_clientdata(client);
himax_touch_sysfs_deinit();
#ifdef CONFIG_FB
if (fb_unregister_client(&ts->fb_notif))
dev_err(&client->dev, "Error occurred while unregistering fb_notifier.\n");
#elif defined(CONFIG_HAS_EARLYSUSPEND)
unregis... |
functions | int himax8528_hw_enable(struct himax_ts_data *data)
{
int err=0;
struct himax_i2c_platform_data *pdata = data->pdata;
/*D("%s() Enter\n", __func__);*/
/*
* First enable the hardware again. This involves for example:
* 1. Power up hardware * 2. Release any reset
*/
if (pdata->enable) {
D("Calling hook ena... |
functions | int himax8528_hw_disable(struct himax_ts_data *data)
{
int err = 0;
struct himax_i2c_platform_data *pdata = data->pdata;
/*D("%s() Enter\n", __func__);*/
/* Have the board code disable the hardware */
if (pdata->disable) {
D("Calling hook disable()\n");
err = pdata->disable(data->dev, pdata);
if (err) {
... |
functions | int himax8528_suspend(struct i2c_client *client, pm_message_t mesg)
{
int ret;
uint8_t buf[2] = {0} |
functions | end
if (!ts->use_irq) {
ret = cancel_work_sync(&ts->work);
if (ret)
himax_int_enable(1);
} |
functions | int himax8528_resume(struct i2c_client *client)
{
int ret = 0;
uint8_t buf[5] = { 0 } |
functions | on
if (ret < 0)
{
E("[himax] %s: I2C access failed addr = 0x%x\n", __func__, client->addr);
} |
functions | int fb_notifier_callback(struct notifier_block *self,
unsigned long event, void *data)
{
struct fb_event *evdata = data;
int *blank;
struct himax_ts_data *ts=
container_of(self, struct himax_ts_data, fb_notif);
I(" %s\n", __func__);
if (evdata && evdata->data && event == FB_EVENT_BLANK && ts &&
ts->clie... |
functions | void himax_ts_early_suspend(struct early_suspend *h)
{
struct himax_ts_data *ts;
ts = container_of(h, struct himax_ts_data, early_suspend);
himax8528_suspend(ts->client, PMSG_SUSPEND);
} |
functions | void himax_ts_late_resume(struct early_suspend *h)
{
struct himax_ts_data *ts;
ts = container_of(h, struct himax_ts_data, early_suspend);
himax8528_resume(ts->client);
} |
functions | __devinit himax8528_init_async(void *unused, async_cookie_t cookie)
{
i2c_add_driver(&himax8528_driver);
} |
functions | __init himax8528_init(void)
{
async_schedule(himax8528_init_async, NULL);
return 0;
} |
functions | __exit himax8528_exit(void)
{
i2c_del_driver(&himax8528_driver);
} |
includes | #include <math.h> |
structs | struct ym2203_info
{
sound_stream * stream;
mame_timer * timer[2];
void * chip;
void * psg;
const struct YM2203interface *intf;
}; |
functions | void psg_set_clock(void *param, int clock)
{
struct ym2203_info *info = param;
ay8910_set_clock_ym(info->psg, clock);
} |
functions | void psg_write(void *param, int address, int data)
{
struct ym2203_info *info = param;
ay8910_write_ym(info->psg, address, data);
} |
functions | int psg_read(void *param)
{
struct ym2203_info *info = param;
return ay8910_read_ym(info->psg);
} |
functions | void psg_reset(void *param)
{
struct ym2203_info *info = param;
ay8910_reset_ym(info->psg);
} |
functions | void IRQHandler(void *param,int irq)
{
struct ym2203_info *info = param;
if(info->intf->handler) info->intf->handler(irq);
} |
functions | void timer_callback_2203_0(void *param)
{
struct ym2203_info *info = param;
YM2203TimerOver(info->chip,0);
} |
functions | void timer_callback_2203_1(void *param)
{
struct ym2203_info *info = param;
YM2203TimerOver(info->chip,1);
} |
functions | void YM2203UpdateRequest(void *param)
{
struct ym2203_info *info = param;
stream_update(info->stream,0);
} |
functions | void TimerHandler(void *param,int c,int count,double stepTime)
{
struct ym2203_info *info = param;
if( count == 0 )
{ /* Reset FM Timer */
timer_enable(info->timer[c], 0);
} |
functions | void ym2203_stream_update(void *param, stream_sample_t **inputs, stream_sample_t **buffer, int length)
{
struct ym2203_info *info = param;
YM2203UpdateOne(info->chip, buffer[0], length);
} |
functions | void ym2203_postload(void *param)
{
struct ym2203_info *info = param;
YM2203Postload(info->chip);
} |
functions | void ym2203_stop(void *token)
{
struct ym2203_info *info = token;
YM2203Shutdown(info->chip);
ay8910_stop_ym(info->psg);
} |
functions | void ym2203_reset(void *token)
{
struct ym2203_info *info = token;
YM2203ResetChip(info->chip);
} |
functions | void ym2203_set_info(void *token, UINT32 state, sndinfo *info)
{
switch (state)
{
/* no parameters to set */
} |
functions | void ym2203_get_info(void *token, UINT32 state, sndinfo *info)
{
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */
/* --- the following bits of info are returned as pointers to data or functions --- */
case SNDINFO_PTR_SET_INFO: info->set_info = ym2203_set_in... |
includes |
#include <linux/slab.h> |
includes | #include <linux/wl12xx.h> |
includes | #include <linux/export.h> |
functions | void wl1271_boot_set_ecpu_ctrl(struct wl1271 *wl, u32 flag)
{
u32 cpu_ctrl;
/* 10.5.0 run the firmware (I) */
cpu_ctrl = wlcore_read_reg(wl, REG_ECPU_CONTROL);
/* 10.5.1 run the firmware (II) */
cpu_ctrl |= flag;
wlcore_write_reg(wl, REG_ECPU_CONTROL, cpu_ctrl);
} |
functions | int wlcore_parse_fw_ver(struct wl1271 *wl)
{
int ret;
ret = sscanf(wl->chip.fw_ver_str + 4, "%u.%u.%u.%u.%u",
&wl->chip.fw_ver[0], &wl->chip.fw_ver[1],
&wl->chip.fw_ver[2], &wl->chip.fw_ver[3],
&wl->chip.fw_ver[4]);
if (ret != 5) {
wl1271_warning("fw version incorrect value");
memset(wl->c... |
functions | int wlcore_boot_fw_version(struct wl1271 *wl)
{
struct wl1271_static_data *static_data;
int ret;
static_data = kmalloc(sizeof(*static_data), GFP_DMA);
if (!static_data) {
wl1271_error("Couldn't allocate memory for static data!");
return -ENOMEM;
} |
functions | int wl1271_boot_upload_firmware_chunk(struct wl1271 *wl, void *buf,
size_t fw_data_len, u32 dest)
{
struct wlcore_partition_set partition;
int addr, chunk_num, partition_limit;
u8 *p, *chunk;
/* whal_FwCtrl_LoadFwImageSm() */
wl1271_debug(DEBUG_BOOT, "starting firmware upload");
wl1271_debug(DEBUG_BO... |
functions | int wlcore_boot_upload_firmware(struct wl1271 *wl)
{
u32 chunks, addr, len;
int ret = 0;
u8 *fw;
fw = wl->fw;
chunks = be32_to_cpup((__be32 *) fw);
fw += sizeof(u32);
wl1271_debug(DEBUG_BOOT, "firmware chunks to be uploaded: %u", chunks);
while (chunks--) {
addr = be32_to_cpup((__be32 *) fw);
fw += sizeo... |
functions | int wlcore_boot_upload_nvs(struct wl1271 *wl)
{
size_t nvs_len, burst_len;
int i;
u32 dest_addr, val;
u8 *nvs_ptr, *nvs_aligned;
if (wl->nvs == NULL)
return -ENODEV;
if (wl->quirks & WLCORE_QUIRK_LEGACY_NVS) {
struct wl1271_nvs_file *nvs =
(struct wl1271_nvs_file *)wl->nvs;
/*
* FIXME: the LEGACY NV... |
functions | int wlcore_boot_run_firmware(struct wl1271 *wl)
{
int loop, ret;
u32 chip_id, intr;
/* Make sure we have the boot partition */
wlcore_set_partition(wl, &wl->ptable[PART_BOOT]);
wl1271_boot_set_ecpu_ctrl(wl, ECPU_CONTROL_HALT);
chip_id = wlcore_read_reg(wl, REG_CHIP_ID_B);
wl1271_debug(DEBUG_BOOT, "chip id af... |
functions | else if (intr & WL1271_ACX_INTR_INIT_COMPLETE) {
wlcore_write_reg(wl, REG_INTERRUPT_ACK,
WL1271_ACX_INTR_INIT_COMPLETE);
break;
} |
includes | #include <linux/cdev.h> |
includes | #include <linux/clk.h> |
includes | #include <linux/delay.h> |
includes | #include <linux/firmware.h> |
includes | #include <linux/init.h> |
includes | #include <linux/i2c.h> |
includes | #include <linux/gpio.h> |
includes | #include <linux/module.h> |
includes | #include <linux/moduleparam.h> |
includes | #include <linux/pm.h> |
includes | #include <linux/slab.h> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.