Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
50 lines
1.2 KiB
C
50 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
TDA8261 8PSK/QPSK tuner driver
|
|
Copyright (C) Manu Abraham (abraham.manu@gmail.com)
|
|
|
|
*/
|
|
|
|
static int tda8261_get_frequency(struct dvb_frontend *fe, u32 *frequency)
|
|
{
|
|
struct dvb_frontend_ops *frontend_ops = &fe->ops;
|
|
struct dvb_tuner_ops *tuner_ops = &frontend_ops->tuner_ops;
|
|
int err = 0;
|
|
|
|
if (tuner_ops->get_frequency) {
|
|
err = tuner_ops->get_frequency(fe, frequency);
|
|
if (err < 0) {
|
|
pr_err("%s: Invalid parameter\n", __func__);
|
|
return err;
|
|
}
|
|
pr_debug("%s: Frequency=%d\n", __func__, *frequency);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int tda8261_set_frequency(struct dvb_frontend *fe, u32 frequency)
|
|
{
|
|
struct dvb_frontend_ops *frontend_ops = &fe->ops;
|
|
struct dvb_tuner_ops *tuner_ops = &frontend_ops->tuner_ops;
|
|
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
|
|
int err = 0;
|
|
|
|
if (tuner_ops->set_params) {
|
|
err = tuner_ops->set_params(fe);
|
|
if (err < 0) {
|
|
pr_err("%s: Invalid parameter\n", __func__);
|
|
return err;
|
|
}
|
|
}
|
|
pr_debug("%s: Frequency=%d\n", __func__, c->frequency);
|
|
return 0;
|
|
}
|
|
|
|
static int tda8261_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)
|
|
{
|
|
/* FIXME! need to calculate Bandwidth */
|
|
*bandwidth = 40000000;
|
|
|
|
return 0;
|
|
}
|