diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2022-04-14 17:46:59 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-19 16:22:28 +0000 |
commit | 1107b39af8ab3a6b73b5a40e489564c7e49bfa2a (patch) | |
tree | 5a5f6c3177ff72ec9bc6361787ab852e4e0b2f04 /driver | |
parent | 86e79d476bce53d2e9eec3db31f712478d5ea707 (diff) | |
download | chrome-ec-1107b39af8ab3a6b73b5a40e489564c7e49bfa2a.tar.gz |
aw20198: Set and clear config register bits correctly
This patch makes aw20198_enable set and clear the bits of the config
register correctly.
BUG=None
BRANCH=None
TEST=None
Change-Id: Id3657c634a4db71ab1bd4816ac09883c067c4d72
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3587155
Reviewed-by: Parth Malkan <parthmalkan@google.com>
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/led/aw20198.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/led/aw20198.c b/driver/led/aw20198.c index 1c6bc4933c..f307ae4a02 100644 --- a/driver/led/aw20198.c +++ b/driver/led/aw20198.c @@ -75,8 +75,8 @@ static int aw20198_enable(struct rgbkbd *ctx, bool enable) return rv; } - return aw20198_write(ctx, AW20198_REG_GCR, - cfg | (enable ? BIT(0) : 0)); + WRITE_BIT(cfg, 0, enable); + return aw20198_write(ctx, AW20198_REG_GCR, cfg); } static int aw20198_set_color(struct rgbkbd *ctx, uint8_t offset, |