Commit 5fa51cc3 authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] msi001: logging changes

Remove function name from debug logs. Logging system could add it
automatically.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 100b7931
...@@ -67,7 +67,8 @@ static int msi001_set_gain(struct msi001 *s, int lna_gain, int mixer_gain, ...@@ -67,7 +67,8 @@ static int msi001_set_gain(struct msi001 *s, int lna_gain, int mixer_gain,
{ {
int ret; int ret;
u32 reg; u32 reg;
dev_dbg(&s->spi->dev, "%s: lna=%d mixer=%d if=%d\n", __func__,
dev_dbg(&s->spi->dev, "lna=%d mixer=%d if=%d\n",
lna_gain, mixer_gain, if_gain); lna_gain, mixer_gain, if_gain);
reg = 1 << 0; reg = 1 << 0;
...@@ -83,7 +84,7 @@ static int msi001_set_gain(struct msi001 *s, int lna_gain, int mixer_gain, ...@@ -83,7 +84,7 @@ static int msi001_set_gain(struct msi001 *s, int lna_gain, int mixer_gain,
return 0; return 0;
err: err:
dev_dbg(&s->spi->dev, "%s: failed %d\n", __func__, ret); dev_dbg(&s->spi->dev, "failed %d\n", ret);
return ret; return ret;
}; };
...@@ -94,6 +95,7 @@ static int msi001_set_tuner(struct msi001 *s) ...@@ -94,6 +95,7 @@ static int msi001_set_tuner(struct msi001 *s)
u32 reg; u32 reg;
u64 f_vco, tmp64; u64 f_vco, tmp64;
u8 mode, filter_mode, lo_div; u8 mode, filter_mode, lo_div;
static const struct { static const struct {
u32 rf; u32 rf;
u8 mode; u8 mode;
...@@ -145,9 +147,7 @@ static int msi001_set_tuner(struct msi001 *s) ...@@ -145,9 +147,7 @@ static int msi001_set_tuner(struct msi001 *s)
#define R_REF 4 #define R_REF 4
#define F_OUT_STEP 1 #define F_OUT_STEP 1
dev_dbg(&s->spi->dev, dev_dbg(&s->spi->dev, "f_rf=%d f_if=%d\n", f_rf, f_if);
"%s: f_rf=%d f_if=%d\n",
__func__, f_rf, f_if);
for (i = 0; i < ARRAY_SIZE(band_lut); i++) { for (i = 0; i < ARRAY_SIZE(band_lut); i++) {
if (f_rf <= band_lut[i].rf) { if (f_rf <= band_lut[i].rf) {
...@@ -198,8 +198,7 @@ static int msi001_set_tuner(struct msi001 *s) ...@@ -198,8 +198,7 @@ static int msi001_set_tuner(struct msi001 *s)
s->bandwidth->val = bandwidth_lut[i].freq; s->bandwidth->val = bandwidth_lut[i].freq;
dev_dbg(&s->spi->dev, "%s: bandwidth selected=%d\n", dev_dbg(&s->spi->dev, "bandwidth selected=%d\n", bandwidth_lut[i].freq);
__func__, bandwidth_lut[i].freq);
f_vco = (u64) (f_rf + f_if + f_if1) * lo_div; f_vco = (u64) (f_rf + f_if + f_if1) * lo_div;
tmp64 = f_vco; tmp64 = f_vco;
...@@ -225,9 +224,8 @@ static int msi001_set_tuner(struct msi001 *s) ...@@ -225,9 +224,8 @@ static int msi001_set_tuner(struct msi001 *s)
tmp += 1ul * F_REF * R_REF * frac / thresh; tmp += 1ul * F_REF * R_REF * frac / thresh;
tmp /= lo_div; tmp /= lo_div;
dev_dbg(&s->spi->dev, dev_dbg(&s->spi->dev, "rf=%u:%u n=%d thresh=%d frac=%d\n",
"%s: rf=%u:%u n=%d thresh=%d frac=%d\n", f_rf, tmp, n, thresh, frac);
__func__, f_rf, tmp, n, thresh, frac);
ret = msi001_wreg(s, 0x00000e); ret = msi001_wreg(s, 0x00000e);
if (ret) if (ret)
...@@ -276,7 +274,7 @@ static int msi001_set_tuner(struct msi001 *s) ...@@ -276,7 +274,7 @@ static int msi001_set_tuner(struct msi001 *s)
return 0; return 0;
err: err:
dev_dbg(&s->spi->dev, "%s: failed %d\n", __func__, ret); dev_dbg(&s->spi->dev, "failed %d\n", ret);
return ret; return ret;
}; };
...@@ -284,7 +282,8 @@ static int msi001_s_power(struct v4l2_subdev *sd, int on) ...@@ -284,7 +282,8 @@ static int msi001_s_power(struct v4l2_subdev *sd, int on)
{ {
struct msi001 *s = sd_to_msi001(sd); struct msi001 *s = sd_to_msi001(sd);
int ret; int ret;
dev_dbg(&s->spi->dev, "%s: on=%d\n", __func__, on);
dev_dbg(&s->spi->dev, "on=%d\n", on);
if (on) if (on)
ret = 0; ret = 0;
...@@ -301,7 +300,8 @@ static const struct v4l2_subdev_core_ops msi001_core_ops = { ...@@ -301,7 +300,8 @@ static const struct v4l2_subdev_core_ops msi001_core_ops = {
static int msi001_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v) static int msi001_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v)
{ {
struct msi001 *s = sd_to_msi001(sd); struct msi001 *s = sd_to_msi001(sd);
dev_dbg(&s->spi->dev, "%s: index=%d\n", __func__, v->index);
dev_dbg(&s->spi->dev, "index=%d\n", v->index);
strlcpy(v->name, "Mirics MSi001", sizeof(v->name)); strlcpy(v->name, "Mirics MSi001", sizeof(v->name));
v->type = V4L2_TUNER_RF; v->type = V4L2_TUNER_RF;
...@@ -315,14 +315,16 @@ static int msi001_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v) ...@@ -315,14 +315,16 @@ static int msi001_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v)
static int msi001_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *v) static int msi001_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *v)
{ {
struct msi001 *s = sd_to_msi001(sd); struct msi001 *s = sd_to_msi001(sd);
dev_dbg(&s->spi->dev, "%s: index=%d\n", __func__, v->index);
dev_dbg(&s->spi->dev, "index=%d\n", v->index);
return 0; return 0;
} }
static int msi001_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f) static int msi001_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
{ {
struct msi001 *s = sd_to_msi001(sd); struct msi001 *s = sd_to_msi001(sd);
dev_dbg(&s->spi->dev, "%s: tuner=%d\n", __func__, f->tuner);
dev_dbg(&s->spi->dev, "tuner=%d\n", f->tuner);
f->frequency = s->f_tuner; f->frequency = s->f_tuner;
return 0; return 0;
} }
...@@ -332,8 +334,9 @@ static int msi001_s_frequency(struct v4l2_subdev *sd, ...@@ -332,8 +334,9 @@ static int msi001_s_frequency(struct v4l2_subdev *sd,
{ {
struct msi001 *s = sd_to_msi001(sd); struct msi001 *s = sd_to_msi001(sd);
unsigned int band; unsigned int band;
dev_dbg(&s->spi->dev, "%s: tuner=%d type=%d frequency=%u\n",
__func__, f->tuner, f->type, f->frequency); dev_dbg(&s->spi->dev, "tuner=%d type=%d frequency=%u\n",
f->tuner, f->type, f->frequency);
if (f->frequency < ((bands[0].rangehigh + bands[1].rangelow) / 2)) if (f->frequency < ((bands[0].rangehigh + bands[1].rangelow) / 2))
band = 0; band = 0;
...@@ -349,8 +352,9 @@ static int msi001_enum_freq_bands(struct v4l2_subdev *sd, ...@@ -349,8 +352,9 @@ static int msi001_enum_freq_bands(struct v4l2_subdev *sd,
struct v4l2_frequency_band *band) struct v4l2_frequency_band *band)
{ {
struct msi001 *s = sd_to_msi001(sd); struct msi001 *s = sd_to_msi001(sd);
dev_dbg(&s->spi->dev, "%s: tuner=%d type=%d index=%d\n",
__func__, band->tuner, band->type, band->index); dev_dbg(&s->spi->dev, "tuner=%d type=%d index=%d\n",
band->tuner, band->type, band->index);
if (band->index >= ARRAY_SIZE(bands)) if (band->index >= ARRAY_SIZE(bands))
return -EINVAL; return -EINVAL;
...@@ -380,9 +384,10 @@ static int msi001_s_ctrl(struct v4l2_ctrl *ctrl) ...@@ -380,9 +384,10 @@ static int msi001_s_ctrl(struct v4l2_ctrl *ctrl)
struct msi001 *s = container_of(ctrl->handler, struct msi001, hdl); struct msi001 *s = container_of(ctrl->handler, struct msi001, hdl);
int ret; int ret;
dev_dbg(&s->spi->dev, dev_dbg(&s->spi->dev,
"%s: id=%d name=%s val=%d min=%lld max=%lld step=%lld\n", "id=%d name=%s val=%d min=%lld max=%lld step=%lld\n",
__func__, ctrl->id, ctrl->name, ctrl->val, ctrl->id, ctrl->name, ctrl->val,
ctrl->minimum, ctrl->maximum, ctrl->step); ctrl->minimum, ctrl->maximum, ctrl->step);
switch (ctrl->id) { switch (ctrl->id) {
...@@ -403,8 +408,7 @@ static int msi001_s_ctrl(struct v4l2_ctrl *ctrl) ...@@ -403,8 +408,7 @@ static int msi001_s_ctrl(struct v4l2_ctrl *ctrl)
s->mixer_gain->cur.val, s->if_gain->val); s->mixer_gain->cur.val, s->if_gain->val);
break; break;
default: default:
dev_dbg(&s->spi->dev, "%s: unkown control %d\n", dev_dbg(&s->spi->dev, "unkown control %d\n", ctrl->id);
__func__, ctrl->id);
ret = -EINVAL; ret = -EINVAL;
} }
...@@ -419,7 +423,8 @@ static int msi001_probe(struct spi_device *spi) ...@@ -419,7 +423,8 @@ static int msi001_probe(struct spi_device *spi)
{ {
struct msi001 *s; struct msi001 *s;
int ret; int ret;
dev_dbg(&spi->dev, "%s:\n", __func__);
dev_dbg(&spi->dev, "\n");
s = kzalloc(sizeof(struct msi001), GFP_KERNEL); s = kzalloc(sizeof(struct msi001), GFP_KERNEL);
if (s == NULL) { if (s == NULL) {
...@@ -466,7 +471,8 @@ static int msi001_remove(struct spi_device *spi) ...@@ -466,7 +471,8 @@ static int msi001_remove(struct spi_device *spi)
{ {
struct v4l2_subdev *sd = spi_get_drvdata(spi); struct v4l2_subdev *sd = spi_get_drvdata(spi);
struct msi001 *s = sd_to_msi001(sd); struct msi001 *s = sd_to_msi001(sd);
dev_dbg(&spi->dev, "%s:\n", __func__);
dev_dbg(&spi->dev, "\n");
/* /*
* Registered by v4l2_spi_new_subdev() from master driver, but we must * Registered by v4l2_spi_new_subdev() from master driver, but we must
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment