From 308fc1a5e33464760d1f87b6cb3bff96b0ad3e5f Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sun, 21 Aug 2011 15:58:56 +0200 Subject: [PATCH] don't do unnecessary debounce configs --- MS2Debounce/assets/debounce.ko | Bin 96813 -> 96781 bytes debounce.c | 12 ++++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MS2Debounce/assets/debounce.ko b/MS2Debounce/assets/debounce.ko index fd7f4066d7fc02eaafc441ff23af8ec036747bc7..5c440d8bcbfd5ca426bf3c00931c960e7cf200c1 100644 GIT binary patch delta 2601 zcmZXV4@}f$7{{OYcX!mN2wWx+x>-9cCyf|)ayl?%7i)y4@-3paJqYR;tRd-p(Wz1w@A=imFh@4fHu zeV>zqj*kZ&r*fRWi-isSv?dT%Ie{=`9_S}p(fju&Uz;j(*R7O5pqKoC-p2h6{fBMt zp1`Sw{#2shJ(*U&qN-lA(z>nuHMio3+;$#oqm^Md%ckUUvh4H(!tTsK*q#~)ms3Ok zN*2HB`MY_d#L+`E8-U7mn9))P=p9y~lSCOU8ci%m|o`VA@x z-y9m6&x^i8+^%rH#NE&Rs^u_etFzX#W`Sz5c9|2^(cmF-soi^*m)2}M?a$)bK4;bi zAB>r%tit%0t%UejtSj;E;K}&g_JpCr?C!SwoXaImf8N{_*IYYraPh5R^Z2K>sJqtB zA3pCZS;n)_;*>-pHMNCBwTftY#{?FBPzt{F{CnR;wBQ{7D^;n~Uu?kinA*d(#tNeB z^0nLGOim%nWZR2Bv6J<|shphk?02@VgT9ax7Q_GKq=?^fmy>O<_U%daAzdB!YIcv? zG@PTs{=FTH#MUW}OynO<;po5ew_o%8^qz zsDfw9vofk<=VY^%SAnp@3f4DR&p*Rq>WFfb5f!Z6vV~NAB*S*Ata`$1tT@D7bL2@L zu_&?;UhG3Vn_kLI=fU2G2GRB4vFcw92ZBSv-TRW#(k7F`$mESoVrDVNGUth&!yIFE zv`q6=u=E6b{K8u1MAieMpAlYUy4jASv0XD1i}zVX=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c @@ -33,15 +33,15 @@ static void hw_debounce_set(int enable, int time) { for (i = 0; i < gpio_evmi->ninputs; i++) { int gpio = gpio_evmi->input_gpios[i]; - if (enable != -1) { - printk(KERN_INFO PREFIX "%sabling hardware debounce for GPIO %d\n", (enable?"En":"Dis"), gpio); - omap_set_gpio_debounce(gpio, enable); - } - - if ((time != -1) && hw_debounce) { + if ((time != -1) && (time != hw_debounce_time) && hw_debounce) { printk(KERN_INFO PREFIX "Setting hardware debounce time for GPIO %d to %d (%dus)\n", gpio, time, (time+1)*31); omap_set_gpio_debounce_time(gpio, time); } + + if ((enable != -1) && (enable != hw_debounce)) { + printk(KERN_INFO PREFIX "%sabling hardware debounce for GPIO %d\n", (enable?"En":"Dis"), gpio); + omap_set_gpio_debounce(gpio, enable); + } } } -- 2.39.5