summaryrefslogtreecommitdiff
path: root/drivers/hwmon/adt7310.c
diff options
context:
space:
mode:
authorDelphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>2024-04-16 05:22:11 +0300
committerGuenter Roeck <linux@roeck-us.net>2024-05-01 17:47:45 +0300
commit801fec8df5649cdba6587522b9b3e872d31cd8c8 (patch)
tree9f29607ad648713cbb6dfe39d6ad65a407aa137c /drivers/hwmon/adt7310.c
parent8ec8d6c50984ca0f8ee160a9adac4b1c8f88d468 (diff)
downloadlinux-801fec8df5649cdba6587522b9b3e872d31cd8c8.tar.xz
hwmon: (max31790) revise the scale to write pwm
Since the value for PWMOUT Target Duty Cycle register is a 9 bit left-justified value that ranges from 0 to 511 and is contained in 2 bytes. There is an issue that the PWM signal recorded by oscilloscope would not be on consistently if we set PWM to 100% to the driver. It is because the LSB of the 9 bit would always be zero if it just left shift 8 bit for the value that write to PWMOUT Target Duty Cycle register. Therefore, revise the scale of the value that was written to pwm input from 255 to 511 and modify the value to left-justified value. Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://lore.kernel.org/r/20240416022211.859483-1-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/adt7310.c')
0 files changed, 0 insertions, 0 deletions