GPI_PIN_END
#define ADP5588_GPIMAPSIZE_MAX (GPI_PIN_END - GPI_PIN_BASE + 1)
if (key_val >= GPI_PIN_BASE && key_val <= GPI_PIN_END) {