zmk driver for PIXART PAW3222 optical sensor
0

Configure Feed

Select the types of activity you want to include in your feed.

Update power GPIO handling in power management actions

+3 -3
+3 -3
src/paw3222.c
··· 443 443 444 444 #if DT_INST_NODE_HAS_PROP(0, power_gpios) 445 445 if (gpio_is_ready_dt(&cfg->power_gpio)) { 446 - ret = gpio_pin_set_dt(&cfg->power_gpio, 0); 446 + ret = gpio_pin_configure_dt(&cfg->power_gpio, GPIO_DISCONNECTED); 447 447 if (ret < 0) { 448 - LOG_ERR("Failed to disable power: %d", ret); 448 + LOG_ERR("Failed to disconnect power: %d", ret); 449 449 return ret; 450 450 } 451 451 } ··· 455 455 case PM_DEVICE_ACTION_RESUME: 456 456 #if DT_INST_NODE_HAS_PROP(0, power_gpios) 457 457 if (gpio_is_ready_dt(&cfg->power_gpio)) { 458 - ret = gpio_pin_set_dt(&cfg->power_gpio, 1); 458 + ret = gpio_pin_configure_dt(&cfg->power_gpio, GPIO_OUTPUT_ACTIVE); 459 459 if (ret < 0) { 460 460 LOG_ERR("Failed to enable power: %d", ret); 461 461 return ret;