All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: "Vokáč Michal" <Michal.Vokac@ysoft.com>
Cc: "linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Gavin Schenk <g.schenk@eckelmann.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>
Subject: Re: RFC: don't let drivers issue pwm_disable after pwm_config(pwm, 0, period)
Date: Fri, 12 Oct 2018 17:47:58 +0200	[thread overview]
Message-ID: <20181012154758.eisrsrhf3exz35yx@pengutronix.de> (raw)
In-Reply-To: <3c0ec462-9f15-cbf2-51f6-5e7e70c68e48@ysoft.com>

Hello Michal,

On Fri, Oct 12, 2018 at 12:25:01PM +0000, Vokáč Michal wrote:
> >> Regarding the GPIO output configuration. Yes, the pin is configured as
> >> input in the imx_pwm_init_pinctrl_info() function. At this stage you
> >> do not really know how to configure the pin. Configuring it as input
> >> is the safest option I think.
> > 
> > Did it work without setting the gpio as output in your tests?
> 
> Yes, I am using it like that for aprox. 2 months without issues.

and you're sure the gpio is configured as output? Strange.
 
> >> I thought that the pin is configured as output whenever gpiod_set_value()
> >> is called. None of the other examples/usages in kernel I looked at used
> >> the gpiod_direction_output()
> > 
> > Maybe they use devm_gpio_request_one or similar that return your gpio's
> > direction already configured?
> 
> Nope. Examples I looked at (mainly I2C recovery) use only the gpiolib
> functions.

For example drivers/i2c/busses/i2c-imx.c uses devm_gpiod_get(&pdev->dev,
"scl", GPIOD_OUT_HIGH_OPEN_DRAIN); which configures as output (somewhat).

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2018-10-12 15:47 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-06 15:51 RFC: don't let drivers issue pwm_disable after pwm_config(pwm, 0, period) Uwe Kleine-König
2018-08-09 11:30 ` Thierry Reding
2018-08-09 15:23   ` Uwe Kleine-König
2018-08-20  9:52     ` Uwe Kleine-König
2018-08-20 14:43       ` [PATCH 0/2] specify the pin state after pwm_disable as explicitly undefined Uwe Kleine-König
2018-08-20 14:43         ` [PATCH 1/2] pwm: document the pin state after pwm_disable() to be undefined Uwe Kleine-König
2018-10-09  7:34           ` Thierry Reding
2018-10-09  9:04             ` Uwe Kleine-König
2018-10-16  7:44               ` Boris Brezillon
2018-10-16  9:07                 ` Uwe Kleine-König
2018-10-18  8:44                 ` Uwe Kleine-König
2018-10-18 14:44                   ` Thierry Reding
2018-10-18 20:43                     ` Uwe Kleine-König
2018-10-18 15:06                 ` Thierry Reding
2018-08-20 14:43         ` [PATCH 2/2] pwm: warn callers of pwm_apply_state() that expect a certain level after disabling Uwe Kleine-König
2018-09-04 20:37       ` RFC: don't let drivers issue pwm_disable after pwm_config(pwm, 0, period) Uwe Kleine-König
2018-09-21 16:02         ` Uwe Kleine-König
2018-09-27 18:26           ` Uwe Kleine-König
2018-09-27 20:29             ` Thierry Reding
2018-10-08 20:02               ` Uwe Kleine-König
2018-10-09  7:53 ` Thierry Reding
2018-10-09  9:35   ` Uwe Kleine-König
2018-10-10 12:26     ` Thierry Reding
2018-10-10 13:50       ` Vokáč Michal
2018-10-11 10:19       ` Uwe Kleine-König
2018-10-11 12:00         ` Thierry Reding
2018-10-11 13:15           ` Vokáč Michal
2018-10-12  9:45             ` Uwe Kleine-König
2018-10-12 10:11               ` Thierry Reding
2018-10-14 11:34                 ` Uwe Kleine-König
2018-10-15  8:14                   ` Uwe Kleine-König
2018-10-15  8:16                     ` Uwe Kleine-König
2018-10-15  9:28                     ` Thierry Reding
2018-10-15  9:22                   ` Thierry Reding
2018-10-15 12:33                     ` Uwe Kleine-König
2018-10-12 12:25               ` Vokáč Michal
2018-10-12 15:47                 ` Uwe Kleine-König [this message]
2018-10-11 20:34           ` Uwe Kleine-König
2018-10-12  9:53             ` Thierry Reding
2018-10-12 10:00               ` Thierry Reding
2018-10-12 17:14               ` Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181012154758.eisrsrhf3exz35yx@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=Michal.Vokac@ysoft.com \
    --cc=g.schenk@eckelmann.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-pwm@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.