[Top] [All Lists]

Re: [PATCH v2 3/3] MIPS: BCM47xx: rewrite GPIO handling and use gpiolib

To: Rafał Miłecki <>
Subject: Re: [PATCH v2 3/3] MIPS: BCM47xx: rewrite GPIO handling and use gpiolib
From: "Arend van Spriel" <>
Date: Thu, 16 Aug 2012 20:43:11 +0200
Cc: "Florian Fainelli" <>, "Hauke Mehrtens" <>,,,,
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
References: <> <> <1791263.5FQJJv4xHF@bender> <>
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0
On 08/16/2012 07:39 PM, Rafał Miłecki wrote:
2012/8/16 Florian Fainelli<>:
>>+void __init bcm47xx_gpio_init(void)
>>+     int err;
>>+     switch (bcm47xx_bus_type) {
>>+#ifdef CONFIG_BCM47XX_SSB
>>+     case BCM47XX_BUS_TYPE_SSB:
>>+             bcm47xx_gpio_count = ssb_gpio_count(&bcm47xx_bus.ssb);
>>+     case BCM47XX_BUS_TYPE_BCMA:
>>+             bcm47xx_gpio_count = bcma_gpio_count(&bcm47xx_bus.bcma.bus);
>>+     }
>Is this exclusive? Cannot we have both SSB and BCMA on the same device?
This applies to SoC only, so I believe it's fine. We don't have SoCs
based on BCMA and SSB at the same time.

It is indeed more than unlikely for a chip to have two silicon interconnects, which is what SSB and BCMA are. However, it does look suspicious from a code reading perspective. So I general I stick to the rule that each case must have a break and fall-thru are clearly commented.

You can find devices with multiple buses, but additional ones are
connected via PCIE or USB interface (or some other I don't know

-- Rafał

Gr. AvS

<Prev in Thread] Current Thread [Next in Thread>