Re: [GIT PATCHES for 2.6.38] Zilog Z8 IR unit fixes

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

 



On Jan 19, 2011, at 3:08 PM, Jarod Wilson wrote:

> On Jan 19, 2011, at 12:43 PM, Jean Delvare wrote:
> 
>> Preliminary technical nitpicking: you can't actually pass two addresses
>> in i2c_board_info, so the second address has to be passed as platform
>> data.
>> 
>> I am sorry if you expected an authoritative answer, but... both options
>> are actually possible.
>> 
>> If you use a single call to i2c_new_device(), you'll have a single
>> i2c_client to start with, and you'll have to instantiate the second one
>> in the probe function using i2c_new_dummy().
>> 
>> If you instead decide to call i2c_new_device() twice, there will be two
>> calls to the probe function (which can be the same one in a single
>> driver, or two different ones in separate drivers, at your option.) If
>> any synchronization is needed between the two i2c_clients, you have to
>> use the bridge driver as a relay, as Andy proposed doing already.
>> 
>> Really, both are possible, and the two options aren't that different in
>> the end. I can't think of anything that can be done with one that
>> couldn't be achieved with the other.
> 
> Yeah, see my follow-up mail. The code in hdpvr-i2c.c is clearly a bit
> off now, and only worked in my testing, as at the time, I was using
> an older lirc_zilog from prior to Andy's changes that still used the
> old style binding and probing directly in the driver. I'm working on
> fixing up hdpvr-i2c further right now, and will do some more prodding
> with pvrusb2, the code for which looks correct with two i2c_new_device()
> calls in it, one for each address, so I just need to figure out why
> lirc_zilog is getting an -EIO trying to get tx brought up.

So as we were discussing on irc today, the -EIO is within lirc_zilog's
send_boot_data() function. The firmware is loaded, and then we send the
z8 a command to activate the firmware, immediately follow by an attempt
to read the firmware version. The z8 is still busy when we do that, and
throwing in a simple mdelay() remedies the problem for both the hvr-1950
and the hdpvr -- tried 100 initially, and all the way down to 20 still
worked, didn't try any lower.

And I definitely horked up the hdpvr i2c a bit, but have a follow-up
patch that goes back to doing the right thing with two i2c_new_device()
calls, which I've successfully tested with the latest lirc_zilog plus
mdelay patch.

Will post patches tomorrow though, its already past my bed time.

-- 
Jarod Wilson
jarod@xxxxxxxxxxxx



--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux