Searched hist:"968 bd3f0388b8eaf6746336856348dc3ddf2ed39" (Results 1 – 2 of 2) sorted by relevance
/linux/drivers/extcon/ |
H A D | extcon-axp288.c | diff 968bd3f0388b8eaf6746336856348dc3ddf2ed39 Thu Sep 16 09:12:55 CEST 2021 Fabio Aiuto <fabioaiuto83@gmail.com> 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>
|
H A D | Kconfig | diff 968bd3f0388b8eaf6746336856348dc3ddf2ed39 Thu Sep 16 09:12:55 CEST 2021 Fabio Aiuto <fabioaiuto83@gmail.com> 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>
|