linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v3 0/2] pwm: imx: Configure output to GPIO in disabled state
@ 2018-12-06 13:41 Vokáč Michal
  2018-12-06 13:41 ` [RFC PATCH v3 1/2] dt-bindings: pwm: imx: Allow switching PWM output between PWM and GPIO Vokáč Michal
  2018-12-06 13:41 ` [RFC PATCH v3 2/2] pwm: imx: Configure output to GPIO in disabled state Vokáč Michal
  0 siblings, 2 replies; 21+ messages in thread
From: Vokáč Michal @ 2018-12-06 13:41 UTC (permalink / raw)
  To: Thierry Reding, Rob Herring
  Cc: Mark Rutland, devicetree, linux-pwm, linux-kernel,
	Lukasz Majewski, Fabio Estevam, Lothar Waßmann,
	Linus Walleij, Vokáč Michal

This is an attempt to deal with i.MX SoC PWM HW limitation.
When a pad is configured as a PWM output the output level is always 0V
if the PWM block is disabled. This can cause problems when inverted PWM
signal is needed to drive the connected circuit. With inverted output
duty cycle = 0% corresponds to high output level and duty cycle = 100%
corresponds to low output level. This means that whenever the PWM block
is disabled the connected circuit is fed with 100% duty cycle.

This binding is totally optional and current users are not affected.
The idea is to use two new pinctrl states, "pwm" and "gpio", instead of
the "default" pinctrl state. The gpio state is selected  when PWM is
disabled and the pwm pinctrl state is selected when PWM is enabled. In the
gpio state level on the output is controlled by the internal pull-up.

Michal Vokáč (2):
  dt-bindings: pwm: imx: Allow switching PWM output between PWM and GPIO
  pwm: imx: Configure output to GPIO in disabled state

 Documentation/devicetree/bindings/pwm/imx-pwm.txt | 49 +++++++++++++++
 drivers/pwm/pwm-imx.c                             | 77 +++++++++++++++++++++++
 2 files changed, 126 insertions(+)

-- 
2.1.4


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2019-02-01 15:50 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-06 13:41 [RFC PATCH v3 0/2] pwm: imx: Configure output to GPIO in disabled state Vokáč Michal
2018-12-06 13:41 ` [RFC PATCH v3 1/2] dt-bindings: pwm: imx: Allow switching PWM output between PWM and GPIO Vokáč Michal
2018-12-10 23:16   ` Rob Herring
2018-12-14 13:45   ` Linus Walleij
2018-12-06 13:41 ` [RFC PATCH v3 2/2] pwm: imx: Configure output to GPIO in disabled state Vokáč Michal
2018-12-06 13:59   ` Uwe Kleine-König
2018-12-06 15:37     ` Vokáč Michal
2018-12-06 16:16       ` Uwe Kleine-König
2018-12-10 11:15         ` Vokáč Michal
2018-12-10 11:17           ` Uwe Kleine-König
2018-12-10 11:38             ` Vokáč Michal
2018-12-12  8:01   ` Uwe Kleine-König
2018-12-12 11:42     ` Vokáč Michal
2018-12-12 12:12       ` Uwe Kleine-König
2019-01-24  8:59         ` Michal Vokáč
2019-01-24  9:22           ` Uwe Kleine-König
2019-01-24 10:12             ` Michal Vokáč
2019-01-24 10:44               ` Uwe Kleine-König
2019-01-30 14:42                 ` Michal Vokáč
2019-01-30 15:39                   ` Uwe Kleine-König
2019-02-01 15:50                     ` Michal Vokáč

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).