diff options
author | Hans de Goede <hdegoede@redhat.com> | 2018-10-11 16:29:10 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-10-25 17:00:05 +0200 |
commit | 3c670dba864d9ab0a23612a93b7d98700734bd44 (patch) | |
tree | 1718fbc1c3f426f3da42d27abd5abfd7738bd7ac /drivers/i2c/busses/i2c-designware-baytrail.c | |
parent | e09db3d241f8d594381b6e5f2ca0f72ffcce478a (diff) | |
download | linux-3c670dba864d9ab0a23612a93b7d98700734bd44.tar.gz linux-3c670dba864d9ab0a23612a93b7d98700734bd44.tar.bz2 linux-3c670dba864d9ab0a23612a93b7d98700734bd44.zip |
ACPI / PMIC: xpower: Block P-Unit I2C access during read-modify-write
intel_xpower_pmic_update_power() does a read-modify-write of the output
control register. The i2c-designware code blocks the P-Unit I2C access
during the read and write by taking the P-Unit's PMIC bus semaphore.
But between the read and the write that semaphore is released and the
P-Unit could make changes to the register which we then end up overwriting.
This commit makes intel_xpower_pmic_update_power() take the semaphore
itself so that it is held over the entire read-modify-write, avoiding this
race.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/i2c/busses/i2c-designware-baytrail.c')
0 files changed, 0 insertions, 0 deletions