2013-01-18 14:36:25

by Piotr Haber

[permalink] [raw]
Subject: bcma: trouble with gpio

Hi,

I turned GPIO support in bcma (CONFIG_BCMA_DRIVER_GPIO)
and get this in log:

bcma: bus0: Found chip with id 0xA8D8, rev 0x01 and package 0x0A
bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
bcma: bus0: Found rev 6 PMU (capabilities 0x108C2606)
bcma: bus0: SPROM offset 0x830
bcma: bus0: PMU resource config unknown or not needed for device 0xA8D8
gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
bcma: bus0: Error registering GPIO driver: -28
bcma: bus0: Bus registered
bcma: bus1: Found chip with id 0x4313, rev 0x01 and package 0x08
bcma: bus1: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
bcma: bus1: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
bcma: bus1: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
bcma: bus1: Found rev 8 PMU (capabilities 0x084C3008)
bcma: bus1: SPROM offset 0x830
gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
bcma: bus1: Error registering GPIO driver: -28
bcma: bus1: Bus registered
bcma: bus2: Found chip with id 0x4313, rev 0x01 and package 0x08
bcma: bus2: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
bcma: bus2: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
bcma: bus2: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
bcma: bus2: Found rev 8 PMU (capabilities 0x084C3008)
bcma: bus2: SPROM offset 0x830
gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
bcma: bus2: Error registering GPIO driver: -28
bcma: bus2: Bus registered

does that mean that gpio is not usable?
what might be the problem?

Kind regards
Piotr



2013-01-19 17:18:19

by Hauke Mehrtens

[permalink] [raw]
Subject: Re: bcma: trouble with gpio

On 01/18/2013 03:33 PM, Piotr Haber wrote:
> Hi,
>
> I turned GPIO support in bcma (CONFIG_BCMA_DRIVER_GPIO)
> and get this in log:
>
> bcma: bus0: Found chip with id 0xA8D8, rev 0x01 and package 0x0A
> bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
> bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
> bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
> bcma: bus0: Found rev 6 PMU (capabilities 0x108C2606)
> bcma: bus0: SPROM offset 0x830
> bcma: bus0: PMU resource config unknown or not needed for device 0xA8D8
> gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
> bcma: bus0: Error registering GPIO driver: -28
> bcma: bus0: Bus registered
> bcma: bus1: Found chip with id 0x4313, rev 0x01 and package 0x08
> bcma: bus1: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
> bcma: bus1: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
> bcma: bus1: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
> bcma: bus1: Found rev 8 PMU (capabilities 0x084C3008)
> bcma: bus1: SPROM offset 0x830
> gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
> bcma: bus1: Error registering GPIO driver: -28
> bcma: bus1: Bus registered
> bcma: bus2: Found chip with id 0x4313, rev 0x01 and package 0x08
> bcma: bus2: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
> bcma: bus2: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
> bcma: bus2: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
> bcma: bus2: Found rev 8 PMU (capabilities 0x084C3008)
> bcma: bus2: SPROM offset 0x830
> gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
> bcma: bus2: Error registering GPIO driver: -28
> bcma: bus2: Bus registered
>
> does that mean that gpio is not usable?

At least it is not usable through the standard linux gpio interface.

> what might be the problem?

Is this -28 (ENOSPC) originally returned in gpiochip_find_base() in
drivers/gpio/gpiolib.c?
I have no idea what's going wrong here, could you provide me with your
kernel config and what kernel version are you using?

>
> Kind regards
> Piotr
>


2013-01-30 12:39:27

by Piotr Haber

[permalink] [raw]
Subject: Re: bcma: trouble with gpio

On 01/19/13 18:18, Hauke Mehrtens wrote:
> On 01/18/2013 03:33 PM, Piotr Haber wrote:
>> Hi,
>>
>> I turned GPIO support in bcma (CONFIG_BCMA_DRIVER_GPIO)
>> and get this in log:
>>
>> bcma: bus0: Found chip with id 0xA8D8, rev 0x01 and package 0x0A
>> bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
>> bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
>> bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
>> bcma: bus0: Found rev 6 PMU (capabilities 0x108C2606)
>> bcma: bus0: SPROM offset 0x830
>> bcma: bus0: PMU resource config unknown or not needed for device 0xA8D8
>> gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
>> bcma: bus0: Error registering GPIO driver: -28
>> bcma: bus0: Bus registered
>> bcma: bus1: Found chip with id 0x4313, rev 0x01 and package 0x08
>> bcma: bus1: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
>> bcma: bus1: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
>> bcma: bus1: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
>> bcma: bus1: Found rev 8 PMU (capabilities 0x084C3008)
>> bcma: bus1: SPROM offset 0x830
>> gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
>> bcma: bus1: Error registering GPIO driver: -28
>> bcma: bus1: Bus registered
>> bcma: bus2: Found chip with id 0x4313, rev 0x01 and package 0x08
>> bcma: bus2: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
>> bcma: bus2: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
>> bcma: bus2: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
>> bcma: bus2: Found rev 8 PMU (capabilities 0x084C3008)
>> bcma: bus2: SPROM offset 0x830
>> gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
>> bcma: bus2: Error registering GPIO driver: -28
>> bcma: bus2: Bus registered
>>
>> does that mean that gpio is not usable?
>
> At least it is not usable through the standard linux gpio interface.
>
>> what might be the problem?
>
> Is this -28 (ENOSPC) originally returned in gpiochip_find_base() in
> drivers/gpio/gpiolib.c?
> I have no idea what's going wrong here, could you provide me with your
> kernel config and what kernel version are you using?
>
>>
>> Kind regards
>> Piotr
>>
>
>
ok, tried on 3.8-rc4 (config included)
first loading of module is ok
unloading and loading again results in same messages as before

seems like gpiochip_find_base call in gpiochip_add fails
not sure what's the reason thou

BTW.
i have CONFIG_BCMA_DEBUG enabled but don't see any additional info, is this flag used at all?

first load:
bcma: bus0: Found chip with id 0xA8D8, rev 0x01 and package 0x0A
bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
bcma: bus0: Found rev 6 PMU (capabilities 0x108C2606)
bcma: bus0: SPROM offset 0x830
bcma: bus0: PMU resource config unknown or not needed for device 0xA8D8
gpiochip_find_base: found new base at 240
gpiochip_add: registered GPIOs 240 to 255 on device: bcma_gpio
bcma: bus0: Bus registered
bcma: bus1: Found chip with id 0x4313, rev 0x01 and package 0x08
bcma: bus1: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
bcma: bus1: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
bcma: bus1: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
bcma: bus1: Found rev 8 PMU (capabilities 0x084C3008)
bcma: bus1: SPROM offset 0x830
gpiochip_find_base: found new base at 224
gpiochip_add: registered GPIOs 224 to 239 on device: bcma_gpio
bcma: bus1: Bus registered
bcma: bus2: Found chip with id 0x4313, rev 0x01 and package 0x08
bcma: bus2: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
bcma: bus2: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
bcma: bus2: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
bcma: bus2: Found rev 8 PMU (capabilities 0x084C3008)
bcma: bus2: SPROM offset 0x830
gpiochip_find_base: found new base at 208
gpiochip_add: registered GPIOs 208 to 223 on device: bcma_gpio
bcma: bus2: Bus registered

second load:
bcma: bus0: Found chip with id 0xA8D8, rev 0x01 and package 0x0A
bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
bcma: bus0: Found rev 6 PMU (capabilities 0x108C2606)
bcma: bus0: SPROM offset 0x830
bcma: bus0: PMU resource config unknown or not needed for device 0xA8D8
gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
bcma: bus0: Error registering GPIO driver: -28
bcma: bus0: Bus registered
bcma: bus1: Found chip with id 0x4313, rev 0x01 and package 0x08
bcma: bus1: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
bcma: bus1: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
bcma: bus1: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
bcma: bus1: Found rev 8 PMU (capabilities 0x084C3008)
bcma: bus1: SPROM offset 0x830
gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
bcma: bus1: Error registering GPIO driver: -28
bcma: bus1: Bus registered
bcma: bus2: Found chip with id 0x4313, rev 0x01 and package 0x08
bcma: bus2: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
bcma: bus2: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
bcma: bus2: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
bcma: bus2: Found rev 8 PMU (capabilities 0x084C3008)
bcma: bus2: SPROM offset 0x830
gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
bcma: bus2: Error registering GPIO driver: -28
bcma: bus2: Bus registered





Attachments:
config-3.8.0-rc4 (114.40 kB)

2013-01-25 09:26:54

by Piotr Haber

[permalink] [raw]
Subject: Re: bcma: trouble with gpio

On 01/19/13 18:18, Hauke Mehrtens wrote:
> On 01/18/2013 03:33 PM, Piotr Haber wrote:
>> Hi,
>>
>> I turned GPIO support in bcma (CONFIG_BCMA_DRIVER_GPIO)
>> and get this in log:
>>
>> bcma: bus0: Found chip with id 0xA8D8, rev 0x01 and package 0x0A
>> bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
>> bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
>> bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
>> bcma: bus0: Found rev 6 PMU (capabilities 0x108C2606)
>> bcma: bus0: SPROM offset 0x830
>> bcma: bus0: PMU resource config unknown or not needed for device 0xA8D8
>> gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
>> bcma: bus0: Error registering GPIO driver: -28
>> bcma: bus0: Bus registered
>> bcma: bus1: Found chip with id 0x4313, rev 0x01 and package 0x08
>> bcma: bus1: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
>> bcma: bus1: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
>> bcma: bus1: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
>> bcma: bus1: Found rev 8 PMU (capabilities 0x084C3008)
>> bcma: bus1: SPROM offset 0x830
>> gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
>> bcma: bus1: Error registering GPIO driver: -28
>> bcma: bus1: Bus registered
>> bcma: bus2: Found chip with id 0x4313, rev 0x01 and package 0x08
>> bcma: bus2: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
>> bcma: bus2: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
>> bcma: bus2: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
>> bcma: bus2: Found rev 8 PMU (capabilities 0x084C3008)
>> bcma: bus2: SPROM offset 0x830
>> gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
>> bcma: bus2: Error registering GPIO driver: -28
>> bcma: bus2: Bus registered
>>
>> does that mean that gpio is not usable?
>
> At least it is not usable through the standard linux gpio interface.
>
>> what might be the problem?
>
> Is this -28 (ENOSPC) originally returned in gpiochip_find_base() in
> drivers/gpio/gpiolib.c?
> I have no idea what's going wrong here, could you provide me with your
> kernel config and what kernel version are you using?
>
i'm on v3.8-rc2,
will update to latest wireless-testing and give it a try again






2013-02-04 09:37:21

by Piotr Haber

[permalink] [raw]
Subject: Re: bcma: trouble with gpio

On 02/03/13 23:46, Hauke Mehrtens wrote:
> On 01/30/2013 01:39 PM, Piotr Haber wrote:
>> On 01/19/13 18:18, Hauke Mehrtens wrote:
>>> On 01/18/2013 03:33 PM, Piotr Haber wrote:
>>>> Hi,
>>>>
>>>> I turned GPIO support in bcma (CONFIG_BCMA_DRIVER_GPIO)
>>>> and get this in log:
>>>>
>>>> bcma: bus0: Found chip with id 0xA8D8, rev 0x01 and package 0x0A
>>>> bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
>>>> bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
>>>> bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
>>>> bcma: bus0: Found rev 6 PMU (capabilities 0x108C2606)
>>>> bcma: bus0: SPROM offset 0x830
>>>> bcma: bus0: PMU resource config unknown or not needed for device 0xA8D8
>>>> gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
>>>> bcma: bus0: Error registering GPIO driver: -28
>>>> bcma: bus0: Bus registered
>>>> bcma: bus1: Found chip with id 0x4313, rev 0x01 and package 0x08
>>>> bcma: bus1: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
>>>> bcma: bus1: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
>>>> bcma: bus1: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
>>>> bcma: bus1: Found rev 8 PMU (capabilities 0x084C3008)
>>>> bcma: bus1: SPROM offset 0x830
>>>> gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
>>>> bcma: bus1: Error registering GPIO driver: -28
>>>> bcma: bus1: Bus registered
>>>> bcma: bus2: Found chip with id 0x4313, rev 0x01 and package 0x08
>>>> bcma: bus2: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
>>>> bcma: bus2: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
>>>> bcma: bus2: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
>>>> bcma: bus2: Found rev 8 PMU (capabilities 0x084C3008)
>>>> bcma: bus2: SPROM offset 0x830
>>>> gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
>>>> bcma: bus2: Error registering GPIO driver: -28
>>>> bcma: bus2: Bus registered
>>>>
>>>> does that mean that gpio is not usable?
>>>
>>> At least it is not usable through the standard linux gpio interface.
>>>
>>>> what might be the problem?
>>>
>>> Is this -28 (ENOSPC) originally returned in gpiochip_find_base() in
>>> drivers/gpio/gpiolib.c?
>>> I have no idea what's going wrong here, could you provide me with your
>>> kernel config and what kernel version are you using?
>>>
>>>>
>>>> Kind regards
>>>> Piotr
>>>>
>>>
>>>
>> ok, tried on 3.8-rc4 (config included)
>> first loading of module is ok
>> unloading and loading again results in same messages as before
>>
>> seems like gpiochip_find_base call in gpiochip_add fails
>> not sure what's the reason thou
>
> Thanks for the logs. I missed unregistering of the gpio driver in bcma
> and that would explain your problems. I am unable to unload bcma on my
> SoCs so I haven't noticed that.
>
> Could your try this patch:
> http://permalink.gmane.org/gmane.linux.kernel.wireless.general/103377
>
> Hauke
>
that patch fixes a problem with loading/unloading
thanks




2013-02-03 22:46:18

by Hauke Mehrtens

[permalink] [raw]
Subject: Re: bcma: trouble with gpio

On 01/30/2013 01:39 PM, Piotr Haber wrote:
> On 01/19/13 18:18, Hauke Mehrtens wrote:
>> On 01/18/2013 03:33 PM, Piotr Haber wrote:
>>> Hi,
>>>
>>> I turned GPIO support in bcma (CONFIG_BCMA_DRIVER_GPIO)
>>> and get this in log:
>>>
>>> bcma: bus0: Found chip with id 0xA8D8, rev 0x01 and package 0x0A
>>> bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
>>> bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
>>> bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
>>> bcma: bus0: Found rev 6 PMU (capabilities 0x108C2606)
>>> bcma: bus0: SPROM offset 0x830
>>> bcma: bus0: PMU resource config unknown or not needed for device 0xA8D8
>>> gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
>>> bcma: bus0: Error registering GPIO driver: -28
>>> bcma: bus0: Bus registered
>>> bcma: bus1: Found chip with id 0x4313, rev 0x01 and package 0x08
>>> bcma: bus1: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
>>> bcma: bus1: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
>>> bcma: bus1: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
>>> bcma: bus1: Found rev 8 PMU (capabilities 0x084C3008)
>>> bcma: bus1: SPROM offset 0x830
>>> gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
>>> bcma: bus1: Error registering GPIO driver: -28
>>> bcma: bus1: Bus registered
>>> bcma: bus2: Found chip with id 0x4313, rev 0x01 and package 0x08
>>> bcma: bus2: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
>>> bcma: bus2: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
>>> bcma: bus2: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
>>> bcma: bus2: Found rev 8 PMU (capabilities 0x084C3008)
>>> bcma: bus2: SPROM offset 0x830
>>> gpiochip_add: gpios -1..14 (bcma_gpio) failed to register
>>> bcma: bus2: Error registering GPIO driver: -28
>>> bcma: bus2: Bus registered
>>>
>>> does that mean that gpio is not usable?
>>
>> At least it is not usable through the standard linux gpio interface.
>>
>>> what might be the problem?
>>
>> Is this -28 (ENOSPC) originally returned in gpiochip_find_base() in
>> drivers/gpio/gpiolib.c?
>> I have no idea what's going wrong here, could you provide me with your
>> kernel config and what kernel version are you using?
>>
>>>
>>> Kind regards
>>> Piotr
>>>
>>
>>
> ok, tried on 3.8-rc4 (config included)
> first loading of module is ok
> unloading and loading again results in same messages as before
>
> seems like gpiochip_find_base call in gpiochip_add fails
> not sure what's the reason thou

Thanks for the logs. I missed unregistering of the gpio driver in bcma
and that would explain your problems. I am unable to unload bcma on my
SoCs so I haven't noticed that.

Could your try this patch:
http://permalink.gmane.org/gmane.linux.kernel.wireless.general/103377

Hauke