All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Fischer <fischerdouglasc@gmail.com>
To: linux-media@vger.kernel.org
Subject: [PATCH] media: radio: Critical interrupt bugfix for si470x over i2c
Date: Thu, 18 Jan 2018 15:00:21 -0500	[thread overview]
Message-ID: <20180118150021.783eeb6a@Constantine> (raw)

Fixed si470x_start() disabling the interrupt signal, causing tune
operations to never complete. This does not affect USB radios
because they poll the registers instead of using the IRQ line.

Signed-off-by: Douglas Fischer <fischerdouglasc@gmail.com>
---

diff -uprN linux.orig/drivers/media/radio/si470x/radio-si470x-common.c
linux/drivers/media/radio/si470x/radio-si470x-common.c ---
linux.orig/drivers/media/radio/si470x/radio-si470x-common.c
2018-01-15 21:58:10.675620432 -0500 +++
linux/drivers/media/radio/si470x/radio-si470x-common.c
2018-01-16 16:54:23.699770645 -0500 @@ -377,8 +377,13 @@ int
si470x_start(struct si470x_device *r goto done; /* sysconfig 1 */
-	radio->registers[SYSCONFIG1] =
-		(de << 11) & SYSCONFIG1_DE;		/* DE*/
+	radio->registers[SYSCONFIG1] |= SYSCONFIG1_RDSIEN;
+	radio->registers[SYSCONFIG1] |= SYSCONFIG1_STCIEN;
+	radio->registers[SYSCONFIG1] |= SYSCONFIG1_RDS;
+	radio->registers[SYSCONFIG1] &= ~SYSCONFIG1_GPIO2;
+	radio->registers[SYSCONFIG1] |= 0x1 << 2;
+	if (de)
+		radio->registers[SYSCONFIG1] |= SYSCONFIG1_DE;
 	retval = si470x_set_register(radio, SYSCONFIG1);
 	if (retval < 0)
 		goto done;

             reply	other threads:[~2018-01-18 20:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 20:00 Douglas Fischer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-01-20 19:18 [PATCH] media: radio: Critical interrupt bugfix for si470x over i2c Douglas Fischer
2018-01-26 23:42 Douglas Fischer
2018-02-15 14:38 ` Hans Verkuil
2018-02-24 22:40   ` Douglas Fischer

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=20180118150021.783eeb6a@Constantine \
    --to=fischerdouglasc@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.