MCP23017 - detecting state of IOCON.BANK bit after MCU reset
My conclusion is that you cannot determine the state of IOCON.BANK, but you can however get it into a known value without resetting the MCP23017 using the following procedure:


Assume IOCON.BANK = 1
Read register 0x05.
Clear bit 7 (presumably the BANK bit) of the stored value then write that value back to 0x05.


At this point you have either:


Switched from BANK = 1 to BANK = 0


or


Disabled GPINTENB.GPINT7


To finish, set GPINTENB.GPINT7 if needed.

You now have a known state with IOCON.BANK = 0.