[PATCH 6/9] staging/sb105x: coding style issues

2013-03-19 Thread Samuel Iglesias Gonsalvez
Driver logic is not being modified Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/sb105x/sb_mp_register.h |7 +- drivers/staging/sb105x/sb_pci_mp.c | 390 ++- drivers/staging/sb105x/sb_pci_mp.h | 165 ++--- drivers/staging/sb105x

[PATCH 0/9] staging/sb105x: minor fixes

2013-03-19 Thread Samuel Iglesias Gonsalvez
ort, a lot of debug information, commented-out code, etc. I added a TODO file in the last commit, to gather some of the work to be done. Thanks, Sam Samuel Iglesias Gonsalvez (9): staging/sb105x: coding style fixes staging/sb105x: rename _INLINE_ to inline staging/sb105x: delete deb

[PATCH 1/9] staging/sb105x: coding style fixes

2013-03-19 Thread Samuel Iglesias Gonsalvez
No change in the logic of the driver Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/sb105x/sb_pci_mp.c | 974 +--- 1 file changed, 449 insertions(+), 525 deletions(-) diff --git a/drivers/staging/sb105x/sb_pci_mp.c b/drivers/staging/sb105x

[PATCH 4/9] staging/sb105x: change some printk to corresponding dev_*

2013-03-19 Thread Samuel Iglesias Gonsalvez
Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/sb105x/sb_pci_mp.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/staging/sb105x/sb_pci_mp.c b/drivers/staging/sb105x/sb_pci_mp.c index 7196412..9e30a0c 100644 --- a/drivers/staging

[PATCH 5/9] staging/sb105x: change some printk to corresponding pr_*

2013-03-19 Thread Samuel Iglesias Gonsalvez
Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/sb105x/sb_pci_mp.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/sb105x/sb_pci_mp.c b/drivers/staging/sb105x/sb_pci_mp.c index 9e30a0c..cb27fb6 100644 --- a

[PATCH 8/9] staging/sb105x: remove BROKEN tag from Kconfig

2013-03-19 Thread Samuel Iglesias Gonsalvez
Now the build finishes without any errors Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/sb105x/Kconfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/sb105x/Kconfig b/drivers/staging/sb105x/Kconfig index 245e784..58cc52e 100644 --- a

[PATCH 2/9] staging/sb105x: rename _INLINE_ to inline

2013-03-19 Thread Samuel Iglesias Gonsalvez
No need to have a definition of inline. It doesn't harm anything if explicitly specify Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/sb105x/sb_pci_mp.c | 24 drivers/staging/sb105x/sb_pci_mp.h |9 - 2 files changed, 12 insertions(+

[PATCH 9/9] staging/sb105x: add TODO file

2013-03-19 Thread Samuel Iglesias Gonsalvez
Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/sb105x/TODO |6 ++ 1 file changed, 6 insertions(+) create mode 100644 drivers/staging/sb105x/TODO diff --git a/drivers/staging/sb105x/TODO b/drivers/staging/sb105x/TODO new file mode 100644 index 000..518346f --- /dev

[PATCH 3/9] staging/sb105x: delete debug printks

2013-03-19 Thread Samuel Iglesias Gonsalvez
Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/sb105x/sb_pci_mp.c | 20 1 file changed, 20 deletions(-) diff --git a/drivers/staging/sb105x/sb_pci_mp.c b/drivers/staging/sb105x/sb_pci_mp.c index 4c88bfc..7196412 100644 --- a/drivers/staging/sb105x

[PATCH 7/9] staging/sb105x: use tty_port

2013-03-19 Thread Samuel Iglesias Gonsalvez
Use struct tty_port wherever is needed, fixing compilation errors. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/sb105x/sb_pci_mp.c | 18 +++--- drivers/staging/sb105x/sb_ser_core.h |1 + 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers

[PATCH 3/3] ipack: split ipack_device_register() in several functions

2013-03-08 Thread Samuel Iglesias Gonsalvez
documentation says. ipack_device_del() is added to remove the device. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/carriers/tpci200.c | 14 +- drivers/ipack/ipack.c| 24 +-- include/linux/ipack.h| 39

[PATCH 2/3] ipack: add ipack_get_device() ipack_put_device()

2013-03-08 Thread Samuel Iglesias Gonsalvez
Prepare everything for later use. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/ipack.c | 12 include/linux/ipack.h |3 +++ 2 files changed, 15 insertions(+) diff --git a/drivers/ipack/ipack.c b/drivers/ipack/ipack.c index 599d4ff..bdac7f6 100644 --- a/drivers

[PATCH 1/3] ipack: avoid double free on device->id

2013-03-08 Thread Samuel Iglesias Gonsalvez
Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/ipack.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ipack/ipack.c b/drivers/ipack/ipack.c index 7ec6b20..599d4ff 100644 --- a/drivers/ipack/ipack.c +++ b/drivers/ipack/ipack.c @@ -24,6 +24,7 @@ static void

[PATCH] ipack: add missing put_device() after device_register() failed

2013-02-26 Thread Samuel Iglesias Gonsalvez
put_device() must be called after device_register() fails, since device_register() always initializes the refcount on the device structure to one. dev->id is free'd inside of ipack_device_release function. So, it's not needed to do it here. Signed-off-by: Samuel Iglesias Gonsalvez

[PATCH] ipack/devices/ipoctal: add missing rx_enable = 1

2013-01-17 Thread Samuel Iglesias Gonsalvez
There was a bug in the code when managing a GE IP-OCTAL-485 board. The RX would be enabled but we have a wrong state in the rx_enable flag. Then, if the user changes the terminal settings, RX would not be enabled again. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/devices

Re: linux-next: manual merge of the char-misc tree with the tty tree

2013-01-17 Thread Samuel Iglesias Gonsalvez
On Thu, Jan 17, 2013 at 01:54:20PM +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the char-misc tree got a conflict in > drivers/ipack/devices/ipoctal.c between commit 2e124b4a390c ("TTY: switch > tty_flip_buffer_push") from the tty tree and commits 7e5730d7c222 > ("ipack

[PATCH 03/12] ipack/devices/ipoctal: fix kernel bug when using pppd

2012-12-10 Thread Samuel Iglesias Gonsalvez
amuel Iglesias Gonsalvez --- drivers/ipack/devices/ipoctal.c | 21 ++--- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipoctal.c index 8f699b0..241db2f 100644 --- a/drivers/ipack/devices/ipoctal.c +++ b/dr

[PATCH 04/12] ipack/devices/ipoctal: remove wait_queue and atomic_t board_write

2012-12-10 Thread Samuel Iglesias Gonsalvez
Don't block the TTY client when sending characters. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/devices/ipoctal.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipoctal.c

[PATCH 05/12] ipack/devices/ipoctal: setup TTY_NORMAL flag for each character.

2012-12-10 Thread Samuel Iglesias Gonsalvez
In case of several characters present in RxFIFO, they will have the flag of the previous one, no matter if the actual character was received properly or not. This patch fixes this bug. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/devices/ipoctal.c |3 ++- 1 file changed, 2

[PATCH 07/12] ipack/devices/ipoctal: avoid re-enable RX two times.

2012-12-10 Thread Samuel Iglesias Gonsalvez
-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/devices/ipoctal.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipoctal.c index 96467bb..45920f5 100644 --- a/drivers/ipack/devices/ipoctal.c +++ b/drivers

[PATCH 01/12] ipack/devices/ipoctal: Fix race condition during Tx

2012-12-10 Thread Samuel Iglesias Gonsalvez
waiting for a condition that will never be true. Signed-off-by: Alberto Garcia Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/devices/ipoctal.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices

[PATCH 09/12] ipack/devices/ipoctal: protect the channel data processing with a spinlock

2012-12-10 Thread Samuel Iglesias Gonsalvez
We protect important data such as TX buffer pointer, nb_bytes counter and status registers of the device, from accessing several times at the same time. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/devices/ipoctal.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers

[PATCH 08/12] ipack/devices/ipoctal: ack IRQ before processing it

2012-12-10 Thread Samuel Iglesias Gonsalvez
Due to the IRQ processing, we can generate another IRQ that can come before we end the previous one, so we lost it. E.g. when transmitting a character. To allow the processing in SMP machines, we ack the IRQ at the beginning of the IRQ handler. Signed-off-by: Samuel Iglesias Gonsalvez

[PATCH 12/12] ipack/devices/ipoctal: added shutdown callback

2012-12-10 Thread Samuel Iglesias Gonsalvez
Added shutdown callback to disable RX and TX when there is no other client accesing the device. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/devices/ipoctal.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack

[PATCH 11/12] ipack/devices/ipoctal: add rx_enable flag

2012-12-10 Thread Samuel Iglesias Gonsalvez
Thus, we don't enable RX when a termios setup has been called, as it could be disabled previously. As the control registers (Rx, Tx flags specifically) cannot be read from the device, we keep this info in rx_enable. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/devices/ipoc

[PATCH 10/12] ipack/devices/ipoctal: remove redundant tty_flip_buffer_push()

2012-12-10 Thread Samuel Iglesias Gonsalvez
The function is already called in ipoctal_irq_rx() Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/devices/ipoctal.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipoctal.c index 8dff66e..f2284ec 100644 --- a/drivers

[PATCH 02/12] ipack/devices/ipoctal: don't check if nb_bytes is < 0

2012-12-10 Thread Samuel Iglesias Gonsalvez
From: Alberto Garcia It is an unsigned int so that check is pointless. Signed-off-by: Alberto Garcia Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/devices/ipoctal.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/ipack/devices/ipoctal.c b

[PATCH 06/12] ipack/devices/ipoctal: rework disable TX when the TX buffer is empty

2012-12-10 Thread Samuel Iglesias Gonsalvez
Depending of the device, it disables the TX mode in different places when there is no more data to transmit. This patch reorder them and disable the TX mode in the same place. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/devices/ipoctal.c | 18 +++--- 1 file changed

[PATCH 1/2] ipack: move header files to include/linux

2012-11-16 Thread Samuel Iglesias Gonsalvez
Move ipack header files to include/linux/ directory where they belong. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/carriers/tpci200.h |3 +-- drivers/ipack/devices/ipoctal.c |3 ++- drivers/ipack/ipack.c|3 ++- {drivers/ipack

[PATCH 2/2] ipack: remove ipack_ids.h file

2012-11-16 Thread Samuel Iglesias Gonsalvez
Its contents are merged into ipack.h. So this file is not needed. Doing that, it simplifies the ipack-related driver development. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/devices/ipoctal.c |1 - drivers/ipack/ipack.c |1 - drivers/ipack/ipack_ids.h

[PATCH] ipack: move header files to include/linux

2012-11-16 Thread Samuel Iglesias Gonsalvez
Move ipack header files to include/linux/ directory where they belong to. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/ipack/carriers/tpci200.h |3 +- drivers/ipack/devices/ipoctal.c |2 +- drivers/ipack/ipack.c|2 +- drivers/ipack/ipack.h| 215

[PATCH 2/2] MAINTAINERS: Add maintainers for Industry Pack subsystem

2012-11-16 Thread Samuel Iglesias Gonsalvez
Add Samuel Iglesias Gonsalvez, Jens Taprogge and Greg Kroah-Hartman as maintainers for the Industry Pack subsystem. Cc: Jens Taprogge Cc: Greg Kroah-Hartman Signed-off-by: Samuel Iglesias Gonsalvez --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS

[PATCH 1/2] Staging: ipack: adapt copyright to CERN guidelines

2012-11-16 Thread Samuel Iglesias Gonsalvez
Adapt the copyright clause to CERN guidelines, as it has the copyright over them. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/carriers/tpci200.c |7 --- drivers/staging/ipack/carriers/tpci200.h |7 --- drivers/staging/ipack/devices/ipoctal.c |7

[PATCH] Staging: ipack/carriers: fix missing include linux/slab.h

2012-10-22 Thread Samuel Iglesias Gonsalvez
k/carriers/tpci200.c: In function 'tpci200_request_irq': drivers/staging/ipack/carriers/tpci200.c:217:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration] Reported-by: Fengguang Wu Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/stag

[PATCH 02/17] Staging: ipack: Make ipack_device_register() analogous to device_register().

2012-09-27 Thread Samuel Iglesias Gonsalvez
-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 19 ++- drivers/staging/ipack/ipack.c | 30 +- drivers/staging/ipack/ipack.h | 15 +-- 3 files changed, 36 insertions(+), 28 deletions(-) d

[PATCH 01/17] Staging: ipack: get rid of ipack_device->bus_nr.

2012-09-27 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge It is replicating information contained in ipack_device->bus->bus_nr. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 18 +- drivers/staging/ipack/devices/ipoctal.c |2 +- d

[PATCH 08/17] staging: ipack/devices/ipoctal: fix ipoctal_inst_slot error path.

2012-09-27 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge The ordering was wrong. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices/ipoctal.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ipack/devices/ipoctal.c b/drivers/staging

[PATCH 10/17] staging: ipack: swich to regular ioremap and friends.

2012-09-27 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Use the regular ioremap functions and their managed counterparts instead of the ones provided through IPack callbacks. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices/ipoctal.c | 70

[PATCH 14/17] Staging: ipack: remove blank line at EOF warning in Kconfig files

2012-09-27 Thread Samuel Iglesias Gonsalvez
Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/Kconfig |1 - drivers/staging/ipack/devices/Kconfig |1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/ipack/bridges/Kconfig b/drivers/staging/ipack/bridges/Kconfig index 97c837e..33fdc24 100644

[PATCH 06/17] Staging: ipack/bridges/tpci200: Cleanups.

2012-09-27 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Constant renames: - Rename TPCI200_*_GAP to TPCI200_*_INTERVAL. - Rename TPCI200_MEM*_* to TPCI200_MEM*_SPACE_* (to match the other SPACE constants. Make tpci200_status_timeout and tpci200_status_error const. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias

[PATCH 03/17] Staging: ipack/bridges/tpci200: Don't map memory spaces that are not used later on.

2012-09-27 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Remove the unused pointers to these spaces. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 10 -- drivers/staging/ipack/bridges/tpci200.h |2 -- 2 files changed, 12 deletions(-) diff --git

[PATCH 04/17] Staging: ipack/bridges/tpci200: change tpci200_slot->*_phys type.

2012-09-27 Thread Samuel Iglesias Gonsalvez
region) and use that as a replacement for struct ipack_addr_space. struct ipack_region is defined in ipack.h because it is planned to later expose the physical addressed to the IPack Module drivers. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack

[PATCH 13/17] staging: ipack: Add support for IPACK_MEM16_SPACE.

2012-09-27 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 19 +++ drivers/staging/ipack/ipack.h |1 + 2 files changed, 20 insertions(+) diff --git a/drivers/staging/ipack/bridges

[PATCH 11/17] Staging: ipack: remove memory mapping callbacks.

2012-09-27 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Now that we have the infrastructure to use the regular function in place and all existing users are converted, remove the map and unmap callbacks from the ipack_bus_device->ops. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/stag

[PATCH 07/17] Staging: ipack: Provide physical memory regions to IPack devices.

2012-09-27 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge This will allow us to use the regular ioremop functions. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 22 ++ drivers/staging/ipack/ipack.h |6 -- 2 files changed

[PATCH 12/17] staging: ipack: Rename IPACK_MEM_SPACE to IPACK_MEM8_SPACE.

2012-09-27 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge There also is a MEM16 space. This will make it clear which one is which, once support for MEM16 space is added. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 24 drivers

[PATCH 16/17] staging: ipack: Documentation cleanups.

2012-09-27 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/Kconfig | 13 - drivers/staging/ipack/carriers/Kconfig |4 ++-- drivers/staging/ipack/ipack.h | 15 --- 3 files changed, 18

[PATCH 17/17] Staging: ipack: fix wrong return value.

2012-09-27 Thread Samuel Iglesias Gonsalvez
In case it is not possible to remap the memory, it returns 0 and the driver thinks that everything went fine. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/ipack.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ipack/ipack.c b/drivers

[PATCH 05/17] Staging: ipack/bridges/tpci200: Store beginning of module memory regions in struct tpci200.

2012-09-27 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge tpci200_register is converted to use this. A later patch will build on this. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 26 +- drivers/staging/ipack/bridges/tpci200.h

[PATCH 15/17] staging: ipack: Rename bridges to carriers.

2012-09-27 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge This is the name used by the standard. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/Kconfig|2 +- drivers/staging/ipack/Makefile |2 +- drivers/staging/ipack/bridges/Kconfig|7

[PATCH 09/17] staging: ipack/devices/ipoctal: obtain model from dev->id_device.

2012-09-27 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge By doing so we can remove ipoctal_check_model() and we also no longer need to map the IPACK_ID_SPACE. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices/ipoctal.c | 46 ++- 1 file changed

[PATCH v2 1/5] Staging: ipack: Add IPACK_INT_SPACE memory space.

2012-09-13 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge This will allow us to correctly access the IPack INT space. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 29 + drivers/staging/ipack/bridges/tpci200.h |2 ++ drivers

[PATCH v2 4/5] Staging: ipack/devices/ipoctal: acknowledge BREAK condition.

2012-09-13 Thread Samuel Iglesias Gonsalvez
Clear the BREAK flag from the ISR register. Doing that, we avoid to read the same condition for the next character received. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices/ipoctal.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/ipack/devices

[PATCH v2 3/5] staging: ipack: remove irq field in struct ipack_device.

2012-09-13 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge The field irq currently is identical to the slot number. It does not seem to have any real use. The number is written to hardware in ipoctal but it seems the value that is written does not matter. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez

[PATCH v2 5/5] Staging: ipack/devices/ipoctal: simplify ipoctal_write_tty()

2012-09-13 Thread Samuel Iglesias Gonsalvez
Remove count_wr and the assigment of nb_bytes = 0 in that function as is useless. Now it returns the count of the characters actually sent. There is other nb_bytes = 0 deleted that has a duplicate a few lines before. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices

[PATCH v2 2/5] Staging: ipack: move the responsibility to clear interrupts to the IPack devices.

2012-09-13 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Now the IPack device acknowledges its own IRQ. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c |4 drivers/staging/ipack/devices/ipoctal.c | 19 +-- drivers/staging/ipack/devices

[PATCH 1/5] Staging: ipack: Add IPACK_INT_SPACE memory space.

2012-09-13 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge This will allow us to correctly access the IPack INT space. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 29 + drivers/staging/ipack/bridges/tpci200.h |2 ++ drivers

[PATCH 2/5] Staging: ipack: move the responsibility to clear interrupts to the IPack devices.

2012-09-13 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Now the IPack device acknowledges its own IRQ. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c |4 drivers/staging/ipack/devices/ipoctal.c | 19 +-- drivers/staging/ipack/devices

[PATCH 3/5] staging: ipack: remove irq field in struct ipack_device.

2012-09-13 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge The field irq currently is identical to the slot number. It does not seem to have any real use. The number is written to hardware in ipoctal but it seems the value that is written does not matter. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez

[PATCH 4/5] Staging: ipack/devices/ipoctal: acknowledge BREAK condition.

2012-09-13 Thread Samuel Iglesias Gonsalvez
Clear the BREAK flag from the ISR register. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices/ipoctal.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/ipack/devices/ipoctal.c b/drivers/staging/ipack/devices/ipoctal.c index 0fd0e01..5f4545a

[PATCH 5/5] Staging: ipack/devices/ipoctal: simplify ipoctal_write_tty()

2012-09-13 Thread Samuel Iglesias Gonsalvez
Remove count_wr and the assigment of nb_bytes = 0 in that function as is useless. Now it returns the count of the characters actually sent. There is other nb_bytes = 0 deleted that has a duplicate a few lines before. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices

[PATCH 01/24] Staging: ipack/bridges/tpci200: add helpers for writing control regs.

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Convert tpci200_set_clockrate and tpci200_interrupt. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 49 --- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a

[PATCH 02/24] Staging: ipack/bridges/tpci200: Remove side effects of tpci200_{request,free}_irq.

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Use the __tpci200_{set,clear}_mask routines to access control register. Do not overwrite flags unrelated to interrupt handling. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 31

[PATCH 04/24] Staging: ipack/devices/ipoctal: split ipoctal_channel from ipoctal.

2012-09-12 Thread Samuel Iglesias Gonsalvez
uel Iglesias Gonsalvez --- drivers/staging/ipack/devices/ipoctal.c | 286 --- 1 file changed, 150 insertions(+), 136 deletions(-) diff --git a/drivers/staging/ipack/devices/ipoctal.c b/drivers/staging/ipack/devices/ipoctal.c index 35513d9..9ab0e80 100644 --- a/driv

[PATCH 05/24] Staging: ipack/devices/ipoctal: Directly use ioread/iowrite function.

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices/ipoctal.c | 151 +-- 1 file changed, 41 insertions(+), 110 deletions(-) diff --git a/drivers/staging/ipack/devices/ipoctal.c b/drivers

[PATCH 07/24] Staging: ipack/devices/ipoctal: Store isr masks in ipoctal_channel

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge This way interrupt handling becomes independent of the channel number. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices/ipoctal.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff

[PATCH 09/24] Staging: ipack/devices/ipoctal: remove superfluous function.

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge ipoctal_write_tty and ipoctal_write are merged. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices/ipoctal.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/staging/ipack

[PATCH 08/24] Staging: ipack/devices/ipoctal: Split interrupt service routine.

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Split the IRQ service routing in TX part and RX part. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices/ipoctal.c | 188 --- 1 file changed, 97 insertions(+), 91 deletions(-) diff --git a

[PATCH 10/24] Staging: ipack/bridges/tpci200: RCU protect slot_irq pointers.

2012-09-12 Thread Samuel Iglesias Gonsalvez
. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c index 24e2a11..9ce577a

[PATCH 11/24] Staging: ipack/bridges/tpci200: Protect device registers with spinlock.

2012-09-12 Thread Samuel Iglesias Gonsalvez
ned-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 33 +-- drivers/staging/ipack/bridges/tpci200.h |1 + 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipa

[PATCH 12/24] Staging: ipack/bridges/tpci200: Clean up interrupt handling.

2012-09-12 Thread Samuel Iglesias Gonsalvez
cases the code now distinguishes: - The tpci200 has raised an interrupt. We handle it and return IRQ_HANDLED. - Our device did not raise an interrupt. We return IRQ_NONE. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c

[PATCH 13/24] Staging: ipack/bridges/tpci200: Cleanup in tpci200_slot_irq() and tpci200_interrupt()

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Minor cleanup. No functional changes. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 58 +-- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/drivers/staging

[PATCH 14/24] Staging: ipack/bridges/tpci200: More cleanups.

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Rename __tpci_request_irq() to tpci_enable_irq() and __tpci_free_irq() to tpci_disable_irq(). Change their second argument, move them above tpci200_interrupt(), and use tpci_disable_irq() in the latter Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez

[PATCH 17/24] Staging: ipack/devices/ipoctal: Clean up device removal.

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Make use of dev_set_drvdata() and dev_get_drvdata() to store and obtain a pointer to the ipoctal struct corresponding to a struct dev. Previously we relied on a private list of devices. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers

[PATCH 18/24] Staging: ipack/devices/ipoctal: Check tty_register_device return value.

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices/ipoctal.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/staging/ipack/devices/ipoctal.c b/drivers/staging/ipack/devices

[PATCH 19/24] Staging: ipack/devices/ipoctal: Use KBUILD_MODNAME instead of hardcoded string.

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices/ipoctal.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ipack/devices/ipoctal.c b/drivers/staging/ipack/devices/ipoctal.c

[PATCH 20/24] Staging: ipack/devices/ipoctal: Get rid of ipoctal_list.

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Use tty_dev->dev's drdata to associate struct ipocal_channel to the respective tty_struct. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices/ipoctal.c | 39 +++ 1 file ch

[PATCH 03/24] Staging: ipack/bridges/tpci200: Clean up interrupt handler.

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge This also removes a possible bug in the unhandles_ints part when slots[i] is not set. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 42 +-- 1 file changed, 17 insertions

[PATCH 06/24] Staging: ipack/devices/ipoctal: put ipoctal_channel into tty->driver_data.

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Each tty's driver_data is now pointing to the channel it is talking to. struct ipoctal_channel contains all the information the callbacks require to do their work. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/de

[PATCH 22/24] Staging: ipack: update TODO file

2012-09-12 Thread Samuel Iglesias Gonsalvez
With the latest patches, the TODO file was outdated. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/TODO | 25 ++--- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/drivers/staging/ipack/TODO b/drivers/staging/ipack/TODO index b21d33a

[PATCH 21/24] Staging: ipack/devices/ipoctal: read more than one character from RX FIFO.

2012-09-12 Thread Samuel Iglesias Gonsalvez
The RX FIFO has a size of 3 characters. Check if when we are picking the oldest one, we have more to read. Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices/ipoctal.c | 60 ++- 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a

[PATCH 15/24] Staging: ipack/bridges/tpci200: move tpci200_free_irq() and tpci200_request_irq()

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Now, all the interrupt related functions are next to each other. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 154 +++ 1 file changed, 77 insertions(+), 77 deletions

[PATCH 24/24] staging: ipack/bridges/tpci200: Use endianess-aware types where applicable.

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c | 10 +- drivers/staging/ipack/bridges/tpci200.h |8 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging

[PATCH 23/24] Staging: ipack/devices/ipoctal: Unmap memory on device removal.

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/devices/ipoctal.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/ipack/devices/ipoctal.c b/drivers/staging/ipack/devices/ipoctal.c index 4f79fad

[PATCH 16/24] Staging: ipack: Let interrupts return irqreturn_t.

2012-09-12 Thread Samuel Iglesias Gonsalvez
From: Jens Taprogge Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsalvez --- drivers/staging/ipack/bridges/tpci200.c |2 +- drivers/staging/ipack/bridges/tpci200.h |3 +-- drivers/staging/ipack/devices/ipoctal.c |2 +- drivers/staging/ipack/ipack.h