diff --git a/esphome/components/mcp23008/mcp23008.cpp b/esphome/components/mcp23008/mcp23008.cpp index b7a4276c46..5f73e03f6f 100644 --- a/esphome/components/mcp23008/mcp23008.cpp +++ b/esphome/components/mcp23008/mcp23008.cpp @@ -23,11 +23,6 @@ void MCP23008::setup() { this->write_reg(mcp23x08_base::MCP23X08_IOCON, iocon | IOCON_ODR); } - // Clear any latched interrupt by reading GPIO before attaching ISR - if (this->interrupt_pin_ != nullptr) { - uint8_t val; - this->read_reg(mcp23x08_base::MCP23X08_GPIO, &val); - } this->setup_interrupt_pin_(); } diff --git a/esphome/components/mcp23017/mcp23017.cpp b/esphome/components/mcp23017/mcp23017.cpp index b1775f2402..212c15ccf2 100644 --- a/esphome/components/mcp23017/mcp23017.cpp +++ b/esphome/components/mcp23017/mcp23017.cpp @@ -33,12 +33,6 @@ void MCP23017::setup() { this->write_reg(mcp23x17_base::MCP23X17_IOCONB, iocon | iocon_flags); } - // Clear any latched interrupt by reading GPIO before attaching ISR - if (this->interrupt_pin_ != nullptr) { - uint8_t val; - this->read_reg(mcp23x17_base::MCP23X17_GPIOA, &val); - this->read_reg(mcp23x17_base::MCP23X17_GPIOB, &val); - } this->setup_interrupt_pin_(); } diff --git a/esphome/components/mcp23s08/mcp23s08.cpp b/esphome/components/mcp23s08/mcp23s08.cpp index 2291381646..983c1aa600 100644 --- a/esphome/components/mcp23s08/mcp23s08.cpp +++ b/esphome/components/mcp23s08/mcp23s08.cpp @@ -35,11 +35,6 @@ void MCP23S08::setup() { this->write_reg(mcp23x08_base::MCP23X08_IOCON, IOCON_SEQOP | IOCON_HAEN | IOCON_ODR); } - // Clear any latched interrupt by reading GPIO before attaching ISR - if (this->interrupt_pin_ != nullptr) { - uint8_t val; - this->read_reg(mcp23x08_base::MCP23X08_GPIO, &val); - } this->setup_interrupt_pin_(); } diff --git a/esphome/components/mcp23s17/mcp23s17.cpp b/esphome/components/mcp23s17/mcp23s17.cpp index f27b55c6f6..db9a34e230 100644 --- a/esphome/components/mcp23s17/mcp23s17.cpp +++ b/esphome/components/mcp23s17/mcp23s17.cpp @@ -51,12 +51,6 @@ void MCP23S17::setup() { this->write_reg(mcp23x17_base::MCP23X17_IOCONB, iocon_flags); } - // Clear any latched interrupt by reading GPIO before attaching ISR - if (this->interrupt_pin_ != nullptr) { - uint8_t val; - this->read_reg(mcp23x17_base::MCP23X17_GPIOA, &val); - this->read_reg(mcp23x17_base::MCP23X17_GPIOB, &val); - } this->setup_interrupt_pin_(); } diff --git a/esphome/components/pi4ioe5v6408/pi4ioe5v6408.cpp b/esphome/components/pi4ioe5v6408/pi4ioe5v6408.cpp index 610015bbe6..fe1df6cbb0 100644 --- a/esphome/components/pi4ioe5v6408/pi4ioe5v6408.cpp +++ b/esphome/components/pi4ioe5v6408/pi4ioe5v6408.cpp @@ -35,9 +35,6 @@ void PI4IOE5V6408Component::setup() { } if (this->interrupt_pin_ != nullptr) { - // Clear any latched interrupt status from before boot - uint8_t status; - this->read_byte(PI4IOE5V6408_REGISTER_INTERRUPT_STATUS, &status); this->interrupt_pin_->setup(); this->interrupt_pin_->attach_interrupt(&PI4IOE5V6408Component::gpio_intr, this, gpio::INTERRUPT_FALLING_EDGE); this->set_invalidate_on_read_(false);