RE: Adding MAX1363 to BBB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

> -----Original Message-----
> From: Greg Wilson-Lindberg 
> Sent: Thursday, August 27, 2015 2:44 PM
> To: Greg Wilson-Lindberg; Michael Welling
> Cc: linux-iio@xxxxxxxxxxxxxxx
> Subject: RE: Adding MAX1363 to BBB
> 
>  
> 
> > -----Original Message-----
> > From: linux-iio-owner@xxxxxxxxxxxxxxx 
> > [mailto:linux-iio-owner@xxxxxxxxxxxxxxx] On Behalf Of Greg 
> > Wilson-Lindberg
> > Sent: Thursday, August 27, 2015 2:06 PM
> > To: Michael Welling
> > Cc: linux-iio@xxxxxxxxxxxxxxx
> > Subject: RE: Adding MAX1363 to BBB
> > 
> >  
> > 
> > > -----Original Message-----
> > > From: Michael Welling [mailto:mwelling79@xxxxxxxxx] On Behalf Of 
> > > Michael Welling
> > > Sent: Thursday, August 27, 2015 1:42 PM
> > > To: Greg Wilson-Lindberg
> > > Cc: linux-iio@xxxxxxxxxxxxxxx
> > > Subject: Re: Adding MAX1363 to BBB
> > > 
> > > On Thu, Aug 27, 2015 at 01:40:24PM -0700, Greg
> > Wilson-Lindberg wrote:
> > > >  
> > > > 
> > > > > -----Original Message-----
> > > > > From: Michael Welling [mailto:mwelling79@xxxxxxxxx] On
> > Behalf Of
> > > > > Michael Welling
> > > > > Sent: Thursday, August 27, 2015 12:16 PM
> > > > > To: Greg Wilson-Lindberg
> > > > > Cc: linux-iio@xxxxxxxxxxxxxxx
> > > > > Subject: Re: Adding MAX1363 to BBB
> > > > > 
> > > > > On Thu, Aug 27, 2015 at 12:10:06PM -0700, Greg
> > > Wilson-Lindberg wrote:
> > > > > >  
> > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Michael Welling [mailto:mwelling79@xxxxxxxxx]
> > > On Behalf Of
> > > > > > > Michael Welling
> > > > > > > Sent: Monday, August 24, 2015 9:55 AM
> > > > > > > To: Greg Wilson-Lindberg
> > > > > > > Cc: linux-iio@xxxxxxxxxxxxxxx
> > > > > > > Subject: Re: Adding MAX1363 to BBB
> > > > > > > 
> > > > > > > On Mon, Aug 24, 2015 at 09:26:53AM -0700, Greg
> > > > > Wilson-Lindberg wrote:
> > > > > > > > I don't know if anybody on this list can answer this, we
> > > > > > > are going to add an IIO compatible Maxim MAX1363 4
> > > channel ADC
> > > > > > > to our BBB cape and I am not sure how to specify 
> in the dts
> > > > > file that
> > > > > > > it is connected to the I2C channel.
> > > > > > > > If anyone can give me suggestions, it would be greatly
> > > > > appreciated.
> > > > > > > >  
> > > > > > > 
> > > > > > > Give this a try:
> > > > > > > 
> > > > > > > &i2c1 {
> > > > > > > 	status = "okay";
> > > > > > > 
> > > > > > > 	adc@34 {
> > > > > > > 		compatible = "maxim,max1363";
> > > > > > > 		vcc-supply = <&reg_3v3>;
> > > > > > > 		reg = <0x34>;
> > > > > > > 	};
> > > > > > > };
> > > > > > > 
> > > > > > > This assume you have an i2c1 and reg_3v3 defined.
> > > > > > > 
> > > > > > > Here is a real example that looks like it uses the
> > > same driver:
> > > > > > > 
> > http://lxr.free-electrons.com/source/arch/arm/boot/dts/imx27-p
> > > > > > > hytec-phycard-s-rdk.dts?v=3.14#L56
> > > > > > > 
> > > > > > 
> > > > > > I've got the max1363 installed on a board and it is showing
> > > > > up as an I2C device, but not as an IIO device. I used
> > > your example
> > > > > above for the dts file.
> > > > > > 
> > > > > > Any thoughts?
> > > > > 
> > > > > Try using the following instead:
> > > > > &i2c1 {
> > > > > 	status = "okay";
> > > > > 
> > > > > 	adc@34 {
> > > > > 		compatible = "max1363";
> > > > > 		vcc-supply = <&reg_3v3>;
> > > > > 		reg = <0x34>;
> > > > > 	};
> > > > > };
> > > > 
> > > > I changed the dts to "max1363", but that didn't get it to
> > > show up under iio devices.
> > > > 
> > > 
> > > Is the driver compiled into the kernel or a module?
> > 
> > Duh, surprisingly, it was not compiled in at all, that's what I get 
> > for thinking everything was enabled.
> > 
> > I compiled it as a module and then I tested it both with 
> the dts set 
> > to "max1363" and "maxim,max1363" and lsmod says the module isn't 
> > loaded. I think that I'll build the kernel with it compiled in.
> > 
> 
> I compiled in the max1363 and tsadc drivers (and IIO 
> subsystem) and with the dts set to "maxim,max1363" the 
> max1363 is showing up as 
> /sys/devices/ocp/4819c000.i2c/i2c-2/2-0034/iio:device0.
> 
> So now all I have to do is get the read routines working with it.
> 
> Again, thanks for all of your help.
> 

I've got the system running, but I get an invalid argument error on the call to iio_buffer_refill().  I'm basically using the same code as for the tsadc, just added in a fourth channel, and none of the setup calls are returning errors, but the first iio_buffer_refill() call returns an error.  I've dumped out the parameter that is being passed to the iio_buffer_refill() call and it is the same as the value that was returned from the iio_device_create_buffer() call.

I've looked at the libiio source and I don't see anything obvious that should return invalid argument for the iio_buffer_refill() call.


> > > 
> > > > > 
> > > > > > 
> > > > > > > 
> > > > > > > > Greg Wilson-Lindberg
> > > > > > > > Sakura Finetek
> > > > > > > > 310-783-5075
> > > > > > > > --
> > > > > > > > To unsubscribe from this list: send the line 
> "unsubscribe
> > > > > > > linux-iio" 
> > > > > > > > in the body of a message to 
> majordomo@xxxxxxxxxxxxxxx More
> > > > > > > majordomo
> > > > > > > > info at  http://vger.kernel.org/majordomo-info.html
> > > > > > > 
> > > > > 
> > > --
> > To unsubscribe from this list: send the line "unsubscribe 
> linux-iio" 
> > in the body of a message to majordomo@xxxxxxxxxxxxxxx More 
> majordomo 
> > info at http://vger.kernel.org/majordomo-info.html
> > --
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux