diff options
author | Fabio Aiuto <fabioaiuto83@gmail.com> | 2021-09-16 10:12:55 +0300 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2021-10-27 08:13:38 +0300 |
commit | 968bd3f0388b8eaf6746336856348dc3ddf2ed39 (patch) | |
tree | 472a5c3878f20b390559cf1bb0f90ab8dcb7ce03 /drivers/extcon/Kconfig | |
parent | 3177308a9421f7735482fd56091bc09ef521b933 (diff) | |
download | linux-968bd3f0388b8eaf6746336856348dc3ddf2ed39.tar.xz |
extcon: extcon-axp288: Use P-Unit semaphore lock for register accesses
use low level P-Unit semaphore lock for axp288 register
accesses directly and for more than one access a time,
to reduce the number of times this semaphore is locked
and released which is an expensive operation.
i2c-bus to the XPower is shared between the kernel and the
SoCs P-Unit. The P-Unit has a semaphore wich the kernel must
lock for axp288 register accesses. When the P-Unit semaphore
is locked CPU and GPU power states cannot change or the system
will freeze.
The P-Unit semaphore lock is already managed inside the regmap
access logic, but for each access the semaphore is locked and
released. So use directly iosf_mbi_(un)block_punit_i2c_access(),
we are safe in doing so because nested calls to the same
semaphore are turned to nops.
Suggested-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon/Kconfig')
-rw-r--r-- | drivers/extcon/Kconfig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig index c69d40ae5619..aab87c9b35c8 100644 --- a/drivers/extcon/Kconfig +++ b/drivers/extcon/Kconfig @@ -23,7 +23,7 @@ config EXTCON_ADC_JACK config EXTCON_AXP288 tristate "X-Power AXP288 EXTCON support" - depends on MFD_AXP20X && USB_SUPPORT && X86 && ACPI + depends on MFD_AXP20X && USB_SUPPORT && X86 && ACPI && IOSF_MBI select USB_ROLE_SWITCH help Say Y here to enable support for USB peripheral detection |