Re: [PATCH v2] gpio: brcmstb: allow 0 width GPIO banks

2018-08-31 Thread Gregory Fong
l GPIOs > that get initialized. We leave this information out since it is already > printed with dev_dbg. > > Signed-off-by: Justin Chen Looks like I'm a bit late on the response, but in case you feel like adding it Linus: Acked-by: Gregory Fong

Re: [PATCH v2] gpio: brcmstb: allow 0 width GPIO banks

2018-08-31 Thread Gregory Fong
l GPIOs > that get initialized. We leave this information out since it is already > printed with dev_dbg. > > Signed-off-by: Justin Chen Looks like I'm a bit late on the response, but in case you feel like adding it Linus: Acked-by: Gregory Fong

Re: [PATCH] drivers: gpio: remove duplicate includes

2017-12-18 Thread Gregory Fong
hedge4li...@gmail.com> Acked-by: Gregory Fong <gregory.0...@gmail.com>

Re: [PATCH] drivers: gpio: remove duplicate includes

2017-12-18 Thread Gregory Fong
On Sat, Dec 16, 2017 at 4:56 AM, Pravin Shedge wrote: > These duplicate includes have been found with scripts/checkincludes.pl > but they have been removed manually to avoid removing false positives. > > Signed-off-by: Pravin Shedge Acked-by: Gregory Fong

Re: [PATCH 03/45] drivers: gpio: remove duplicate includes

2017-12-06 Thread Gregory Fong
Hi Pravin, On Mon, Dec 4, 2017 at 5:58 PM, Pravin Shedge wrote: > These duplicate includes have been found with scripts/checkincludes.pl but > they have been removed manually to avoid removing false positives. > > Signed-off-by: Pravin Shedge

Re: [PATCH 03/45] drivers: gpio: remove duplicate includes

2017-12-06 Thread Gregory Fong
Hi Pravin, On Mon, Dec 4, 2017 at 5:58 PM, Pravin Shedge wrote: > These duplicate includes have been found with scripts/checkincludes.pl but > they have been removed manually to avoid removing false positives. > > Signed-off-by: Pravin Shedge > --- > drivers/gpio/gpio-brcmstb.c | 1 - > 1 file

Re: [PATCH v2 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-10-26 Thread Gregory Fong
It is convenient to mask the non-wake parent > when suspending to preserve the hardware state for proper wakeup > accounting when the driver is resumed. > > Signed-off-by: Doug Berger <open...@gmail.com> Acked-by: Gregory Fong <gregory.0...@gmail.com>

Re: [PATCH v2 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-10-26 Thread Gregory Fong
non-wake parent > when suspending to preserve the hardware state for proper wakeup > accounting when the driver is resumed. > > Signed-off-by: Doug Berger Acked-by: Gregory Fong

Re: [PATCH v2 6/7] gpio: brcmstb: consolidate interrupt domains

2017-10-26 Thread Gregory Fong
mber of > the GPIO should resolve. This domain can only map hwirq numbers > 0-31 so interrupts on GPIO above that can't be mapped by the > device-tree. > > This commit effectively reverts the patch from Gregory Fong [1] > that was accepted upstream and replaces it with a consolidated > irq

Re: [PATCH v2 6/7] gpio: brcmstb: consolidate interrupt domains

2017-10-26 Thread Gregory Fong
olve. This domain can only map hwirq numbers > 0-31 so interrupts on GPIO above that can't be mapped by the > device-tree. > > This commit effectively reverts the patch from Gregory Fong [1] > that was accepted upstream and replaces it with a consolidated > irq domain implementa

Re: [PATCH 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-10-20 Thread Gregory Fong
On Thu, Oct 19, 2017 at 11:39 AM, Doug Berger wrote: >>> +static int brcmstb_gpio_resume(struct device *dev) >>> +{ >>> +struct brcmstb_gpio_priv *priv = dev_get_drvdata(dev); >>> +struct brcmstb_gpio_bank *bank; >>> +u32 wake_mask = 0; >> >> This isn't really being

Re: [PATCH 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-10-20 Thread Gregory Fong
On Thu, Oct 19, 2017 at 11:39 AM, Doug Berger wrote: >>> +static int brcmstb_gpio_resume(struct device *dev) >>> +{ >>> +struct brcmstb_gpio_priv *priv = dev_get_drvdata(dev); >>> +struct brcmstb_gpio_bank *bank; >>> +u32 wake_mask = 0; >> >> This isn't really being used as a mask,

Re: [PATCH 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-10-19 Thread Gregory Fong
Hi Doug, Nice description of the problem with dealing with a pending disabled wake interrupt and the solution. A few remarks: On Fri, Sep 29, 2017 at 08:40:57PM -0700, Doug Berger wrote: > diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c > index 752a46ce3589..c964ed71a68d

Re: [PATCH 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-10-19 Thread Gregory Fong
Hi Doug, Nice description of the problem with dealing with a pending disabled wake interrupt and the solution. A few remarks: On Fri, Sep 29, 2017 at 08:40:57PM -0700, Doug Berger wrote: > diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c > index 752a46ce3589..c964ed71a68d

Re: [PATCH 6/7] gpio: brcmstb: consolidate interrupt domains

2017-10-19 Thread Gregory Fong
Hi Doug, On Wed, Oct 04, 2017 at 02:24:37PM -0700, Doug Berger wrote: > On 10/03/2017 08:03 PM, Gregory Fong wrote: > > On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger <open...@gmail.com> wrote: > >> The GPIOLIB IRQ chip helpers were very appealing, but badly broke >

Re: [PATCH 6/7] gpio: brcmstb: consolidate interrupt domains

2017-10-19 Thread Gregory Fong
Hi Doug, On Wed, Oct 04, 2017 at 02:24:37PM -0700, Doug Berger wrote: > On 10/03/2017 08:03 PM, Gregory Fong wrote: > > On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger wrote: > >> The GPIOLIB IRQ chip helpers were very appealing, but badly broke > >> the 1:1 mapping

Re: [PATCH 5/7] gpio: brcmstb: enable masking of interrupts when changing type

2017-10-03 Thread Gregory Fong
On Tue, Oct 3, 2017 at 7:22 PM, Doug Berger <open...@gmail.com> wrote: > On 10/03/2017 07:10 PM, Gregory Fong wrote: >> Hi Doug, >> >> On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger <open...@gmail.com> wrote: >>> Mask the GPIO interrupt while its type

Re: [PATCH 5/7] gpio: brcmstb: enable masking of interrupts when changing type

2017-10-03 Thread Gregory Fong
On Tue, Oct 3, 2017 at 7:22 PM, Doug Berger wrote: > On 10/03/2017 07:10 PM, Gregory Fong wrote: >> Hi Doug, >> >> On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger wrote: >>> Mask the GPIO interrupt while its type is being changed, just in case >>> it can pr

Re: [PATCH 2/7] gpio: brcmstb: release the bgpio lock during irq handlers

2017-10-03 Thread Gregory Fong
On Tue, Oct 3, 2017 at 7:09 PM, Doug Berger <open...@gmail.com> wrote: > On 10/03/2017 06:55 PM, Gregory Fong wrote: >> Hi Doug, >> >> On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger <open...@gmail.com> wrote: >>> The basic memory-mapped GPIO controlle

Re: [PATCH 2/7] gpio: brcmstb: release the bgpio lock during irq handlers

2017-10-03 Thread Gregory Fong
On Tue, Oct 3, 2017 at 7:09 PM, Doug Berger wrote: > On 10/03/2017 06:55 PM, Gregory Fong wrote: >> Hi Doug, >> >> On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger wrote: >>> The basic memory-mapped GPIO controller lock must be released >>> before calling

Re: [PATCH 6/7] gpio: brcmstb: consolidate interrupt domains

2017-10-03 Thread Gregory Fong
Hi Doug, On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger wrote: > The GPIOLIB IRQ chip helpers were very appealing, but badly broke > the 1:1 mapping between a GPIO controller's device_node and its > interrupt domain. Out of curiosity, what sort of problems have you seen from

Re: [PATCH 6/7] gpio: brcmstb: consolidate interrupt domains

2017-10-03 Thread Gregory Fong
Hi Doug, On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger wrote: > The GPIOLIB IRQ chip helpers were very appealing, but badly broke > the 1:1 mapping between a GPIO controller's device_node and its > interrupt domain. Out of curiosity, what sort of problems have you seen from this? > > This

Re: [PATCH 5/7] gpio: brcmstb: enable masking of interrupts when changing type

2017-10-03 Thread Gregory Fong
Hi Doug, On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger wrote: > Mask the GPIO interrupt while its type is being changed, just in case > it can prevent a spurious interrupt. "Just in case"? I don't have access to hardware documentation for this anymore, but I'd expect to some

Re: [PATCH 5/7] gpio: brcmstb: enable masking of interrupts when changing type

2017-10-03 Thread Gregory Fong
Hi Doug, On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger wrote: > Mask the GPIO interrupt while its type is being changed, just in case > it can prevent a spurious interrupt. "Just in case"? I don't have access to hardware documentation for this anymore, but I'd expect to some stronger claim that

Re: [PATCH 4/7] gpio: brcmstb: correct the configuration of level interrupts

2017-10-03 Thread Gregory Fong
; Fixes: 19a7b6940b78 ("gpio: brcmstb: Add interrupt and wakeup source support") > Signed-off-by: Doug Berger <open...@gmail.com> Acked-by: Gregory Fong <gregory.0...@gmail.com>

Re: [PATCH 4/7] gpio: brcmstb: correct the configuration of level interrupts

2017-10-03 Thread Gregory Fong
t;gpio: brcmstb: Add interrupt and wakeup source support") > Signed-off-by: Doug Berger Acked-by: Gregory Fong

Re: [PATCH 3/7] gpio: brcmstb: switch to handle_level_irq flow

2017-10-03 Thread Gregory Fong
Signed-off-by: Doug Berger <open...@gmail.com> Acked-by: Gregory Fong <gregory.0...@gmail.com>

Re: [PATCH 3/7] gpio: brcmstb: switch to handle_level_irq flow

2017-10-03 Thread Gregory Fong
rq flow instead of the handle_simple_irq > flow we get proper handling of interrupt masking as well as acking > of interrupts. The irq_ack method is added to support this. > > Fixes: 19a7b6940b78 ("gpio: brcmstb: Add interrupt and wakeup source support") > Signed-off-by: Doug Berger Acked-by: Gregory Fong

Re: [PATCH 2/7] gpio: brcmstb: release the bgpio lock during irq handlers

2017-10-03 Thread Gregory Fong
Hi Doug, On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger wrote: > The basic memory-mapped GPIO controller lock must be released > before calling the registered GPIO interrupt handlers to allow > the interrupt handlers to access the hardware. Otherwise, the > hardware accesses

Re: [PATCH 2/7] gpio: brcmstb: release the bgpio lock during irq handlers

2017-10-03 Thread Gregory Fong
Hi Doug, On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger wrote: > The basic memory-mapped GPIO controller lock must be released > before calling the registered GPIO interrupt handlers to allow > the interrupt handlers to access the hardware. Otherwise, the > hardware accesses will deadlock when

Re: [PATCH 1/7] gpio: brcmstb: allow all instances to be wakeup sources

2017-10-03 Thread Gregory Fong
_irq has been defined to > indicate that the GPIO device can wake. > > Fixes: 19a7b6940b78 ("gpio: brcmstb: Add interrupt and wakeup source support") > Signed-off-by: Doug Berger <open...@gmail.com> Acked-by: Gregory Fong <gregory.0...@gmail.com>

Re: [PATCH 1/7] gpio: brcmstb: allow all instances to be wakeup sources

2017-10-03 Thread Gregory Fong
cate that the GPIO device can wake. > > Fixes: 19a7b6940b78 ("gpio: brcmstb: Add interrupt and wakeup source support") > Signed-off-by: Doug Berger Acked-by: Gregory Fong

Re: [PATCH 1/2] gpio: brcmstb: Handle return value of devm_kasprintf

2017-09-20 Thread Gregory Fong
On Wed, Sep 20, 2017 at 12:13 AM, Arvind Yadav wrote: > devm_kasprintf() can fail here and we must check its return value. > > Signed-off-by: Arvind Yadav > --- > drivers/gpio/gpio-brcmstb.c | 3 +++ > 1 file changed, 3 insertions(+) > >

Re: [PATCH 1/2] gpio: brcmstb: Handle return value of devm_kasprintf

2017-09-20 Thread Gregory Fong
On Wed, Sep 20, 2017 at 12:13 AM, Arvind Yadav wrote: > devm_kasprintf() can fail here and we must check its return value. > > Signed-off-by: Arvind Yadav > --- > drivers/gpio/gpio-brcmstb.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpio/gpio-brcmstb.c

Re: [PATCH] gpio: brcmstb: check return value of gpiochip_irqchip_add()

2017-08-16 Thread Gregory Fong
On Wed, Aug 9, 2017 at 3:51 PM, Masahiro Yamada <yamada.masah...@socionext.com> wrote: > Because gpiochip_irqchip_add() may fail, its return value should > be checked. > > Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> Acked-by: Gregory Fong <gregory.0...@gmail.com>

Re: [PATCH] gpio: brcmstb: check return value of gpiochip_irqchip_add()

2017-08-16 Thread Gregory Fong
On Wed, Aug 9, 2017 at 3:51 PM, Masahiro Yamada wrote: > Because gpiochip_irqchip_add() may fail, its return value should > be checked. > > Signed-off-by: Masahiro Yamada Acked-by: Gregory Fong

Re: [PATCH] irqchip: brcmstb-l2: Define an irq_pm_shutdown function

2017-07-28 Thread Gregory Fong
rian Fainelli <f.faine...@gmail.com> Acked-by: Gregory Fong <gregory.0...@gmail.com>

Re: [PATCH] irqchip: brcmstb-l2: Define an irq_pm_shutdown function

2017-07-28 Thread Gregory Fong
g non-wakeup events, which would result in spurious > wake-ups from sources that were not explicitly configured for wake-up. > > Fixes: 7f646e92766e ("irqchip: brcmstb-l2: Add Broadcom Set Top Box Level-2 > interrupt controller") > Signed-off-by: Florian Fainelli Acked-by: Gregory Fong

Re: [PATCH] gpio: Convert to using %pOF instead of full_name

2017-07-19 Thread Gregory Fong
ff-by: Rob Herring <r...@kernel.org> For the brcmstb part, Acked-by: Gregory Fong <gregory.0...@gmail.com>

Re: [PATCH] gpio: Convert to using %pOF instead of full_name

2017-07-19 Thread Gregory Fong
stb part, Acked-by: Gregory Fong

Re: [PATCH] cma: fix calculation of aligned offset

2017-06-29 Thread Gregory Fong
t CMA region > position") > Signed-off-by: Angus Clark <an...@angusclark.org> > Signed-off-by: Doug Berger <open...@gmail.com> Acked-by: Gregory Fong <gregory.0...@gmail.com>

Re: [PATCH] cma: fix calculation of aligned offset

2017-06-29 Thread Gregory Fong
inclusion in stable. > > Also, the align_order arguments of cma_bitmap_aligned_mask() and > cma_bitmap_aligned_offset() should not be negative so the argument > type was made unsigned. > > Fixes: b5be83e308f7 ("mm: cma: align to physical address, not CMA region > posit

Re: handle_bad_irq and locking

2017-05-15 Thread Gregory Fong
On Fri, May 12, 2017 at 1:40 AM, Thomas Gleixner <t...@linutronix.de> wrote: > On Thu, 11 May 2017, Gregory Fong wrote: >> Hi Thomas, >> >> I noticed that when you changed arm irq handling to use the generic >> implementation back in 2006 that you changed

Re: handle_bad_irq and locking

2017-05-15 Thread Gregory Fong
On Fri, May 12, 2017 at 1:40 AM, Thomas Gleixner wrote: > On Thu, 11 May 2017, Gregory Fong wrote: >> Hi Thomas, >> >> I noticed that when you changed arm irq handling to use the generic >> implementation back in 2006 that you changed do_bad_IRQ() to the >> fol

handle_bad_irq and locking

2017-05-11 Thread Gregory Fong
Hi Thomas, I noticed that when you changed arm irq handling to use the generic implementation back in 2006 that you changed do_bad_IRQ() to the following: +#define do_bad_IRQ(irq,desc,regs) \ +do { \ + spin_lock(>lock);

handle_bad_irq and locking

2017-05-11 Thread Gregory Fong
Hi Thomas, I noticed that when you changed arm irq handling to use the generic implementation back in 2006 that you changed do_bad_IRQ() to the following: +#define do_bad_IRQ(irq,desc,regs) \ +do { \ + spin_lock(>lock);

[PATCH] misc: Implement devm_misc_register

2017-05-08 Thread Gregory Fong
Add device managed devm_misc_register() to allow simplifying some miscdevice code. Signed-off-by: Gregory Fong <gregory.f...@virginorbit.com> --- This seemed like it would be handy for removing a large chunk of the cleanup code in various miscdevice users. Let me know whether you thin

[PATCH] misc: Implement devm_misc_register

2017-05-08 Thread Gregory Fong
Add device managed devm_misc_register() to allow simplifying some miscdevice code. Signed-off-by: Gregory Fong --- This seemed like it would be handy for removing a large chunk of the cleanup code in various miscdevice users. Let me know whether you think it'd be worth going ahead changing

Re: [PATCH] soc: bcm: brcmstb: Correctly match 7435 SoC

2017-04-19 Thread Gregory Fong
oc: bcm: brcmstb: Match additional compatible strings") > Reported-by: Andreas Oberritter <o...@saftware.de> > Signed-off-by: Florian Fainelli <f.faine...@gmail.com> Acked-by: Gregory Fong <gregory.0...@gmail.com>

Re: [PATCH] soc: bcm: brcmstb: Correctly match 7435 SoC

2017-04-19 Thread Gregory Fong
tional compatible strings") > Reported-by: Andreas Oberritter > Signed-off-by: Florian Fainelli Acked-by: Gregory Fong

Re: [PATCH 6/9] bus: brcmstb_gisb: correct support for 64-bit address output

2017-03-24 Thread Gregory Fong
ext line, this cast can be omitted. > + value |= (u64)gisb_read(gdev, ARB_ERR_CAP_HI_ADDR) << 32; > + > + return value; > +} > [snip] Acked-by: Gregory Fong <gregory.0...@gmail.com>

Re: [PATCH 6/9] bus: brcmstb_gisb: correct support for 64-bit address output

2017-03-24 Thread Gregory Fong
4)gisb_read(gdev, ARB_ERR_CAP_HI_ADDR) << 32; > + > + return value; > +} > [snip] Acked-by: Gregory Fong

Re: [PATCH 4/9] bus: brcmstb_gisb: Use register offsets with writes too

2017-03-24 Thread Gregory Fong
offset from the base address for writes as well as reads. > > Fixes: f80835875d3d ("bus: brcmstb_gisb: Look up register offsets in a table") > Signed-off-by: Doug Berger <open...@gmail.com> Acked-by: Gregory Fong <gregory.0...@gmail.com>

Re: [PATCH 4/9] bus: brcmstb_gisb: Use register offsets with writes too

2017-03-24 Thread Gregory Fong
ess for writes as well as reads. > > Fixes: f80835875d3d ("bus: brcmstb_gisb: Look up register offsets in a table") > Signed-off-by: Doug Berger Acked-by: Gregory Fong

mpic IRQ_TYPE_BOTH handling

2017-01-02 Thread Gregory Fong
Hi all, In arch/powerpc/sysdev/mpic.c , it looks like IRQ_TYPE_EDGE_BOTH is handled the same way as IRQ_TYPE_EDGE_FALLING: static unsigned int mpic_type_to_vecpri(struct mpic *mpic, unsigned int type) { /* Now convert sense value */ switch(type & IRQ_TYPE_SENSE_MASK) {

mpic IRQ_TYPE_BOTH handling

2017-01-02 Thread Gregory Fong
Hi all, In arch/powerpc/sysdev/mpic.c , it looks like IRQ_TYPE_EDGE_BOTH is handled the same way as IRQ_TYPE_EDGE_FALLING: static unsigned int mpic_type_to_vecpri(struct mpic *mpic, unsigned int type) { /* Now convert sense value */ switch(type & IRQ_TYPE_SENSE_MASK) {

[PATCH v2] MIPS: BCM63XX: Use pr_* instead of printk

2015-10-14 Thread Gregory Fong
Signed-off-by: Gregory Fong Cc: Florian Fainelli Cc: Jonas Gorski Cc: Joe Perches --- v1->v2: Address Joe's comments on v1 (see http://lkml.iu.edu/hypermail/linux/kernel/1508.3/03472.html ) arch/mips/bcm63xx/boards/board_bcm963xx.c | 14 +++--- arch/mips/bcm63xx/cp

[PATCH v2] MIPS: BCM63XX: Use pr_* instead of printk

2015-10-14 Thread Gregory Fong
Signed-off-by: Gregory Fong <gregory.0...@gmail.com> Cc: Florian Fainelli <f.faine...@gmail.com> Cc: Jonas Gorski <j...@openwrt.org> Cc: Joe Perches <j...@perches.com> --- v1->v2: Address Joe's comments on v1 (see http://lkml.iu.edu/hypermail/linux/kernel/1508.3/03472

[PATCH] MIPS: BCM63XX: Use pr_* instead of printk

2015-08-27 Thread Gregory Fong
Signed-off-by: Gregory Fong Cc: Florian Fainelli Cc: Jonas Gorski --- arch/mips/bcm63xx/boards/board_bcm963xx.c | 11 ++- arch/mips/bcm63xx/cpu.c | 6 +++--- arch/mips/bcm63xx/dev-pcmcia.c| 2 +- arch/mips/bcm63xx/irq.c | 2 +- arch

[PATCH] MIPS: BCM63XX: Use pr_* instead of printk

2015-08-27 Thread Gregory Fong
Signed-off-by: Gregory Fong gregory.0...@gmail.com Cc: Florian Fainelli f.faine...@gmail.com Cc: Jonas Gorski j...@openwrt.org --- arch/mips/bcm63xx/boards/board_bcm963xx.c | 11 ++- arch/mips/bcm63xx/cpu.c | 6 +++--- arch/mips/bcm63xx/dev-pcmcia.c| 2

[PATCH v2] scripts/setlocalversion: fix false positive -dirty tag from ctime

2015-08-13 Thread Gregory Fong
-00130-g7ddab73-dirty After, starting from clean index: $ ls -l Kbuild -rw-rw-r-- 1 gregory gregory 2622 Aug 10 12:38 Kbuild $ chmod u+w Kbuild # intentional no-op that updates ctime $ CONFIG_LOCALVERSION_AUTO=y /bin/sh scripts/setlocalversion $PWD -00131-gfa3477d Signed-off-by: Greg

Re: [PATCH v4 2/4] gpio: brcmstb: Add interrupt and wakeup source support

2015-08-13 Thread Gregory Fong
On Thu, Aug 13, 2015 at 4:11 AM, Linus Walleij wrote: > On Sat, Aug 1, 2015 at 3:17 AM, Gregory Fong wrote: > >> Uses the gpiolib irqchip helpers. For this to work, the irq setup >> function is called once per bank instead of once per device. Note >> that all known

Re: [PATCH v4 2/4] gpio: brcmstb: Add interrupt and wakeup source support

2015-08-13 Thread Gregory Fong
On Thu, Aug 13, 2015 at 4:11 AM, Linus Walleij linus.wall...@linaro.org wrote: On Sat, Aug 1, 2015 at 3:17 AM, Gregory Fong gregory.0...@gmail.com wrote: Uses the gpiolib irqchip helpers. For this to work, the irq setup function is called once per bank instead of once per device. Note

[PATCH v2] scripts/setlocalversion: fix false positive -dirty tag from ctime

2015-08-13 Thread Gregory Fong
-g7ddab73-dirty After, starting from clean index: $ ls -l Kbuild -rw-rw-r-- 1 gregory gregory 2622 Aug 10 12:38 Kbuild $ chmod u+w Kbuild # intentional no-op that updates ctime $ CONFIG_LOCALVERSION_AUTO=y /bin/sh scripts/setlocalversion $PWD -00131-gfa3477d Signed-off-by: Gregory Fong

[PATCH] mm: cma: mark cma_bitmap_maxno() inline in header

2015-08-12 Thread Gregory Fong
to mm/cma.c or make it inline here, and it's simple enough for the latter to make sense. Signed-off-by: Gregory Fong --- mm/cma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/cma.h b/mm/cma.h index 1132d73..17c75a4 100644 --- a/mm/cma.h +++ b/mm/cma.h @@ -16,7 +16,7

[PATCH] mm: cma: mark cma_bitmap_maxno() inline in header

2015-08-12 Thread Gregory Fong
to mm/cma.c or make it inline here, and it's simple enough for the latter to make sense. Signed-off-by: Gregory Fong gregory.0...@gmail.com --- mm/cma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/cma.h b/mm/cma.h index 1132d73..17c75a4 100644 --- a/mm/cma.h +++ b/mm

[PATCH] ARM: brcmstb: select ARCH_DMA_ADDR_T_64BIT for LPAE

2015-08-06 Thread Gregory Fong
Broadcom STB (BRCMSTB) has some 64-bit capable DMA and therefore needs dma_addr_t to be a 64-bit size. One user is the Broadcom SATA3 AHCI controller driver. Signed-off-by: Gregory Fong --- arch/arm/mach-bcm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-bcm/Kconfig

[PATCH] ARM: brcmstb: select ARCH_DMA_ADDR_T_64BIT for LPAE

2015-08-06 Thread Gregory Fong
Broadcom STB (BRCMSTB) has some 64-bit capable DMA and therefore needs dma_addr_t to be a 64-bit size. One user is the Broadcom SATA3 AHCI controller driver. Signed-off-by: Gregory Fong gregory.0...@gmail.com --- arch/arm/mach-bcm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch

[PATCH] ARM: BCM: Enable ARM erratum 798181 for BRCMSTB

2015-08-04 Thread Gregory Fong
Commit 04fcab32d3fa1d3f6afe97e0ab431c5572e07a2c ("ARM: 8111/1: Enable erratum 798181 for Broadcom Brahma-B15") enables this erratum for affected Broadcom Brahma-B15 CPUs when CONFIG_ARM_ERRATA_798181=y. Let's make sure that config option is actually set. Signed-off-by: Gregory Fong ---

[PATCH] ARM: BCM: Enable ARM erratum 798181 for BRCMSTB

2015-08-04 Thread Gregory Fong
Commit 04fcab32d3fa1d3f6afe97e0ab431c5572e07a2c (ARM: 8111/1: Enable erratum 798181 for Broadcom Brahma-B15) enables this erratum for affected Broadcom Brahma-B15 CPUs when CONFIG_ARM_ERRATA_798181=y. Let's make sure that config option is actually set. Signed-off-by: Gregory Fong gregory.0

[PATCH v4 2/4] gpio: brcmstb: Add interrupt and wakeup source support

2015-07-31 Thread Gregory Fong
iolib-of.c: - of_gpiochip_find_and_xlate() - of_get_named_gpiod_flags() drivers/gpio/gpiolib.c: - gpiochip_find() Signed-off-by: Gregory Fong --- v4: - when checking parent_irq, use <= 0 or > 0 since 0 is NO_IRQ. drivers/gpio/Kconfig| 1 + drivers/gpio/gpio

[PATCH v4 1/4] dt-bindings: brcmstb-gpio: document properties for wakeup

2015-07-31 Thread Gregory Fong
gpio-cells, #interrupt-cells, and brcm,gpio-bank-widths from hex to dec - use phandles Reviewed-by: Brian Norris Acked-by: Florian Fainelli Signed-off-by: Gregory Fong --- v4: no changes from v3 .../devicetree/bindings/gpio/brcm,brcmstb-gpio.txt | 35 +- 1 file changed, 28 insert

[PATCH v4 3/4] gpio: brcmstb: support wakeup from S5 cold boot

2015-07-31 Thread Gregory Fong
/brcmstb-gpio/f04172c0.gpio/power/wakeup enabled # cat /sys/bus/platform/drivers/brcmstb-gpio/f04172c0.gpio/power/wakeup_count 1 Signed-off-by: Gregory Fong --- v4: rename __brcmstb_gpio_irq_set_wake() to brcmstb_gpio_priv_set_wake(). drivers/gpio/gpio-brcmstb.c | 56

[PATCH v4 4/4] ARM: dts: brcmstb: add BCM7445 GPIO nodes

2015-07-31 Thread Gregory Fong
Need the aon_pm_l2_intc and irq0_aon_intc descriptions, so included those as well. Signed-off-by: Gregory Fong --- New in v4. arch/arm/boot/dts/bcm7445.dtsi | 50 ++ 1 file changed, 50 insertions(+) diff --git a/arch/arm/boot/dts/bcm7445.dtsi b/arch/arm

[PATCH v4 0/4] GPIO support for BRCMSTB

2015-07-31 Thread Gregory Fong
(merged from v2 to GPIO tree) - ARM Kconfig changes (merged from v2 to arm-soc tree) - fix for null ptr deref in driver remove (merged from v3) Previous versions: v1: https://lkml.org/lkml/2015/5/6/199 v2: https://lkml.org/lkml/2015/5/28/853 v3: https://lkml.org/lkml/2015/6/17/960 Gregory Fong (4

[PATCH v4 0/4] GPIO support for BRCMSTB

2015-07-31 Thread Gregory Fong
(merged from v2 to GPIO tree) - ARM Kconfig changes (merged from v2 to arm-soc tree) - fix for null ptr deref in driver remove (merged from v3) Previous versions: v1: https://lkml.org/lkml/2015/5/6/199 v2: https://lkml.org/lkml/2015/5/28/853 v3: https://lkml.org/lkml/2015/6/17/960 Gregory Fong (4

[PATCH v4 2/4] gpio: brcmstb: Add interrupt and wakeup source support

2015-07-31 Thread Gregory Fong
: - of_gpiochip_find_and_xlate() - of_get_named_gpiod_flags() drivers/gpio/gpiolib.c: - gpiochip_find() Signed-off-by: Gregory Fong gregory.0...@gmail.com --- v4: - when checking parent_irq, use = 0 or 0 since 0 is NO_IRQ. drivers/gpio/Kconfig| 1 + drivers/gpio/gpio-brcmstb.c | 262

[PATCH v4 1/4] dt-bindings: brcmstb-gpio: document properties for wakeup

2015-07-31 Thread Gregory Fong
, #interrupt-cells, and brcm,gpio-bank-widths from hex to dec - use phandles Reviewed-by: Brian Norris computersforpe...@gmail.com Acked-by: Florian Fainelli f.faine...@gmail.com Signed-off-by: Gregory Fong gregory.0...@gmail.com --- v4: no changes from v3 .../devicetree/bindings/gpio/brcm,brcmstb

[PATCH v4 3/4] gpio: brcmstb: support wakeup from S5 cold boot

2015-07-31 Thread Gregory Fong
/brcmstb-gpio/f04172c0.gpio/power/wakeup enabled # cat /sys/bus/platform/drivers/brcmstb-gpio/f04172c0.gpio/power/wakeup_count 1 Signed-off-by: Gregory Fong gregory.0...@gmail.com --- v4: rename __brcmstb_gpio_irq_set_wake() to brcmstb_gpio_priv_set_wake(). drivers/gpio/gpio-brcmstb.c | 56

[PATCH v4 4/4] ARM: dts: brcmstb: add BCM7445 GPIO nodes

2015-07-31 Thread Gregory Fong
Need the aon_pm_l2_intc and irq0_aon_intc descriptions, so included those as well. Signed-off-by: Gregory Fong gregory.0...@gmail.com --- New in v4. arch/arm/boot/dts/bcm7445.dtsi | 50 ++ 1 file changed, 50 insertions(+) diff --git a/arch/arm/boot/dts

Re: [PATCH] irqchip: bcm7120-l2: Fix interrupt status for multiple parent IRQs

2015-07-27 Thread Gregory Fong
urce this is coming > from. To simplify things, associate an unique structure per parent interrupt > handler to avoid multiplying the number of lookups. > > Fixes: a5042de2688d ("irqchip: bcm7120-l2: Add Broadcom BCM7120-style Level 2 > interrupt controller") > Signed-off-by

Re: [PATCH] irqchip: bcm7120-l2: Fix interrupt status for multiple parent IRQs

2015-07-27 Thread Gregory Fong
an unique structure per parent interrupt handler to avoid multiplying the number of lookups. Fixes: a5042de2688d (irqchip: bcm7120-l2: Add Broadcom BCM7120-style Level 2 interrupt controller) Signed-off-by: Florian Fainelli f.faine...@gmail.com Acked-by: Gregory Fong gregory.0...@gmail.com

Re: [PATCH v3 4/4] gpio: brcmstb: support wakeup from S5 cold boot

2015-07-13 Thread Gregory Fong
On Mon, Jul 13, 2015 at 6:03 AM, Linus Walleij wrote: > On Thu, Jun 18, 2015 at 3:00 AM, Gregory Fong wrote: > >> For wake from S5, we need to: >> - register a reboot handler >> - set wakeup capability before requesting IRQ so wakeup count is >> incremented >

Re: [PATCH v3 3/4] gpio: brcmstb: Add interrupt and wakeup source support

2015-07-13 Thread Gregory Fong
On Mon, Jul 13, 2015 at 5:58 AM, Linus Walleij wrote: > On Thu, Jun 18, 2015 at 3:00 AM, Gregory Fong wrote: > >> Uses the gpiolib irqchip helpers. For this to work, the irq setup >> function is called once per bank instead of once per device. Note >> that all known

Re: [PATCH v3 3/4] gpio: brcmstb: Add interrupt and wakeup source support

2015-07-13 Thread Gregory Fong
On Mon, Jul 13, 2015 at 5:58 AM, Linus Walleij linus.wall...@linaro.org wrote: On Thu, Jun 18, 2015 at 3:00 AM, Gregory Fong gregory.0...@gmail.com wrote: Uses the gpiolib irqchip helpers. For this to work, the irq setup function is called once per bank instead of once per device. Note

Re: [PATCH v3 4/4] gpio: brcmstb: support wakeup from S5 cold boot

2015-07-13 Thread Gregory Fong
On Mon, Jul 13, 2015 at 6:03 AM, Linus Walleij linus.wall...@linaro.org wrote: On Thu, Jun 18, 2015 at 3:00 AM, Gregory Fong gregory.0...@gmail.com wrote: For wake from S5, we need to: - register a reboot handler - set wakeup capability before requesting IRQ so wakeup count is incremented

Re: [PATCH 0/7] soc: brcmstb: add system suspend support for STB SoCs

2015-06-18 Thread Gregory Fong
On Thu, Jun 18, 2015 at 5:11 PM, Brian Norris wrote: > Hi, > > This patch set introduces system suspend/resume support for Broadcom STB SoCs. > There are two suspend modes (S2 and S3) as well as a related low-power > shutdown > mode (S5). > > Along with the core PM support, include a driver for

Re: [PATCH 5/7] soc: brcmstb: add wake-timer driver

2015-06-18 Thread Gregory Fong
evice *pdev) > +{ > [...] > + /* > +* Set wakeup capability before requesting wakeup interrupt, so we can > +* process boot-time "wakeups" (e.g., from S5 soft-off) > +*/ > + device_set_wakeup_capable(dev, true); > + device_wakeu

Re: [PATCH 2/7] Documentation: dt: brcmstb: add waketimer documentation

2015-06-18 Thread Gregory Fong
On Thu, Jun 18, 2015 at 5:11 PM, Brian Norris wrote: > Signed-off-by: Brian Norris Acked-by: Gregory Fong -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.

Re: [PATCH 6/7] ARM: brcmstb: mask GIC IRQs on suspend

2015-06-18 Thread Gregory Fong
Norris Acked-by: Gregory Fong -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 6/7] ARM: brcmstb: mask GIC IRQs on suspend

2015-06-18 Thread Gregory Fong
Norris computersforpe...@gmail.com Acked-by: Gregory Fong gregory.0...@gmail.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ

Re: [PATCH 0/7] soc: brcmstb: add system suspend support for STB SoCs

2015-06-18 Thread Gregory Fong
On Thu, Jun 18, 2015 at 5:11 PM, Brian Norris computersforpe...@gmail.com wrote: Hi, This patch set introduces system suspend/resume support for Broadcom STB SoCs. There are two suspend modes (S2 and S3) as well as a related low-power shutdown mode (S5). Along with the core PM support,

Re: [PATCH 2/7] Documentation: dt: brcmstb: add waketimer documentation

2015-06-18 Thread Gregory Fong
On Thu, Jun 18, 2015 at 5:11 PM, Brian Norris computersforpe...@gmail.com wrote: Signed-off-by: Brian Norris computersforpe...@gmail.com Acked-by: Gregory Fong gregory.0...@gmail.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

Re: [PATCH 5/7] soc: brcmstb: add wake-timer driver

2015-06-18 Thread Gregory Fong
this cast. [snip] Acked-by: Gregory Fong gregory.0...@gmail.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org

[PATCH v3 4/4] gpio: brcmstb: support wakeup from S5 cold boot

2015-06-17 Thread Gregory Fong
/brcmstb-gpio/f04172c0.gpio/power/wakeup enabled # cat /sys/bus/platform/drivers/brcmstb-gpio/f04172c0.gpio/power/wakeup_count 1 Signed-off-by: Gregory Fong --- New in v3. drivers/gpio/gpio-brcmstb.c | 56 - 1 file changed, 50 insertions(+), 6

[PATCH v3 3/4] gpio: brcmstb: Add interrupt and wakeup source support

2015-06-17 Thread Gregory Fong
iolib-of.c: - of_gpiochip_find_and_xlate() - of_get_named_gpiod_flags() drivers/gpio/gpiolib.c: - gpiochip_find() Signed-off-by: Gregory Fong --- v3: - combine commits to add interrupt support and allow GPIOs to be wakeup sources - change to use the gpiolib irqchip helpers, reducing unnecessary code d

[PATCH v3 2/4] dt-bindings: brcmstb-gpio: document properties for wakeup

2015-06-17 Thread Gregory Fong
gpio-cells, #interrupt-cells, and brcm,gpio-bank-widths from hex to dec - use phandles Reviewed-by: Brian Norris Signed-off-by: Gregory Fong --- v3: Update per Brian's suggestions described in above message. .../devicetree/bindings/gpio/brcm,brcmstb-gpio.txt | 35 +- 1 file c

[PATCH v3 1/4] gpio: brcmstb: fix null ptr dereference in driver remove

2015-06-17 Thread Gregory Fong
list head right after allocating the priv struct to both avoid the null pointer dereference that could occur today. To guard against potential future changes, check for null pointer in remove. Reported-by: Tim Ross Signed-off-by: Gregory Fong --- New in v3. drivers/gpio/gpio-brcmstb.c | 14

[PATCH v3 0/4] GPIO support for BRCMSTB

2015-06-17 Thread Gregory Fong
v1 to GPIO tree) - Initial GPIO support w/o interrupts (merged from v2 to GPIO tree) - ARM Kconfig changes (merged from v2 to arm-soc tree) Previous revisions: v1: https://lkml.org/lkml/2015/5/6/199 v2: https://lkml.org/lkml/2015/5/28/853 Gregory Fong (4): gpio: brcmstb: fix null ptr dereference

[PATCH v3 1/4] gpio: brcmstb: fix null ptr dereference in driver remove

2015-06-17 Thread Gregory Fong
list head right after allocating the priv struct to both avoid the null pointer dereference that could occur today. To guard against potential future changes, check for null pointer in remove. Reported-by: Tim Ross tr...@broadcom.com Signed-off-by: Gregory Fong gregory.0...@gmail.com --- New in v3

  1   2   3   >