aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2017-06-13 10:53:25 -0700
committerSebastian Reichel <sre@kernel.org>2017-06-15 16:51:25 +0200
commitfe8a6534396807b8a0863cd146b72c0bce0b0c88 (patch)
treecee4795b492c68ff19d5ab242ab48287d994f987 /drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
parent48f680c0a9cae36e37d91a3dc086143d6047c8a8 (diff)
power: supply: sbs-battery: Prevent CAPACITY_MODE races
A subset of smart battery commands return charge or energy depending on the CAPACITY_MODE bit setting of BatteryMode(). In order to unambiguously read a charge or energy value, it is necessary to ensure that CAPACITY_MODE is set as desired, and not changed for the duration of the attribute read. Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c')
0 files changed, 0 insertions, 0 deletions