/* Gets the state of input pins of the PCA953X I/O Port and stores in driver data struct.  */
static int update_input(const struct device *dev)
/* Gets the state of input pins of the PCA953X I/O Port and stores in driver data struct.  */
static int update_input(const struct device *dev)
{
	const struct pca953x_config *cfg = dev->config;
	struct pca953x_drv_data *drv_data = dev->data;
	uint8_t input_states;
	int rc = 0;
	rc = i2c_reg_read_byte_dt(&cfg->i2c, PCA953X_INPUT_PORT, &input_states);
	if (rc == 0) {
		drv_data->pin_state.input = input_states;
	}
	return rc;
}