leds: st1202: Correct the name of the prescaler conversion helper

st1202_prescalar_to_miliseconds() converts a duration in milliseconds
into the prescaler value written to the pattern duration registers, so
its name states the conversion the wrong way round. It also misspells
both "prescaler" and "milliseconds".

Rename it to st1202_milliseconds_to_prescaler(). No functional change.

Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Assisted-by: LLM
Link: https://patch.msgid.link/GV1PR08MB8497AA602374777F1BA08E07C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
Manuel Fombuena 2026-09-15 13:42:15 +01:00 committed by Lee Jones
parent 145ca6bca2
commit 226f325436

View File

@ -85,7 +85,7 @@ static int st1202_write_reg(struct st1202_chip *chip, int reg, uint8_t val)
return ret;
}
static uint8_t st1202_prescalar_to_miliseconds(unsigned int value)
static uint8_t st1202_milliseconds_to_prescaler(unsigned int value)
{
return value / ST1202_MILLIS_PATTERN_DUR_MIN;
}
@ -126,7 +126,7 @@ static int st1202_duration_pattern_write(struct st1202_chip *chip, int pattern,
unsigned int value)
{
return st1202_write_reg(chip, (ST1202_PATTERN_DUR + pattern),
st1202_prescalar_to_miliseconds(value));
st1202_milliseconds_to_prescaler(value));
}
static int __st1202_channel_set(struct st1202_chip *chip, int led_num, bool active)