<br><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="EN-US" vlink="purple" link="blue">
<div>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">You may need to use</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">smbus_send_byte(hub_address, hub_channel);</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">or</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">smbus_write_byte(hub_address, hub_channel);</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p></div></div></blockquote>
<div> </div>
<div>smbus_write_byte may need three parametres, smbus_write_byte(device ,address ,val).</div>
<div>for PCA9545 to enable one channel need four steps ,</div>
<div> </div>
<div>1. outb(hub_address, base_io+02)</div>
<div>2. outb(hub_channel, base_io +03)</div>
<div>3. outb(0x04, base_io + 00)</div>
<div>4. test  inb(base_io+01)   </div>
<div> </div>
<div>it is a little different from PCA9556/PCA9557. as I look at the code , use smbus_write_byte may not make pca9545 work . </div>
<div>use smbus_send_byte(device,val) , I get the output:</div>
<div> </div>
<div>No memory for this cpu</div>
<div>No memory</div>
<div> </div>
<div>so I change below</div>
<div>outb(val, smbus_io_base + SMBHSTCMD);</div>
<div>then everything works fine.</div>
<div>so I think smbus_send_byte(device,val) ,device should be the HUB_ADDRESS , and val is the HUB_CHANNEL. is it right?</div>
<div> </div>
<div>bxshi</div>
<div> </div>