Re: [PATCH] drivers/pcmcia: Convert timers to use timer_setup()

2017-10-27 Thread Russell King - ARM Linux
ers/pcmcia/soc_common.c | 7 +++ > drivers/pcmcia/tcic.c | 8 +++- > drivers/pcmcia/yenta_socket.c | 7 +++ > 8 files changed, 24 insertions(+), 31 deletions(-) For soc_common.c: Acked-by: Russell King <rmk+ker...@armlinux.org.uk> Thanks. -- RMK's Patch system: ht

[PATCH] pcmcia: sa1111: remove special sa1111 mmio accessors

2017-09-26 Thread Russell King
Remove the special SA MMIO accessors from the SA PCMCIA driver as their definition will be removed shortly. The SA accessors are barrierless, so use the _relaxed variants. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/sa_generic.

[PATCH] pcmcia: sa1111: use sa1111_get_irq() to obtain IRQ resources

2017-09-26 Thread Russell King
Use the provided sa_get_irq() to fetch the IRQ resources for the SA PCMCIA driver. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/sa_generic.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/

Re: [PATCH 16/28] pcmcia: fix return value of soc_pcmcia_regulator_set

2016-10-18 Thread Russell King - ARM Linux
On Tue, Oct 18, 2016 at 12:13:37AM +0200, Arnd Bergmann wrote: > The newly introduced soc_pcmcia_regulator_set() function sometimes returns > without setting its return code, as shown by this warning: > > drivers/pcmcia/soc_common.c: In function 'soc_pcmcia_regulator_set': >

[PATCH 10/12] pcmcia: soc_common: constify pcmcia_low_level ops pointer

2016-09-28 Thread Russell King
Constify the pcmcia_low_level operation pointer to soc_pcmcia_init_one() which has no need to modify it. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/soc_common.c | 2 +- drivers/pcmcia/soc_common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

[PATCH 12/12] pcmcia: soc_common: add driver-data pointer

2016-09-28 Thread Russell King
Add a driver-data pointer so that low level drivers can add additional data to the soc_common pcmcia socket structure. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/soc_common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pcmcia/soc_comm

[PATCH 09/12] pcmcia: soc_common: switch to a per-socket cpufreq notifier

2016-09-28 Thread Russell King
Switch to a per-socket cpufreq notifier rather than a global notifier. This allows each socket to be self-contained. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/soc_common.c | 77 ++--- drivers/pcmcia/soc_common.h | 3

[PATCH 07/12] pcmcia: soc_common: add CF socket state helper

2016-09-28 Thread Russell King
Add a helper to get the voltage state of CF sockets, where the voltage sense pins are not wired up. Switch assabet and cerf to use this helper. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/sa1100_assabet.c | 9 + drivers/pcmcia/sa1100_cerf.c

[PATCH 03/12] pcmcia: soc_common: ignore invalid interrupts

2016-09-28 Thread Russell King
If gpiod_to_irq() returns an invalid interrupt, we should not try to use it as an interrupt number. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/soc_common.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/pcmcia/soc_co

[PATCH 04/12] pcmcia: soc_common: request legacy detect GPIO with active low

2016-09-28 Thread Russell King
Request the legacy card detect signal with the active low property and remove our own negation of the detection value. This allows us to use the firmware-defined polarities rather than hard-coding it into the driver. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/

[PATCH 02/12] pcmcia: soc_common: switch to using gpio_descs

2016-09-28 Thread Russell King
Switch to using the gpiod_* consumer API rather than the legacy API. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/soc_common.c | 49 +++-- drivers/pcmcia/soc_common.h | 3 +++ 2 files changed, 41 insertions(+), 11 del

[PATCH 01/12] pcmcia: soc_common: use devm_gpio_request_one()

2016-09-28 Thread Russell King
Use devm_gpio_request_one() to request the GPIOs so we can avoid manual clean up these gpio resources. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/soc_common.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/

Re: [PATCH 10/33] pcmcia: soc_common: switch to using gpio_descs

2016-09-14 Thread Russell King - ARM Linux
On Wed, Sep 14, 2016 at 01:29:04PM +0200, Linus Walleij wrote: > On Mon, Aug 29, 2016 at 12:24 PM, Russell King > <rmk+ker...@armlinux.org.uk> wrote: > > > Switch to using the gpiod_* consumer API rather than the legacy API. > > > > Signed-off-by: Russell

Re: [PATCH 18/33] pcmcia: sa1100: provide generic CF support

2016-09-14 Thread Russell King - ARM Linux
On Wed, Sep 14, 2016 at 10:52:39AM +0200, Linus Walleij wrote: > On Mon, Aug 29, 2016 at 12:25 PM, Russell King > <rmk+ker...@armlinux.org.uk> wrote: > > > Provide generic non-voltage sensing socket support for StrongARM > > platforms using the gpiolib and reg

Re: [PATCH 8/8] ARM: pxa/lubbock: add pcmcia clock

2016-09-07 Thread Russell King - ARM Linux
On Tue, Sep 06, 2016 at 07:17:09PM +0200, Robert Jarzmik wrote: > Russell King <rmk+ker...@armlinux.org.uk> writes: > > > Add the required PCMCIA clock for the SA "1800" device. This clock > > is used to compute timing information for the PCMCIA interface

[PATCH 7/8] ARM: sa1111: fix missing clk_disable()

2016-09-06 Thread Russell King
SA forgets to call clk_disable() in the probe error cleanup path. Add the necessary call. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/common/sa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/common/sa.c b/arch/arm/

[PATCH 8/8] ARM: pxa/lubbock: add pcmcia clock

2016-09-06 Thread Russell King
this must not be copied into DT. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/mach-pxa/lubbock.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 7245f3359564..d6159f8ef0c2 100644 --- a/a

[PATCH 1/8] pcmcia: sa1111: fix propagation of lowlevel board init return code

2016-09-06 Thread Russell King
<robert.jarz...@free.fr> Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/sa_badge4.c | 22 -- drivers/pcmcia/sa_generic.c| 22 +- drivers/pcmcia/sa_jornada720.c | 25 ++--- dr

[PATCH 2/8] pcmcia: lubbock: fix sockets configuration

2016-09-06 Thread Russell King
ldmib r3, {r2, r3}<-- trapping instruction Signed-off-by: Robert Jarzmik <robert.jarz...@free.fr> Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/pxa2xx_base.c| 9 + drivers/pcmcia/pxa2xx_base.h| 2 +- drivers/pcmcia/sa111

[PATCH 6/8] ARM: sa1111: fix pcmcia suspend/resume

2016-09-06 Thread Russell King
cards after a S2RAM cycle. Fixes: d7646f7632549 ("pcmcia: use dev_pm_ops for class pcmcia_socket_class") Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/common/sa.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a

[PATCH 5/8] ARM: sa1111: fix pcmcia interrupt mask polarity

2016-09-06 Thread Russell King
The polarity of the high IRQs was being calculated using SA_IRQMASK_HI(), but this assumes a Linux interrupt number, not a hardware interrupt number. Hence, the resulting mask was incorrect. Fix this. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/common/sa

[PATCH 4/8] ARM: sa1111: fix error code propagation in sa1111_probe()

2016-09-06 Thread Russell King
Ensure that we propagate the platform_get_irq() error code out of the probe function. This allows probe deferrals to work correctly should platform_get_irq() not be able to resolve the interrupt in a DT environment at probe time. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> ---

Re: [PATCH 0/3] SA11x0/PXA pcmcia fixes

2016-09-06 Thread Russell King - ARM Linux
On Mon, Aug 29, 2016 at 11:02:32AM +0100, Russell King - ARM Linux wrote: > Further to the DS suspend/resume fix, here's a few more for SA11x0/PXA. > > drivers/pcmcia/sa11xx_base.c | 8 > drivers/pcmcia/soc_common.c | 2 +- > 2 files changed, 5 insertions(+), 5 deletion

Re: [PATCH 05/33] gpio: add generic single-register fixed-direction GPIO driver

2016-09-05 Thread Russell King - ARM Linux
On Mon, Sep 05, 2016 at 11:06:28AM +0200, Linus Walleij wrote: > I couldn't resist testing on the Compaq iPAQ h3600. It works the > same as before so: > Tested-by: Linus Walleij [for Compaq iPAQ H3600] Great news. I've been thinking about digging out my h3600, but it's

Re: [PATCH 05/33] gpio: add generic single-register fixed-direction GPIO driver

2016-09-04 Thread Russell King - ARM Linux
On Sun, Sep 04, 2016 at 09:04:59PM +0200, Robert Jarzmik wrote: > And retested with my 3 patches on top of it. Everything works fine : > - CF insertion is correctly detected now ! > - AT/2 keyboard interrupts fire, keys are there, etc ... > - the AT/2 warning is now gone > > The pxa_cplds_irqs

Re: [PATCH 05/33] gpio: add generic single-register fixed-direction GPIO driver

2016-09-03 Thread Russell King - ARM Linux
On Fri, Sep 02, 2016 at 11:21:12PM +0200, Robert Jarzmik wrote: > It looks that I have an ordering problem : > - I want gpio-pxa.probe() to be called at device initcall time > - pxa_cplds_irqs.probe() cannot complete before gpio-pxa.probe() because it >needs GPIO0 as its interrupt source >

Re: [PATCH 05/33] gpio: add generic single-register fixed-direction GPIO driver

2016-09-03 Thread Russell King - ARM Linux
On Thu, Sep 01, 2016 at 09:19:13AM +0200, Robert Jarzmik wrote: > >From 977c16201a752aac8a8fb2da1f4271795f0b2122 Mon Sep 17 00:00:00 2001 > From: Robert Jarzmik > Date: Thu, 1 Sep 2016 08:31:08 +0200 > Subject: [PATCH] pcmcia: lubbock: fix sockets configuration > > On

Re: [PATCH 05/33] gpio: add generic single-register fixed-direction GPIO driver

2016-09-02 Thread Russell King - ARM Linux
On Fri, Sep 02, 2016 at 07:50:35PM +0200, Robert Jarzmik wrote: > Russell King - ARM Linux <li...@armlinux.org.uk> writes: > >> Moreover, I have a bit of homework as I also see : > >> - no SA interrupts at all, especially nothing when I insert/remove m

Re: [PATCH 05/33] gpio: add generic single-register fixed-direction GPIO driver

2016-09-02 Thread Russell King - ARM Linux
rom: Russell King <rmk+ker...@armlinux.org.uk> Subject: [PATCH] gpio: gpio-reg: add irq mapping for gpio-reg users Add support for mapping gpio-reg gpios to interrupts. This may be a non-linear mapping - some gpios in the register may not even have corresponding interrupts associated with th

[PATCH] pcmcia: sa1111: fix propagation of lowlevel board init return code

2016-09-02 Thread Russell King
When testing Lubbock, it was noticed that the sa pcmcia driver bound but was not functional due to no sockets being registered. This is because the return code from the lowlevel board initialisation was not being propagated out of the probe function. Fix this. Signed-off-by: Russell King

Re: [PATCH 05/33] gpio: add generic single-register fixed-direction GPIO driver

2016-09-01 Thread Russell King - ARM Linux
On Thu, Sep 01, 2016 at 11:58:28PM +0200, Robert Jarzmik wrote: > Russell King - ARM Linux <li...@armlinux.org.uk> writes: > > On Thu, Sep 01, 2016 at 09:19:13AM +0200, Robert Jarzmik wrote: > > It looks like: > > > > (a) pcmcia_probe() in drivers/pcmc

Re: [RFC PATCH 00/33] SA11x0/PXA GPIO rework (Core + PCMCIA only)

2016-09-01 Thread Russell King - ARM Linux
On Tue, Aug 30, 2016 at 11:31:58PM +0200, Linus Walleij wrote: > For all the GPIO patches: > Acked-by: Linus Walleij > > With the smallish changes needed to patch 5/33 that one is acked too. > > In fact I would ACK it anyway, because the net total cleanup is so > nice

Re: [PATCH 05/33] gpio: add generic single-register fixed-direction GPIO driver

2016-08-31 Thread Russell King - ARM Linux
On Wed, Aug 31, 2016 at 09:49:38AM +0100, Russell King - ARM Linux wrote: > On Tue, Aug 30, 2016 at 11:32:16PM +0200, Robert Jarzmik wrote: > > Russell King - ARM Linux <li...@armlinux.org.uk> writes: > > > > > If you can wait a day or two, I'll push a branch o

Re: [PATCH 05/33] gpio: add generic single-register fixed-direction GPIO driver

2016-08-31 Thread Russell King - ARM Linux
On Tue, Aug 30, 2016 at 11:32:16PM +0200, Robert Jarzmik wrote: > Russell King - ARM Linux <li...@armlinux.org.uk> writes: > > > If you can wait a day or two, I'll push a branch out for everything in > > all these multiple series. > Sure, just ping me wh

Re: [PATCH 05/33] gpio: add generic single-register fixed-direction GPIO driver

2016-08-30 Thread Russell King - ARM Linux
On Tue, Aug 30, 2016 at 11:25:19PM +0200, Linus Walleij wrote: > On Mon, Aug 29, 2016 at 12:24 PM, Russell King > <rmk+ker...@armlinux.org.uk> wrote: > > > Add a simple, generic, single register fixed-direction GPIO driver. > > This is able to support a single re

Re: [PATCH 05/33] gpio: add generic single-register fixed-direction GPIO driver

2016-08-30 Thread Russell King - ARM Linux
On Tue, Aug 30, 2016 at 06:42:03PM +0200, Robert Jarzmik wrote: > Russell King - ARM Linux <li...@armlinux.org.uk> writes: > > > On Mon, Aug 29, 2016 at 09:39:54PM +0200, Robert Jarzmik wrote: > >> Maybe this one would deserve a doxygen comment ? > > > > Do

Re: [PATCH 05/33] gpio: add generic single-register fixed-direction GPIO driver

2016-08-30 Thread Russell King - ARM Linux
On Tue, Aug 30, 2016 at 09:08:03AM +0300, Alexander Shiyan wrote: > >Вторник, 30 августа 2016, 2:12 +03:00 от Russell King - ARM Linux > ><li...@armlinux.org.uk>: > > > >On Mon, Aug 29, 2016 at 09:39:54PM +0200, Robert Jarzmik wrote: > >> Hi Rus

Re: [PATCH 05/33] gpio: add generic single-register fixed-direction GPIO driver

2016-08-29 Thread Russell King - ARM Linux
On Mon, Aug 29, 2016 at 09:39:54PM +0200, Robert Jarzmik wrote: > Hi Russell, > > Russell King <rmk+ker...@armlinux.org.uk> writes: > > > Add a simple, generic, single register fixed-direction GPIO driver. > > This is able to support a single register where a fix

Re: [PATCH 06/33] ARM: pxa/lubbock: add GPIO driver for LUB_MISC_WR register

2016-08-29 Thread Russell King - ARM Linux
On Mon, Aug 29, 2016 at 09:57:20PM +0200, Robert Jarzmik wrote: > Russell King <rmk+ker...@armlinux.org.uk> writes: > If gpio_reg_init() failed (and I know, the probability of a lack of memory at > that stage of the kernel boot is ridiculous), this will end up as an NULL > p

[PATCH 33/33] ARM: sa1111: remove legacy GPIO interfaces

2016-08-29 Thread Russell King
Now that we have migrated all users of the legacy private SA gpio interfaces, we can remove these redundant interfaces. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/common/sa.c | 59 -- arch/arm/include/asm/ha

[PATCH 16/33] pcmcia: soc_common: switch to a per-socket cpufreq notifier

2016-08-29 Thread Russell King
Switch to a per-socket cpufreq notifier rather than a global notifier. This allows each socket to be self-contained. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/soc_common.c | 77 ++--- drivers/pcmcia/soc_common.h | 3

[PATCH 18/33] pcmcia: sa1100: provide generic CF support

2016-08-29 Thread Russell King
Provide generic non-voltage sensing socket support for StrongARM platforms using the gpiolib and regulator subsystems to obtain the resources to control the socket. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/sa1100_generic.c

[PATCH 17/33] pcmcia: soc_common: constify pcmcia_low_level ops pointer

2016-08-29 Thread Russell King
Constify the pcmcia_low_level operation pointer to soc_pcmcia_init_one() which has no need to modify it. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/soc_common.c | 2 +- drivers/pcmcia/soc_common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

[PATCH 20/33] pcmcia: add MAX1600 driver

2016-08-29 Thread Russell King
Add a driver for the MAX1600 PCMCIA power switch device. This is a dual-channel device, controlled via four GPIO signals per channel. Two signals control the Vcc output, and two control the Vpp output. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/Kconfig

[PATCH 32/33] pcmcia: sa1100*: remove redundant bvd1/bvd2 setting

2016-08-29 Thread Russell King
bvd1 and bvd2 both default to 1 in the generic soc_common code, so having a driver repeat this is redundant. Remove it. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/sa1100_shannon.c | 4 drivers/pcmcia/sa1100_simpad.c | 4 ++-- 2 files changed, 2 inse

[PATCH 14/33] pcmcia: soc_common: add CF socket state helper

2016-08-29 Thread Russell King
Add a helper to get the voltage state of CF sockets, where the voltage sense pins are not wired up. Switch assabet and cerf to use this helper. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/sa1100_assabet.c | 9 + drivers/pcmcia/sa1100_cerf.c

[PATCH 24/33] ARM: sa1100/h3xxx: switch h3xxx PCMCIA to use gpiod APIs

2016-08-29 Thread Russell King
Switch h3xxx's PCMCIA implementation to use the gpiod APIs where possible. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/mach-sa1100/h3xxx.c | 17 + drivers/pcmcia/sa1100_h3600.c | 16 +++- 2 files changed, 24 insertions(+), 9 del

[PATCH 23/33] ARM: sa1100/cerf: convert to generic CF sockets

2016-08-29 Thread Russell King
Convert Cerf to use the generic CF socket support. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/mach-sa1100/cerf.c | 18 +++-- drivers/pcmcia/Makefile | 1 - drivers/pcmcia/sa1100_cerf.c| 85 - drivers/

[PATCH 21/33] ARM: sa1100: provide infrastructure to support generic CF sockets

2016-08-29 Thread Russell King
Provide the SoC-level infrastructure to support the generic CF sockets. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/mach-sa1100/clock.c | 2 ++ arch/arm/mach-sa1100/generic.c | 14 +- arch/arm/mach-sa1100/generic.h | 3 +++ 3 files changed, 18 inse

[PATCH 12/33] pcmcia: soc_common: add support for reset and bus enable GPIOs

2016-08-29 Thread Russell King
Add support to soc_common for controlling reset and bus enable GPIOs from within the generic soc_common layer, rather than having individual drivers having to perform this themselves. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/soc_common.

[PATCH 15/33] pcmcia: soc_common: add support for Vcc and Vpp regulators

2016-08-29 Thread Russell King
) and we need to ignore attempts to configure for 5V, as per the existing board specific drivers. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/soc_common.c | 47 + drivers/pcmcia/soc_common.h | 11 +++ 2 files c

[PATCH 31/33] ARM: pxa/lubbock: convert PCMCIA to use MAX1600 driver

2016-08-29 Thread Russell King
As Lubbock now provides GPIOs via gpiolib for controlling the socket power, we can use the MAX1600 driver. Switch Lubbock to use this driver, which simplifies the code. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/mach-pxa/lubbock.c | 16 ++ drivers/

[PATCH 19/33] pcmcia: sa1111: add driver-data pointer

2016-08-29 Thread Russell King
Add a driver-data pointer so that low level drivers can add additional data to the sa pcmcia socket structure. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/sa_generic.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pcmcia/sa_gener

[PATCH 22/33] ARM: sa1100/assabet: convert to generic CF sockets

2016-08-29 Thread Russell King
Convert Assabet to use the generic CF socket support. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/mach-sa1100/assabet.c | 61 +- arch/arm/mach-sa1100/include/mach/assabet.h | 6 -- drivers/pcmcia/Makefile | 1 - d

[PATCH 30/33] ARM: sa1100/jornada720: switch jornada720 PCMCIA to gpiod APIs

2016-08-29 Thread Russell King
Convert the low level PCMCIA driver to gpiod APIs for controlling the socket power. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/mach-sa1100/jornada720.c | 12 ++ drivers/pcmcia/sa_jornada720.c | 81 +- 2 files chang

[PATCH 29/33] pcmcia: sa1111/neponset: convert to use MAX1600 power driver

2016-08-29 Thread Russell King
Use the MAX1600 power switch driver for Neponset. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/Kconfig | 1 + drivers/pcmcia/sa_neponset.c | 79 ++-- 2 files changed, 20 insertions(+), 60 deletions(-) diff

[PATCH 26/33] ARM: sa1100/shannon: switch shannon PCMCIA to use gpiod APIs

2016-08-29 Thread Russell King
Switch shannon's PCMCIA implementation to use the gpiod APIs. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/mach-sa1100/shannon.c | 13 + drivers/pcmcia/sa1100_shannon.c | 25 ++--- 2 files changed, 19 insertions(+), 19 deletions(-)

[PATCH 28/33] ARM: sa1100/neponset: add GPIOs for PCMCIA

2016-08-29 Thread Russell King
Add the gpiod table for Neponset PCMCIA power control. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/mach-sa1100/neponset.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c

[PATCH 27/33] ARM: sa1100/simpad: switch simpad CF to use gpiod APIs

2016-08-29 Thread Russell King
Switch simpad's CF implementation to use the gpiod APIs. The inverted detection is handled using gpiolib's native inversion abilities. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/mach-sa1100/simpad.c | 12 drivers/pcmcia/sa1100_simpad.

[PATCH 25/33] ARM: sa1100/nanoengine: convert to generic CF sockets

2016-08-29 Thread Russell King
Convert nanoengine to use the generic CF socket support. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/mach-sa1100/nanoengine.c | 23 +++ drivers/pcmcia/sa1100_generic.c| 3 - drivers/pcmcia/sa1100_generic.h| 1 - drivers/pcmcia/sa1100_nanoengine.c

[PATCH 09/33] ARM: sa1111: implement a gpio_chip for SA1111 GPIOs

2016-08-29 Thread Russell King
Add a gpio_chip instance for SA GPIOs. This allows us to use gpiolib to lookup and manipulate SA GPIOs. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/common/sa.c | 168 ++- 1 file changed, 165 insertions

[PATCH 08/33] ARM: sa1100/neponset: add GPIO drivers for control and modem registers

2016-08-29 Thread Russell King
from having to maintain a software copy of the current state. Model these registers as fixed-direction GPIO registers. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/mach-sa1100/neponset.c | 153 1 file changed, 93 insertions(

[PATCH 10/33] pcmcia: soc_common: switch to using gpio_descs

2016-08-29 Thread Russell King
Switch to using the gpiod_* consumer API rather than the legacy API. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/soc_common.c | 57 + drivers/pcmcia/soc_common.h | 3 +++ 2 files changed, 45 insertions(+), 15 del

[PATCH 07/33] ARM: sa1100/assabet: add BCR/BSR GPIO driver

2016-08-29 Thread Russell King
Add a GPIO driver for the board control register/board status register for the sa1100/assabet platform. This allows us to transition a range of drivers to use the gpiod APIs rather than the platform private ASSABET_BCR_* interfaces. Signed-off-by: Russell King <rmk+ker...@armlinux.org

[PATCH 06/33] ARM: pxa/lubbock: add GPIO driver for LUB_MISC_WR register

2016-08-29 Thread Russell King
Add a gpio driver for the lubbock miscellaneous write IO register so we can take advantage of subsystems modelled around gpiolib, rather than having to provide platform specific callbacks. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- arch/arm/mach-pxa/Kconfig | 1 + ar

[PATCH 05/33] gpio: add generic single-register fixed-direction GPIO driver

2016-08-29 Thread Russell King
Add a simple, generic, single register fixed-direction GPIO driver. This is able to support a single register where a fixed number of bits are used for input and a fixed number of bits used for output. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/gpio/Kconfig

[PATCH 03/33] gpio: sa1100: convert to use IO accessors

2016-08-29 Thread Russell King
Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/gpio/gpio-sa1100.c | 199 - 1 file changed, 124 insertions(+), 75 deletions(-) diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c index fb9d52a57d78..bad016

[PATCH 02/33] gpio: sa1100: use sa11x0_gpio_set_wake()

2016-08-29 Thread Russell King
Use sa11x0_gpio_set_wake() to set the PWER register, as provided by Dmitry some time back. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/gpio/gpio-sa1100.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/gpio/gpio-sa11

[RFC PATCH 00/33] SA11x0/PXA GPIO rework (Core + PCMCIA only)

2016-08-29 Thread Russell King - ARM Linux
Following on from the PCMCIA fixes, this series reworks GPIO on SA11x0 and PXA platforms. This is a subset of a larger series, which I'm splitting up due to its size. This part contains the base and PCMCIA updates. Further updates for IrDA drivers, DMA engine, serial, and ethernet will follow

[PATCH 1/3] pcmcia: sa11xx_base: fix reporting of timing information

2016-08-29 Thread Russell King
) common : 300 (316) Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/sa11xx_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c index 9f6ec87b9f9e..af37b7ec1c73 100644 --- a/drivers/

[PATCH 2/3] pcmcia: sa11xx_base: add units to the timing information

2016-08-29 Thread Russell King
Add units to the timing information, so we know that the numbers are nanoseconds. The output changes from: I/O : 165 (172) attribute: 300 (316) common : 300 (316) to: I/O : 165ns (172ns) attribute: 300ns (316ns) common : 300ns (316ns) Signed-off-by: Russell King <rmk+

[PATCH 3/3] pcmcia: soc_common: fix SS_STSCHG polarity

2016-08-29 Thread Russell King
SS_STSCHG should be set for an IO card when the BVD1 signal is asserted low, not high. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/soc_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pcmcia/soc_common.c b/drivers/

[PATCH 0/3] SA11x0/PXA pcmcia fixes

2016-08-29 Thread Russell King - ARM Linux
Further to the DS suspend/resume fix, here's a few more for SA11x0/PXA. drivers/pcmcia/sa11xx_base.c | 8 drivers/pcmcia/soc_common.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for

Re: [PATCH] pcmcia: ds: fix suspend/resume

2016-08-27 Thread Russell King - ARM Linux
On Sat, Aug 27, 2016 at 02:05:22PM +0200, Dominik Brodowski wrote: > Russell, > > On Sun, Aug 21, 2016 at 12:05:30AM +0100, Russell King wrote: > > PCMCIA suspend/resume no longer works since the commit mentioned below, > > as the callbacks are no longer made. Convert

[PATCH] pcmcia: ds: fix suspend/resume

2016-08-20 Thread Russell King
ot;PM / sleep: Go direct_complete if driver has no callbacks") Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> --- drivers/pcmcia/ds.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 489ea1098c96..69b

[PATCH 8/8] pcmcia: soc_common: remove skt_dev_info's clk pointer

2015-07-15 Thread Russell King
We no longer need to store the clk pointer in struct skt_dev_info as we no longer need to remember the clk pointer for the cleanup paths. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/pcmcia/pxa2xx_base.c | 1 - drivers/pcmcia/sa11xx_base.c | 1 - drivers/pcmcia

[PATCH 7/8] pcmcia: sa11xx_base.c: remove useless init/exit functions

2015-07-15 Thread Russell King
A library module is not required to have module init/exit functions. Get rid of these unnecessary functions. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/pcmcia/sa11xx_base.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/pcmcia/sa11xx_base.c b

[PATCH 5/8] pcmcia: sa1111: update socket driver to use devm_clk_get() API

2015-07-15 Thread Russell King
Update the pxa2xx socket driver to use the devm_clk_get() API so that the cleanup paths are simplified. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/pcmcia/sa_generic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pcmcia

[PATCH 1/8] pcmcia: sa11x0: fix missing clk_put() in sa11x0 socket drivers

2015-07-15 Thread Russell King
Fix the lack of clk_put() in sa11xx_base.c's error cleanup paths by converting the driver to the devm_* API. Fixes: 86d88bfca475 (ARM: 8247/2: pcmcia: sa1100: make use of device clock) Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/pcmcia/sa1100_generic.c | 1 - drivers

[PATCH 4/8] pcmcia: pxa2xx: convert memory allocation to devm_* API

2015-07-15 Thread Russell King
Convert the pxa2xx socket driver memory allocation to use devm_kzalloc() to simplify the cleanup path. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/pcmcia/pxa2xx_base.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/pcmcia/pxa2xx_base.c

[PATCH 0/8] sa11x0 PCMCIA updates

2015-07-15 Thread Russell King - ARM Linux
A series of PCMCIA updates for SA11x0/PXA devices consisting mainly of patches switching the code to use the devm_* APIs, thus cleaning the code up. The first patch fixes an omitted clk_put() in sa11xx_base.c by switching the clk_get to devm_clk_get(). drivers/pcmcia/pxa2xx_base.c| 17

[PATCH 3/8] pcmcia: pxa2xx: update socket driver to use devm_clk_get() API

2015-07-15 Thread Russell King
Update the pxa2xx socket driver to use the devm_clk_get() API so that the cleanup paths are simplified. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/pcmcia/pxa2xx_base.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/pcmcia

[PATCH 2/8] pcmcia: sa11x0: convert memory allocation to devm_* API

2015-07-15 Thread Russell King
Convert the sa11x0 socket driver memory allocation to use devm_kzalloc() to simplify the cleanup path. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/pcmcia/sa1100_generic.c | 1 - drivers/pcmcia/sa11xx_base.c| 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff

[PATCH 6/8] pcmcia: sa1111: simplify clk handing in sa1111_pcmcia_add()

2015-07-15 Thread Russell King
clk_get(dev, NULL) will always refer to the same clock, so it's pointless calling this multiple times for the same device. As we no longer have to worry about the cleanup (via use of devm_clk_get()) we can simplify sa_pcmcia_add() too. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk

Re: [PATCH] Drivers: pcmcia: Fix memroy leak in sa11xx_drv_pcmcia_probe()

2015-04-22 Thread Russell King - ARM Linux
On Wed, Apr 22, 2015 at 04:25:48PM +0800, Firo Yang wrote: From: Firo Yang fir...@gmail.com Allocated clk was never freed if kzalloc() failed to alloc memory for skt_dev_info *sinfo. So just free clk when kzalloc() failed. A similar patch was posted in March, and in March I posted a series

Re: [PATCH 4/8] pcmcia: pxa2xx: convert memory allocation to devm_* API

2015-03-28 Thread Russell King - ARM Linux
On Sat, Mar 28, 2015 at 10:38:24PM +0100, Robert Jarzmik wrote: Russell King rmk+ker...@arm.linux.org.uk writes: Convert the pxa2xx socket driver memory allocation to use devm_kzalloc() to simplify the cleanup path. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk

Re: [PATCHv2] pcmcia:Fix memory leak in the function, sa11xx_drv_pcmcia_probe

2015-03-26 Thread Russell King - ARM Linux
On Wed, Mar 25, 2015 at 11:15:52PM -0400, Nicholas Krause wrote: This fixes the memory found when running coccinelle on the latest How does this fix the memory ? Is the memory faulty? kernel tree for if we are unable to successfully allocate memory for the structure pointer,sinfo of type

[PATCH 4/8] pcmcia: pxa2xx: convert memory allocation to devm_* API

2015-03-26 Thread Russell King
Convert the pxa2xx socket driver memory allocation to use devm_kzalloc() to simplify the cleanup path. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/pcmcia/pxa2xx_base.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/pcmcia/pxa2xx_base.c

[PATCH 3/8] pcmcia: pxa2xx: update socket driver to use devm_clk_get() API

2015-03-26 Thread Russell King
Update the pxa2xx socket driver to use the devm_clk_get() API so that the cleanup paths are simplified. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/pcmcia/pxa2xx_base.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/pcmcia

[PATCH 8/8] pcmcia: soc_common: remove skt_dev_info's clk pointer

2015-03-26 Thread Russell King
We no longer need to store the clk pointer in struct skt_dev_info as we no longer need to remember the clk pointer for the cleanup paths. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/pcmcia/pxa2xx_base.c | 1 - drivers/pcmcia/sa11xx_base.c | 1 - drivers/pcmcia

[PATCH 0/8] sa11x0 PCMCIA updates

2015-03-26 Thread Russell King - ARM Linux
Here's a collection of patches which cleans up and updates the SA11x0 and PXA2xx socket drivers, particularly converting them to the devm_* APIs to ensure that resources are properly cleaned up. I've stopped short of totally converting sa_generic as there are some corner cases where we want

[PATCH 5/8] pcmcia: sa1111: update socket driver to use devm_clk_get() API

2015-03-26 Thread Russell King
Update the pxa2xx socket driver to use the devm_clk_get() API so that the cleanup paths are simplified. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/pcmcia/sa_generic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pcmcia

[PATCH 1/8] pcmcia: sa11x0: fix missing clk_put() in sa11x0 socket drivers

2015-03-26 Thread Russell King
Fix the lack of clk_put() in sa11xx_base.c's error cleanup paths by converting the driver to the devm_* API. Fixes: 86d88bfca475 (ARM: 8247/2: pcmcia: sa1100: make use of device clock) Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/pcmcia/sa1100_generic.c | 1 - drivers

[PATCH 2/8] pcmcia: sa11x0: convert memory allocation to devm_* API

2015-03-26 Thread Russell King
Convert the sa11x0 socket driver memory allocation to use devm_kzalloc() to simplify the cleanup path. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/pcmcia/sa1100_generic.c | 1 - drivers/pcmcia/sa11xx_base.c| 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff

[PATCH 6/8] pcmcia: sa1111: simplify clk handing in sa1111_pcmcia_add()

2015-03-26 Thread Russell King
clk_get(dev, NULL) will always refer to the same clock, so it's pointless calling this multiple times for the same device. As we no longer have to worry about the cleanup (via use of devm_clk_get()) we can simplify sa_pcmcia_add() too. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk

[PATCH 7/8] pcmcia: sa11xx_base.c: remove useless init/exit functions

2015-03-26 Thread Russell King
A library module is not required to have module init/exit functions. Get rid of these unnecessary functions. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/pcmcia/sa11xx_base.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/pcmcia/sa11xx_base.c b

Re: [PATCHv2] pcmcia:Fix memory leak in the function, sa11xx_drv_pcmcia_probe

2015-03-26 Thread Russell King - ARM Linux
On Thu, Mar 26, 2015 at 07:14:38AM -0400, Nicholas Krause wrote: On March 26, 2015 5:52:25 AM EDT, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Wed, Mar 25, 2015 at 11:15:52PM -0400, Nicholas Krause wrote: This fixes the memory found when running coccinelle on the latest

Re: [PATCH 2/6] PCI/arm: Use list_for_each_entry() for bus traversal

2014-02-13 Thread Russell King - ARM Linux
On Thu, Feb 13, 2014 at 09:13:59PM +0800, Yijing Wang wrote: Replace list_for_each() + pci_bus_b() with the simpler list_for_each_entry(). Signed-off-by: Yijing Wang wangyij...@huawei.com Acked-by: Russell King rmk+ker...@arm.linux.org.uk -- FTTC broadband for 0.8mile line: 5.8Mbps down

Re: [PATCH 1/5] arm: sa1100: add cpu clock

2013-11-12 Thread Russell King - ARM Linux
On Tue, Nov 12, 2013 at 07:32:08AM +0400, Dmitry Eremin-Solenikov wrote: Both SA1100 framebuffer and PCMCIA drivers require knowledge of cpu frequency to correctly program timings. Currently they receive timing information by calling cpufreq_get(0). However if cpu frequency driver is not

[PATCH,FIXED] PCMCIA card inserted, five s2ram cycles, you're dead

2012-01-22 Thread Russell King - ARM Linux
. A fatal oops quickly follows this warning - often even just a 'dmesg' following the warning causes the kernel to oops. 8 From: Russell King rmk+ker...@arm.linux.org.uk Subject: [PATCH] Fix PCMCIA socket refcount decrementing on each resume While testing suspend/resume on an ARM device

  1   2   >