type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | int notify_page_fault(struct pt_regs *regs, unsigned int fsr)
{
return 0;
} |
functions | void show_pte(struct mm_struct *mm, unsigned long addr)
{
pgd_t *pgd;
if (!mm)
mm = &init_mm;
pr_alert("pgd = %p\n", mm->pgd);
pgd = pgd_offset(mm, addr);
pr_alert("[%08lx] *pgd=%08llx",
addr, (long long)pgd_val(*pgd));
do {
pud_t *pud;
pmd_t *pmd;
pte_t *pte;
if (pgd_none(*pgd))
break;
if ... |
functions | void show_pte(struct mm_struct *mm, unsigned long addr)
{ } |
functions | void
__do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
struct pt_regs *regs)
{
/*
* Are we prepared to handle this kernel fault?
*/
if (fixup_exception(regs))
return;
/*
* No handler, we'll have to terminate things with extreme prejudice.
*/
bust_spinlocks(1);
pr_alert("U... |
functions | void
__do_user_fault(struct task_struct *tsk, unsigned long addr,
unsigned int fsr, unsigned int sig, int code,
struct pt_regs *regs)
{
struct siginfo si;
#ifdef CONFIG_DEBUG_USER
if (((user_debug & UDBG_SEGV) && (sig == SIGSEGV)) ||
((user_debug & UDBG_BUS) && (sig == SIGBUS))) {
printk(KERN_DEBUG "%s: ... |
functions | void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
struct task_struct *tsk = current;
struct mm_struct *mm = tsk->active_mm;
/*
* If we are in kernel mode at this point, we
* have no context to handle this fault with.
*/
if (user_mode(regs))
__do_user_fault(tsk, addr, fsr, SIGSE... |
functions | bool access_error(unsigned int fsr, struct vm_area_struct *vma)
{
unsigned int mask = VM_READ | VM_WRITE | VM_EXEC;
if (fsr & FSR_WRITE)
mask = VM_WRITE;
if (fsr & FSR_LNX_PF)
mask = VM_EXEC;
return vma->vm_flags & mask ? false : true;
} |
functions | __kprobes
__do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
unsigned int flags, struct task_struct *tsk)
{
struct vm_area_struct *vma;
int fault;
vma = find_vma(mm, addr);
fault = VM_FAULT_BADMAP;
if (unlikely(!vma))
goto out;
if (unlikely(vma->vm_start > addr))
goto check_stack;
... |
functions | __kprobes
do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
struct task_struct *tsk;
struct mm_struct *mm;
int fault, sig, code;
unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
if (notify_page_fault(regs, fsr))
return 0;
tsk = current;
mm = tsk->mm;
/* Enable i... |
functions | int
do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
return 0;
} |
functions | __kprobes
do_translation_fault(unsigned long addr, unsigned int fsr,
struct pt_regs *regs)
{
unsigned int index;
pgd_t *pgd, *pgd_k;
pud_t *pud, *pud_k;
pmd_t *pmd, *pmd_k;
if (addr < TASK_SIZE)
return do_page_fault(addr, fsr, regs);
if (interrupts_enabled(regs))
local_irq_enable();
if (user_mode(r... |
functions | int
do_translation_fault(unsigned long addr, unsigned int fsr,
struct pt_regs *regs)
{
return 0;
} |
functions | int
do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
if (interrupts_enabled(regs))
local_irq_enable();
do_bad_area(addr, fsr, regs);
return 0;
} |
functions | int
do_bad(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
return 1;
} |
functions | __exception
do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
const struct fsr_info *inf = fsr_info + fsr_fs(fsr);
struct siginfo info;
if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs))
return;
pr_alert("Unhandled fault: %s (0x%03x) at 0x%08lx\n",
inf->name, fsr, addr);
show_pte(current->... |
functions | __exception
do_PrefetchAbort(unsigned long addr, unsigned int ifsr, struct pt_regs *regs)
{
const struct fsr_info *inf = ifsr_info + fsr_fs(ifsr);
struct siginfo info;
if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
return;
pr_alert("Unhandled prefetch abort: %s (0x%03x) at 0x%08lx\n",
inf->name, ifsr, addr);
... |
functions | __init exceptions_init(void)
{
if (cpu_architecture() >= CPU_ARCH_ARMv6) {
hook_fault_code(4, do_translation_fault, SIGSEGV, SEGV_MAPERR,
"I-cache maintenance fault");
} |
includes | #include <GL/gl.h> |
includes | #include <GL/glu.h> |
includes |
#include <math.h> |
structs | struct DIB2D{
BITMAPINFOHEADER *Info;
RGBQUAD *palette;
BYTE *bits;
}; |
structs | struct GLTXTLOAD{
GLint format;
GLint perpixel;
GLint Width;
GLint Height;
BYTE* bits;
}; |
functions | BOOL LoadDIB(char*file,DIB2D*dib)
{
BOOL result=FALSE;
HANDLE hfile=CreateFile(file,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING ,FILE_ATTRIBUTE_NORMAL,0);
if(hfile!=INVALID_HANDLE_VALUE)
{
DWORD readed;
int size=GetFileSize(hfile,0);
if(size>sizeof(BITMAPFILEHEADER))
{
BITMAPF... |
functions | long ScanBytes(int pixWidth, int bitsPixel) {
return (((long)pixWidth*bitsPixel+31) / 32) * 4;
} |
functions | BOOL ScaleImage(DIB2D&dib,GLTXTLOAD&p)
{
GLint glMaxTexDim; // OpenGL maximum texture dimension
GLint XDMaxTexDim=512; // user maximum texture dimension
GLint minsize =2;
double xPow2, yPow2;
int ixPow2, iyPow2;
int xSize2, ySize2;
GLint m_iWidth=dib.Info->biWidth;
GLint m_iHeight=dib.Info... |
functions | void LoadTexture(char*filename)
{
DIB2D dib;
GLTXTLOAD load;
if(LoadDIB(filename,&dib))
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
if(ScaleImage(dib,load))
{
glTexImage2D(GL_TEXTURE_2D,0,load.perpixel,
... |
functions | void MyMaterial(GLenum mode,GLfloat *f,GLfloat alpha)
{
GLfloat d[4];
d[0]=f[0];
d[1]=f[1];
d[2]=f[2];
d[3]=alpha;
glMaterialfv (GL_FRONT_AND_BACK,mode,d);
} |
functions | void SelectMaterial(int i)
{
//
// Define the reflective properties of the 3D Object faces.
//
glEnd();
GLfloat alpha=materials[i].alpha;
MyMaterial (GL_AMBIENT, materials[i].ambient,alpha);
MyMaterial (GL_DIFFUSE, materials[i].diffuse,alpha);
MyMaterial (GL_SPECULAR, materials[i].specular,alpha);
MyM... |
functions | GLint Gen3DObjectList()
{
int i;
int j;
GLuint texture_name;
for(i=0;i<244;i++){
vertices[i][2]-=5;
} |
includes |
#include <linux/himax_852xD.h> |
includes | #include <linux/delay.h> |
includes | #include <linux/notifier.h> |
includes | #include <linux/fb.h> |
includes | #include <linux/earlysuspend.h> |
includes | #include <linux/hrtimer.h> |
includes | #include <linux/i2c.h> |
includes | #include <linux/input.h> |
includes | #include <linux/interrupt.h> |
includes | #include <linux/module.h> |
includes | #include <linux/async.h> |
includes | #include <linux/platform_device.h> |
includes | #include <linux/slab.h> |
includes | #include <linux/gpio.h> |
includes | #include <linux/input/mt.h> |
includes | #include <mach/msm_hsusb.h> |
includes | #include <mach/cable_detect.h> |
includes | #include <mach/board.h> |
includes | #include <asm/atomic.h> |
includes | #include <mach/board_htc.h> |
includes | #include <linux/firmware.h> |
includes | #include <linux/mfd/abx500/ux500_chargalg.h> |
includes | #include <linux/of_gpio.h> |
includes | #include <mach/devices_cmdline.h> |
includes | #include <linux/async.h> |
includes | #include <linux/wakelock.h> |
includes | #include <linux/string.h> |
includes | #include <linux/kthread.h> |
defines |
#define HIMAX_I2C_RETRY_TIMES 10 |
defines | #define FAKE_EVENT |
defines | #define SUPPORT_FINGER_DATA_CHECKSUM 0x0F |
defines |
#define D(x...) printk(KERN_DEBUG "[TP] " x) |
defines | #define I(x...) printk(KERN_INFO "[TP] " x) |
defines | #define W(x...) printk(KERN_WARNING "[TP][WARNING] " x) |
defines | #define E(x...) printk(KERN_ERR "[TP][ERROR] " x) |
defines | #define DIF(x...) \ |
defines |
#define SWITCH_TO_HTC_EVENT_ONLY 1 |
defines | #define INJECT_HTC_EVENT 2 |
defines | #define CC(pa) do { \ |
defines | #define SHIFTBITS 5 |
defines | #define HMX_FW_NAME "tp_HMX.img" |
defines | #define FLASH_RETRY_TIMES 3 |
defines | #define himax_match_table NULL |
structs | struct himax_ts_data {
uint8_t x_channel;
uint8_t y_channel;
uint8_t diag_command;
uint8_t usb_connected;
uint16_t finger_pressed;
uint8_t first_pressed;
uint8_t just_resume;
uint16_t last_slot;
uint8_t protocol_type;
uint16_t pre_finger_mask;
uint8_t useScreenRes;
uint8_t diag_self[50];
uint8_t *cable_con... |
functions | void do_nsleep(unsigned int msecs, struct hrtimer_sleeper *sleeper,
int sigs)
{
enum hrtimer_mode mode = HRTIMER_MODE_REL;
int state = sigs ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE;
/*
* This is really just a reworked and simplified version
* of do_nanosleep().
*/
hrtimer_init(&sleeper->timer, CLOCK_MONOT... |
functions | void hr_msleep(unsigned int msecs)
{
struct hrtimer_sleeper sleeper;
do_nsleep(msecs, &sleeper, 0);
} |
functions | void himax_int_enable(int enable)
{
if (enable == 1 && irq_enable_count == 0) {
enable_irq(private_ts->client->irq);
irq_enable_count++;
} |
functions | else if (enable == 0 && irq_enable_count == 1) {
disable_irq_nosync(private_ts->client->irq);
irq_enable_count--;
} |
functions | int himax_ManualMode(int enter)
{
uint8_t cmd[2];
cmd[0] = enter;
if ( i2c_himax_write(private_ts->client, 0x42 ,&cmd[0], 1, 3) < 0) {
E("%s: i2c access fail!\n", __func__);
return 0;
} |
functions | int himax_FlashMode(int enter)
{
uint8_t cmd[2];
cmd[0] = enter;
if ( i2c_himax_write(private_ts->client, 0x43 ,&cmd[0], 1, 3) < 0) {
E("%s: i2c access fail!\n", __func__);
return 0;
} |
functions | int himax_lock_flash(void)
{
uint8_t cmd[5];
/* lock sequence start */
cmd[0] = 0x01;cmd[1] = 0x00;cmd[2] = 0x06;
if (i2c_himax_write(private_ts->client, 0x43 ,&cmd[0], 3, 3) < 0) {
E("%s: i2c access fail!\n", __func__);
return 0;
} |
functions | int himax_unlock_flash(void)
{
uint8_t cmd[5];
/* unlock sequence start */
cmd[0] = 0x01;cmd[1] = 0x00;cmd[2] = 0x06;
if (i2c_himax_write(private_ts->client, 0x43 ,&cmd[0], 3, 3) < 0) {
E("%s: i2c access fail!\n", __func__);
return 0;
} |
functions | start
if (IC_CHECKSUM == HX_TP_BIN_CHECKSUM_SW) {
u16 checksum = 0;
uint8_t cmd[5], last_byte;
int FileLength, i, readLen, k, lastLength;
FileLength = fullLength - 2;
memset(cmd, 0x00, sizeof(cmd));
//himax_HW_reset(RST);
//if ((i2c_smbus_write_i2c_block_data(i2c_client, 0x81, 0, &cmd[0]))< 0)
//ret... |
functions | else if (IC_CHECKSUM == HX_TP_BIN_CHECKSUM_HW) {
u32 sw_checksum = 0;
u32 hw_checksum = 0;
uint8_t cmd[5], last_byte;
int FileLength, i, readLen, k, lastLength;
FileLength = fullLength;
memset(cmd, 0x00, sizeof(cmd));
//himax_HW_reset(RST);
//if ((i2c_smbus_write_i2c_block_data(i2c_client, 0x81, 0, &... |
functions | else if (IC_CHECKSUM == HX_TP_BIN_CHECKSUM_CRC) {
uint8_t cmd[5];
//Set Flash Clock Rate
if (i2c_himax_read(private_ts->client, 0x7F, cmd, 5, DEFAULT_RETRY_CNT) < 0) {
E("%s: i2c access fail!\n", __func__);
return -1;
} |
functions | u8 himax_read_FW_ver(bool hw_reset)
{
u16 fw_ver_maj_start_addr;
u16 fw_ver_maj_end_addr;
u16 fw_ver_maj_addr;
u16 fw_ver_maj_length;
u16 fw_ver_min_start_addr;
u16 fw_ver_min_end_addr;
u16 fw_ver_min_addr;
u16 fw_ver_min_length;
u16 cfg_ver_maj_start_addr;
u16 cfg_ver_maj_end_addr;
u16 cfg_ver_maj_addr;
... |
functions | page
for( k = 0; k < 4 && j < fw_ver_maj_length; k++) {
FW_VER_MAJ_buff[j++] = cmd[k];
} |
functions | page
for(k = 0; k < 4 && j < fw_ver_min_length; k++) {
FW_VER_MIN_buff[j++] = cmd[k];
} |
functions | page
for(k = 0; k < 4 && j < cfg_ver_maj_length; k++) {
CFG_VER_MAJ_buff[j++] = cmd[k];
} |
functions | page
for (k = 0; k < 4 && j < cfg_ver_min_length; k++) {
CFG_VER_MIN_buff[j++] = cmd[k];
} |
functions | void ESD_HW_REST(void)
{
ESD_RESET_ACTIVATE = 1;
ESD_COUNTER = 0;
ESD_R36_FAIL = 0;
I("START_Himax TP: ESD - Reset\n");
while(ESD_R36_FAIL <=3 )
{
#ifdef HX_RST_BY_POWER
//power off by different platform's API
hr_msleep(100);
//power on by different platform's API
hr_msleep(100);
#else
... |
functions | void himax_chip_reset_function(struct work_struct *dat)
{
printk("[Himax]:himax_chip_reset_function ++ \n");
if(private_ts->retry_time <= 10)
{
#ifdef HX_ESD_WORKAROUND
ESD_RESET_ACTIVATE = 1;
#endif
#ifdef HX_RST_BY_POWER
//power off by different platform's API
hr_msleep(100);
//power o... |
functions | void himax_HW_reset(void)
{
#ifdef HX_ESD_WORKAROUND
ESD_RESET_ACTIVATE = 1;
#endif
#ifdef HX_RST_BY_POWER
//power off by different platform's API
hr_msleep(100);
//power on by different platform's API
hr_msleep(100);
#else
gpio_set_value(private_ts->rst_gpio, 0);
hr_msleep(30);
gpio_set_value(pri... |
functions | void calcDataSize(uint8_t finger_num)
{
struct himax_ts_data *ts_data = private_ts;
ts_data->coord_data_size = 4 * finger_num;
ts_data->area_data_size = ((finger_num / 4) + (finger_num % 4 ? 1 : 0)) * 4;
ts_data->raw_data_frame_size = 128 - ts_data->coord_data_size - ts_data->area_data_size - 4 - 4 - 1;
ts_data->r... |
functions | int i2c_himax_read(struct i2c_client *client, uint8_t command, uint8_t *data, uint8_t length, uint8_t toRetry)
{
int retry;
struct i2c_msg msg[] = {
{
.addr = client->addr,
.flags = 0,
.len = 1,
.buf = &command,
} |
functions | int i2c_himax_write(struct i2c_client *client, uint8_t command, uint8_t *data, uint8_t length, uint8_t toRetry)
{
int retry, loop_i;
uint8_t buf[length + 1];
struct i2c_msg msg[] = {
{
.addr = client->addr,
.flags = 0,
.len = length + 1,
.buf = buf,
} |
functions | int i2c_himax_write_command(struct i2c_client *client, uint8_t command, uint8_t toRetry)
{
return i2c_himax_write(client, command, NULL, 0, toRetry);
} |
functions | int i2c_himax_master_write(struct i2c_client *client, uint8_t *data, uint8_t length, uint8_t toRetry)
{
int retry, loop_i;
uint8_t buf[length];
struct i2c_msg msg[] = {
{
.addr = client->addr,
.flags = 0,
.len = length,
.buf = buf,
} |
functions | int i2c_himax_read_command(struct i2c_client *client, uint8_t length, uint8_t *data, uint8_t *readlength, uint8_t toRetry)
{
int retry;
struct i2c_msg msg[] = {
{
.addr = client->addr,
.flags = I2C_M_RD,
.len = length,
.buf = data,
} |
functions | int himax_loaddefaultSensorConfig(struct i2c_client *client)
{
/* int result = 1;*/
char data[4];
/* int fw_ver_info_retry = 0;*/
const int normalRetry = 10;
//Power on sequence
data[0] = 0x42; data[1] = 0x02;
i2c_himax_master_write(client, &data[0],2,normalRetry);
hr_msleep(1);
data[0] = 0x36; d... |
functions | int himax_loadSensorConfig(struct i2c_client *client, struct himax_i2c_platform_data *pdata,bool need_load_default)
{
#ifndef CONFIG_OF
int i = 0;
#endif
int result = 1;
char data[12] = {0} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.