RE: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
Hi Greg, > > Yes, I've received an email saying that the patch will show up in the next > > release of the linux-next tree, but I was not aware that linux-next tree > > means 3.8-rc1. > > It does not, you didn't read the next sentance which described when the > patch would be sent to Linus... Thank you for correcting. Correction to my earlier reply: The patch will show up in the next release of the linux-next tree, then to Linus Torvalds. And if it gets accepted at each step along the way, it will be merged in the mainline :-) Best regards, Alexandra -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
On Fri, Dec 07, 2012 at 04:01:10AM +, Alexandra Chin wrote: > Hi Greg, > > > That is because they were new features, and not regressions, so they > > will be showing up in Linus's tree for 3.8-rc1. > > > > > May I know status of this patch? Please let me know if there is anything I > > > should do. > > > > Didn't you get an email when I applied the patches saying where the > > patches could be seen and when they would be merged to Linus? > > > > Yes, I've received an email saying that the patch will show up in the next > release of the linux-next tree, but I was not aware that linux-next tree > means 3.8-rc1. It does not, you didn't read the next sentance which described when the patch would be sent to Linus... greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
Hi Greg, > That is because they were new features, and not regressions, so they > will be showing up in Linus's tree for 3.8-rc1. > > > May I know status of this patch? Please let me know if there is anything I > > should do. > > Didn't you get an email when I applied the patches saying where the > patches could be seen and when they would be merged to Linus? > Yes, I've received an email saying that the patch will show up in the next release of the linux-next tree, but I was not aware that linux-next tree means 3.8-rc1. Now I understand, and really thank you for your prompt reply. Alexandra -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
On Thu, Dec 06, 2012 at 11:30:55AM +, Alexandra Chin wrote: > Hi Greg, > > > > For next time: Once you have received an acked-by or reviewed-by, you > > > may add that line under your own signed-off-by in subsequent > > > mails. That way, the status of the patch can be tracked properly, > > > making life easier for everyone. > > > > > > Greg, I think we are ready now. :-) > > > > All applied. > > There are coming patches which needs to be updated and based on this patch, > but I noticed that this patch has not been submitted in recent mainline > archives (3.7-rc7/3.7-rc8). That is because they were new features, and not regressions, so they will be showing up in Linus's tree for 3.8-rc1. > May I know status of this patch? Please let me know if there is anything I > should do. Didn't you get an email when I applied the patches saying where the patches could be seen and when they would be merged to Linus? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
Hi Greg, > > For next time: Once you have received an acked-by or reviewed-by, you > > may add that line under your own signed-off-by in subsequent > > mails. That way, the status of the patch can be tracked properly, > > making life easier for everyone. > > > > Greg, I think we are ready now. :-) > > All applied. There are coming patches which needs to be updated and based on this patch, but I noticed that this patch has not been submitted in recent mainline archives (3.7-rc7/3.7-rc8). May I know status of this patch? Please let me know if there is anything I should do. Appreciate your advice. Best regards, Alexandra -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
Hi Greg, For next time: Once you have received an acked-by or reviewed-by, you may add that line under your own signed-off-by in subsequent mails. That way, the status of the patch can be tracked properly, making life easier for everyone. Greg, I think we are ready now. :-) All applied. There are coming patches which needs to be updated and based on this patch, but I noticed that this patch has not been submitted in recent mainline archives (3.7-rc7/3.7-rc8). May I know status of this patch? Please let me know if there is anything I should do. Appreciate your advice. Best regards, Alexandra -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
On Thu, Dec 06, 2012 at 11:30:55AM +, Alexandra Chin wrote: Hi Greg, For next time: Once you have received an acked-by or reviewed-by, you may add that line under your own signed-off-by in subsequent mails. That way, the status of the patch can be tracked properly, making life easier for everyone. Greg, I think we are ready now. :-) All applied. There are coming patches which needs to be updated and based on this patch, but I noticed that this patch has not been submitted in recent mainline archives (3.7-rc7/3.7-rc8). That is because they were new features, and not regressions, so they will be showing up in Linus's tree for 3.8-rc1. May I know status of this patch? Please let me know if there is anything I should do. Didn't you get an email when I applied the patches saying where the patches could be seen and when they would be merged to Linus? thanks, greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
Hi Greg, That is because they were new features, and not regressions, so they will be showing up in Linus's tree for 3.8-rc1. May I know status of this patch? Please let me know if there is anything I should do. Didn't you get an email when I applied the patches saying where the patches could be seen and when they would be merged to Linus? Yes, I've received an email saying that the patch will show up in the next release of the linux-next tree, but I was not aware that linux-next tree means 3.8-rc1. Now I understand, and really thank you for your prompt reply. Alexandra -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
On Fri, Dec 07, 2012 at 04:01:10AM +, Alexandra Chin wrote: Hi Greg, That is because they were new features, and not regressions, so they will be showing up in Linus's tree for 3.8-rc1. May I know status of this patch? Please let me know if there is anything I should do. Didn't you get an email when I applied the patches saying where the patches could be seen and when they would be merged to Linus? Yes, I've received an email saying that the patch will show up in the next release of the linux-next tree, but I was not aware that linux-next tree means 3.8-rc1. It does not, you didn't read the next sentance which described when the patch would be sent to Linus... greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
Hi Greg, Yes, I've received an email saying that the patch will show up in the next release of the linux-next tree, but I was not aware that linux-next tree means 3.8-rc1. It does not, you didn't read the next sentance which described when the patch would be sent to Linus... Thank you for correcting. Correction to my earlier reply: The patch will show up in the next release of the linux-next tree, then to Linus Torvalds. And if it gets accepted at each step along the way, it will be merged in the mainline :-) Best regards, Alexandra -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
On Fri, Nov 16, 2012 at 08:54:33PM +0100, Henrik Rydberg wrote: > Hi Alexandra, > > > Convert to MT-B because Synaptics touch devices are capable > > of tracking identifiable fingers. > > > > Signed-off-by: Alexandra Chin > > For next time: Once you have received an acked-by or reviewed-by, you > may add that line under your own signed-off-by in subsequent > mails. That way, the status of the patch can be tracked properly, > making life easier for everyone. > > Greg, I think we are ready now. :-) All applied. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
Hi Alexandra, > Convert to MT-B because Synaptics touch devices are capable > of tracking identifiable fingers. > > Signed-off-by: Alexandra Chin For next time: Once you have received an acked-by or reviewed-by, you may add that line under your own signed-off-by in subsequent mails. That way, the status of the patch can be tracked properly, making life easier for everyone. Greg, I think we are ready now. :-) Thanks, Henrik -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v6] staging: ste_rmi4: Convert to Type-B support
Convert to MT-B because Synaptics touch devices are capable of tracking identifiable fingers. Signed-off-by: Alexandra Chin --- This patch was tested on Pandaboard. Changes from v6: - Incorporated Henrik's review comments *remove irrelevant changes within the patch Changes from v5: - Incorporated Henrik's review comments *rollback to v3 from v4 *fix odd line break in v3 Changes from v4: - Incorporated Henrik's review comments *split function synpatics_rmi4_touchscreen_report *split function synaptics_rmi4_i2c_query_device Changes from v3: - Incorporated Henrik's review comments *remove 'else' after an error path return *add input_mt_sync_frame() for pointer emulation effects *correct names of touchscreen - Replace printk with dev_err Changes from v2: - Incorporated Henrik's review comments *directly report finger state with Type-B - Against 3.7-rcX *call input_mt_init_slots with INPUT_MT_DIRECT flag --- drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 76 +++-- 1 files changed, 33 insertions(+), 43 deletions(-) diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c index 277491a..ed304e0 100644 --- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c @@ -31,6 +31,7 @@ #include #include #include +#include #include "synaptics_i2c_rmi4.h" /* TODO: for multiple device support will need a per-device mutex */ @@ -67,7 +68,6 @@ #define PDT_START_SCAN_LOCATION (0x00E9) #define PDT_END_SCAN_LOCATION (0x000A) #define PDT_ENTRY_SIZE (0x0006) -#define RMI4_NUMBER_OF_MAX_FINGERS (8) #define SYNAPTICS_RMI4_TOUCHPAD_FUNC_NUM (0x11) #define SYNAPTICS_RMI4_DEVICE_CONTROL_FUNC_NUM (0x01) @@ -164,6 +164,7 @@ struct synaptics_rmi4_device_info { * @regulator: pointer to the regulator structure * @wait: wait queue structure variable * @touch_stopped: flag to stop the thread function + * @fingers_supported: maximum supported fingers * * This structure gives the device data information. */ @@ -184,6 +185,7 @@ struct synaptics_rmi4_data { struct regulator*regulator; wait_queue_head_t wait; booltouch_stopped; + unsigned char fingers_supported; }; /** @@ -303,22 +305,21 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, /* number of touch points - fingers down in this case */ int touch_count = 0; int finger; - int fingers_supported; int finger_registers; int reg; int finger_shift; int finger_status; int retval; + int x, y; + int wx, wy; unsigned short data_base_addr; unsigned short data_offset; unsigned char data_reg_blk_size; unsigned char values[2]; unsigned char data[DATA_LEN]; - int x[RMI4_NUMBER_OF_MAX_FINGERS]; - int y[RMI4_NUMBER_OF_MAX_FINGERS]; - int wx[RMI4_NUMBER_OF_MAX_FINGERS]; - int wy[RMI4_NUMBER_OF_MAX_FINGERS]; + unsigned char fingers_supported = pdata->fingers_supported; struct i2c_client *client = pdata->i2c_client; + struct input_dev *input_dev = pdata->input_dev; /* get 2D sensor finger data */ /* @@ -333,7 +334,6 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, * 10 = finger present but data may not be accurate, * 11 = reserved for product use. */ - fingers_supported = rfi->num_of_data_points; finger_registers= (fingers_supported + 3)/4; data_base_addr = rfi->fn_desc.data_base_addr; retval = synaptics_rmi4_i2c_block_read(pdata, data_base_addr, values, @@ -358,7 +358,11 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, * if finger status indicates a finger is present then * read the finger data and report it */ - if (finger_status == 1 || finger_status == 2) { + input_mt_slot(input_dev, finger); + input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, + finger_status != 0); + + if (finger_status) { /* Read the finger data */ data_offset = data_base_addr + ((finger * data_reg_blk_size) + @@ -367,50 +371,33 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, data_offset, data, data_reg_blk_size);
[PATCH v6] staging: ste_rmi4: Convert to Type-B support
Convert to MT-B because Synaptics touch devices are capable of tracking identifiable fingers. Signed-off-by: Alexandra Chin alexandra.c...@tw.synaptics.com --- This patch was tested on Pandaboard. Changes from v6: - Incorporated Henrik's review comments *remove irrelevant changes within the patch Changes from v5: - Incorporated Henrik's review comments *rollback to v3 from v4 *fix odd line break in v3 Changes from v4: - Incorporated Henrik's review comments *split function synpatics_rmi4_touchscreen_report *split function synaptics_rmi4_i2c_query_device Changes from v3: - Incorporated Henrik's review comments *remove 'else' after an error path return *add input_mt_sync_frame() for pointer emulation effects *correct names of touchscreen - Replace printk with dev_err Changes from v2: - Incorporated Henrik's review comments *directly report finger state with Type-B - Against 3.7-rcX *call input_mt_init_slots with INPUT_MT_DIRECT flag --- drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 76 +++-- 1 files changed, 33 insertions(+), 43 deletions(-) diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c index 277491a..ed304e0 100644 --- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c @@ -31,6 +31,7 @@ #include linux/interrupt.h #include linux/regulator/consumer.h #include linux/module.h +#include linux/input/mt.h #include synaptics_i2c_rmi4.h /* TODO: for multiple device support will need a per-device mutex */ @@ -67,7 +68,6 @@ #define PDT_START_SCAN_LOCATION (0x00E9) #define PDT_END_SCAN_LOCATION (0x000A) #define PDT_ENTRY_SIZE (0x0006) -#define RMI4_NUMBER_OF_MAX_FINGERS (8) #define SYNAPTICS_RMI4_TOUCHPAD_FUNC_NUM (0x11) #define SYNAPTICS_RMI4_DEVICE_CONTROL_FUNC_NUM (0x01) @@ -164,6 +164,7 @@ struct synaptics_rmi4_device_info { * @regulator: pointer to the regulator structure * @wait: wait queue structure variable * @touch_stopped: flag to stop the thread function + * @fingers_supported: maximum supported fingers * * This structure gives the device data information. */ @@ -184,6 +185,7 @@ struct synaptics_rmi4_data { struct regulator*regulator; wait_queue_head_t wait; booltouch_stopped; + unsigned char fingers_supported; }; /** @@ -303,22 +305,21 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, /* number of touch points - fingers down in this case */ int touch_count = 0; int finger; - int fingers_supported; int finger_registers; int reg; int finger_shift; int finger_status; int retval; + int x, y; + int wx, wy; unsigned short data_base_addr; unsigned short data_offset; unsigned char data_reg_blk_size; unsigned char values[2]; unsigned char data[DATA_LEN]; - int x[RMI4_NUMBER_OF_MAX_FINGERS]; - int y[RMI4_NUMBER_OF_MAX_FINGERS]; - int wx[RMI4_NUMBER_OF_MAX_FINGERS]; - int wy[RMI4_NUMBER_OF_MAX_FINGERS]; + unsigned char fingers_supported = pdata-fingers_supported; struct i2c_client *client = pdata-i2c_client; + struct input_dev *input_dev = pdata-input_dev; /* get 2D sensor finger data */ /* @@ -333,7 +334,6 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, * 10 = finger present but data may not be accurate, * 11 = reserved for product use. */ - fingers_supported = rfi-num_of_data_points; finger_registers= (fingers_supported + 3)/4; data_base_addr = rfi-fn_desc.data_base_addr; retval = synaptics_rmi4_i2c_block_read(pdata, data_base_addr, values, @@ -358,7 +358,11 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, * if finger status indicates a finger is present then * read the finger data and report it */ - if (finger_status == 1 || finger_status == 2) { + input_mt_slot(input_dev, finger); + input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, + finger_status != 0); + + if (finger_status) { /* Read the finger data */ data_offset = data_base_addr + ((finger * data_reg_blk_size) + @@ -367,50 +371,33 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata,
Re: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
Hi Alexandra, Convert to MT-B because Synaptics touch devices are capable of tracking identifiable fingers. Signed-off-by: Alexandra Chin alexandra.c...@tw.synaptics.com For next time: Once you have received an acked-by or reviewed-by, you may add that line under your own signed-off-by in subsequent mails. That way, the status of the patch can be tracked properly, making life easier for everyone. Greg, I think we are ready now. :-) Thanks, Henrik -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
On Fri, Nov 16, 2012 at 08:54:33PM +0100, Henrik Rydberg wrote: Hi Alexandra, Convert to MT-B because Synaptics touch devices are capable of tracking identifiable fingers. Signed-off-by: Alexandra Chin alexandra.c...@tw.synaptics.com For next time: Once you have received an acked-by or reviewed-by, you may add that line under your own signed-off-by in subsequent mails. That way, the status of the patch can be tracked properly, making life easier for everyone. Greg, I think we are ready now. :-) All applied. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
Hi Henrik, > > @@ -367,50 +371,33 @@ static int synpatics_rmi4_touchpad_report(struct > synaptics_rmi4_data *pdata, > > data_offset, data, > > data_reg_blk_size); > > if (retval != data_reg_blk_size) { > > - printk(KERN_ERR "%s:read data failed\n", > > + dev_err(>dev, "%s:read data failed\n", > > Still not needed for this patch. Please try to refrain from making > unnecessary changes in the future. > Thanks for your acceptance! And I will remember that do not put irrelevant changes in the same patch. I will follow the rule to keep updating changes of v4 in future patch. Thanks you. Alexandra Chin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
Hi Henrik, @@ -367,50 +371,33 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, data_offset, data, data_reg_blk_size); if (retval != data_reg_blk_size) { - printk(KERN_ERR %s:read data failed\n, + dev_err(client-dev, %s:read data failed\n, Still not needed for this patch. Please try to refrain from making unnecessary changes in the future. Thanks for your acceptance! And I will remember that do not put irrelevant changes in the same patch. I will follow the rule to keep updating changes of v4 in future patch. Thanks you. Alexandra Chin -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
Hi Alexandra, > Convert to MT-B because Synaptics touch devices are capable > of tracking identifiable fingers. > > Signed-off-by: Alexandra Chin > --- > This patch was tested on Pandaboard. Thank you for making changes. One minor comment inline, but I am ok with the patch as is. Looks like we have finally arrived. :-) Reviewed-by: Henrik Rydberg Thanks, Henrik > --- > drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 76 > +++-- > 1 files changed, 33 insertions(+), 43 deletions(-) > > diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c > b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c > index 277491a..ed304e0 100644 > --- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c > +++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c > @@ -31,6 +31,7 @@ > #include > #include > #include > +#include > #include "synaptics_i2c_rmi4.h" > > /* TODO: for multiple device support will need a per-device mutex */ > @@ -67,7 +68,6 @@ > #define PDT_START_SCAN_LOCATION (0x00E9) > #define PDT_END_SCAN_LOCATION(0x000A) > #define PDT_ENTRY_SIZE (0x0006) > -#define RMI4_NUMBER_OF_MAX_FINGERS (8) > #define SYNAPTICS_RMI4_TOUCHPAD_FUNC_NUM (0x11) > #define SYNAPTICS_RMI4_DEVICE_CONTROL_FUNC_NUM (0x01) > > @@ -164,6 +164,7 @@ struct synaptics_rmi4_device_info { > * @regulator: pointer to the regulator structure > * @wait: wait queue structure variable > * @touch_stopped: flag to stop the thread function > + * @fingers_supported: maximum supported fingers > * > * This structure gives the device data information. > */ > @@ -184,6 +185,7 @@ struct synaptics_rmi4_data { > struct regulator*regulator; > wait_queue_head_t wait; > booltouch_stopped; > + unsigned char fingers_supported; > }; > > /** > @@ -303,22 +305,21 @@ static int synpatics_rmi4_touchpad_report(struct > synaptics_rmi4_data *pdata, > /* number of touch points - fingers down in this case */ > int touch_count = 0; > int finger; > - int fingers_supported; > int finger_registers; > int reg; > int finger_shift; > int finger_status; > int retval; > + int x, y; > + int wx, wy; > unsigned short data_base_addr; > unsigned short data_offset; > unsigned char data_reg_blk_size; > unsigned char values[2]; > unsigned char data[DATA_LEN]; > - int x[RMI4_NUMBER_OF_MAX_FINGERS]; > - int y[RMI4_NUMBER_OF_MAX_FINGERS]; > - int wx[RMI4_NUMBER_OF_MAX_FINGERS]; > - int wy[RMI4_NUMBER_OF_MAX_FINGERS]; > + unsigned char fingers_supported = pdata->fingers_supported; > struct i2c_client *client = pdata->i2c_client; > + struct input_dev *input_dev = pdata->input_dev; > > /* get 2D sensor finger data */ > /* > @@ -333,7 +334,6 @@ static int synpatics_rmi4_touchpad_report(struct > synaptics_rmi4_data *pdata, >* 10 = finger present but data may not be accurate, >* 11 = reserved for product use. >*/ > - fingers_supported = rfi->num_of_data_points; > finger_registers= (fingers_supported + 3)/4; > data_base_addr = rfi->fn_desc.data_base_addr; > retval = synaptics_rmi4_i2c_block_read(pdata, data_base_addr, values, > @@ -358,7 +358,11 @@ static int synpatics_rmi4_touchpad_report(struct > synaptics_rmi4_data *pdata, >* if finger status indicates a finger is present then >* read the finger data and report it >*/ > - if (finger_status == 1 || finger_status == 2) { > + input_mt_slot(input_dev, finger); > + input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, > + finger_status != 0); > + > + if (finger_status) { > /* Read the finger data */ > data_offset = data_base_addr + > ((finger * data_reg_blk_size) + > @@ -367,50 +371,33 @@ static int synpatics_rmi4_touchpad_report(struct > synaptics_rmi4_data *pdata, > data_offset, data, > data_reg_blk_size); > if (retval != data_reg_blk_size) { > - printk(KERN_ERR "%s:read data failed\n", > + dev_err(>dev, "%s:read data failed\n", Still not needed for this patch. Please try to refrain from making unnecessary changes in the future. > __func__); > return 0; > - } else { > - x[touch_count] = > - (data[0] << 4) | (data[2] & MASK_4BIT); > -
[PATCH v6] staging: ste_rmi4: Convert to Type-B support
Convert to MT-B because Synaptics touch devices are capable of tracking identifiable fingers. Signed-off-by: Alexandra Chin --- This patch was tested on Pandaboard. Changes from v6: - Incorporated Henrik's review comments *remove irrelevant changes within the patch Changes from v5: - Incorporated Henrik's review comments *rollback to v3 from v4 *fix odd line break in v3 Changes from v4: - Incorporated Henrik's review comments *split function synpatics_rmi4_touchscreen_report *split function synaptics_rmi4_i2c_query_device Changes from v3: - Incorporated Henrik's review comments *remove 'else' after an error path return *add input_mt_sync_frame() for pointer emulation effects *correct names of touchscreen - Replace printk with dev_err Changes from v2: - Incorporated Henrik's review comments *directly report finger state with Type-B - Against 3.7-rcX *call input_mt_init_slots with INPUT_MT_DIRECT flag --- drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 76 +++-- 1 files changed, 33 insertions(+), 43 deletions(-) diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c index 277491a..ed304e0 100644 --- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c @@ -31,6 +31,7 @@ #include #include #include +#include #include "synaptics_i2c_rmi4.h" /* TODO: for multiple device support will need a per-device mutex */ @@ -67,7 +68,6 @@ #define PDT_START_SCAN_LOCATION (0x00E9) #define PDT_END_SCAN_LOCATION (0x000A) #define PDT_ENTRY_SIZE (0x0006) -#define RMI4_NUMBER_OF_MAX_FINGERS (8) #define SYNAPTICS_RMI4_TOUCHPAD_FUNC_NUM (0x11) #define SYNAPTICS_RMI4_DEVICE_CONTROL_FUNC_NUM (0x01) @@ -164,6 +164,7 @@ struct synaptics_rmi4_device_info { * @regulator: pointer to the regulator structure * @wait: wait queue structure variable * @touch_stopped: flag to stop the thread function + * @fingers_supported: maximum supported fingers * * This structure gives the device data information. */ @@ -184,6 +185,7 @@ struct synaptics_rmi4_data { struct regulator*regulator; wait_queue_head_t wait; booltouch_stopped; + unsigned char fingers_supported; }; /** @@ -303,22 +305,21 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, /* number of touch points - fingers down in this case */ int touch_count = 0; int finger; - int fingers_supported; int finger_registers; int reg; int finger_shift; int finger_status; int retval; + int x, y; + int wx, wy; unsigned short data_base_addr; unsigned short data_offset; unsigned char data_reg_blk_size; unsigned char values[2]; unsigned char data[DATA_LEN]; - int x[RMI4_NUMBER_OF_MAX_FINGERS]; - int y[RMI4_NUMBER_OF_MAX_FINGERS]; - int wx[RMI4_NUMBER_OF_MAX_FINGERS]; - int wy[RMI4_NUMBER_OF_MAX_FINGERS]; + unsigned char fingers_supported = pdata->fingers_supported; struct i2c_client *client = pdata->i2c_client; + struct input_dev *input_dev = pdata->input_dev; /* get 2D sensor finger data */ /* @@ -333,7 +334,6 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, * 10 = finger present but data may not be accurate, * 11 = reserved for product use. */ - fingers_supported = rfi->num_of_data_points; finger_registers= (fingers_supported + 3)/4; data_base_addr = rfi->fn_desc.data_base_addr; retval = synaptics_rmi4_i2c_block_read(pdata, data_base_addr, values, @@ -358,7 +358,11 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, * if finger status indicates a finger is present then * read the finger data and report it */ - if (finger_status == 1 || finger_status == 2) { + input_mt_slot(input_dev, finger); + input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, + finger_status != 0); + + if (finger_status) { /* Read the finger data */ data_offset = data_base_addr + ((finger * data_reg_blk_size) + @@ -367,50 +371,33 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, data_offset, data, data_reg_blk_size);
[PATCH v6] staging: ste_rmi4: Convert to Type-B support
Convert to MT-B because Synaptics touch devices are capable of tracking identifiable fingers. Signed-off-by: Alexandra Chin alexandra.c...@tw.synaptics.com --- This patch was tested on Pandaboard. Changes from v6: - Incorporated Henrik's review comments *remove irrelevant changes within the patch Changes from v5: - Incorporated Henrik's review comments *rollback to v3 from v4 *fix odd line break in v3 Changes from v4: - Incorporated Henrik's review comments *split function synpatics_rmi4_touchscreen_report *split function synaptics_rmi4_i2c_query_device Changes from v3: - Incorporated Henrik's review comments *remove 'else' after an error path return *add input_mt_sync_frame() for pointer emulation effects *correct names of touchscreen - Replace printk with dev_err Changes from v2: - Incorporated Henrik's review comments *directly report finger state with Type-B - Against 3.7-rcX *call input_mt_init_slots with INPUT_MT_DIRECT flag --- drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 76 +++-- 1 files changed, 33 insertions(+), 43 deletions(-) diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c index 277491a..ed304e0 100644 --- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c @@ -31,6 +31,7 @@ #include linux/interrupt.h #include linux/regulator/consumer.h #include linux/module.h +#include linux/input/mt.h #include synaptics_i2c_rmi4.h /* TODO: for multiple device support will need a per-device mutex */ @@ -67,7 +68,6 @@ #define PDT_START_SCAN_LOCATION (0x00E9) #define PDT_END_SCAN_LOCATION (0x000A) #define PDT_ENTRY_SIZE (0x0006) -#define RMI4_NUMBER_OF_MAX_FINGERS (8) #define SYNAPTICS_RMI4_TOUCHPAD_FUNC_NUM (0x11) #define SYNAPTICS_RMI4_DEVICE_CONTROL_FUNC_NUM (0x01) @@ -164,6 +164,7 @@ struct synaptics_rmi4_device_info { * @regulator: pointer to the regulator structure * @wait: wait queue structure variable * @touch_stopped: flag to stop the thread function + * @fingers_supported: maximum supported fingers * * This structure gives the device data information. */ @@ -184,6 +185,7 @@ struct synaptics_rmi4_data { struct regulator*regulator; wait_queue_head_t wait; booltouch_stopped; + unsigned char fingers_supported; }; /** @@ -303,22 +305,21 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, /* number of touch points - fingers down in this case */ int touch_count = 0; int finger; - int fingers_supported; int finger_registers; int reg; int finger_shift; int finger_status; int retval; + int x, y; + int wx, wy; unsigned short data_base_addr; unsigned short data_offset; unsigned char data_reg_blk_size; unsigned char values[2]; unsigned char data[DATA_LEN]; - int x[RMI4_NUMBER_OF_MAX_FINGERS]; - int y[RMI4_NUMBER_OF_MAX_FINGERS]; - int wx[RMI4_NUMBER_OF_MAX_FINGERS]; - int wy[RMI4_NUMBER_OF_MAX_FINGERS]; + unsigned char fingers_supported = pdata-fingers_supported; struct i2c_client *client = pdata-i2c_client; + struct input_dev *input_dev = pdata-input_dev; /* get 2D sensor finger data */ /* @@ -333,7 +334,6 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, * 10 = finger present but data may not be accurate, * 11 = reserved for product use. */ - fingers_supported = rfi-num_of_data_points; finger_registers= (fingers_supported + 3)/4; data_base_addr = rfi-fn_desc.data_base_addr; retval = synaptics_rmi4_i2c_block_read(pdata, data_base_addr, values, @@ -358,7 +358,11 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, * if finger status indicates a finger is present then * read the finger data and report it */ - if (finger_status == 1 || finger_status == 2) { + input_mt_slot(input_dev, finger); + input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, + finger_status != 0); + + if (finger_status) { /* Read the finger data */ data_offset = data_base_addr + ((finger * data_reg_blk_size) + @@ -367,50 +371,33 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata,
Re: [PATCH v6] staging: ste_rmi4: Convert to Type-B support
Hi Alexandra, Convert to MT-B because Synaptics touch devices are capable of tracking identifiable fingers. Signed-off-by: Alexandra Chin alexandra.c...@tw.synaptics.com --- This patch was tested on Pandaboard. Thank you for making changes. One minor comment inline, but I am ok with the patch as is. Looks like we have finally arrived. :-) Reviewed-by: Henrik Rydberg rydb...@euromail.se Thanks, Henrik --- drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 76 +++-- 1 files changed, 33 insertions(+), 43 deletions(-) diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c index 277491a..ed304e0 100644 --- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c @@ -31,6 +31,7 @@ #include linux/interrupt.h #include linux/regulator/consumer.h #include linux/module.h +#include linux/input/mt.h #include synaptics_i2c_rmi4.h /* TODO: for multiple device support will need a per-device mutex */ @@ -67,7 +68,6 @@ #define PDT_START_SCAN_LOCATION (0x00E9) #define PDT_END_SCAN_LOCATION(0x000A) #define PDT_ENTRY_SIZE (0x0006) -#define RMI4_NUMBER_OF_MAX_FINGERS (8) #define SYNAPTICS_RMI4_TOUCHPAD_FUNC_NUM (0x11) #define SYNAPTICS_RMI4_DEVICE_CONTROL_FUNC_NUM (0x01) @@ -164,6 +164,7 @@ struct synaptics_rmi4_device_info { * @regulator: pointer to the regulator structure * @wait: wait queue structure variable * @touch_stopped: flag to stop the thread function + * @fingers_supported: maximum supported fingers * * This structure gives the device data information. */ @@ -184,6 +185,7 @@ struct synaptics_rmi4_data { struct regulator*regulator; wait_queue_head_t wait; booltouch_stopped; + unsigned char fingers_supported; }; /** @@ -303,22 +305,21 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, /* number of touch points - fingers down in this case */ int touch_count = 0; int finger; - int fingers_supported; int finger_registers; int reg; int finger_shift; int finger_status; int retval; + int x, y; + int wx, wy; unsigned short data_base_addr; unsigned short data_offset; unsigned char data_reg_blk_size; unsigned char values[2]; unsigned char data[DATA_LEN]; - int x[RMI4_NUMBER_OF_MAX_FINGERS]; - int y[RMI4_NUMBER_OF_MAX_FINGERS]; - int wx[RMI4_NUMBER_OF_MAX_FINGERS]; - int wy[RMI4_NUMBER_OF_MAX_FINGERS]; + unsigned char fingers_supported = pdata-fingers_supported; struct i2c_client *client = pdata-i2c_client; + struct input_dev *input_dev = pdata-input_dev; /* get 2D sensor finger data */ /* @@ -333,7 +334,6 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, * 10 = finger present but data may not be accurate, * 11 = reserved for product use. */ - fingers_supported = rfi-num_of_data_points; finger_registers= (fingers_supported + 3)/4; data_base_addr = rfi-fn_desc.data_base_addr; retval = synaptics_rmi4_i2c_block_read(pdata, data_base_addr, values, @@ -358,7 +358,11 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, * if finger status indicates a finger is present then * read the finger data and report it */ - if (finger_status == 1 || finger_status == 2) { + input_mt_slot(input_dev, finger); + input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, + finger_status != 0); + + if (finger_status) { /* Read the finger data */ data_offset = data_base_addr + ((finger * data_reg_blk_size) + @@ -367,50 +371,33 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata, data_offset, data, data_reg_blk_size); if (retval != data_reg_blk_size) { - printk(KERN_ERR %s:read data failed\n, + dev_err(client-dev, %s:read data failed\n, Still not needed for this patch. Please try to refrain from making unnecessary changes in the future. __func__); return 0; - } else { - x[touch_count] = - (data[0] 4) | (data[2] MASK_4BIT); -