HP 59306A problem with the gpib_bitbang driver in the 4.3.4 and 4.3.5 releases

Vladimir Vassilev <[email protected]> Fri, 4 Nov 2022 20:17:26 +0100
Newsgroups gmane.linux.hardware.gpib.general
Message-ID <[email protected]>
Hi,

I created a Debian package and tested the latest 4.3.5 release on a 
Raspberry Pi with the gpib_bitbang driver and a lsi-gpib4pi-1.1 shield 
(with sn7516x drivers).

I noticed that my testcases for one particular device (HP 59306A) were 
failing while the rest (Agilent E3647A, etc.) were completing OK.


The write operations to that ancient relay actuator (probably the first 
standard IEEE 488 device) were completing OK but no effect was taking place.


I managed to reproduce the issue for the previous release 4.3.4 too so 
this is not an issue introduced in 4.3.5.


In the end after comparing with older driver versions I found that one 
needs to apply this patch and the problem is gone.


--- a/linux-gpib-kernel/drivers/gpib/gpio/gpib_bitbang.c
+++ b/linux-gpib-kernel/drivers/gpib/gpio/gpib_bitbang.c
@@ -1026,7 +1026,7 @@ gpib_interface_t bb_interface =
  static int __init bb_init_module(void)
  {
          gpib_register_driver(&bb_interface, THIS_MODULE);
-
+        gpio_direction_output(0, 0); // workaround without this line 
accessing HP 59306A device does not work
          dbg_printk(1,"module loaded%s",(sn7516x_used)?" with SN7516x 
driver support":"");
          return 0;
  }


That said it seems like this workaround without proper gpio request just 
providing 0 as gpio argument is a bug ... or probably a feature that I 
was not able to find anything in the documentation is used. So for now I 
will not push a patch proposal.


/V



_______________________________________________
Linux-gpib-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-gpib-general