Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752604AbcKGKX0 (ORCPT ); Mon, 7 Nov 2016 05:23:26 -0500 Received: from up.free-electrons.com ([163.172.77.33]:43588 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751454AbcKGKWI (ORCPT ); Mon, 7 Nov 2016 05:22:08 -0500 Date: Mon, 7 Nov 2016 11:15:00 +0100 From: Maxime Ripard To: Corentin Labbe Cc: Chen-Yu Tsai , Linus Walleij , "linux-gpio@vger.kernel.org" , linux-arm-kernel , linux-kernel , linux-sunxi Subject: Re: [BUG] pinctrl: sunxi: sunxi-pinctrl fail to load with CONFIG_DEBUG_TEST_DRIVER_REMOVE Message-ID: <20161107101500.ostb5auj2fpxcqe6@lukather> References: <20161107081832.GA23580@Red> <20161107095612.ih5ns24m2qiwujy5@lukather> <20161107095953.GB20037@Red> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ykyx4dgmoe7pdlcu" Content-Disposition: inline In-Reply-To: <20161107095953.GB20037@Red> User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2852 Lines: 78 --ykyx4dgmoe7pdlcu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 07, 2016 at 10:59:53AM +0100, Corentin Labbe wrote: > On Mon, Nov 07, 2016 at 10:56:12AM +0100, Maxime Ripard wrote: > > On Mon, Nov 07, 2016 at 05:48:43PM +0800, Chen-Yu Tsai wrote: > > > Hi, > > >=20 > > > On Mon, Nov 7, 2016 at 4:18 PM, LABBE Corentin > > > wrote: > > > > Hello > > > > > > > > With CONFIG_DEBUG_TEST_DRIVER_REMOVE=3Dy pinctrl-sunxi fail to load= on the second try. > > > > > > > > [ 3.900061] sun8i-h3-pinctrl 1c20800.pinctrl: initialized sunXi = PIO driver > > > > [ 3.916251] gpio gpiochip1: GPIO integer space overlap, cannot a= dd chip > > > > [ 3.923016] gpiochip_add_data: GPIOs 0..223 (1c20800.pinctrl) fa= iled to register > > > > [ 3.931099] sun8i-h3-pinctrl: probe of 1c20800.pinctrl failed wi= th error -16 > > > > [ 3.944709] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunX= i PIO driver > > > > [ 3.960796] gpio gpiochip2: GPIO integer space overlap, cannot a= dd chip > > > > [ 3.967594] gpiochip_add_data: GPIOs 352..383 (1f02c00.pinctrl) = failed to register > > > > [ 3.975633] sun8i-h3-r-pinctrl: probe of 1f02c00.pinctrl failed = with error -16 > > > > > > > > Without it, all subsequent drivers fail to load. > > > > Tested on Orange PI PC board. > > >=20 > > > I don't think the pinctrl drivers were designed to be removed. > > > And I thought the lack of a .remove callback in the driver blocks > > > the core from removing the device? Maybe I remember wrong... > >=20 > > Using a builtin_platform_driver should be enough to prevent it to be > > removed. > >=20 >=20 > The problem is that it is already builtin_platform_driver() Then there's no way it can be removed in the first place. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --ykyx4dgmoe7pdlcu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJYIFQfAAoJEBx+YmzsjxAgECQP/ieE4KDS2SOCn1Am5kqwzGay TdKgrxjiBBvFIjK7jYhtUZwkqVfVZJSZ8tOUM1Va4k6uy2QZHTPzSeBJwgbvKNlF MumZJxGpW2nLNnnNDNXTU9AA1NP+e5nVGbq/vPxu31tF4LvhZfLrZCrLx+9mDdeD 1JvVif1b7eDLmmdLPgpdIaWMtWqTLm4rth1/0KwOrZX/xzprqXWQuCWxIm3FWO3B 41WV3ZYCSL88TS0MEB3HAq2x9ga5NqZt3WGYboYs092GOvByz6vlZqSLE5/VWoj+ Ff5gTiEAk6TGBBwYU4eRGqEZQ/dISSvPqYq7A6fuDBMX8I9TuuGbjAs+GczG2GDz 7gdYE+Bu6r2uVRNrfB+Wn8cDT8fDD390Rr4Dv/zjmA3hVXatxkpTYCc4b3KZRLwL 2mYO4PLMhOrSbwU24i1G3V4moe9+uYvbVM1pqzwJFecHGd8QC9nATfVA350gB3Hg e9V8JKMzcRKj4ORCNwlrqCkP7Q7haaM4RCwhnf6CQ39u8plF8MXg+9/FyAyZS3cQ 2BTXzHQn5SWZutpdx5Qjj+IwU30vR7LGkS1e5kMunS7mcpO6bVH7P5OTCKAGaso9 Q41Bh9Zs8chBMOWXAy0F3x7HiYGPia3XjB4pGrx1xYI2HLLF35pb1dkAogW2AkeT g9KAKJyc4BE3B5gDkeNY =hSdv -----END PGP SIGNATURE----- --ykyx4dgmoe7pdlcu--