From: Mauro Carvalho Chehab <m.chehab@samsung.com>
To: Antti Palosaari <crope@iki.fi>
Cc: linux-media@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>
Subject: Re: [REVIEW PATCH 02/16] e4000: implement controls via v4l2 control framework
Date: Thu, 13 Mar 2014 10:57:27 -0300 [thread overview]
Message-ID: <20140313105727.43c3d689@samsung.com> (raw)
In-Reply-To: <1393461025-11857-3-git-send-email-crope@iki.fi>
Em Thu, 27 Feb 2014 02:30:11 +0200
Antti Palosaari <crope@iki.fi> escreveu:
> Implement gain and bandwidth controls using v4l2 control framework.
> Pointer to control handler is provided by exported symbol.
>
> Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
> Cc: Hans Verkuil <hverkuil@xs4all.nl>
> Signed-off-by: Antti Palosaari <crope@iki.fi>
> ---
> drivers/media/tuners/e4000.c | 210 +++++++++++++++++++++++++++++++++++++-
> drivers/media/tuners/e4000.h | 14 +++
> drivers/media/tuners/e4000_priv.h | 75 ++++++++++++++
> 3 files changed, 298 insertions(+), 1 deletion(-)
...
> diff --git a/drivers/media/tuners/e4000.h b/drivers/media/tuners/e4000.h
> index e74b8b2..989f2ea 100644
> --- a/drivers/media/tuners/e4000.h
> +++ b/drivers/media/tuners/e4000.h
> @@ -40,4 +40,18 @@ struct e4000_config {
> u32 clock;
> };
>
> +#if IS_ENABLED(CONFIG_MEDIA_TUNER_E4000)
> +extern struct v4l2_ctrl_handler *e4000_get_ctrl_handler(
> + struct dvb_frontend *fe
> +);
> +#else
> +static inline struct v4l2_ctrl_handler *e4000_get_ctrl_handler(
> + struct dvb_frontend *fe
> +)
> +{
> + pr_warn("%s: driver disabled by Kconfig\n", __func__);
> + return NULL;
> +}
> +#endif
> +
> #endif
There are two things to be noticed here:
1) Please don't add any EXPORT_SYMBOL() on a pure I2C module. You
should, instead, use the subdev calls, in order to callback a
function provided by the module;
2) As you're now using request_module(), you don't need to use
#if IS_ENABLED() anymore. It is up to the module to register
itself as a V4L2 subdevice. The caller module should use the
subdevice interface to run the callbacks.
If you don't to that, you'll have several issues with the
building system.
Regards,
Mauro
next prev parent reply other threads:[~2014-03-13 13:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 0:30 [REVIEW PATCH 00/16] SDR API - Realtek RTL2832 SDR driver Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 01/16] e4000: convert DVB tuner to I2C driver model Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 02/16] e4000: implement controls via v4l2 control framework Antti Palosaari
2014-03-13 13:57 ` Mauro Carvalho Chehab [this message]
2014-03-13 15:17 ` Antti Palosaari
2014-03-13 16:05 ` Antti Palosaari
2014-03-13 16:40 ` Mauro Carvalho Chehab
2014-02-27 0:30 ` [REVIEW PATCH 03/16] e4000: fix PLL calc to allow higher frequencies Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 04/16] e4000: implement PLL lock v4l control Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 05/16] e4000: get rid of DVB i2c_gate_ctrl() Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 06/16] e4000: convert to Regmap API Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 07/16] e4000: rename some variables Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 08/16] rtl2832_sdr: Realtek RTL2832 SDR driver module Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 09/16] rtl28xxu: constify demod config structs Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 10/16] rtl28xxu: attach SDR extension module Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 11/16] rtl28xxu: fix switch-case style issue Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 12/16] rtl28xxu: use muxed RTL2832 I2C adapters for E4000 and RTL2832_SDR Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 13/16] rtl2832_sdr: expose e4000 controls to user Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 14/16] r820t: add manual gain controls Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 15/16] rtl2832_sdr: expose R820T controls to user Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 16/16] MAINTAINERS: add rtl2832_sdr driver Antti Palosaari
-- strict thread matches above, loose matches on Subject: below --
2014-02-11 2:04 [REVIEW PATCH 00/16] SDR API - drivers Antti Palosaari
2014-02-11 2:04 ` [REVIEW PATCH 02/16] e4000: implement controls via v4l2 control framework Antti Palosaari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140313105727.43c3d689@samsung.com \
--to=m.chehab@samsung.com \
--cc=crope@iki.fi \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox