[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdaNfHjfq9MZ9H2qBskKemR_x92VoELKPUptVavCwZedBQ@mail.gmail.com>
Date: Thu, 31 Mar 2016 15:18:10 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Robert Jarzmik <robert.jarzmik@...e.fr>
Cc: Alexandre Courbot <gnurou@...il.com>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: pxa: fix legacy non pinctrl aware builds
On Tue, Mar 29, 2016 at 10:04 AM, Robert Jarzmik <robert.jarzmik@...e.fr> wrote:
> In legacy pxa builds, ie. non device-tree and platform-data only builds,
> pinctrl is not yet available. As a consequence, the pinctrl gpio
> direction change function is a stub, returning always success.
>
> In the current state, the gpio driver direction function believes the
> pinctrl direction change was successful, and exits without actually
> changing the gpio direction.
>
> This patch changes the logic :
> - if the pinctrl direction function fails, gpio direction will report
> that failure
> - if the pinctrl direction function succeeds, gpio direction is changed
> by the gpio driver anyway.
> This is sub optimal in the pinctrl aware case, as the gpio direction
> will be changed twice: once by pinctrl function and another time by
> the gpio direction function.
>
> Yet it should be acceptable in this form, as this is functional for all
> pxa platforms (device-tree and platform-data), and moreover changing a
> gpio direction is very very seldom, usually in machine initialization,
> seldom in drivers probe, and an exception for ac97 reset bug.
>
> Fixes: a770d946371e ("gpio: pxa: add pin control gpio direction and request")
> Reported-by: Guenter Roeck <guenter@...ck-us.net>
> Tested-by: Guenter Roeck <guenter@...ck-us.net>
> Signed-off-by: Robert Jarzmik <robert.jarzmik@...e.fr>
Patch applied for fixes.
Yours,
Linus Walleij
Powered by blists - more mailing lists