Re: [PATCH 2/5 v7] regulator: fixed/gpio: Pull inversion/OD into gpiolib

2018-11-29 Thread Janusz Krzysztofik
depending on how the platform is configured: if the line > is active low, it deals with that, if the line is open drain, > it deals with that too. > > Cc: Janusz Krzysztofik # OMAP1 Tested-by: Janusz Krzysztofik #OMAP1 Amstrad Delta Thanks, Janusz

[PATCH] ARM: OMAP1: ams-delta: Fix audio permanently muted

2018-11-23 Thread Janusz Krzysztofik
trol. For now, rename the pin to "audio_mute" to reflect its function and, as a quick fix, hogg it as output low so on-board audio can produce audible sound again. Fixes: 1137ceee76ba ("ARM: OMAP1: ams-delta: Don't request unused GPIOs") Signed-off-by: Janusz Krzysztof

[PATCH v4 1/4] ARM: OMAP1: ams-delta: Provide GPIO lookup table for NAND data port

2018-11-21 Thread Janusz Krzysztofik
-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Reviewed-by: Linus Walleij --- arch/arm/mach-omap1/board-ams-delta.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index

[PATCH v4 3/4] mtd: rawnand: ams-delta: Use GPIO API for data I/O

2018-11-21 Thread Janusz Krzysztofik
Don't readw()/writew() data directly from/to GPIO port which is under control of gpio-omap driver, use GPIO consumer API instead. The driver should now work with any 8-bit bidirectional GPIO port, not only OMAP. Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij --- drivers/mtd/nand

[PATCH v4 2/4] mtd: rawnand: ams-delta: Request data port GPIO resource

2018-11-21 Thread Janusz Krzysztofik
accessing the port pins by requesting an array of its GPIO descriptors. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Reviewed-by: Linus Walleij --- drivers/mtd/nand/raw/ams-delta.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw

[PATCH v4 4/4] ARM: OMAP1: ams-delta: Drop obsolete NAND resources

2018-11-21 Thread Janusz Krzysztofik
Amstrad Delta NAND driver now uses GPIO API for data I/O so there is no need to assign memory I/O resource to the device any longer. Drop it. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/arch/arm

Subject: [PATCH v4 0/4] mtd: rawnand: ams-delta: Use GPIO API for data I/O

2018-11-21 Thread Janusz Krzysztofik
Finalize implementation of the idea suggested by Artem Bityutskiy and Tony Lindgren, described in commit b027274d2e3a ("mtd: ams-delta: fix request_mem_region() failure"). Use pure GPIO consumer API, as reqested by Boris Brezillon. Janusz Krzysztofik (4): ARM: OMAP1: ams-delt

[PATCH] ARM: OMAP1: ams-delta: Fix possible use of uninitialized field

2018-11-07 Thread Janusz Krzysztofik
n NULL pointer dereference. Fix it by checking for uninitialized pointer before using it in modem_pm(). Fixes: aabf31737a6a ("ARM: OMAP1: ams-delta: update the modem to use regulator API") Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.c | 3 +++ 1 file chang

[PATCH 2/3] ARM: OMAP1: ams-delta: Drop unused symbols from the board header

2018-11-07 Thread Janusz Krzysztofik
Those bitmap symbols defining pins of latch2 register, used with read()/write() calls before the latch was converted to a GPIO device, have been obsoleted by integer symbols defined inside the board file. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.h | 4 1

[PATCH 3/3] ARM: OMAP1: ams-delta: Move AMS_DELTA_LATCH2_NGPIO to the board file

2018-11-07 Thread Janusz Krzysztofik
That symbol is not used outside the board file, there is no need to keep it in the board header. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.c | 6 -- arch/arm/mach-omap1/board-ams-delta.h | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 0/3] ARN: OMAP1: ams-delta: Post-GPIO-refresh cleanups

2018-11-07 Thread Janusz Krzysztofik
Janusz Krzysztofik (3): ARM: OMAP1: ams-delta: Drop board specific global GPIO numbers ARM: OMAP1: ams-delta: Drop unused symbols from the board header ARM: OMAP1: ams-delta: Move AMS_DELTA_LATCH2_NGPIO to the board file board-ams-delta.c |9 - board-ams-delta.h

[PATCH 1/3] ARM: OMAP1: ams-delta: Drop board specific global GPIO numbers

2018-11-07 Thread Janusz Krzysztofik
As all users of the board specific GPIO pins have been converted from legacy integer-based to descriptor-based interface, there is no longer a need to maintain statically assigned GPIO pin numbers. Drop support for that. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams

[PATCH] ARM: OMAP1: ams-delta: Provide GPIO lookup table for LED device

2018-11-05 Thread Janusz Krzysztofik
Global GPIO numbers no longer have to be passed to leds-gpio driver, replace their assignment with a lookup table. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.c | 95 ++- 1 file changed, 26 insertions(+), 69 deletions(-) diff --git

[PATCH] ARM: OMAP1: ams-delta: make board header file local to mach-omap1

2018-11-05 Thread Janusz Krzysztofik
Now as the board header file is no longer included by drivers, move it to the root directory of mach-omap1. Signed-off-by: Janusz Krzysztofik --- Changelog: v4: - rebased on top of v4.20-rc1 - resubmitted as a standalone patch, other patches of the series it depended on have been already

[PATCH v3 2/3] mtd: rawnand: ams-delta: Stop using legacy .IOADDR_R/W

2018-10-15 Thread Janusz Krzysztofik
Replace use of legacy .IOADDR_R/W with runtime calculations based on priv->io_base. Suggested-by: Boris Brezillon Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon --- Changelog: v3: New patch, split out from former PATCH 2/2 on Boris request - thanks drivers/mtd/nand/raw/

[PATCH v3 1/3] mtd: rawnand: Provide helper for polling GPIO R/B pin

2018-10-15 Thread Janusz Krzysztofik
Each controller driver having access to NAND R/B pin over GPIO would have to reimplement the polling loop otherwise. Suggested-by: Boris Brezillon Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon --- Changelog: v3: - don't surround added code with #ifdef CONFIG_GPIOLIB

[PATCH v3 3/3] mtd: rawnand: ams-delta: Convert the driver to ->exec_op()

2018-10-15 Thread Janusz Krzysztofik
Replace legacy callbacks with ->select_chip() and ->exec_op(). Suggested-by: Boris Brezillon Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon --- Changelog: v3: - former PATCH 2/2 from which PATCH v3 2/3 has been split out, - added missing return on check_only - req

[PATCH v2 1/2] mtd: rawnand: Provide helper for polling GPIO R/B pin

2018-10-12 Thread Janusz Krzysztofik
Each controller driver with access to NAND R/B pin over GPIO would have to reimplement the polling loop otherwise. Signed-off-by: Janusz Krzysztofik --- Changelog: v2: New patch - v1 consisted of only one patch (the followning one) drivers/mtd/nand/raw/nand_base.c | 38

[PATCH v2 2/2] mtd: rawnand: ams-delta: Use ->exec_op()

2018-10-12 Thread Janusz Krzysztofik
Replace legacy callbacks with ->select_chip() and ->exec_op(). In order to remove any references to legacy structure members, use of .IO_ADDR_R/W has been replaced wit runtime calculations based on priv->io_base. Suggested-by: Boris Brezillon Signed-off-by: Janusz Krzysztofik ---

[RFT PATCH] mmc: pwrseq_simple: Fix incorrect handling of GPIO bitmap

2018-10-12 Thread Janusz Krzysztofik
he 'values' bitmap size not exceding the number of bits of the 'value' argument type. Fix it. Signed-off-by: Janusz Krzysztofik --- Hi, I think that patch has been missed while we were resolving issues related to GPIO fast bitmap processing. Since all issues other than the one addreessed by this

Re: [RFC PATCH] mtd: rawnand: ams-delta: use ->exec_op()

2018-10-04 Thread Janusz Krzysztofik
On Thursday, October 4, 2018 3:59:33 PM CEST Boris Brezillon wrote: > On Thu, 04 Oct 2018 15:52:57 +0200 > Janusz Krzysztofik wrote: > > > Hi Boris, > > > > On Wednesday, October 3, 2018 4:06:34 PM CEST Boris Brezillon wrote: > > > On Wed, 03 Oct 2018 15:

Re: [RFC PATCH] mtd: rawnand: ams-delta: use ->exec_op()

2018-10-04 Thread Janusz Krzysztofik
Hi Boris, On Wednesday, October 3, 2018 4:06:34 PM CEST Boris Brezillon wrote: > On Wed, 03 Oct 2018 15:55:25 +0200 > Janusz Krzysztofik wrote: > > > > > > > > > Implementation of NAND_OP_WAITRDY_INSTR has been based on legacy > > > > nand_wait_

Re: [RFC PATCH] mtd: rawnand: ams-delta: use ->exec_op()

2018-10-03 Thread Janusz Krzysztofik
On Wednesday, October 3, 2018 2:30:54 PM CEST Boris Brezillon wrote: > Hi Janusz, > > On Wed, 3 Oct 2018 14:00:28 +0200 > Janusz Krzysztofik wrote: > > > Replace legacy callbacks with ->select_chip() and ->exec_op(). > > Thanks for working o

[RFC PATCH] mtd: rawnand: ams-delta: use ->exec_op()

2018-10-03 Thread Janusz Krzysztofik
sed. Use of IO_ADDR_R and IO_ADDR_W legacy structure members will be dropped later, as soon as the driver is converted to use GPIO API for data I/O. Suggested-by: Boris Brezillon Signed-off-by: Janusz Krzysztofik --- Hi, I've not tested the change on hardware yet as I'm not sure if: - handling of NC

[PATCH] ARM: OMAP1: ams-delta: Fix impossible .irq < 0

2018-10-02 Thread Janusz Krzysztofik
"serial8250" driver. Fixes: 0812db943748 ("ARM: OMAP1: ams-delta: assign MODEM IRQ from GPIO descriptor") Reported-by: Dan Carpenter Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) di

[PATCH] mmc: pwrseq_simple: Fix incorrect handling of GPIO bitmap

2018-09-25 Thread Janusz Krzysztofik
erpreation of the 'value' argument, wrong assumption is taken about the 'values' bitmap size never exceding the number of bits of the 'value' argument type. Fix it. Reported-by: Marek Szyprowski Signed-off-by: Janusz Krzysztofik --- Hi, I hope I've finally identified the root cause of the

Re: [PATCH v2 0/3] ARM: OMAP1: ams-delta: Clean up GPIO setup for MODEM

2018-09-20 Thread Janusz Krzysztofik
Hi Tony, On Thursday, September 20, 2018 11:23:26 PM CEST Tony Lindgren wrote: > * Janusz Krzysztofik [180910 21:52]: > > On Monday, September 10, 2018 1:44:16 AM CEST Janusz Krzysztofik wrote: > > > > > > Convert modem related GPIO setup from integer space to G

Re: [PATCH v7 4/4] gpiolib: Implement fast processing path in get/set array

2018-09-20 Thread Janusz Krzysztofik
On Thursday, September 20, 2018 5:48:22 PM CEST Janusz Krzysztofik wrote: > On Thursday, September 20, 2018 12:11:48 PM CEST Marek Szyprowski wrote: > > Hi All, > > > > On 2018-09-02 14:01, Janusz Krzysztofik wrote: > > > Certain GPIO descriptor arrays returned b

[PATCH v5 3/3] mtd: rawnand: ams-delta: Set port direction when needed

2018-09-19 Thread Janusz Krzysztofik
of the driver to GPIO API for data I/O will be implemented. Reviewed-by: Boris Brezillon Signed-off-by: Janusz Krzysztofik --- drivers/mtd/nand/raw/ams-delta.c | 57 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/drivers/mtd/nand/raw/ams

[PATCH v5 0/3] mtd: rawnand: ams-delta: Cleanups and optimizations

2018-09-19 Thread Janusz Krzysztofik
This series consist of possibly ready to apply patches extracted from a former one titled "mtd: rawnand: ams-delta: Use GPIO API for data I/O". Remaining patches implementing conversion of data I/O to GPIO have been postponed until gpiolib is optimized to ensure sufficient performance

[PATCH v5 1/3] mtd: rawnand: ams-delta: show parent device in sysfs

2018-09-19 Thread Janusz Krzysztofik
Fix a bug where parent device symlinks aren't shown in sysfs. While at it, make use of the default owner set by mtdcore. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon --- drivers/mtd/nand/raw/ams-delta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v5 2/3] mtd: rawnand: ams-delta: Use private structure

2018-09-19 Thread Janusz Krzysztofik
the structure with more members as needed. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon --- drivers/mtd/nand/raw/ams-delta.c | 122 +-- 1 file changed, 66 insertions(+), 56 deletions(-) diff --git a/drivers/mtd/nand/raw/ams-delta.c b/drivers/mtd

[PATCH v5] mtd: rawnand: ams-delta: use GPIO lookup table

2018-09-19 Thread Janusz Krzysztofik
equivalents. Pin naming used by the driver should be followed while respective GPIO lookup table is initialized by a board init code. Signed-off-by: Janusz Krzysztofik Acked-by: Boris Brezillon Acked-by: Miquel Raynal --- Changelog: v5: - rebased on nand/next - resubmitted to linux-mtd as a stand-alone

Re: [PATCH v2 0/3] ARM: OMAP1: ams-delta: Clean up GPIO setup for MODEM

2018-09-10 Thread Janusz Krzysztofik
On Monday, September 10, 2018 1:44:16 AM CEST Janusz Krzysztofik wrote: > > Convert modem related GPIO setup from integer space to GPIO descriptors. > Also, restore original initialization order of the MODEM device and its > related GPIO pins. > > Cleanup of MODEM relaat

[PATCH] ARM: OMAP1: ams-delta: Don't request unused GPIOs

2018-09-10 Thread Janusz Krzysztofik
GPIOs with no kernel drivers can still be used from user space, don't request them from the board file. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.c | 40 +-- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/arch/arm

[PATCH] ARM: OMAP1: ams-delta-fiq: Use

2018-09-10 Thread Janusz Krzysztofik
Instead of defining symbols already defined in linux/platform_data/gpio-omap.h, use that header file. Since we include the header into an assembler code, prevent C only bits from being read in. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/ams-delta-fiq-handler.S | 12

Re: [PATCH v7] regulator: fixed: Convert to use GPIO descriptor only

2018-09-10 Thread Janusz Krzysztofik
so I renamed it with the > infix *_regulator_* as part of this patch set. > > Intel MID portions tested by Andy. > > Cc: Janusz Krzysztofik # OMAP1 > Cc: Alexander Shiyan # i.MX boards user > Cc: Haojian Zhuang # MMP2 maintainer > Cc: Aaro Koskinen # OMAP1 maintainer &g

[PATCH v2 3/3] ARM: OMAP1: ams-delta: register MODEM device earlier

2018-09-09 Thread Janusz Krzysztofik
was moved to machine_init by preceding patch. Move registration of the MODEM device to arch_initcall_sync, not to arch_initcall, so it is never exposed to potential conflict in registration order hazard against OMAP serial ports. Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij --- arch/arm/

[PATCH v2 1/3] ARM: OMAP1: ams-delta: assign MODEM IRQ from GPIO descriptor

2018-09-09 Thread Janusz Krzysztofik
been already assigned. Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij --- arch/arm/mach-omap1/board-ams-delta.c | 47 ++- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board

[PATCH v2 0/3] ARM: OMAP1: ams-delta: Clean up GPIO setup for MODEM

2018-09-09 Thread Janusz Krzysztofik
descriptors. Janusz Krzysztofik (3): ARM: OMAP1: ams-delta: assign MODEM IRQ from GPIO descriptor ARM: OMAP1: ams-delta: initialize latch2 pins to safe values ARM: OMAP1: ams-delta: register MODEM device earlier Changelog: v2: - rebased on v4.19-rc1 - added Reviewed-by: obtained from

[PATCH v2 2/3] ARM: OMAP1: ams-delta: initialize latch2 pins to safe values

2018-09-09 Thread Janusz Krzysztofik
_CODEC. Once done, remove the no longer needed GPIO based implementation of ams_delta_latch_write() and its frontend macro. Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij --- arch/arm/mach-omap1/board-ams-delta.c | 52 +++ arch/arm/mach-omap1/board

Re: [PATCH v4 0/3] mtd: rawnand: ams-delta: Cleanups and optimizations

2018-09-05 Thread Janusz Krzysztofik
Hi Miquel, Tony, On Wednesday, September 5, 2018 8:47:57 AM CEST Miquel Raynal wrote: > Hi Janusz, > > Janusz Krzysztofik wrote on Mon, 20 Aug 2018 > 23:39:01 +0200: > > > This series consist of possibly ready to apply patches extracted from > > a former one title

[PATCH v4 3/3] mtd: rawnand: ams-delta: Set port direction when needed

2018-08-20 Thread Janusz Krzysztofik
of the driver to GPIO API for data I/O will be implemented. Signed-off-by: Janusz Krzysztofik --- drivers/mtd/nand/raw/ams-delta.c | 68 ++-- 1 file changed, 45 insertions(+), 23 deletions(-) diff --git a/drivers/mtd/nand/raw/ams-delta.c b/drivers/mtd/nand/raw

[PATCH v4 2/3] mtd: rawnand: ams-delta: Use private structure

2018-08-20 Thread Janusz Krzysztofik
the structure with more members as needed. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon --- drivers/mtd/nand/raw/ams-delta.c | 126 +-- 1 file changed, 69 insertions(+), 57 deletions(-) diff --git a/drivers/mtd/nand/raw/ams-delta.c b/drivers/mtd

[PATCH v4 1/3] mtd: rawnand: ams-delta: show parent device in sysfs

2018-08-20 Thread Janusz Krzysztofik
Fix a bug where parent device symlinks aren't shown in sysfs. While at it, make use of the default owner set by mtdcore. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon --- drivers/mtd/nand/raw/ams-delta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v4 0/3] mtd: rawnand: ams-delta: Cleanups and optimizations

2018-08-20 Thread Janusz Krzysztofik
This series consist of possibly ready to apply patches extracted from a former one titled "mtd: rawnand: ams-delta: Use GPIO API for data I/O". Remaining patches implementing conversion of data I/O to GPIO have been postponed until gpiolib is optimized to ensure sufficient performance

[PATCH 1/3] ARM: OMAP1: ams-delta: assign MODEM IRQ from GPIO descriptor

2018-08-20 Thread Janusz Krzysztofik
been already assigned. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.c | 46 ++- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index

[PATCH 0/3] ARM: OMAP1: ams-delta: Clean up GPIO setup for MODEM

2018-08-20 Thread Janusz Krzysztofik
descriptors. Janusz Krzysztofik (3): ARM: OMAP1: ams-delta: assign MODEM IRQ from GPIO descriptor ARM: OMAP1: ams-delta: initialize latch2 pins to safe values ARM: OMAP1: ams-delta: register MODEM device earlier diffstat: board-ams-delta.c | 120

[PATCH 3/3] ARM: OMAP1: ams-delta: register MODEM device earlier

2018-08-20 Thread Janusz Krzysztofik
was moved to machine_init by preceding patch. Move registration of the MODEM device to arch_initcall_sync, not to arch_initcall, so it is never exposed to potential conflictinh registration order hazard against OMAP serial ports. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-de

[PATCH 2/3] ARM: OMAP1: ams-delta: initialize latch2 pins to safe values

2018-08-20 Thread Janusz Krzysztofik
_CODEC. Once done, remove the no longer needed GPIO based implementation of ams_delta_latch_write() and its frontend macro. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.c | 52 +++ arch/arm/mach-omap1/board-ams-delta.h | 7

[PATCH v3 6/7] mtd: rawnand: ams-delta: Simplify pointer resolution on read/write

2018-08-13 Thread Janusz Krzysztofik
Simplify data read/write sub-functions by making them accept private structure pointer instead of resolving it again from mtd_info. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon --- drivers/mtd/nand/raw/ams-delta.c | 30 +++--- 1 file changed, 15

[PATCH v3 3/7] ARM: OMAP1: ams-delta: Provide GPIO lookup table for NAND data port

2018-08-13 Thread Janusz Krzysztofik
-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Reviewed-by: Linus Walleij --- arch/arm/mach-omap1/board-ams-delta.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index

[PATCH v3 4/7] mtd: rawnand: ams-delta: request data port GPIO resource

2018-08-13 Thread Janusz Krzysztofik
from other users accessing the port pins by requesting an array of its GPIO descriptors. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Reviewed-by: Linus Walleij --- drivers/mtd/nand/raw/ams-delta.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/mtd/nand

[PATCH v3 7/7] mtd: rawnand: ams-delta: use GPIO API for data I/O

2018-08-13 Thread Janusz Krzysztofik
+-bit bidirectional GPIO port, not only OMAP. Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij --- Exceprts fro timestamped boot logs showing performance degrade. Before the change: [5.469426] Creating 6 MTD partitions on "ams-delta-nand": [5.480909] 0x00

[PATCH v3 2/7] mtd: rawnand: ams-delta: Use private structure

2018-08-13 Thread Janusz Krzysztofik
the structure with more members as needed. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon --- drivers/mtd/nand/raw/ams-delta.c | 126 +-- 1 file changed, 69 insertions(+), 57 deletions(-) diff --git a/drivers/mtd/nand/raw/ams-delta.c b/drivers/mtd

[PATCH v3 0/7] mtd: rawnand: ams-delta: Use GPIO API for data I/O

2018-08-13 Thread Janusz Krzysztofik
Implement the idea suggested by Artem Bityutskiy and Tony Lindgren, described in commit b027274d2e3a ("mtd: ams-delta: fix request_mem_region() failure"). Use pure GPIO API as suggested by Boris Brezillon. Janusz Krzysztofik (7): mtd: rawnand: ams-delta: show parent devic

[PATCH v3 5/7] mtd: rawnand: ams-delta: Set port direction when needed

2018-08-13 Thread Janusz Krzysztofik
of the driver to GPIO API for data I/O will be implemented. Signed-off-by: Janusz Krzysztofik --- drivers/mtd/nand/raw/ams-delta.c | 59 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/drivers/mtd/nand/raw/ams-delta.c b/drivers/mtd/nand/raw

[PATCH v3 1/7] mtd: rawnand: ams-delta: show parent device in sysfs

2018-08-13 Thread Janusz Krzysztofik
Fix a bug where parent device symlinks aren't shown in sysfs. While at it, make use of the default owner set by mtdcore. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon --- drivers/mtd/nand/raw/ams-delta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[RFC PATCH v2 04/12] mtd: rawnand: ams-delta: request data port GPIO resource

2018-08-06 Thread Janusz Krzysztofik
from other users accessing the port pins by requesting an array of its GPIO descriptors. Signed-off-by: Janusz Krzysztofik --- drivers/mtd/nand/raw/ams-delta.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/mtd/nand/raw/ams-delta.c b/drivers/mtd/nand/raw/ams-delta.c index

Re: [RFC PATCH 8/8] mtd: rawnand: ams-delta: Use GPIO callbacks for data I/O

2018-07-20 Thread Janusz Krzysztofik
On Thursday, July 19, 2018 8:47:49 AM CEST Boris Brezillon wrote: > On Thu, 19 Jul 2018 01:57:10 +0200 > Janusz Krzysztofik wrote: > > > Don't readw()/writew() data directly from/to GPIO port which is under > > control of gpio-omap driver, use GPIO chip callbacks ins

Re: [RFC PATCH 4/8] mtd: rawnand: ams-delta: Optimize pointer resolution on read/write

2018-07-20 Thread Janusz Krzysztofik
On Thursday, July 19, 2018 8:25:38 AM CEST Boris Brezillon wrote: > On Thu, 19 Jul 2018 01:57:06 +0200 > Janusz Krzysztofik wrote: > > > Further optimize processing speed of read/write callback functions by > > resolving private structure pointer only once per callback and

Re: [RFC PATCH 3/8] mtd: rawnand: ams-delta: Set port direction once per transfer

2018-07-20 Thread Janusz Krzysztofik
On Thursday, July 19, 2018 8:23:18 AM CEST Boris Brezillon wrote: > On Thu, 19 Jul 2018 01:57:05 +0200 > Janusz Krzysztofik wrote: > > > In its current shape, the driver sets data port direction before each > > byte read/write operation, even during multi-byte

Re: [RFC PATCH 2/8] mtd: rawnand: ams-delta: Write protect device during probe

2018-07-20 Thread Janusz Krzysztofik
On Thursday, July 19, 2018 8:22:00 AM CEST Boris Brezillon wrote: > On Thu, 19 Jul 2018 01:57:04 +0200 > Janusz Krzysztofik wrote: > > > Initialize NWP GPIO pin low to protect the device from hazard during > > probe. Release write protection as soon as the device

Re: [RFC PATCH 1/8] mtd: rawnand: ams-delta: Use private structure

2018-07-20 Thread Janusz Krzysztofik
On Thursday, July 19, 2018 8:17:28 AM CEST Boris Brezillon wrote: > On Thu, 19 Jul 2018 01:57:03 +0200 > Janusz Krzysztofik wrote: > > > Introduce a driver private structure and allocate it on device probe. > > Use it for storing nand_chip structure, GPIO descriptors

Re: [RFC PATCH 0/8] mtd: rawnand: ams-delta: Use gpio-omap accessors for data I/O

2018-07-20 Thread Janusz Krzysztofik
Hi Boris, On Thursday, July 19, 2018 8:15:08 AM CEST Boris Brezillon wrote: > Hi Janusz, > > On Thu, 19 Jul 2018 01:57:02 +0200 > Janusz Krzysztofik wrote: > > > Implement the idea suggested by Artem Bityutskiy and Tony Lindgren > > described in commit b027274

[RFC PATCH] ARM: OMAP1: Make OMAP15xx MPUIO based GPIO device optional

2018-07-20 Thread Janusz Krzysztofik
ther device. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-generic.c | 2 ++ arch/arm/mach-omap1/board-innovator.c | 7 ++- arch/arm/mach-omap1/board-palmte.c| 2 ++ arch/arm/mach-omap1/board-palmtt.c| 2 ++ arch/arm/mach-omap1/board-palmz71.c | 2 ++ arch/arm/ma

[RFC PATCH 2/8] mtd: rawnand: ams-delta: Write protect device during probe

2018-07-18 Thread Janusz Krzysztofik
Initialize NWP GPIO pin low to protect the device from hazard during probe. Release write protection as soon as the device is under control. Signed-off-by: Janusz Krzysztofik --- drivers/mtd/nand/raw/ams-delta.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git

[RFC PATCH 3/8] mtd: rawnand: ams-delta: Set port direction once per transfer

2018-07-18 Thread Janusz Krzysztofik
In its current shape, the driver sets data port direction before each byte read/write operation, even during multi-byte transfers. Optimize that by setting the port direction only on first byte of each transfer. Signed-off-by: Janusz Krzysztofik --- drivers/mtd/nand/raw/ams-delta.c | 42

[RFC PATCH 6/8] gpio: omap: Add get/set_multiple() callbacks

2018-07-18 Thread Janusz Krzysztofik
This should make applications utilizing whole banks work faster. Signed-off-by: Janusz Krzysztofik --- drivers/gpio/gpio-omap.c | 88 ++-- 1 file changed, 86 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio

[RFC PATCH 8/8] mtd: rawnand: ams-delta: Use GPIO callbacks for data I/O

2018-07-18 Thread Janusz Krzysztofik
bidirectional GPIO port, not only OMAP. Signed-off-by: Janusz Krzysztofik # Conflicts: # drivers/mtd/nand/raw/ams-delta.c --- arch/arm/mach-omap1/board-ams-delta.c | 11 drivers/mtd/nand/raw/ams-delta.c | 119 +++--- 2 files changed, 52 insertions(+), 78

[RFC PATCH 4/8] mtd: rawnand: ams-delta: Optimize pointer resolution on read/write

2018-07-18 Thread Janusz Krzysztofik
Further optimize processing speed of read/write callback functions by resolving private structure pointer only once per callback and passing it to all subfunctions instead of mtd_info. Signed-off-by: Janusz Krzysztofik --- drivers/mtd/nand/raw/ams-delta.c | 44

[RFC PATCH 5/8] mtd: rawnand: ams-delta: Request data port GPIO resource

2018-07-18 Thread Janusz Krzysztofik
obtain exclusive access to the port by requesting an array of its GPIO descriptors. For that to work on Amstrad Delta, respective GPIO lookup table entries are added to the board init file. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.c | 11 ++- drivers/mtd

[RFC PATCH 7/8] mtd: rawnand: ams-delta: Check sanity of data GPIO resource

2018-07-18 Thread Janusz Krzysztofik
the above described sanity checks before replacing the readw()/writew() operations witn GPIO callbacks. If a check fails, return -EINVAL to indicate the board provided GPIO setup is invalid. Signed-off-by: Janusz Krzysztofik --- drivers/mtd/nand/raw/ams-delta.c | 87

[RFC PATCH 1/8] mtd: rawnand: ams-delta: Use private structure

2018-07-18 Thread Janusz Krzysztofik
the structure with more members as needed. While at it, fix missing mtd->dev.parent and drop useless mtd->owner. Signed-off-by: Janusz Krzysztofik --- drivers/mtd/nand/raw/ams-delta.c | 126 +-- 1 file changed, 69 insertions(+), 57 deletions(-) diff --git a/d

[RFC PATCH 0/8] mtd: rawnand: ams-delta: Use gpio-omap accessors for data I/O

2018-07-18 Thread Janusz Krzysztofik
Implement the idea suggested by Artem Bityutskiy and Tony Lindgren described in commit b027274d2e3a ("mtd: ams-delta: fix request_mem_region() failure"). arch/arm/mach-omap1/board-ams-delta.c | 22 - drivers/gpio/gpio-omap.c | 88 ++ drivers/mtd/nand/raw/ams-delta.c |

Re: [PATCH v3] mtd: rawnand: ams-delta: use GPIO lookup table

2018-07-17 Thread Janusz Krzysztofik
Hi Boris, On Tuesday, July 17, 2018 9:37:36 PM CEST Boris Brezillon wrote: > ... > Sorry, but we can't apply this patch now because of the dependency on > those 2 commits. I guess it's not a big issue if we defer it to 4.20. > Alternatively, we could consider queuing it to mtd/fixes after

[PATCH] ARM: OMAP1: ams-delta: assign MODEM IRQ from GPIO descriptor

2018-07-17 Thread Janusz Krzysztofik
IRQ to the MODEM. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.c | 46 ++- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index dd28d2614d7f

[PATCH RESEND v3] mtd: rawnand: ams-delta: use GPIO lookup table

2018-07-17 Thread Janusz Krzysztofik
equivalents. Pin naming used by the driver should be followed while respective GPIO lookup table is initialized by a board init code. Signed-off-by: Janusz Krzysztofik --- Changlog: v1: Fix handling of devm_gpiod_get_optional() return values - thanks to Andy Shevchenko. v2: Remove problematic error

Re: [PATCH v4] regulator: fixed: Convert to use GPIO descriptor only

2018-07-13 Thread Janusz Krzysztofik
Hi Linus, On Friday, July 13, 2018 9:35:06 AM CEST Linus Walleij wrote: > On Tue, Jul 10, 2018 at 7:56 PM Janusz Krzysztofik wrote: > > > - .gpio = AMS_DELTA_GPIO_PIN_MODEM_NRESET, > > > > This is OK but not enough for clean build of board

Re: [PATCH v4] regulator: fixed: Convert to use GPIO descriptor only

2018-07-10 Thread Janusz Krzysztofik
to current linux-next where late_gpio_tables[] has been removed from board-ams-delta.c and its content integrated into ams_delta_gpio_tables[]. > _delta_lcd_gpio_table, > _delta_nand_gpio_table, > }; If that makes your life easier, I can prepare a fix for board-ams-delta.c on top of your patch. In that case you can add my: Reviewed-by: Janusz Krzysztofik Thanks, Janusz

[PATCH v3] mtd: rawnand: ams-delta: use GPIO lookup table

2018-07-09 Thread Janusz Krzysztofik
equivalents. Pin naming used by the driver should be followed while respective GPIO lookup table is initialized by a board init code. Signed-off-by: Janusz Krzysztofik --- Changlog: v1: Fix handling of devm_gpiod_get_optional() return values - thanks to Andy Shevchenko. v2: Remove problematic error

Re: [PATCH] gpiolib: Defer on non-DT find_chip_by_name() failure

2018-07-06 Thread Janusz Krzysztofik
> >> On Wed, 04 Jul 2018, Janusz Krzysztofik wrote: > >>> On Tuesday, July 3, 2018 7:31:41 PM CEST Boris Brezillon wrote: > >>>> On Tue, 3 Jul 2018 19:26:35 +0200 Janusz Krzysztofik wrote: > >>>>> chip = find_chip_by_

Re: [PATCH] gpiolib: Defer on non-DT find_chip_by_name() failure

2018-07-05 Thread Janusz Krzysztofik
On Thursday, July 5, 2018 7:50:37 AM CEST Lee Jones wrote: > On Wed, 04 Jul 2018, Janusz Krzysztofik wrote: > > On Tuesday, July 3, 2018 7:31:41 PM CEST Boris Brezillon wrote: > > > Hi Janusz, > > > > > > On Tue, 3 Jul 2018 19:26:35 +0200 > > > &

Re: [PATCH] gpiolib: Defer on non-DT find_chip_by_name() failure

2018-07-04 Thread Janusz Krzysztofik
On Tuesday, July 3, 2018 7:31:41 PM CEST Boris Brezillon wrote: > Hi Janusz, > > On Tue, 3 Jul 2018 19:26:35 +0200 > > Janusz Krzysztofik wrote: > > Avoid replication of error code conversion in non-DT GPIO consumers' > > code by returning -EPROBE_DEFER from

[PATCH v2] gpiolib: Defer on non-DT find_chip_by_name() failure

2018-07-03 Thread Janusz Krzysztofik
-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon --- Changelog v2: fix typo (latar -> later) - thanks Boris and Andy for catching this I'm not sure if adding both Suggested-by: and Reviewed-by: heades both with the same person name is in line with good practices, please remove

[PATCH] gpiolib: Defer on non-DT find_chip_by_name() failure

2018-07-03 Thread Janusz Krzysztofik
Avoid replication of error code conversion in non-DT GPIO consumers' code by returning -EPROBE_DEFER from gpiod_find() in case a chip identified by its label in a registered lookup table is not ready. See https://lkml.org/lkml/2018/5/30/176 for example case. Signed-off-by: Janusz Krzysztofik

[PATCH] ARM: OMAP1: ams-delta: move late devices back to init_machine

2018-07-02 Thread Janusz Krzysztofik
mmit 5322c19b117a ("ARM: OMAP1: ams-delta: Hog "keybrd_dataout" GPIO pin"). In turn, the issue of missing regulator has been fixed by commit 50c678772a0b ("ASoC: cx20442: Don't ignore regulator_get() errors."). Simplify the board init code by moving registration o

[PATCH] ASoC: cx20442: Don't ignore regulator_get() errors.

2018-06-24 Thread Janusz Krzysztofik
-off-by: Janusz Krzysztofik --- Created and tested on linux-4.18-rc1 sound/soc/codecs/cx20442.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c index 07dd33b09596..ab174b5114dc 100644 --- a/sound

[PATCH v2 04/10] Input: ams_delta_serio: Replace power GPIO with regulator

2018-06-21 Thread Janusz Krzysztofik
vice and register it from the board file. Both assign an absulute GPIO number to the soon depreciated .gpio member of the regulator config structure, and also build and register a GPIO lookup table so it is ready for use by the regulator driver as soon as its upcoming update is applied. Signed-off-b

[PATCH v2 06/10] ARM: OMAP1: ams-delta FIQ: don't use static GPIO numbers

2018-06-21 Thread Janusz Krzysztofik
ork faster. Signed-off-by: Janusz Krzysztofik Acked-by: Linus Walleij --- Changelog: v2: rebased on v4.18-rc1, no conflicts arch/arm/mach-omap1/ams-delta-fiq.c | 48 +--- arch/arm/mach-omap1/board-ams-delta.c| 41 +++- arch/arm/mach-oma

[PATCH v2 05/10] ARM: OMAP1: ams-delta: Hog "keybrd_dataout" GPIO pin

2018-06-21 Thread Janusz Krzysztofik
Introduce a GPIO hog table and take over control of the "keybrd_dataout" GPIO pin from the ams-delta-serio driver. Signed-off-by: Janusz Krzysztofik --- Changelog: v2: rebased on v4.18-rc1, no conflicts arch/arm/mach-omap1/board-ams-delta.c | 8 drivers/input/serio/ams_delta_

[PATCH v2 07/10] ARM: OMAP1: ams-delta FIQ: Keep serio input GPIOs requested

2018-06-21 Thread Janusz Krzysztofik
hem and releases while identifying GPIO IRQs. Signed-off-by: Janusz Krzysztofik --- Changelog: v2: rebased on v4.18-rc1, no conflicts arch/arm/mach-omap1/ams-delta-fiq.c | 42 ++- drivers/input/serio/ams_delta_serio.c | 30 ++--- 2 files changed,

[PATCH v2 10/10] Input: ams_delta_serio: Get FIQ buffer from platform_data

2018-06-21 Thread Janusz Krzysztofik
Instead of exporting the FIQ buffer symbol to be used in ams-delta-serio driver, pass it to the driver as platform_data. Signed-off-by: Janusz Krzysztofik --- Changelog: v2: rebased on v4.18-rc1, no conflicts arch/arm/mach-omap1/ams-delta-fiq.c | 6 +++--- arch/arm/mach-omap1/board

[PATCH v2 08/10] ARM: OMAP1: Get rid of

2018-06-21 Thread Janusz Krzysztofik
-off-by: Janusz Krzysztofik --- Changelog: v2: rebased on v4.18-rc1, no conflicts MAINTAINERS| 1 + arch/arm/mach-omap1/ams-delta-fiq-handler.S| 5 +-- arch/arm/mach-omap1/ams-delta-fiq.c| 7 ++-- arch/arm/mach-omap1/ams-delta-fiq.h

[PATCH v2 09/10] Input: ams_delta_serio: use IRQ resource

2018-06-21 Thread Janusz Krzysztofik
a benefit, the driver no longer needs to include . Signed-off-by: Janusz Krzysztofik --- Changelog: v2: - obsolete assignment of handle_simple_irq() removed from the driver and replaced with a comment in the FIQ init file, - rebased on v4.18-rc1, no conflicts. arch/arm/mach-omap1/ams-d

[PATCH v2 03/10] Input: ams_delta_serio: use private structure

2018-06-21 Thread Janusz Krzysztofik
Introduce a driver private structure and allocate it on device probe. For now, use it instead of a static variable for storing a pointer to serio structure. Subsequent patches will populate it with more members as needed. Signed-off-by: Janusz Krzysztofik --- Changelog: v2: rebased on v4.18-rc1

[PATCH v2 02/10] Input: ams_delta_serio: convert to platform driver

2018-06-21 Thread Janusz Krzysztofik
Convert the driver to an "ams-delta-serio" platform driver. For it to be used with Amstrad Delta, register an "ams-delta-serio" platform device from the board init file. Signed-off-by: Janusz Krzysztofik --- Changelog: v2: rebased on v4.18-rc1, no conflicts arch/arm/

[PATCH v2 01/10] ARM: OMAP1: ams-delta: drop GPIO lookup table for serio device

2018-06-21 Thread Janusz Krzysztofik
the board init file. Signed-off-by: Janusz Krzysztofik --- Changelog: v2: rebased on v4.18-rc1, no conflicts arch/arm/mach-omap1/board-ams-delta.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.

[PATCH 4/10 v2] Input: ams_delta_serio: Replace power GPIO with regulator

2018-06-14 Thread Janusz Krzysztofik
vice and register it from the board file. Both assign an absulute GPIO number to the soon depreciated .gpio member of the regulator config structure, and also build and register a GPIO lookup table so it is ready for use by the regulator driver as soon as its upcoming update is applied. Signed-off-b

Re: [PATCH 01/10] ARM: OMAP1: ams-delta: drop GPIO lookup table for serio device

2018-06-12 Thread Janusz Krzysztofik
On Wednesday, June 13, 2018 12:23:56 AM CEST Dmitry Torokhov wrote: > Hi Janusz, > > On Sat, Jun 09, 2018 at 04:02:15PM +0200, Janusz Krzysztofik wrote: > > GPIO lookup table for ams-delta-serio device was introduced by commit > > 0486738928bf ("ARM: OMAP1: ams-del

  1   2   >