drivers: pwm: pwm_nrfx: Fix driver suspending

This commit clears current settings of the PWM perihperal
that are stored inside device structure.
This makes sure that PWM period and prescaler is configured
as expected after driver was suspended.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
This commit is contained in:
Radoslaw Koppel 2021-06-17 17:23:55 +02:00 committed by Kumar Gala
commit 2d2bc55f51

View file

@ -288,6 +288,8 @@ static void pwm_nrfx_uninit(const struct device *dev)
const struct pwm_nrfx_config *config = dev->config;
nrfx_pwm_uninit(&config->pwm);
memset(dev->data, 0, sizeof(struct pwm_nrfx_data));
}
static int pwm_nrfx_set_power_state(uint32_t new_state,