RE: [PATCH] i2c: cyttsp i2c touchscreen driver init submit

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Kevin McNeely
Date: Wednesday, August 4, 2010 - 10:22 am

Hi Trilok,


The new refactored code has new core file added to build dependencies.


TTSP=TrueTouch Standard Product.  Headers will be updated to show this.


Paths and filenames will be removed from headers.

License
Foundation,
notice

The paragraph will be removed from headers.


Early suspend will be removed from the driver.


This has been removed.  No globals will be used.

valuw
interrupts
count in
-

Globals have been removed.

***********************************************************************
***********************************************************************
show_cid);

Functions have been reordered to eliminate prototypes.


The parts are called TTSP parts.
The driver supports all TTSP parts.
Sample part numbers will be added to the headers.


The key must be sent to the device on bootup to move the device to
operational mode.


This has been moved in the new code.


This has been added to new code.

*buf)
%d\n",

The sysfs entried were to support dynamic debug enables.
These have been removed.
The new code has replaced the custom debug.

i2c_smbus_write_i2c_block_data(ts->client,
&host_reg);
touches
hst_mode=%02X)\n",
mode
false);
i2c_smbus_write_i2c_block_data(ts->client,
false);
&&
i2c_smbus_write_i2c_block_data(ts->client,
mode
*/
info
data
touches
*)(&g_xy_data);
*)(&g_xy_data);
ts->platform_data-
ts->platform_data-
id) {
ts->platform_data-
ts->platform_data-
id) {
ts->platform_data-
ts->platform_data-
id) {
ts->platform_data-
ts->platform_data-
id) {
tracks */
GET_TOUCH1_ID(g_xy_data.touch12_id);
id;
ID=%3d\n", \
(ts->platform_data->use_trk_id)
CY_MT_TCH2_IDX;
cur_st_tch[CY_ST_FNGR2_IDX] =
cur_st_tch[CY_ST_FNGR2_IDX] =
cur_mt_pos[id][CY_XPOS];
cur_mt_pos[id][CY_YPOS];
- ST2
cur_st_tch[CY_ST_FNGR2_IDX]);
{
GET_TOUCH2_ID(g_xy_data.touch12_id);
id;
ID=%3d\n", \
{
CY_TCH);
st_x2);
st_y2);
Z:%3d\n",
CY_NTCH);
info
ts->prv_mt_pos[id][CY_XPOS]);
ts->prv_mt_pos[id][CY_YPOS]);
cur_mt_pos[id][CY_XPOS]);
cur_mt_pos[id][CY_YPOS]);
*/
CY_NUM_MT_TCH_ID;
found */
t3=%d\n", \
p3=%d\n", \
(cyttsp_inlist(ts->prv_mt_tch,
- 1;
tmp_trk[id];
s[%d]=%d
snd_trk[loc], \
\
inlist s[%d]=%d
\
\
tmp_trk[id],
inlist t[%d]=%d
loc);
CY_NUM_MT_TCH_ID - 1;
tmp_trk[id];
cyttsp_xdebug("put inlist
snd_trk[loc], id,
list s[%d]=%d
id,
s3=%d\n", \
touch
temp[%d]=%d
cur_mt_pos[snd_trk[id]][CY_XPOS]);
cur_mt_pos[snd_trk[id]][CY_YPOS]);
Y:%3d
cur_mt_pos[snd_trk[id]][CY_XPOS], \
cur_mt_pos[snd_trk[id]][CY_YPOS], \
CY_NUM_TRK_ID)
Y:%3d
this
- No
snd_trk[id]);
cur_mt_pos[snd_trk[id]][CY_XPOS];
cur_mt_pos[snd_trk[id]][CY_YPOS];
Z:%3d
ts->prv_mt_pos[snd_trk[id]][CY_XPOS], \
ts->prv_mt_pos[snd_trk[id]][CY_YPOS], \
CY_TCH;
*/
TOUCHSCREEN_TIMEOUT);

Yes. In new code.


New code should be clean.


Yes. In new code.

***********************************************************************
***********************************************************************

New code uses request_threaded_irq().

***********************************************************************
***********************************************************************
\
g_bl_data.ttspver_lo, \
\
g_bl_data.appver_lo);

New code replaces included code with file based loader support.

i2c_smbus_write_i2c_block_data(ts->client,
cyttsp_fw[i].Block);
writes */
\
CY_BL_WRITE_BLK)
cyttsp_i2c_wr_blk_chunks(ts,
*/
Len=% 3d
Rec=%3d
cyttsp_fw[i-1].Record, \
counter */
cyttsp_i2c_wr_blk_data(ts-
false);
cyttsp_fw[i].Length,
cyttsp_fw[i].Block);
f=%02X,
g_bl_data.bl_file, \
g_bl_data.bl_status, \
g_bl_data.bl_error, \
6, true,
(g_bl_data.bl_status !=
g_bl_data.bl_status != 0x11
true, false,
g_bl_data.cid_2);
(ret=%d)\n", \
CY_LOW_PWR_MODE*/;
i2c_smbus_write_i2c_block_data(ts-
switch to
bl=%02X%02X
\
\
||
||
||
||
||
flttsp=0x%02X%02X
g_bl_data.ttspver_lo, \
\
g_bl_data.appver_lo, \
Device
i2c_smbus_write_i2c_block_data(ts-
mode
i2c_smbus_read_i2c_block_data(ts->client,
mfg_cmd=0x%02X
intrvl_ray[sizeof(ts->platform_data-
sizeof(ts->platform_data-
sizeof(ts->platform_data-
ts->platform_data->act_intrvl;
ts->platform_data->tch_tmout;
ts->platform_data->lp_intrvl;
ts->platform_data->act_intrvl, \
ts->platform_data->tch_tmout, \
ts->platform_data->lp_intrvl);
i2c_smbus_write_i2c_block_data(
intrvl_ray);
i2c_smbus_write_i2c_block_data(ts->client,

New refactored code breaks this into modules for clarity and reuse.


Fixed in new code.


Correct. Fixed in new code.


Converted to use __set_bit() calls.


Code includes Single_Touch handling to support developers with older
platform trees.  Single-touch is a board configuration selection item.
 
0, 0);
0, 0);
0);
0);

By enabling programmable keys, the developer can define regions of the
touch surface that can be translated to button presses.  The regions can
be defined in the board configuration file.

timer/ISR
specified

The new code has been reworked.
 
ts);

We require supporting developers that have polling models.


Done in new code.
 
retval);

Error code defines eliminated.


Custom debug statements removed.  New code uses printk() calls.


Added in new code.


New code uses printk() calls.


New code has no commented out code.

EARLY_SUSPEND_LEVEL_BLANK_SCREEN

Done.


Fixed.

i2c_smbus_read_i2c_block_data(ts->client,
{
(GET_BOOTLOADERMODE(g_bl_data.bl_status)

Replaced all mdelay with msleep in new code.

TOUCHSCREEN_TIMEOUT);

Done.
 

Done.

CY_ACTIVE_STATE))
i2c_smbus_write_i2c_block_data(ts->client,
CY_LOW_PWR_STATE;

New code has removal code.
 

Module_init() used in new code.


Module_exit() used in new code.


Removed in new code.

License
Foundation,
notice

New refactored code has extracted common code into a core file and added
special I2C only and SPI only files.

+/*********************************************************************
config
*/

New code has SPI defines only in SPI file.


New code only uses printk() calls.


Retained to support developers using polling platform models.


Suspend/resume code simplified in new code.
 
***********************************************************************
__func__ ,
__func__ ,
__func__ ,
a)
a); }
a); }

Done in new code.


Hacks removed from driver code.

executed
*/
*/
position
position
device */
blob
(lift off)
(touchdown)
data read */
mode

This has been done in the new refactored code.

*/
(cyttsp_fw_records),
array

Thank you Trilok for your review.



---------------------------------------------------------------
This message and any attachments may contain Cypress (or its
subsidiaries) confidential information. If it has been received
in error, please advise the sender and immediately delete this
message.
---------------------------------------------------------------

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] i2c: cyttsp i2c touchscreen driver init submit, Kevin McNeely, (Mon Jul 12, 1:56 pm)
Re: [PATCH] i2c: cyttsp i2c touchscreen driver init submit, Christoph Fritz, (Mon Jul 12, 7:34 pm)
Re: [PATCH] i2c: cyttsp i2c touchscreen driver init submit, Henrik Rydberg, (Mon Jul 12, 11:48 pm)
Re: [PATCH] i2c: cyttsp i2c touchscreen driver init submit, Dmitry Torokhov, (Tue Jul 13, 12:55 am)
RE: [PATCH] i2c: cyttsp i2c touchscreen driver init submit, Kevin McNeely, (Wed Aug 4, 10:22 am)