Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1625415
| From | Sven Van Asbroeck <thesven73@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 1/1] pwm: pca9685: fix gpio-only operation. |
| Date | 2017-04-18 18:00 +0200 |
| Message-ID | <txDHQ-7VF-13@gated-at.bofh.it> (permalink) |
| References | <tvMvU-388-5@gated-at.bofh.it> <tvMvU-388-7@gated-at.bofh.it> <txxsJ-4oB-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Thanks for the feedback Andy !! > I would go with > > /* Wait for @sleep microseconds for the oscillator to be back up */ > if (sleep) > udelay(sleep); > > Otherwise int sleep is oddly here. > > Or > > bool sleep > > /* Wait 500us ... */ > if (sleep) > udelay(500); > >> +} I think you may be getting confused between: - the chip's SLEEP bit (int sleep) - the amount of time to delay after chip comes _out of_ sleep. (always 500 us) If it's confusing for you, it might be confusing for others? Perhaps change the parameter to 'bool sleep_bit' or 'bool do_sleep' to make the distinction clearer? > __maybe_unused and remove ugly #ifdef:ery. If this works on non- CONFIG_PM systems, I'm all for it ! Grepping the drivers/ directory, I see that some drivers use #ifdef CONFIG_PM, some use __maybe_unused for runtime_pm. Mika and Thierry, thoughts ?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 0/1] pwm: pca9685: fix gpio-only operation. Sven Van Asbroeck <thesven73@gmail.com> - 2017-04-13 15:00 +0200
[PATCH v4 1/1] pwm: pca9685: fix gpio-only operation. Sven Van Asbroeck <thesven73@gmail.com> - 2017-04-13 15:00 +0200
Re: [PATCH v4 1/1] pwm: pca9685: fix gpio-only operation. Thierry Reding <thierry.reding@gmail.com> - 2017-04-13 17:40 +0200
Re: [PATCH v4 1/1] pwm: pca9685: fix gpio-only operation. Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-04-18 11:20 +0200
Re: [PATCH v4 1/1] pwm: pca9685: fix gpio-only operation. Sven Van Asbroeck <thesven73@gmail.com> - 2017-04-18 18:00 +0200
Re: [PATCH v4 1/1] pwm: pca9685: fix gpio-only operation. Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-04-19 22:30 +0200
Re: [PATCH v4 1/1] pwm: pca9685: fix gpio-only operation. Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-04-20 09:30 +0200
Re: [PATCH v4 1/1] pwm: pca9685: fix gpio-only operation. Sven Van Asbroeck <thesven73@gmail.com> - 2017-04-20 16:20 +0200
Re: [PATCH v4 1/1] pwm: pca9685: fix gpio-only operation. Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-04-20 17:10 +0200
Re: [PATCH v4 1/1] pwm: pca9685: fix gpio-only operation. Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-04-20 18:00 +0200
Re: [PATCH v4 1/1] pwm: pca9685: fix gpio-only operation. Sven Van Asbroeck <thesven73@gmail.com> - 2017-04-20 18:00 +0200
Re: [PATCH v4 1/1] pwm: pca9685: fix gpio-only operation. Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-04-20 18:20 +0200
csiph-web