All of lore.kernel.org
 help / color / mirror / Atom feed
From: Iiro Valkonen <iiro.valkonen@atmel.com>
To: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org,
	kyungmin.park@samsung.com
Subject: Re: [PATCH 2/4] Input: atmel_mxt_ts - Support 12bit resolution
Date: Fri, 01 Apr 2011 12:58:23 +0300	[thread overview]
Message-ID: <4D95A1BF.6070100@atmel.com> (raw)
In-Reply-To: <4D956C64.6000906@samsung.com>

Hi,

On 04/01/2011 09:10 AM, Joonyoung Shim wrote:
>>> @@ -837,6 +847,17 @@ static int mxt_initialize(struct mxt_data *data)
>>>          return 0;
>>>   }
>>>
>>> +static void mxt_calc_resolution(struct mxt_data *data)
>>> +{
>>> +       if (data->pdata->orient&  MXT_XY_SWITCH) {
>>> +               data->x_size = data->pdata->y_size;
>>> +               data->y_size = data->pdata->x_size;
>>> +       } else {
>>> +               data->x_size = data->pdata->x_size;
>>> +               data->y_size = data->pdata->y_size;
>>> +       }
>>> +}
>>> +
>>
>> What's the reason for this? If we have set the x/y switch in the config, then
>> we probably want to swap the axes. Or is this axis swap something that should be
>> done on upper layers? Even so, then we shouldn't have the MXT_XY_SWITCH bit set
>> in the config, and we could just say "data->x_max_value = data->pdata->xsize - 1"
>> (and same for y) in the probe function. We wouldn't need Touch orient bit defines
>> either.
>>
> 
> If we set XY_SWITCH for special purpose then the axis is swapped and
> driver will report also coordinates out of max value.
> 

Right, of course.

Regards,

-- 
Iiro

  reply	other threads:[~2011-04-01  9:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-07  8:42 [PATCH 1/4] Input: atmel_mxt_ts - Remove firmware version check Joonyoung Shim
2011-03-07  8:42 ` [PATCH 2/4] Input: atmel_mxt_ts - Support 12bit resolution Joonyoung Shim
2011-03-31 13:43   ` Iiro Valkonen
2011-04-01  6:10     ` Joonyoung Shim
2011-04-01  9:58       ` Iiro Valkonen [this message]
2011-04-01 10:25         ` Joonyoung Shim
2011-04-01 13:39           ` Iiro Valkonen
2011-03-07  8:42 ` [PATCH 3/4] Input: atmel_mxt_ts - Add objects of mXT1386 chip Joonyoung Shim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D95A1BF.6070100@atmel.com \
    --to=iiro.valkonen@atmel.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.