/* Read current logic level of all IO pins  */
int pca953x_get_val(uint8_t chip)
/* Read current logic level of all IO pins  */
int pca953x_get_val(uint8_t chip)
{
	uint8_t val;
	if (i2c_read(chip, 0, 1, &val, 1))
		return -1;
	return (int)val;
}