Commit 45066c4b authored by Abdel Alkuor's avatar Abdel Alkuor Committed by Lee Jones

leds: ncp5623: Add MS suffix to time defines

To make the time macro defines clearer, add MS as a suffix.
Signed-off-by: default avatarAbdel Alkuor <alkuor@gmail.com>
Link: https://lore.kernel.org/r/20240305133824.1551809-1-alkuor@gmail.comSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent 7b7e50f8
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
#define NCP5623_DIMMING_TIME_REG NCP5623_REG(0x7) #define NCP5623_DIMMING_TIME_REG NCP5623_REG(0x7)
#define NCP5623_MAX_BRIGHTNESS 0x1f #define NCP5623_MAX_BRIGHTNESS 0x1f
#define NCP5623_MAX_DIM_TIME 240 /* ms */ #define NCP5623_MAX_DIM_TIME_MS 240
#define NCP5623_DIM_STEP 8 /* ms */ #define NCP5623_DIM_STEP_MS 8
struct ncp5623 { struct ncp5623 {
struct i2c_client *client; struct i2c_client *client;
...@@ -92,8 +92,8 @@ static int ncp5623_pattern_set(struct led_classdev *cdev, ...@@ -92,8 +92,8 @@ static int ncp5623_pattern_set(struct led_classdev *cdev,
ncp->delay = 0; ncp->delay = 0;
if (pattern[0].delta_t > NCP5623_MAX_DIM_TIME || if (pattern[0].delta_t > NCP5623_MAX_DIM_TIME_MS ||
(pattern[0].delta_t % NCP5623_DIM_STEP) != 0) (pattern[0].delta_t % NCP5623_DIM_STEP_MS) != 0)
return -EINVAL; return -EINVAL;
brightness_diff = pattern[0].brightness - ncp->current_brightness; brightness_diff = pattern[0].brightness - ncp->current_brightness;
...@@ -117,7 +117,7 @@ static int ncp5623_pattern_set(struct led_classdev *cdev, ...@@ -117,7 +117,7 @@ static int ncp5623_pattern_set(struct led_classdev *cdev,
ret = ncp5623_write(ncp->client, ret = ncp5623_write(ncp->client,
NCP5623_DIMMING_TIME_REG, NCP5623_DIMMING_TIME_REG,
pattern[0].delta_t / NCP5623_DIM_STEP); pattern[0].delta_t / NCP5623_DIM_STEP_MS);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment