drivers/iio/dac/adi-axi-dac.c | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-)
This patchset is intended to fix a random wrong chip ID read, or a
scratchpad test mismatch, tests done in the ad3552r-hs driver probe. The
bus "read" operation must always check for busy flag before reading.
First patch fixes the wrong bus read occurence, second patch reorganizes
a bit the busy-wait polling code.
NOTE: due to ongoing changes in adi-axi-dac.c, this patch is intended to be
applied after the linked "ramp generator" patch.
Link: https://lore.kernel.org/linux-iio/20250408-wip-bl-ad3552r-fixes-v4-0-b33c0264bd78@baylibre.com
Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
---
Changes in v3:
- fix axi_dac_wait_bus_free(), 0 must be checked on poll, not -1. Someway
failed testing it here initially.
- Link to v2: https://lore.kernel.org/r/20250409-ad3552r-fix-bus-read-v2-0-34d3b21e8ca0@baylibre.com
Changes in v2:
- invert patch order, fix first.
- Link to v1: https://lore.kernel.org/r/20250408-ad3552r-fix-bus-read-v1-0-37add66aeb08@baylibre.com
---
Angelo Dureghello (2):
iio: dac: adi-axi-dac: fix bus read
iio: dac: adi-axi-dac: use unique bus free check
drivers/iio/dac/adi-axi-dac.c | 40 +++++++++++++++++++++++++---------------
1 file changed, 25 insertions(+), 15 deletions(-)
---
base-commit: 6fb85f14853ddde06d57030c753168402bf69cd9
change-id: 20250408-ad3552r-fix-bus-read-1522622fbd2b
Best regards,
--
Angelo Dureghello <adureghello@baylibre.com>
On Fri, 2025-05-23 at 11:00 +0200, Angelo Dureghello wrote: > This patchset is intended to fix a random wrong chip ID read, or a > scratchpad test mismatch, tests done in the ad3552r-hs driver probe. The > bus "read" operation must always check for busy flag before reading. > > First patch fixes the wrong bus read occurence, second patch reorganizes > a bit the busy-wait polling code. > > NOTE: due to ongoing changes in adi-axi-dac.c, this patch is intended to be > applied after the linked "ramp generator" patch. > > Link: > https://lore.kernel.org/linux-iio/20250408-wip-bl-ad3552r-fixes-v4-0-b33c0264bd78@baylibre.com > Signed-off-by: Angelo Dureghello <adureghello@baylibre.com> > --- Reviewed-by: Nuno Sá <nuno.sa@analog.com> > Changes in v3: > - fix axi_dac_wait_bus_free(), 0 must be checked on poll, not -1. Someway > failed testing it here initially. > - Link to v2: > https://lore.kernel.org/r/20250409-ad3552r-fix-bus-read-v2-0-34d3b21e8ca0@baylibre.com > > Changes in v2: > - invert patch order, fix first. > - Link to v1: > https://lore.kernel.org/r/20250408-ad3552r-fix-bus-read-v1-0-37add66aeb08@baylibre.com > > --- > Angelo Dureghello (2): > iio: dac: adi-axi-dac: fix bus read > iio: dac: adi-axi-dac: use unique bus free check > > drivers/iio/dac/adi-axi-dac.c | 40 +++++++++++++++++++++++++--------------- > 1 file changed, 25 insertions(+), 15 deletions(-) > --- > base-commit: 6fb85f14853ddde06d57030c753168402bf69cd9 > change-id: 20250408-ad3552r-fix-bus-read-1522622fbd2b > > Best regards,
On Fri, 23 May 2025 14:36:50 +0100 Nuno Sá <noname.nuno@gmail.com> wrote: > On Fri, 2025-05-23 at 11:00 +0200, Angelo Dureghello wrote: > > This patchset is intended to fix a random wrong chip ID read, or a > > scratchpad test mismatch, tests done in the ad3552r-hs driver probe. The > > bus "read" operation must always check for busy flag before reading. > > > > First patch fixes the wrong bus read occurence, second patch reorganizes > > a bit the busy-wait polling code. > > > > NOTE: due to ongoing changes in adi-axi-dac.c, this patch is intended to be > > applied after the linked "ramp generator" patch. > > > > Link: > > https://lore.kernel.org/linux-iio/20250408-wip-bl-ad3552r-fixes-v4-0-b33c0264bd78@baylibre.com > > Signed-off-by: Angelo Dureghello <adureghello@baylibre.com> > > --- > > Reviewed-by: Nuno Sá <nuno.sa@analog.com> Applied patch 2 - though note I'll be rebasing on rc1 once that is out so for now this will only appear as testing. > > > Changes in v3: > > - fix axi_dac_wait_bus_free(), 0 must be checked on poll, not -1. Someway > > failed testing it here initially. > > - Link to v2: > > https://lore.kernel.org/r/20250409-ad3552r-fix-bus-read-v2-0-34d3b21e8ca0@baylibre.com > > > > Changes in v2: > > - invert patch order, fix first. > > - Link to v1: > > https://lore.kernel.org/r/20250408-ad3552r-fix-bus-read-v1-0-37add66aeb08@baylibre.com > > > > --- > > Angelo Dureghello (2): > > iio: dac: adi-axi-dac: fix bus read > > iio: dac: adi-axi-dac: use unique bus free check > > > > drivers/iio/dac/adi-axi-dac.c | 40 +++++++++++++++++++++++++--------------- > > 1 file changed, 25 insertions(+), 15 deletions(-) > > --- > > base-commit: 6fb85f14853ddde06d57030c753168402bf69cd9 > > change-id: 20250408-ad3552r-fix-bus-read-1522622fbd2b > > > > Best regards,
© 2016 - 2025 Red Hat, Inc.