* [PATCH] media: helene: fix xtal frequency setting at power on
@ 2018-05-16 8:41 Katsuhiro Suzuki
2018-05-16 10:56 ` Abylay Ospan
0 siblings, 1 reply; 2+ messages in thread
From: Katsuhiro Suzuki @ 2018-05-16 8:41 UTC (permalink / raw)
To: Abylay Ospan, Mauro Carvalho Chehab, linux-media
Cc: Masami Hiramatsu, Jassi Brar, linux-arm-kernel, linux-kernel,
Katsuhiro Suzuki
This patch fixes crystal frequency setting when power on this device.
Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
---
drivers/media/dvb-frontends/helene.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/media/dvb-frontends/helene.c b/drivers/media/dvb-frontends/helene.c
index 0a4f312c4368..8fcf7a00782a 100644
--- a/drivers/media/dvb-frontends/helene.c
+++ b/drivers/media/dvb-frontends/helene.c
@@ -924,7 +924,10 @@ static int helene_x_pon(struct helene_priv *priv)
helene_write_regs(priv, 0x99, cdata, sizeof(cdata));
/* 0x81 - 0x94 */
- data[0] = 0x18; /* xtal 24 MHz */
+ if (priv->xtal == SONY_HELENE_XTAL_16000)
+ data[0] = 0x10; /* xtal 16 MHz */
+ else
+ data[0] = 0x18; /* xtal 24 MHz */
data[1] = (uint8_t)(0x80 | (0x04 & 0x1F)); /* 4 x 25 = 100uA */
data[2] = (uint8_t)(0x80 | (0x26 & 0x7F)); /* 38 x 0.25 = 9.5pF */
data[3] = 0x80; /* REFOUT signal output 500mVpp */
--
2.17.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: helene: fix xtal frequency setting at power on
2018-05-16 8:41 [PATCH] media: helene: fix xtal frequency setting at power on Katsuhiro Suzuki
@ 2018-05-16 10:56 ` Abylay Ospan
0 siblings, 0 replies; 2+ messages in thread
From: Abylay Ospan @ 2018-05-16 10:56 UTC (permalink / raw)
To: Katsuhiro Suzuki
Cc: Mauro Carvalho Chehab, linux-media, Masami Hiramatsu, Jassi Brar,
linux-arm-kernel, linux-kernel
Acked-by: Abylay Ospan <aospan@netup.ru>
2018-05-16 4:41 GMT-04:00 Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>:
> This patch fixes crystal frequency setting when power on this device.
>
> Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
> ---
> drivers/media/dvb-frontends/helene.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/dvb-frontends/helene.c b/drivers/media/dvb-frontends/helene.c
> index 0a4f312c4368..8fcf7a00782a 100644
> --- a/drivers/media/dvb-frontends/helene.c
> +++ b/drivers/media/dvb-frontends/helene.c
> @@ -924,7 +924,10 @@ static int helene_x_pon(struct helene_priv *priv)
> helene_write_regs(priv, 0x99, cdata, sizeof(cdata));
>
> /* 0x81 - 0x94 */
> - data[0] = 0x18; /* xtal 24 MHz */
> + if (priv->xtal == SONY_HELENE_XTAL_16000)
> + data[0] = 0x10; /* xtal 16 MHz */
> + else
> + data[0] = 0x18; /* xtal 24 MHz */
> data[1] = (uint8_t)(0x80 | (0x04 & 0x1F)); /* 4 x 25 = 100uA */
> data[2] = (uint8_t)(0x80 | (0x26 & 0x7F)); /* 38 x 0.25 = 9.5pF */
> data[3] = 0x80; /* REFOUT signal output 500mVpp */
> --
> 2.17.0
>
--
Abylay Ospan,
NetUP Inc.
http://www.netup.tv
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-16 11:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-16 8:41 [PATCH] media: helene: fix xtal frequency setting at power on Katsuhiro Suzuki
2018-05-16 10:56 ` Abylay Ospan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).