Commit 961aa783 authored by Rene Habraken's avatar Rene Habraken
Browse files

added patches to enable 4 converters in driver

parent bf84ec59
From 151787cf7a56b56dff8568805610903f74aeaf85 Mon Sep 17 00:00:00 2001
From: rhabraken <r.habraken@science.ru.nl>
Date: Thu, 23 Jul 2020 19:03:14 +0200
Subject: [PATCH] changed resolution and octets
---
drivers/iio/adc/ad9680.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/adc/ad9680.c b/drivers/iio/adc/ad9680.c
index 733e5e31e096..d4943c89e017 100644
--- a/drivers/iio/adc/ad9680.c
+++ b/drivers/iio/adc/ad9680.c
@@ -1190,10 +1190,10 @@ static int ad9694_setup(struct spi_device *spi)
link_config.lane_mux[i] = i;
}
link_config.num_converters = 2;
- link_config.octets_per_frame = 1;
+ link_config.octets_per_frame = 2;
link_config.frames_per_multiframe = 32;
- link_config.converter_resolution = 8;
- link_config.bits_per_sample = 8;
+ link_config.converter_resolution = 16;
+ link_config.bits_per_sample = 16;
link_config.scrambling = true;
if (conv->sysref_clk) {
--
2.17.1
From 1fdeaa49cb23f95b9ad43c05ca374ccfac335df7 Mon Sep 17 00:00:00 2001
From: rhabraken <r.habraken@science.ru.nl>
Date: Tue, 21 Jul 2020 20:54:04 +0200
Subject: [PATCH] disabled watchdog rest
Signed-off-by: rhabraken <r.habraken@science.ru.nl>
---
drivers/iio/adc/ad9680.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ad9680.c b/drivers/iio/adc/ad9680.c
index e1d450c1f64d..4782c7cf35d8 100644
--- a/drivers/iio/adc/ad9680.c
+++ b/drivers/iio/adc/ad9680.c
@@ -1324,7 +1324,7 @@ static int ad9694_setup(struct spi_device *spi)
return ret;
}
- schedule_delayed_work(&conv->watchdog_work, HZ);
+// schedule_delayed_work(&conv->watchdog_work, HZ);
conv->sample_rate_read_only = true;
@@ -1588,7 +1588,7 @@ static int ad9680_remove(struct spi_device *spi)
{
struct axiadc_converter *conv = spi_get_drvdata(spi);
- cancel_delayed_work_sync(&conv->watchdog_work);
+ //cancel_delayed_work_sync(&conv->watchdog_work);
clk_disable_unprepare(conv->clk);
return 0;
--
2.17.1
From 2633134eaaf666eb165f884b8b1acadcb3a4e6ab Mon Sep 17 00:00:00 2001
From: rhabraken <r.habraken@science.ru.nl>
Date: Tue, 21 Jul 2020 18:02:54 +0200
Subject: [PATCH] disabled watchdog
Signed-off-by: rhabraken <r.habraken@science.ru.nl>
---
drivers/iio/adc/ad9680.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/ad9680.c b/drivers/iio/adc/ad9680.c
index f8f816dde8e4..e1d450c1f64d 100644
--- a/drivers/iio/adc/ad9680.c
+++ b/drivers/iio/adc/ad9680.c
@@ -1499,7 +1499,7 @@ static int ad9680_probe(struct spi_device *spi)
conv->adc_clkscale.mult = 1;
conv->adc_clkscale.div = 1;
- INIT_DELAYED_WORK(&conv->watchdog_work, ad9694_serdes_pll_watchdog);
+ //INIT_DELAYED_WORK(&conv->watchdog_work, ad9694_serdes_pll_watchdog);
spi_set_drvdata(spi, conv);
conv->spi = spi;
--
2.17.1
From 855812905519413b230e4c6decc8d5955edc41be Mon Sep 17 00:00:00 2001
From: rhabraken <r.habraken@science.ru.nl>
Date: Fri, 24 Jul 2020 15:20:30 +0200
Subject: [PATCH] real bits to 14
---
drivers/iio/adc/ad9680.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/ad9680.c b/drivers/iio/adc/ad9680.c
index 0914f30c8b52..3447a5d32f77 100644
--- a/drivers/iio/adc/ad9680.c
+++ b/drivers/iio/adc/ad9680.c
@@ -606,7 +606,7 @@ static const struct iio_event_spec ad9680_events[] = {
.scan_index = _chan, \
.scan_type = { \
.sign = 'S', \
- .realbits = 16, \
+ .realbits = 14, \
.storagebits = 16, \
.shift = 0, \
}, \
--
2.17.1
From 35e038059ca79c3bac92c7f04d33f3465a30ae47 Mon Sep 17 00:00:00 2001
From: rhabraken <r.habraken@science.ru.nl>
Date: Thu, 23 Jul 2020 19:18:35 +0200
Subject: [PATCH] sample rate and define
---
drivers/iio/adc/ad9680.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/adc/ad9680.c b/drivers/iio/adc/ad9680.c
index d4943c89e017..0914f30c8b52 100644
--- a/drivers/iio/adc/ad9680.c
+++ b/drivers/iio/adc/ad9680.c
@@ -606,8 +606,8 @@ static const struct iio_event_spec ad9680_events[] = {
.scan_index = _chan, \
.scan_type = { \
.sign = 'S', \
- .realbits = 8, \
- .storagebits = 8, \
+ .realbits = 16, \
+ .storagebits = 16, \
.shift = 0, \
}, \
.event_spec = ad9680_events, \
@@ -802,7 +802,7 @@ static int ad9680_setup_jesd204_link(struct axiadc_converter *conv,
int ret;
sysref_rate = DIV_ROUND_CLOSEST(sample_rate, 32);
- lane_rate_kHz = DIV_ROUND_CLOSEST(sample_rate, 100);
+ lane_rate_kHz = DIV_ROUND_CLOSEST(sample_rate, 50);
if (lane_rate_kHz < 3125000 || lane_rate_kHz > 12500000) {
dev_err(&conv->spi->dev, "Lane rate %lu Mbps out of bounds. Must be between 3125 and 12500 Mbps",
@@ -1115,7 +1115,7 @@ static int ad9694_setup_jesd204_link(struct axiadc_converter *conv,
sysref_rate = DIV_ROUND_CLOSEST(sample_rate, 128);
else
sysref_rate = DIV_ROUND_CLOSEST(sample_rate, 32);
- lane_rate_kHz = DIV_ROUND_CLOSEST(sample_rate, 100);
+ lane_rate_kHz = DIV_ROUND_CLOSEST(sample_rate, 50);
if (lane_rate_kHz < 1687500 || lane_rate_kHz > 15000000) {
dev_err(&conv->spi->dev, "Lane rate %lu Mbps out of bounds. Must be between 1687.5 and 15000 Mbps",
--
2.17.1
......@@ -24,6 +24,7 @@ file://0001-disabled-watchdog.patch \
file://0001-disabled-watchdog-rest.patch \
file://0001-changed-resolution-and-octets.patch \
file://0001-sample-rate-and-define.patch \
file://0001-real-bits-to-14.patch \
"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
Supports Markdown
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