diff options
author | Hans de Goede <[email protected]> | 2017-02-10 11:27:51 +0100 |
---|---|---|
committer | Daniel Vetter <[email protected]> | 2017-02-26 21:13:24 +0100 |
commit | 9260a0409794a59079393e843511414d5f08c14b (patch) | |
tree | b892381ffa8e9df787d0b9d8150bd7bb5db99444 /tools/lib/api/debug.c | |
parent | 64a577196d66b44e37384bc5c4d78c61f59d5b2a (diff) |
x86/platform/intel/iosf_mbi: Add a mutex for P-Unit access
One some systems the P-Unit accesses the PMIC to change various voltages
through the same bus as other kernel drivers use for e.g. battery
monitoring.
If a driver sends requests to the P-Unit which require the P-Unit to access
the PMIC bus while another driver is also accessing the PMIC bus various
bad things happen.
This commit adds a mutex to protect the P-Unit against simultaneous
accesses and 2 functions to lock / unlock this mutex.
Note on these systems the i2c-bus driver will request a sempahore from the
P-Unit for exclusive access to the PMIC bus when i2c drivers are accessing
it, but this does not appear to be sufficient, we still need to avoid
making certain P-Unit requests during the access window to avoid problems.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=155241
Signed-off-by: Hans de Goede <[email protected]>
Tested-by: tagorereddy <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/lib/api/debug.c')
0 files changed, 0 insertions, 0 deletions