From 07bc6420d1bd337f9b4d4515cc78b6fea2452a8b Mon Sep 17 00:00:00 2001 From: Damon Ding Date: Thu, 12 Dec 2024 09:49:09 +0800 Subject: [PATCH] pwm: rockchip: fix the comment for the tx_value of IR transmit function Fixes: 9be1108fc554 ("pwm: rockchip: add support for IR NEC transmit") Change-Id: I90ccf6131178d619ed4205886e28960a9a6c384b Signed-off-by: Damon Ding --- drivers/pwm/pwm-rockchip.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c index 56c419d0c344..7851ab6a2b72 100644 --- a/drivers/pwm/pwm-rockchip.c +++ b/drivers/pwm/pwm-rockchip.c @@ -1944,8 +1944,13 @@ static int rockchip_pwm_ir_transmit_v4(struct pwm_chip *chip, unsigned int *txbu * txbuf[4]: the high duration of NEC logic '0'. * txbuf[5]: the high duration of NEC logic '1'. * txbuf[6]: - * bit[31:24] bit[23:16] bit[15:8] bit[7:0] - * address code address inverted code command code command inverted code + * For 8-bit address code: + * bit[31:24] bit[23:16] bit[15:8] bit[7:0] + * command inverted code command code address inverted code address code + * + * For 16-bit address code: + * bit[31:24] bit[23:16] bit[15:8] bit[7:0] + * command inverted code command code address code bit[15:8] address code bit[7:0] */ preload = txbuf[0] << IR_TRANS_OUT_LOW_PRELOAD_SHIFT | txbuf[1] << IR_TRANS_OUT_HIGH_PRELOAD_SHIFT;