Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1515900 > unrolled thread

[BUG] pinctrl: sunxi: sunxi-pinctrl fail to load with CONFIG_DEBUG_TEST_DRIVER_REMOVE

Started byLABBE Corentin <clabbe.montjoie@gmail.com>
First post2016-11-07 09:30 +0100
Last post2016-11-07 13:00 +0100
Articles 7 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [BUG] pinctrl: sunxi: sunxi-pinctrl fail to load with  CONFIG_DEBUG_TEST_DRIVER_REMOVE LABBE Corentin <clabbe.montjoie@gmail.com> - 2016-11-07 09:30 +0100
    Re: [BUG] pinctrl: sunxi: sunxi-pinctrl fail to load with CONFIG_DEBUG_TEST_DRIVER_REMOVE Chen-Yu Tsai <wens@csie.org> - 2016-11-07 10:50 +0100
      Re: [BUG] pinctrl: sunxi: sunxi-pinctrl fail to load with  CONFIG_DEBUG_TEST_DRIVER_REMOVE Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-11-07 11:00 +0100
        Re: [BUG] pinctrl: sunxi: sunxi-pinctrl fail to load with CONFIG_DEBUG_TEST_DRIVER_REMOVE Chen-Yu Tsai <wens@csie.org> - 2016-11-07 11:10 +0100
        Re: [BUG] pinctrl: sunxi: sunxi-pinctrl fail to load with  CONFIG_DEBUG_TEST_DRIVER_REMOVE Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-11-07 11:30 +0100
          Re: [BUG] pinctrl: sunxi: sunxi-pinctrl fail to load with  CONFIG_DEBUG_TEST_DRIVER_REMOVE Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-11-07 11:30 +0100
        Re: [BUG] pinctrl: sunxi: sunxi-pinctrl fail to load with  CONFIG_DEBUG_TEST_DRIVER_REMOVE Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-11-07 13:00 +0100

#1515900 — [BUG] pinctrl: sunxi: sunxi-pinctrl fail to load with CONFIG_DEBUG_TEST_DRIVER_REMOVE

FromLABBE Corentin <clabbe.montjoie@gmail.com>
Date2016-11-07 09:30 +0100
Subject[BUG] pinctrl: sunxi: sunxi-pinctrl fail to load with CONFIG_DEBUG_TEST_DRIVER_REMOVE
Message-ID<sANtv-q8-3@gated-at.bofh.it>
Hello

With CONFIG_DEBUG_TEST_DRIVER_REMOVE=y 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 add chip
[    3.923016] gpiochip_add_data: GPIOs 0..223 (1c20800.pinctrl) failed to register
[    3.931099] sun8i-h3-pinctrl: probe of 1c20800.pinctrl failed with error -16
[    3.944709] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[    3.960796] gpio gpiochip2: GPIO integer space overlap, cannot add 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.

Regards

[toc] | [next] | [standalone]


#1515950 — Re: [BUG] pinctrl: sunxi: sunxi-pinctrl fail to load with CONFIG_DEBUG_TEST_DRIVER_REMOVE

FromChen-Yu Tsai <wens@csie.org>
Date2016-11-07 10:50 +0100
SubjectRe: [BUG] pinctrl: sunxi: sunxi-pinctrl fail to load with CONFIG_DEBUG_TEST_DRIVER_REMOVE
Message-ID<sAOIV-1iM-9@gated-at.bofh.it>
In reply to#1515900
Hi,

On Mon, Nov 7, 2016 at 4:18 PM, LABBE Corentin
<clabbe.montjoie@gmail.com> wrote:
> Hello
>
> With CONFIG_DEBUG_TEST_DRIVER_REMOVE=y 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 add chip
> [    3.923016] gpiochip_add_data: GPIOs 0..223 (1c20800.pinctrl) failed to register
> [    3.931099] sun8i-h3-pinctrl: probe of 1c20800.pinctrl failed with error -16
> [    3.944709] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
> [    3.960796] gpio gpiochip2: GPIO integer space overlap, cannot add 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.

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...

ChenYu

>
> Regards

[toc] | [prev] | [next] | [standalone]


#1515952

FromMaxime Ripard <maxime.ripard@free-electrons.com>
Date2016-11-07 11:00 +0100
Message-ID<sAOSB-1m1-9@gated-at.bofh.it>
In reply to#1515950

[Multipart message — attachments visible in raw view] — view raw

On Mon, Nov 07, 2016 at 05:48:43PM +0800, Chen-Yu Tsai wrote:
> Hi,
> 
> On Mon, Nov 7, 2016 at 4:18 PM, LABBE Corentin
> <clabbe.montjoie@gmail.com> wrote:
> > Hello
> >
> > With CONFIG_DEBUG_TEST_DRIVER_REMOVE=y 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 add chip
> > [    3.923016] gpiochip_add_data: GPIOs 0..223 (1c20800.pinctrl) failed to register
> > [    3.931099] sun8i-h3-pinctrl: probe of 1c20800.pinctrl failed with error -16
> > [    3.944709] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
> > [    3.960796] gpio gpiochip2: GPIO integer space overlap, cannot add 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.
> 
> 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...

Using a builtin_platform_driver should be enough to prevent it to be
removed.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[toc] | [prev] | [next] | [standalone]


#1515977 — Re: [BUG] pinctrl: sunxi: sunxi-pinctrl fail to load with CONFIG_DEBUG_TEST_DRIVER_REMOVE

FromChen-Yu Tsai <wens@csie.org>
Date2016-11-07 11:10 +0100
SubjectRe: [BUG] pinctrl: sunxi: sunxi-pinctrl fail to load with CONFIG_DEBUG_TEST_DRIVER_REMOVE
Message-ID<sAP2i-1FI-53@gated-at.bofh.it>
In reply to#1515952
On Mon, Nov 7, 2016 at 5:56 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Mon, Nov 07, 2016 at 05:48:43PM +0800, Chen-Yu Tsai wrote:
>> Hi,
>>
>> On Mon, Nov 7, 2016 at 4:18 PM, LABBE Corentin
>> <clabbe.montjoie@gmail.com> wrote:
>> > Hello
>> >
>> > With CONFIG_DEBUG_TEST_DRIVER_REMOVE=y 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 add chip
>> > [    3.923016] gpiochip_add_data: GPIOs 0..223 (1c20800.pinctrl) failed to register
>> > [    3.931099] sun8i-h3-pinctrl: probe of 1c20800.pinctrl failed with error -16
>> > [    3.944709] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
>> > [    3.960796] gpio gpiochip2: GPIO integer space overlap, cannot add 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.
>>
>> 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...
>
> Using a builtin_platform_driver should be enough to prevent it to be
> removed.

Labbe, can you test it again on linux-next? Or at least with this patch

    0c8c6ba00cbf pinctrl: sunxi: make bool drivers explicitly non-modular

from linux-pinctrl applied. This should fix it.

ChenYu

[toc] | [prev] | [next] | [standalone]


#1515981

FromMaxime Ripard <maxime.ripard@free-electrons.com>
Date2016-11-07 11:30 +0100
Message-ID<sAPlE-1P0-1@gated-at.bofh.it>
In reply to#1515952

[Multipart message — attachments visible in raw view] — view raw

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,
> > > 
> > > On Mon, Nov 7, 2016 at 4:18 PM, LABBE Corentin
> > > <clabbe.montjoie@gmail.com> wrote:
> > > > Hello
> > > >
> > > > With CONFIG_DEBUG_TEST_DRIVER_REMOVE=y 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 add chip
> > > > [    3.923016] gpiochip_add_data: GPIOs 0..223 (1c20800.pinctrl) failed to register
> > > > [    3.931099] sun8i-h3-pinctrl: probe of 1c20800.pinctrl failed with error -16
> > > > [    3.944709] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
> > > > [    3.960796] gpio gpiochip2: GPIO integer space overlap, cannot add 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.
> > > 
> > > 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...
> > 
> > Using a builtin_platform_driver should be enough to prevent it to be
> > removed.
> > 
> 
> The problem is that it is already builtin_platform_driver()

Then there's no way it can be removed in the first place.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[toc] | [prev] | [next] | [standalone]


#1515984

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2016-11-07 11:30 +0100
Message-ID<sAPlE-1P0-11@gated-at.bofh.it>
In reply to#1515981
On Mon, Nov 07, 2016 at 11:15:00AM +0100, Maxime Ripard wrote:
> 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,
> > > > 
> > > > On Mon, Nov 7, 2016 at 4:18 PM, LABBE Corentin
> > > > <clabbe.montjoie@gmail.com> wrote:
> > > > > Hello
> > > > >
> > > > > With CONFIG_DEBUG_TEST_DRIVER_REMOVE=y 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 add chip
> > > > > [    3.923016] gpiochip_add_data: GPIOs 0..223 (1c20800.pinctrl) failed to register
> > > > > [    3.931099] sun8i-h3-pinctrl: probe of 1c20800.pinctrl failed with error -16
> > > > > [    3.944709] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
> > > > > [    3.960796] gpio gpiochip2: GPIO integer space overlap, cannot add 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.
> > > > 
> > > > 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...
> > > 
> > > Using a builtin_platform_driver should be enough to prevent it to be
> > > removed.
> > > 
> > 
> > The problem is that it is already builtin_platform_driver()
> 
> Then there's no way it can be removed in the first place.
> 

I will send a patch for fixing CONFIG_DEBUG_TEST_DRIVER_REMOVE

[toc] | [prev] | [next] | [standalone]


#1516038

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2016-11-07 13:00 +0100
Message-ID<sAPlE-1P0-3@gated-at.bofh.it>
In reply to#1515952
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,
> > 
> > On Mon, Nov 7, 2016 at 4:18 PM, LABBE Corentin
> > <clabbe.montjoie@gmail.com> wrote:
> > > Hello
> > >
> > > With CONFIG_DEBUG_TEST_DRIVER_REMOVE=y 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 add chip
> > > [    3.923016] gpiochip_add_data: GPIOs 0..223 (1c20800.pinctrl) failed to register
> > > [    3.931099] sun8i-h3-pinctrl: probe of 1c20800.pinctrl failed with error -16
> > > [    3.944709] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
> > > [    3.960796] gpio gpiochip2: GPIO integer space overlap, cannot add 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.
> > 
> > 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...
> 
> Using a builtin_platform_driver should be enough to prevent it to be
> removed.
> 

The problem is that it is already builtin_platform_driver()

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web