linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: bcma: export bcma_core_disable() function
@ 2011-06-09 18:07 Arend van Spriel
  2011-06-10 11:40 ` Rafał Miłecki
  2011-06-13 15:29 ` [PATCH] bcma: clean exports of functions Rafał Miłecki
  0 siblings, 2 replies; 8+ messages in thread
From: Arend van Spriel @ 2011-06-09 18:07 UTC (permalink / raw)
  To: linville; +Cc: Arend van Spriel, linux-wireless, Rafal Milecki

In the brcm80211 driver we disable the 80211 core when the driver is
'down'. The bcma_core_disable() function exactly does the same as
our implementation so exporting this function makes sense.

Cc: linux-wireless@vger.kernel.org
Cc: Rafal Milecki <zajec5@gmail.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 drivers/bcma/core.c       |    3 ++-
 include/linux/bcma/bcma.h |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/bcma/core.c b/drivers/bcma/core.c
index ced379f..1ec7d45 100644
--- a/drivers/bcma/core.c
+++ b/drivers/bcma/core.c
@@ -19,7 +19,7 @@ bool bcma_core_is_enabled(struct bcma_device *core)
 }
 EXPORT_SYMBOL_GPL(bcma_core_is_enabled);
 
-static void bcma_core_disable(struct bcma_device *core, u32 flags)
+void bcma_core_disable(struct bcma_device *core, u32 flags)
 {
 	if (bcma_aread32(core, BCMA_RESET_CTL) & BCMA_RESET_CTL_RESET)
 		return;
@@ -31,6 +31,7 @@ static void bcma_core_disable(struct bcma_device *core, u32 flags)
 	bcma_awrite32(core, BCMA_RESET_CTL, BCMA_RESET_CTL_RESET);
 	udelay(1);
 }
+EXPORT_SYMBOL_GPL(bcma_core_disable);
 
 int bcma_core_enable(struct bcma_device *core, u32 flags)
 {
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h
index 6ff080e..3895aeb 100644
--- a/include/linux/bcma/bcma.h
+++ b/include/linux/bcma/bcma.h
@@ -244,6 +244,7 @@ void bcma_awrite32(struct bcma_device *core, u16 offset, u32 value)
 }
 
 extern bool bcma_core_is_enabled(struct bcma_device *core);
+extern void bcma_core_disable(struct bcma_device *core, u32 flags);
 extern int bcma_core_enable(struct bcma_device *core, u32 flags);
 
 #endif /* LINUX_BCMA_H_ */
-- 
1.7.4.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] drivers: bcma: export bcma_core_disable() function
  2011-06-09 18:07 [PATCH] drivers: bcma: export bcma_core_disable() function Arend van Spriel
@ 2011-06-10 11:40 ` Rafał Miłecki
  2011-06-10 11:46   ` Arend van Spriel
  2011-06-13 15:29 ` [PATCH] bcma: clean exports of functions Rafał Miłecki
  1 sibling, 1 reply; 8+ messages in thread
From: Rafał Miłecki @ 2011-06-10 11:40 UTC (permalink / raw)
  To: Arend van Spriel, Michael Buesch; +Cc: linville, linux-wireless

2011/6/9 Arend van Spriel <arend@broadcom.com>:
> In the brcm80211 driver we disable the 80211 core when the driver is
> 'down'. The bcma_core_disable() function exactly does the same as
> our implementation so exporting this function makes sense.

Michael said we should not do do such a exporting without getting
users within the same patch serie.

-- 
Rafał

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drivers: bcma: export bcma_core_disable() function
  2011-06-10 11:40 ` Rafał Miłecki
@ 2011-06-10 11:46   ` Arend van Spriel
  2011-06-10 13:39     ` Michael Büsch
  0 siblings, 1 reply; 8+ messages in thread
From: Arend van Spriel @ 2011-06-10 11:46 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Michael Buesch, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org

On 06/10/2011 01:40 PM, Rafał Miłecki wrote:
> 2011/6/9 Arend van Spriel<arend@broadcom.com>:
>> In the brcm80211 driver we disable the 80211 core when the driver is
>> 'down'. The bcma_core_disable() function exactly does the same as
>> our implementation so exporting this function makes sense.
> Michael said we should not do do such a exporting without getting
> users within the same patch serie.

Hi Rafał,

That is going to be hard for me despite my willingness to comply. Our 
driver is still in staging so we submit our brcm80211 patches to Greg 
KH. I figured it would be better to do submit patches for bcma on 
wireless repository.

Gr. AvS

-- 
Almost nobody dances sober, unless they happen to be insane.
-- H.P. Lovecraft --



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drivers: bcma: export bcma_core_disable() function
  2011-06-10 11:46   ` Arend van Spriel
@ 2011-06-10 13:39     ` Michael Büsch
  2011-06-10 13:40       ` John W. Linville
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Büsch @ 2011-06-10 13:39 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Rafał Miłecki, Michael Buesch, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org

On Fri, 10 Jun 2011 13:46:52 +0200
"Arend van Spriel" <arend@broadcom.com> wrote:
> > Michael said we should not do do such a exporting without getting
> > users within the same patch serie.
> That is going to be hard for me despite my willingness to comply. Our 
> driver is still in staging so we submit our brcm80211 patches to Greg 
> KH. I figured it would be better to do submit patches for bcma on 
> wireless repository.

There are no rules without exceptions ;-)



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drivers: bcma: export bcma_core_disable() function
  2011-06-10 13:39     ` Michael Büsch
@ 2011-06-10 13:40       ` John W. Linville
  2011-06-10 16:29         ` Arend van Spriel
  0 siblings, 1 reply; 8+ messages in thread
From: John W. Linville @ 2011-06-10 13:40 UTC (permalink / raw)
  To: Michael Büsch
  Cc: Arend van Spriel, Rafał Miłecki, Michael Buesch,
	linux-wireless@vger.kernel.org

On Fri, Jun 10, 2011 at 01:39:11PM +0000, Michael Büsch wrote:
> On Fri, 10 Jun 2011 13:46:52 +0200
> "Arend van Spriel" <arend@broadcom.com> wrote:
> > > Michael said we should not do do such a exporting without getting
> > > users within the same patch serie.
> > That is going to be hard for me despite my willingness to comply. Our 
> > driver is still in staging so we submit our brcm80211 patches to Greg 
> > KH. I figured it would be better to do submit patches for bcma on 
> > wireless repository.
> 
> There are no rules without exceptions ;-)

Right, so I don't really mind taking it.  OTOH, maybe Greg could just
carry the patch in his staging tree...?

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drivers: bcma: export bcma_core_disable() function
  2011-06-10 13:40       ` John W. Linville
@ 2011-06-10 16:29         ` Arend van Spriel
  2011-06-10 17:19           ` Rafał Miłecki
  0 siblings, 1 reply; 8+ messages in thread
From: Arend van Spriel @ 2011-06-10 16:29 UTC (permalink / raw)
  To: John W. Linville
  Cc: Michael Büsch, Rafał Miłecki, Michael Buesch,
	linux-wireless@vger.kernel.org, Greg KH

On 06/10/2011 03:40 PM, John W. Linville wrote:
> On Fri, Jun 10, 2011 at 01:39:11PM +0000, Michael Büsch wrote:
>> On Fri, 10 Jun 2011 13:46:52 +0200
>> "Arend van Spriel"<arend@broadcom.com>  wrote:
>>>> Michael said we should not do do such a exporting without getting
>>>> users within the same patch serie.
>>> That is going to be hard for me despite my willingness to comply. Our
>>> driver is still in staging so we submit our brcm80211 patches to Greg
>>> KH. I figured it would be better to do submit patches for bcma on
>>> wireless repository.
>> There are no rules without exceptions ;-)
> Right, so I don't really mind taking it.  OTOH, maybe Greg could just
> carry the patch in his staging tree...?
>
> John

Thanks, John

I leave it up to Rafał and Michael to decide. Both ways are fine by me.

Gr. AvS

-- 
Almost nobody dances sober, unless they happen to be insane.
-- H.P. Lovecraft --



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drivers: bcma: export bcma_core_disable() function
  2011-06-10 16:29         ` Arend van Spriel
@ 2011-06-10 17:19           ` Rafał Miłecki
  0 siblings, 0 replies; 8+ messages in thread
From: Rafał Miłecki @ 2011-06-10 17:19 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: John W. Linville, Michael Büsch, Michael Buesch,
	linux-wireless@vger.kernel.org, Greg KH

W dniu 10 czerwca 2011 18:29 użytkownik Arend van Spriel
<arend@broadcom.com> napisał:
> On 06/10/2011 03:40 PM, John W. Linville wrote:
>>
>> On Fri, Jun 10, 2011 at 01:39:11PM +0000, Michael Büsch wrote:
>>>
>>> On Fri, 10 Jun 2011 13:46:52 +0200
>>> "Arend van Spriel"<arend@broadcom.com>  wrote:
>>>>>
>>>>> Michael said we should not do do such a exporting without getting
>>>>> users within the same patch serie.
>>>>
>>>> That is going to be hard for me despite my willingness to comply. Our
>>>> driver is still in staging so we submit our brcm80211 patches to Greg
>>>> KH. I figured it would be better to do submit patches for bcma on
>>>> wireless repository.
>>>
>>> There are no rules without exceptions ;-)
>>
>> Right, so I don't really mind taking it.  OTOH, maybe Greg could just
>> carry the patch in his staging tree...?
>>
>> John
>
> Thanks, John
>
> I leave it up to Rafał and Michael to decide. Both ways are fine by me.

Please, take it to wireless tree. I'm going to need this in b43 soon anyway.

-- 
Rafał

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] bcma: clean exports of functions
  2011-06-09 18:07 [PATCH] drivers: bcma: export bcma_core_disable() function Arend van Spriel
  2011-06-10 11:40 ` Rafał Miłecki
@ 2011-06-13 15:29 ` Rafał Miłecki
  1 sibling, 0 replies; 8+ messages in thread
From: Rafał Miłecki @ 2011-06-13 15:29 UTC (permalink / raw)
  To: linux-wireless, John W. Linville
  Cc: Rafał Miłecki, Arend van Spriel

I forgot to export function disabling core, which is obviously required
by drivers. Function managing IRQs will be also needed soon.
On the other side we do not expect writing any hosts drivers outside of
bcma, so this is safe to do not export functions related to this.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Rafal Milecki <zajec5@gmail.com>
---
John, if you didn't take "bcma: export bcma_core_disable() function"
yet, can you take this one instead?
---
 drivers/bcma/bcma_private.h          |    4 ++--
 drivers/bcma/core.c                  |    3 ++-
 drivers/bcma/driver_pci.c            |    1 +
 drivers/bcma/main.c                  |    2 --
 include/linux/bcma/bcma.h            |    1 +
 include/linux/bcma/bcma_driver_pci.h |    2 ++
 6 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h
index 12a75ab..4228736 100644
--- a/drivers/bcma/bcma_private.h
+++ b/drivers/bcma/bcma_private.h
@@ -13,8 +13,8 @@
 struct bcma_bus;
 
 /* main.c */
-extern int bcma_bus_register(struct bcma_bus *bus);
-extern void bcma_bus_unregister(struct bcma_bus *bus);
+int bcma_bus_register(struct bcma_bus *bus);
+void bcma_bus_unregister(struct bcma_bus *bus);
 
 /* scan.c */
 int bcma_bus_scan(struct bcma_bus *bus);
diff --git a/drivers/bcma/core.c b/drivers/bcma/core.c
index ced379f..1ec7d45 100644
--- a/drivers/bcma/core.c
+++ b/drivers/bcma/core.c
@@ -19,7 +19,7 @@ bool bcma_core_is_enabled(struct bcma_device *core)
 }
 EXPORT_SYMBOL_GPL(bcma_core_is_enabled);
 
-static void bcma_core_disable(struct bcma_device *core, u32 flags)
+void bcma_core_disable(struct bcma_device *core, u32 flags)
 {
 	if (bcma_aread32(core, BCMA_RESET_CTL) & BCMA_RESET_CTL_RESET)
 		return;
@@ -31,6 +31,7 @@ static void bcma_core_disable(struct bcma_device *core, u32 flags)
 	bcma_awrite32(core, BCMA_RESET_CTL, BCMA_RESET_CTL_RESET);
 	udelay(1);
 }
+EXPORT_SYMBOL_GPL(bcma_core_disable);
 
 int bcma_core_enable(struct bcma_device *core, u32 flags)
 {
diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c
index 789d68b..b0c19ed 100644
--- a/drivers/bcma/driver_pci.c
+++ b/drivers/bcma/driver_pci.c
@@ -184,3 +184,4 @@ int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, struct bcma_device *core,
 out:
 	return err;
 }
+EXPORT_SYMBOL_GPL(bcma_core_pci_irq_ctl);
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 11e96dc..ba15105 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -160,13 +160,11 @@ int bcma_bus_register(struct bcma_bus *bus)
 
 	return 0;
 }
-EXPORT_SYMBOL_GPL(bcma_bus_register);
 
 void bcma_bus_unregister(struct bcma_bus *bus)
 {
 	bcma_unregister_cores(bus);
 }
-EXPORT_SYMBOL_GPL(bcma_bus_unregister);
 
 int __bcma_driver_register(struct bcma_driver *drv, struct module *owner)
 {
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h
index 6ff080e..3895aeb 100644
--- a/include/linux/bcma/bcma.h
+++ b/include/linux/bcma/bcma.h
@@ -244,6 +244,7 @@ void bcma_awrite32(struct bcma_device *core, u16 offset, u32 value)
 }
 
 extern bool bcma_core_is_enabled(struct bcma_device *core);
+extern void bcma_core_disable(struct bcma_device *core, u32 flags);
 extern int bcma_core_enable(struct bcma_device *core, u32 flags);
 
 #endif /* LINUX_BCMA_H_ */
diff --git a/include/linux/bcma/bcma_driver_pci.h b/include/linux/bcma/bcma_driver_pci.h
index b7e191c..3871b66 100644
--- a/include/linux/bcma/bcma_driver_pci.h
+++ b/include/linux/bcma/bcma_driver_pci.h
@@ -85,5 +85,7 @@ struct bcma_drv_pci {
 #define pcicore_write32(pc, offset, val)	bcma_write32((pc)->core, offset, val)
 
 extern void bcma_core_pci_init(struct bcma_drv_pci *pc);
+extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc,
+				 struct bcma_device *core, bool enable);
 
 #endif /* LINUX_BCMA_DRIVER_PCI_H_ */
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-06-13 14:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-09 18:07 [PATCH] drivers: bcma: export bcma_core_disable() function Arend van Spriel
2011-06-10 11:40 ` Rafał Miłecki
2011-06-10 11:46   ` Arend van Spriel
2011-06-10 13:39     ` Michael Büsch
2011-06-10 13:40       ` John W. Linville
2011-06-10 16:29         ` Arend van Spriel
2011-06-10 17:19           ` Rafał Miłecki
2011-06-13 15:29 ` [PATCH] bcma: clean exports of functions Rafał Miłecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).