High precision timer in kernel module
I am building a kernel dirver for a backlight control. The problem is that the backlight driver expects a PWM signal but it is connected only to a normal GPIO pin wich has no PWM capability. So I have to write a software PWM driver. Therefore I need a high precision timer with a high resolution and a high precision. The PWM must have a frequency of at least 100Hz and I'd like to have at least 10 steps, means that I need a timer with 1kHz resolution and also precision!
I tryed with the hrtimer but the PWM is not stable, means I have a jitter in the signal which causes the display to flicker.
Is there any possibility to get a timer with higher precision? Frequency must be higher than 1kHz but can go up to MHz.