]> git.karo-electronics.de Git - linux-beck.git/commit
pinctrl: baytrail: Debounce register is one per community
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 26 Jan 2017 17:24:08 +0000 (19:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2017 07:08:28 +0000 (08:08 +0100)
commit2cf6c49264e40e395e73fef11f487b10b05548b4
tree54f5ce2cb5d247b1e31806a900ae46faa56075fb
parent449d3ecfbd7640dc763dbf333131858ead6c3f11
pinctrl: baytrail: Debounce register is one per community

commit 1b89970d81bbd52720fc64a3fe9572ee33588363 upstream.

Debounce value is set globally per community. Otherwise user will easily
get a kernel crash when they start using the feature:

BUG: unable to handle kernel paging request at ffffc900003be000
IP: byt_gpio_dbg_show+0xa9/0x430

Make it clear in byt_gpio_reg().

Note that this fix just prevents kernel to crash, but doesn't make any
difference to the existing logic. It means the last caller will win the
trade and debounce value will be configured accordingly. The actual
logic fix needs to be thought about and it's not as important as crash
fix. That's why the latter goes separately and right now.

Fixes: 658b476c742f ("pinctrl: baytrail: Add debounce configuration")
Cc: Cristina Ciocan <cristina.ciocan@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/intel/pinctrl-baytrail.c