Re: [PATCH v2 1/1] pwm: pca9685: fix gpio-only operation.

2017-04-12 Thread Sven Van Asbroeck
On Wed, Apr 12, 2017 at 4:53 AM, Mika Westerberg wrote: > Looks like going to the right direction. Thanks, I appreciate your comments ! >> +static void pca9685_pwm_gpio_free(struct gpio_chip *gpio, unsigned int >> offset) > Why did you move the function here? Because I added code that disables

Re: [PATCH v2 1/1] pwm: pca9685: fix gpio-only operation.

2017-04-12 Thread Mika Westerberg
On Tue, Apr 11, 2017 at 03:19:05PM -0400, Sven Van Asbroeck wrote: > gpio-only driver operation never clears the SLEEP bit, which can > cause the gpios to become unusable. > > Example: > 1. user requests first pwm -> driver clears SLEEP bit > 2. user frees last pwm -> driver sets S

[PATCH v2 1/1] pwm: pca9685: fix gpio-only operation.

2017-04-11 Thread Sven Van Asbroeck
gpio-only driver operation never clears the SLEEP bit, which can cause the gpios to become unusable. Example: 1. user requests first pwm -> driver clears SLEEP bit 2. user frees last pwm -> driver sets SLEEP bit 3. user requests gpio 4. user switches gpio on-> output does