All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: haojian.zhuang@gmail.com, sameo@linux.intel.com,
	linux-kernel@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCH 01/13] input: touchscreen: use polling mode in 88pm860x
Date: Sat, 16 Apr 2011 10:17:13 -0400	[thread overview]
Message-ID: <60599.1302963433@localhost> (raw)
In-Reply-To: Your message of "Sat, 16 Apr 2011 20:46:20 +0800." <1302957980-27343-1-git-send-email-haojian.zhuang@marvell.com>

[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]

On Sat, 16 Apr 2011 20:46:20 +0800, Haojian Zhuang said:
> Measuring point on touchscreen with IRQ mode can only monitor pen-down
> event. If finger is moving on touchscreen, it can't be monitored by
> IRQ pen-down event. So switch to polling mode after pen-down event.

>  drivers/input/touchscreen/88pm860x-ts.c |   79 ++++++++++++++++++++++++------

> +/*
> + * While 32KHz hardware timer is used for scheduler, we always assign HZ
> + * to 128. It means that 1 tick costs 7.8msec.
> + */
> +#define MEASURE_INTERVAL_MS	(7)

Is it guaranteed that this hardware part will only ever be used on systems
where this is true?  How big a bug would it be if somebody tried to glue this
touchscreen into some random embedded-ARM where HZ was something else, and
should this be computed as a function of HZ instead of hardcoding 7?

It *looks* like the intent of the schedule_delayed_work() call is "let's run
this once a tick when we're awake *anyhow*" - but looking at the code, I can't
convince myself a rounding error in computing 'interval' won't schedule 1ms
before or after the next tick would have been.  Isn't there a better API with
slack timers or something that would do a better "next tick" job?




[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]

  parent reply	other threads:[~2011-04-16 14:17 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2011041301>
2011-04-13 14:50 ` 1. Replace mfd_data with platform_data for 88pm860x since mfd tree is upgraded Haojian Zhuang
2011-04-13 14:50   ` [PATCH 01/13] input: touchscreen: use polling mode in 88pm860x Haojian Zhuang
2011-04-13 14:50     ` [PATCH 02/13] input: touchscreen: move initialization " Haojian Zhuang
2011-04-13 14:50       ` [PATCH 03/13] rtc: add 88pm860x rtc Haojian Zhuang
2011-04-13 14:50         ` [PATCH 04/13] input: set the long press detection in 88pm860x onkey Haojian Zhuang
2011-04-13 14:50           ` [PATCH 05/13] w1: add DS278x slave driver Haojian Zhuang
2011-04-13 14:50             ` [PATCH 06/13] mfd: pxa-w1: MFD driver for PXA 1wire control + DS1WM chip Haojian Zhuang
2011-04-13 14:50               ` [PATCH 07/13] mfd: fix build warning on 88pm860x Haojian Zhuang
2011-04-13 14:50                 ` [PATCH 08/13] mfd: use platform_data in max8925 Haojian Zhuang
2011-04-13 14:51                   ` [PATCH 09/13] input: get irq from resource in max8925 onkey Haojian Zhuang
2011-04-13 14:51                     ` [PATCH 10/13] rtc: avoid to use hardcoding irq number in max8925 Haojian Zhuang
2011-04-13 14:51                       ` [PATCH 11/13] power_supply: max8925: use platform_data from cell Haojian Zhuang
2011-04-13 14:51                         ` [PATCH 12/13] regulator: check name in initialization of max8925 Haojian Zhuang
2011-04-13 14:51                           ` [PATCH 13/13] regulator: max8925: enable i2c sequence for control Haojian Zhuang
2011-04-16 18:02                             ` Mark Brown
2011-04-16 18:01                           ` [PATCH 12/13] regulator: check name in initialization of max8925 Mark Brown
2011-04-18 13:49                             ` Haojian Zhuang
2011-04-13 15:03                         ` [PATCH 11/13] power_supply: max8925: use platform_data from cell Anton Vorontsov
2011-04-14  2:26                           ` Haojian Zhuang
2011-04-14  2:16                         ` Haojian Zhuang
2011-04-15  0:41                       ` [PATCH 10/13] rtc: avoid to use hardcoding irq number in max8925 Wanlong Gao
2011-04-15  0:35                   ` [PATCH 08/13] mfd: use platform_data " Wanlong Gao
2011-04-14 14:17               ` [PATCH 06/13] mfd: pxa-w1: MFD driver for PXA 1wire control + DS1WM chip Wanlong Gao
2011-04-14 14:21                 ` Haojian Zhuang
2011-04-14 14:29                   ` Wanlong Gao
2011-04-14 14:02     ` [PATCH 01/13] input: touchscreen: use polling mode in 88pm860x Wanlong Gao
2011-04-14 14:41       ` Haojian Zhuang
2011-04-14 14:52         ` Wanlong Gao
2011-04-16 12:46   ` Haojian Zhuang
2011-04-16 13:17     ` Wanlong Gao
2011-04-16 14:17     ` Valdis.Kletnieks [this message]
2011-04-18 13:12       ` Haojian Zhuang

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=60599.1302963433@localhost \
    --to=valdis.kletnieks@vt.edu \
    --cc=dmitry.torokhov@gmail.com \
    --cc=haojian.zhuang@gmail.com \
    --cc=haojian.zhuang@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    /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.