lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20121123075537.A14713E0A91@localhost>
Date:	Fri, 23 Nov 2012 07:55:37 +0000
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Peter Ujfalusi <peter.ujfalusi@...com>,
	Linus Walleij <linus.walleij@...aro.org>
Cc:	Rob Landley <rob@...dley.net>, devicetree-discuss@...ts.ozlabs.org,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	linux-omap@...r.kernel.org
Subject: Re: [PATCH] gpio: New driver for GPO emulation using PWM generators

On Thu, 22 Nov 2012 14:42:03 +0100, Peter Ujfalusi <peter.ujfalusi@...com> wrote:
> There seams to be board designs using PWM generators as enable/disable signals.
> For these boards we used to have custom code as hacks to deal with such a
> situations.
> With the gpio-pwm driver we can emulate the GPIO functionality using PWM
> generators via standard interfaces. The PWM will be configured to be off
> when the GPIO is off and to full duty cycle when the GPIO is requested to be
> on.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
> ---
> Hi Linus,
> 
> So this is the driver I came up regarding to the issue that some boards
> (BeagleBoard for example) are using the PWM generators as enable/disable signal.
> 
> On BeagleBoard the situation is like this:
> TWL4030 PWMA -> TWL4030 LEDA -> nUSBHOST_PWR_EN -> external power switch -> USB
> host hub power.
> 
> So I have tested this driver on BeagleBoard:
> - Custom code to toggle the GPIO just to see if it switches correctly
> 
> - Real life usecase:
> fixed voltage regulator with GPIO control (the gpio is the gpio-pwm provided).
> ehci-omap has been modified to allow deferred probe.
> the regulator is used by ehci-omap.
> 
> All works fine.

Ugh. and this is why I wanted the PWM and GPIO subsystems to use the
same namespace and binding. <grumble, mutter> But that's not your fault.

It's pretty horrible to have a separate translator node to convert a PWM
into a GPIO (with output only of course). The gpio properties should
appear directly in the PWM node itself and the translation code should
be in either the pwm or the gpio core. I don't think it should look like
a separate device.

g.

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ