gpiolib: acpi: Convert ACPI value of debounce to microseconds
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 7 Mar 2022 11:56:23 +0000 (13:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Mar 2022 13:23:37 +0000 (14:23 +0100)
commitc5883d38a470a3fdf25733c5f05a3f9f4c4445ce
tree0a8426ef7e22bb7d8c909d0d05ffc4d94f5c7a91
parentc014efbd1c28e7a4cb2c94db99405b3c6671cd37
gpiolib: acpi: Convert ACPI value of debounce to microseconds

[ Upstream commit 660c619b9d7ccd28648ee3766cdbe94ec7b27402 ]

It appears that GPIO ACPI library uses ACPI debounce values directly.
However, the GPIO library APIs expect the debounce timeout to be in
microseconds.

Convert ACPI value of debounce to microseconds.

While at it, document this detail where it is appropriate.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215664
Reported-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Fixes: 8dcb7a15a585 ("gpiolib: acpi: Take into account debounce settings")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpio/gpiolib-acpi.c
drivers/gpio/gpiolib.c