2010-07-28 15:23:35     ADE7758 driver

Document created by Aaronwu Employee on Aug 22, 2013
Version 1Show Document
  • View in full screen mode

2010-07-28 15:23:35     ADE7758 driver

Allister Mannion (AFGHANISTAN)

Message: 91823   

 

Dear Mr. Song,

 

I bet this isn't the right place to address this, but...

 

I've had some success using your ADE7758 driver today. I found the reason I was always getting '0' back from all the sysfs registry entries; an identical bug in the:

 

ade7758_spi_read_reg_8

 

ade7758_spi_read_reg_16

 

ade7758_spi_read_reg_16

 

functions. The rx_buf component of the spi_transfer was not being set in any of the functions. So each should be modified from:

 

struct spi_transfer xfers[] = {

                {

                        .tx_buf = st->tx,

                        .bits_per_word = 8,

                        .len = 4,

                },

        };

 

to:

 

struct spi_transfer xfers[] = {

                {

                        .tx_buf = st->tx,

                        .rx_buf = st->rx,

                        .bits_per_word = 8,

                        .len = 4,

                },

        };

 

 

 

I hope this helps.

 

I really need some help into integrating this into the IIO structure, but I'll save this for another post

 

Allister

QuoteReplyEditDelete

 

 

2010-07-28 15:34:04     Re: ADE7758 driver

Mike Frysinger (UNITED STATES)

Message: 91824   

 

this is the right place for any Linux driver for any Analog Devices part

QuoteReplyEditDelete

 

 

2010-08-01 22:33:34     Re: ADE7758 driver

Barry Song (CHINA)

Message: 91990   

 

Allister,

 

You are right in this patch. We'll merge it. Thanks!

 

-barry

Attachments

    Outcomes