maoxiaochuan
ab6a9539bf
pwm: loongson: Add an error code in probe()
...
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2025-05-30 15:52:38 +08:00
maoxiaochuan
55c2653569
pwm: loongson: Fix u32 overflow in waveform calculation
...
mul_u64_u64_div_u64() returns an u64 that might be bigger than U32_MAX.
To properly handle this case it must not be directly assigned to an u32
value.
Use a wider type for duty and period to make the idiom:
duty = mul_u64_u64_div_u64(...)
if (duty > U32_MAX)
duty = U32_MAX;
actually work as intended.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org >
Link: https://lore.kernel.org/r/44f3c764-8b65-49a9-b3ad-797e9fbb96f5@stanley.mountain
Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn >
Link: https://lore.kernel.org/r/20250412122124.1636152-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2025-05-30 15:52:38 +08:00
maoxiaochuan
881dbd52e0
update to e7567cc18
...
1.Fix the issue of the SD card crashing due to repeated plugging and unplugging.
2.add init-polarity to support setup init pwm status
3.loongson2_thermal: update temperature formula
4.Fix alert/critical temperature to 75/105
5.Add alientek-2k300 support
2025-04-17 19:59:01 +08:00
ilikara
40bd8588a5
refactor: remove old atim & gtim pwm driver
2025-03-01 05:19:23 +00:00
ilikara
bdcdd6f493
refactor: update loongson_timers_dma_burst_read
2025-03-01 05:19:20 +00:00
ilikara
d248dff659
bug: pwm capture fix
2025-03-01 05:19:18 +00:00
ilikara
403cd66482
feat: timer pwm driver based on mfd driver
2025-03-01 05:19:05 +00:00
ilikara
ed6ce74c49
feat(pwm): support pwm capture
2025-02-20 04:57:29 +00:00
ilikara
f3bdbfb5eb
refactor: update debug message
2025-02-20 04:57:26 +00:00
ilikara
f858e3a8ac
feat(pwm): pwm capture(WIP)
2025-02-20 04:57:22 +00:00
ilikara
abec461f7f
feat(pwm): add ATIM and GTIM pwm driver
2025-02-18 15:18:27 +00:00
maoxiaochuan
d405f3e1c1
PWM:Remove unused code
2025-02-16 18:09:45 +08:00
maoxiaochuan
7ffd18ab9d
Update to 14fc3074cfe039
...
1. 添加带irq处理的gpio驱动
2. 龙芯2k系列添加mmc驱动支持
3. 添加看门狗驱动
4. dtb支持从command line中的board_name字段判断
5. 支持内存分布描述数据从固件传入的数据获取
6. 支持从bootcmdline获取ramdisk启动的地址和所用大小
7. 添加2k300的i2c总线驱动
8. 2k300使用新的spi 和 spi-io 驱动
9. CPU芯片温度传感器支持2k300的计算方式
10. 添加2k300的adc驱动
11. pwm: update default pwm freq to 50Mhz
12. loongson pwm 驱动支持dts使用clock-frequency形式声明频率
13. loongson pwm 确保disable时输出的电平为空闲电平
14. 2k300编译配置使能pwm leds功能
15. 2k300的gmac的phy-mode默认使用rgmii-id
16. 2k300先锋派设置YT8531的内部延迟
17. YT8531 phy 支持设置led的工作模式
18. LCD屏幕 支持cmdline的panel属性选择某一款板卡的dts配置,实现屏幕切换
19. 添加脚本用于快速选择板卡配置文件
20. 添加CAN驱动
21. 添加音频驱动
22. 优化OTG兼容性
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2025-02-13 16:03:32 +08:00
Binbin Zhou
c9fe5e5ab6
pwm: Add Loongson PWM controller support
...
This commit adds a generic PWM framework driver for the PWM controller
found on Loongson family chips.
Co-developed-by: Juxin Gao <gaojuxin@loongson.cn >
Signed-off-by: Juxin Gao <gaojuxin@loongson.cn >
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn >
Acked-by: Huacai Chen <chenhuacai@loongson.cn >
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2025-02-13 14:30:10 +08:00
maoxiaochuan
8b074cffbf
init src (linux-6.12.0)
2025-02-13 14:11:16 +08:00