diff mbox

[1/2] Input: smtpe-ts: Use msecs_to_jiffies() instead of HZ

Message ID 1431049991-30129-1-git-send-email-marex@denx.de (mailing list archive)
State New, archived
Headers show

Commit Message

Marek Vasut May 8, 2015, 1:53 a.m. UTC
Use msecs_to_jiffies(20) instead of plain (HZ / 50), as the
former is much more explicit about it's behavior. We want
to schedule the task 20 mS from now, so make it explicit in
the code.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Vipul Kumar Samar <vipulkumar.samar@st.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/touchscreen/stmpe-ts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Viresh Kumar May 8, 2015, 2:15 a.m. UTC | #1
On 8 May 2015 at 07:23, Marek Vasut <marex@denx.de> wrote:
> Use msecs_to_jiffies(20) instead of plain (HZ / 50), as the
> former is much more explicit about it's behavior. We want
> to schedule the task 20 mS from now, so make it explicit in
> the code.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Vipul Kumar Samar <vipulkumar.samar@st.com>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>  drivers/input/touchscreen/stmpe-ts.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dmitry Torokhov May 8, 2015, 5:28 a.m. UTC | #2
On Fri, May 08, 2015 at 07:45:48AM +0530, Viresh Kumar wrote:
> On 8 May 2015 at 07:23, Marek Vasut <marex@denx.de> wrote:
> > Use msecs_to_jiffies(20) instead of plain (HZ / 50), as the
> > former is much more explicit about it's behavior. We want
> > to schedule the task 20 mS from now, so make it explicit in
> > the code.
> >
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Vipul Kumar Samar <vipulkumar.samar@st.com>
> > Cc: Viresh Kumar <viresh.kumar@linaro.org>
> > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > ---
> >  drivers/input/touchscreen/stmpe-ts.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>

Applied both, thank you.
Marek Vasut May 8, 2015, 9:47 a.m. UTC | #3
On Friday, May 08, 2015 at 07:28:20 AM, Dmitry Torokhov wrote:
> On Fri, May 08, 2015 at 07:45:48AM +0530, Viresh Kumar wrote:
> > On 8 May 2015 at 07:23, Marek Vasut <marex@denx.de> wrote:
> > > Use msecs_to_jiffies(20) instead of plain (HZ / 50), as the
> > > former is much more explicit about it's behavior. We want
> > > to schedule the task 20 mS from now, so make it explicit in
> > > the code.
> > > 
> > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > Cc: Vipul Kumar Samar <vipulkumar.samar@st.com>
> > > Cc: Viresh Kumar <viresh.kumar@linaro.org>
> > > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > ---
> > > 
> > >  drivers/input/touchscreen/stmpe-ts.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
> 
> Applied both, thank you.

Thank you! Shall I submit them for -stable as well please ?

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dmitry Torokhov May 8, 2015, 5:22 p.m. UTC | #4
On Fri, May 08, 2015 at 11:47:39AM +0200, Marek Vasut wrote:
> On Friday, May 08, 2015 at 07:28:20 AM, Dmitry Torokhov wrote:
> > On Fri, May 08, 2015 at 07:45:48AM +0530, Viresh Kumar wrote:
> > > On 8 May 2015 at 07:23, Marek Vasut <marex@denx.de> wrote:
> > > > Use msecs_to_jiffies(20) instead of plain (HZ / 50), as the
> > > > former is much more explicit about it's behavior. We want
> > > > to schedule the task 20 mS from now, so make it explicit in
> > > > the code.
> > > > 
> > > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > > Cc: Vipul Kumar Samar <vipulkumar.samar@st.com>
> > > > Cc: Viresh Kumar <viresh.kumar@linaro.org>
> > > > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > > ---
> > > > 
> > > >  drivers/input/touchscreen/stmpe-ts.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
> > 
> > Applied both, thank you.
> 
> Thank you! Shall I submit them for -stable as well please ?

Please.
Marek Vasut May 21, 2015, 11:58 p.m. UTC | #5
On Friday, May 08, 2015 at 07:22:28 PM, Dmitry Torokhov wrote:
> On Fri, May 08, 2015 at 11:47:39AM +0200, Marek Vasut wrote:
> > On Friday, May 08, 2015 at 07:28:20 AM, Dmitry Torokhov wrote:
> > > On Fri, May 08, 2015 at 07:45:48AM +0530, Viresh Kumar wrote:
> > > > On 8 May 2015 at 07:23, Marek Vasut <marex@denx.de> wrote:
> > > > > Use msecs_to_jiffies(20) instead of plain (HZ / 50), as the
> > > > > former is much more explicit about it's behavior. We want
> > > > > to schedule the task 20 mS from now, so make it explicit in
> > > > > the code.
> > > > > 
> > > > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > > > Cc: Vipul Kumar Samar <vipulkumar.samar@st.com>
> > > > > Cc: Viresh Kumar <viresh.kumar@linaro.org>
> > > > > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > > > ---
> > > > > 
> > > > >  drivers/input/touchscreen/stmpe-ts.c | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
> > > 
> > > Applied both, thank you.
> > 
> > Thank you! Shall I submit them for -stable as well please ?
> 
> Please.

Hi,

these patches still didn't make it for Linus's tree. I cannot submit
to -stable unless they hit Linus's tree to my knowledge. Shall I wait
some more please ?

Thank you!

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dmitry Torokhov May 22, 2015, 12:01 a.m. UTC | #6
On Fri, May 22, 2015 at 01:58:34AM +0200, Marek Vasut wrote:
> On Friday, May 08, 2015 at 07:22:28 PM, Dmitry Torokhov wrote:
> > On Fri, May 08, 2015 at 11:47:39AM +0200, Marek Vasut wrote:
> > > On Friday, May 08, 2015 at 07:28:20 AM, Dmitry Torokhov wrote:
> > > > On Fri, May 08, 2015 at 07:45:48AM +0530, Viresh Kumar wrote:
> > > > > On 8 May 2015 at 07:23, Marek Vasut <marex@denx.de> wrote:
> > > > > > Use msecs_to_jiffies(20) instead of plain (HZ / 50), as the
> > > > > > former is much more explicit about it's behavior. We want
> > > > > > to schedule the task 20 mS from now, so make it explicit in
> > > > > > the code.
> > > > > > 
> > > > > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > > > > Cc: Vipul Kumar Samar <vipulkumar.samar@st.com>
> > > > > > Cc: Viresh Kumar <viresh.kumar@linaro.org>
> > > > > > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > > > > ---
> > > > > > 
> > > > > >  drivers/input/touchscreen/stmpe-ts.c | 2 +-
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > 
> > > > > Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
> > > > 
> > > > Applied both, thank you.
> > > 
> > > Thank you! Shall I submit them for -stable as well please ?
> > 
> > Please.
> 
> Hi,
> 
> these patches still didn't make it for Linus's tree. I cannot submit
> to -stable unless they hit Linus's tree to my knowledge. Shall I wait
> some more please ?

They are in -next. I guess I could get them in 4.1...
Marek Vasut May 22, 2015, 12:05 a.m. UTC | #7
On Friday, May 22, 2015 at 02:01:21 AM, Dmitry Torokhov wrote:
> On Fri, May 22, 2015 at 01:58:34AM +0200, Marek Vasut wrote:
> > On Friday, May 08, 2015 at 07:22:28 PM, Dmitry Torokhov wrote:
> > > On Fri, May 08, 2015 at 11:47:39AM +0200, Marek Vasut wrote:
> > > > On Friday, May 08, 2015 at 07:28:20 AM, Dmitry Torokhov wrote:
> > > > > On Fri, May 08, 2015 at 07:45:48AM +0530, Viresh Kumar wrote:
> > > > > > On 8 May 2015 at 07:23, Marek Vasut <marex@denx.de> wrote:
> > > > > > > Use msecs_to_jiffies(20) instead of plain (HZ / 50), as the
> > > > > > > former is much more explicit about it's behavior. We want
> > > > > > > to schedule the task 20 mS from now, so make it explicit in
> > > > > > > the code.
> > > > > > > 
> > > > > > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > > > > > Cc: Vipul Kumar Samar <vipulkumar.samar@st.com>
> > > > > > > Cc: Viresh Kumar <viresh.kumar@linaro.org>
> > > > > > > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > > > > > ---
> > > > > > > 
> > > > > > >  drivers/input/touchscreen/stmpe-ts.c | 2 +-
> > > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > 
> > > > > > Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
> > > > > 
> > > > > Applied both, thank you.
> > > > 
> > > > Thank you! Shall I submit them for -stable as well please ?
> > > 
> > > Please.
> > 
> > Hi,
> > 
> > these patches still didn't make it for Linus's tree. I cannot submit
> > to -stable unless they hit Linus's tree to my knowledge. Shall I wait
> > some more please ?
> 
> They are in -next. I guess I could get them in 4.1...

In case it's not much of a hassle for everyone involved, it would be nice.
Otherwise, I will just wait for 4.2 merge window to open and submit for
stable after that. Just let me know what you prefer and I will do so.

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dmitry Torokhov May 22, 2015, 11:30 p.m. UTC | #8
On Fri, May 22, 2015 at 02:05:52AM +0200, Marek Vasut wrote:
> On Friday, May 22, 2015 at 02:01:21 AM, Dmitry Torokhov wrote:
> > On Fri, May 22, 2015 at 01:58:34AM +0200, Marek Vasut wrote:
> > > On Friday, May 08, 2015 at 07:22:28 PM, Dmitry Torokhov wrote:
> > > > On Fri, May 08, 2015 at 11:47:39AM +0200, Marek Vasut wrote:
> > > > > On Friday, May 08, 2015 at 07:28:20 AM, Dmitry Torokhov wrote:
> > > > > > On Fri, May 08, 2015 at 07:45:48AM +0530, Viresh Kumar wrote:
> > > > > > > On 8 May 2015 at 07:23, Marek Vasut <marex@denx.de> wrote:
> > > > > > > > Use msecs_to_jiffies(20) instead of plain (HZ / 50), as the
> > > > > > > > former is much more explicit about it's behavior. We want
> > > > > > > > to schedule the task 20 mS from now, so make it explicit in
> > > > > > > > the code.
> > > > > > > > 
> > > > > > > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > > > > > > Cc: Vipul Kumar Samar <vipulkumar.samar@st.com>
> > > > > > > > Cc: Viresh Kumar <viresh.kumar@linaro.org>
> > > > > > > > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > > > > > > ---
> > > > > > > > 
> > > > > > > >  drivers/input/touchscreen/stmpe-ts.c | 2 +-
> > > > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > > 
> > > > > > > Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
> > > > > > 
> > > > > > Applied both, thank you.
> > > > > 
> > > > > Thank you! Shall I submit them for -stable as well please ?
> > > > 
> > > > Please.
> > > 
> > > Hi,
> > > 
> > > these patches still didn't make it for Linus's tree. I cannot submit
> > > to -stable unless they hit Linus's tree to my knowledge. Shall I wait
> > > some more please ?
> > 
> > They are in -next. I guess I could get them in 4.1...
> 
> In case it's not much of a hassle for everyone involved, it would be nice.
> Otherwise, I will just wait for 4.2 merge window to open and submit for
> stable after that. Just let me know what you prefer and I will do so.

I sent pull request to Linus, so let's see.

Thanks.
Marek Vasut May 24, 2015, 9:54 p.m. UTC | #9
On Saturday, May 23, 2015 at 01:30:48 AM, Dmitry Torokhov wrote:

[...]

> > In case it's not much of a hassle for everyone involved, it would be
> > nice. Otherwise, I will just wait for 4.2 merge window to open and
> > submit for stable after that. Just let me know what you prefer and I
> > will do so.
> 
> I sent pull request to Linus, so let's see.

Hi!

Thank you very much !

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c
index 42ce31a..9e5c880 100644
--- a/drivers/input/touchscreen/stmpe-ts.c
+++ b/drivers/input/touchscreen/stmpe-ts.c
@@ -164,7 +164,7 @@  static irqreturn_t stmpe_ts_handler(int irq, void *data)
 			STMPE_TSC_CTRL_TSC_EN, STMPE_TSC_CTRL_TSC_EN);
 
 	/* start polling for touch_det to detect release */
-	schedule_delayed_work(&ts->work, HZ / 50);
+	schedule_delayed_work(&ts->work, msecs_to_jiffies(20));
 
 	return IRQ_HANDLED;
 }