linux-mips
[Top] [All Lists]

Re: [PATCH v3 2/3] bcma: add GPIO driver for SoCs

To: Rafał Miłecki <zajec5@gmail.com>
Subject: Re: [PATCH v3 2/3] bcma: add GPIO driver for SoCs
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun, 09 Sep 2012 17:22:06 +0200
Cc: ralf@linux-mips.org, john@phrozen.org, linux-mips@linux-mips.org, linux-wireless@vger.kernel.org, florian@openwrt.org
In-reply-to: <CACna6rwb15pfbM6rM5ros0yCSW+uv1CbwWz5pUz8OgvONKKrvg@mail.gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1346427485-12801-1-git-send-email-hauke@hauke-m.de> <1346427485-12801-3-git-send-email-hauke@hauke-m.de> <CACna6rwb15pfbM6rM5ros0yCSW+uv1CbwWz5pUz8OgvONKKrvg@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0
On 09/03/2012 09:15 PM, Rafał Miłecki wrote:
> 2012/8/31 Hauke Mehrtens <hauke@hauke-m.de>:
>> +u32 bcma_gpio_in(struct bcma_bus *bus, u32 mask)
>> +{
>> +       unsigned long flags;
>> +       u32 res = 0;
>> +
>> +       spin_lock_irqsave(&bus->gpio_lock, flags);
>> +       res = bcma_chipco_gpio_in(&bus->drv_cc, mask);
>> +       spin_unlock_irqrestore(&bus->gpio_lock, flags);
>> +
>> +       return res;
>> +}
>> +EXPORT_SYMBOL(bcma_gpio_in);
> 
> 
> Could we put here direct ops on ChipCommon regs and drop GPIO
> functions from driver_chipcommon.c?

So you mean that all accesses to the gpio registers are locked, also
when b43 or bcma accesses them? If so, I will change my patch and test
it on my devices. I am currently not at my development machine and do
not have the test devices here, but I will see if I find some time on
Tuesday when I am home again.

So bcma_chipco_gpio_XXX() should not be exported in the way it is done
now any more and all accesses to the gpio registers should be locked.

Hauke

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