media: dvb-frontends: a8293: fix LNB powerup failure in PCTV 461e
authorChuck Ritola <cjritola@gmail.com>
Fri, 31 Dec 2021 03:53:27 +0000 (03:53 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 25 Nov 2022 09:55:55 +0000 (09:55 +0000)
commite6431a0c0d711af71a0628689463af4ec19c82f8
tree7792d60720e7de2fe650e3f582280cb8f7a5def1
parentb5411dd4d506c373d4957e0b6c1c8e822dc8e511
media: dvb-frontends: a8293: fix LNB powerup failure in PCTV 461e

Fixes a8293 failure to raise LNB voltage in PCTV 461e DVB-S2 Stick
affecting multiple users over several years as found here:

http://www.linuxquestions.org/questions/linux-hardware-18/pctv-dvb-s2-stick-461e-not-feeding-lnb-4175529374/
https://www.linuxtv.org/wiki/index.php/Pinnacle_PCTV_DVB-S2_Stick_(461e)
https://github.com/OpenELEC/OpenELEC.tv/issues/3731

Caused by vIN undervoltage lockout (status register bit 7) when raising LNB to 18V.
Addressed by using the higher-precision voltages available on the a8293 to gradually
increase (slew) the voltage when voltage increases are requested.

Adds volt_slew_nanos_per_mv to a8293_platform_data struct for specifying slew rate.
If value is <1 or non-sane (>1600), the original no-slew version for a8293_set_voltage is used.

Link: https://lore.kernel.org/linux-media/20211231035326.6759-1-cjritola@gmail.com
[mchehab: fixed some coding style issues]
Signed-off-by: Chuck Ritola <cjritola@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/dvb-frontends/a8293.c
drivers/media/dvb-frontends/a8293.h
drivers/media/usb/em28xx/em28xx-dvb.c