Hi

+    duty_ns = gta02_vib->period_ns * 255 / value;

This is wrong but I don't test it but just compile.

+    if (value) {
+        pwm_config(gta02_vib->pwm, duty_ns, gta02_vib->period_ns);
+        pwm_enable(gta02_vib->pwm);
+    } else
+        pwm_disable(gta02_vib->pwm);

There is a semplification of the platform data too that contains only the period_ns.


Michael

Reply via email to