[PATCH 1/9] media: rc: nuvoton: remove interrupt handling for wakeup

2016-06-23 Thread Heiner Kallweit
There is a rudimentary ISR for handling interrupts generated by the
wakeup part of the chip. Interrupts however have never been enabled
in the wakeup part.
Also, now that we can set the wakeup sequence via sysfs, there's in
general no need to enable interrupts in the wakeup part.

Signed-off-by: Heiner Kallweit 
---
 drivers/media/rc/nuvoton-cir.c | 58 ++
 drivers/media/rc/nuvoton-cir.h |  1 -
 2 files changed, 2 insertions(+), 57 deletions(-)

diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 4a8f79c..b32f3bf 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -480,10 +480,8 @@ static void nvt_cir_wake_ldev_init(struct nvt_dev *nvt)
 
nvt_set_ioaddr(nvt, >cir_wake_addr);
 
-   nvt_cr_write(nvt, nvt->cir_wake_irq, CR_CIR_IRQ_RSRC);
-
-   nvt_dbg("CIR Wake initialized, base io port address: 0x%lx, irq: %d",
-   nvt->cir_wake_addr, nvt->cir_wake_irq);
+   nvt_dbg("CIR Wake initialized, base io port address: 0x%lx",
+   nvt->cir_wake_addr);
 }
 
 /* clear out the hardware's cir rx fifo */
@@ -997,51 +995,6 @@ static irqreturn_t nvt_cir_isr(int irq, void *data)
return IRQ_HANDLED;
 }
 
-/* Interrupt service routine for CIR Wake */
-static irqreturn_t nvt_cir_wake_isr(int irq, void *data)
-{
-   u8 status, iren, val;
-   struct nvt_dev *nvt = data;
-   unsigned long flags;
-
-   nvt_dbg_wake("%s firing", __func__);
-
-   spin_lock_irqsave(>nvt_lock, flags);
-
-   status = nvt_cir_wake_reg_read(nvt, CIR_WAKE_IRSTS);
-   iren = nvt_cir_wake_reg_read(nvt, CIR_WAKE_IREN);
-
-   /* IRQ may be shared with CIR, therefore check for each
-* status bit whether the related interrupt source is enabled
-*/
-   if (!(status & iren)) {
-   spin_unlock_irqrestore(>nvt_lock, flags);
-   return IRQ_NONE;
-   }
-
-   if (status & CIR_WAKE_IRSTS_IR_PENDING)
-   nvt_clear_cir_wake_fifo(nvt);
-
-   nvt_cir_wake_reg_write(nvt, status, CIR_WAKE_IRSTS);
-   nvt_cir_wake_reg_write(nvt, 0, CIR_WAKE_IRSTS);
-
-   if ((status & CIR_WAKE_IRSTS_PE) &&
-   (nvt->wake_state == ST_WAKE_START)) {
-   while (nvt_cir_wake_reg_read(nvt, CIR_WAKE_RD_FIFO_ONLY_IDX)) {
-   val = nvt_cir_wake_reg_read(nvt, CIR_WAKE_RD_FIFO_ONLY);
-   nvt_dbg("setting wake up key: 0x%x", val);
-   }
-
-   nvt_cir_wake_reg_write(nvt, 0, CIR_WAKE_IREN);
-   nvt->wake_state = ST_WAKE_FINISH;
-   }
-
-   spin_unlock_irqrestore(>nvt_lock, flags);
-
-   nvt_dbg_wake("%s done", __func__);
-   return IRQ_HANDLED;
-}
-
 static void nvt_disable_cir(struct nvt_dev *nvt)
 {
unsigned long flags;
@@ -1145,8 +1098,6 @@ static int nvt_probe(struct pnp_dev *pdev, const struct 
pnp_device_id *dev_id)
nvt->cir_irq  = pnp_irq(pdev, 0);
 
nvt->cir_wake_addr = pnp_port_start(pdev, 1);
-   /* irq is always shared between cir and cir wake */
-   nvt->cir_wake_irq  = nvt->cir_irq;
 
nvt->cr_efir = CR_EFIR;
nvt->cr_efdr = CR_EFDR;
@@ -1223,11 +1174,6 @@ static int nvt_probe(struct pnp_dev *pdev, const struct 
pnp_device_id *dev_id)
CIR_IOREG_LENGTH, NVT_DRIVER_NAME "-wake"))
goto exit_unregister_device;
 
-   if (devm_request_irq(>dev, nvt->cir_wake_irq,
-nvt_cir_wake_isr, IRQF_SHARED,
-NVT_DRIVER_NAME "-wake", (void *)nvt))
-   goto exit_unregister_device;
-
ret = device_create_file(>dev, _attr_wakeup_data);
if (ret)
goto exit_unregister_device;
diff --git a/drivers/media/rc/nuvoton-cir.h b/drivers/media/rc/nuvoton-cir.h
index c9c98eb..68431f0 100644
--- a/drivers/media/rc/nuvoton-cir.h
+++ b/drivers/media/rc/nuvoton-cir.h
@@ -104,7 +104,6 @@ struct nvt_dev {
unsigned long cir_addr;
unsigned long cir_wake_addr;
int cir_irq;
-   int cir_wake_irq;
 
enum nvt_chip_ver chip_ver;
/* hardware id */
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 6/9] media: rc: nuvoton: remove study states

2016-06-23 Thread Heiner Kallweit
Study states have never been used and are not needed. Remove them.

Signed-off-by: Heiner Kallweit 
---
 drivers/media/rc/nuvoton-cir.c | 11 +--
 drivers/media/rc/nuvoton-cir.h | 13 -
 2 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 9d9717d..5ce0238 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -865,7 +865,7 @@ static bool nvt_cir_tx_inactive(struct nvt_dev *nvt)
 static irqreturn_t nvt_cir_isr(int irq, void *data)
 {
struct nvt_dev *nvt = data;
-   u8 status, iren, cur_state;
+   u8 status, iren;
unsigned long flags;
 
nvt_dbg_verbose("%s firing", __func__);
@@ -907,7 +907,6 @@ static irqreturn_t nvt_cir_isr(int irq, void *data)
nvt_handle_rx_fifo_overrun(nvt);
 
if (status & CIR_IRSTS_RTR) {
-   /* FIXME: add code for study/learn mode */
/* We only do rx if not tx'ing */
if (nvt_cir_tx_inactive(nvt))
nvt_get_rx_ir_data(nvt);
@@ -916,11 +915,6 @@ static irqreturn_t nvt_cir_isr(int irq, void *data)
if (status & CIR_IRSTS_PE) {
if (nvt_cir_tx_inactive(nvt))
nvt_get_rx_ir_data(nvt);
-
-   cur_state = nvt->study_state;
-
-   if (cur_state == ST_STUDY_NONE)
-   nvt_clear_cir_fifo(nvt);
}
 
spin_unlock_irqrestore(>nvt_lock, flags);
@@ -1193,9 +1187,6 @@ static int nvt_suspend(struct pnp_dev *pdev, pm_message_t 
state)
 
spin_lock_irqsave(>nvt_lock, flags);
 
-   /* zero out misc state tracking */
-   nvt->study_state = ST_STUDY_NONE;
-
/* disable all CIR interrupts */
nvt_cir_reg_write(nvt, 0, CIR_IREN);
 
diff --git a/drivers/media/rc/nuvoton-cir.h b/drivers/media/rc/nuvoton-cir.h
index 8bd35bd..65324ef 100644
--- a/drivers/media/rc/nuvoton-cir.h
+++ b/drivers/media/rc/nuvoton-cir.h
@@ -117,23 +117,10 @@ struct nvt_dev {
/* rx settings */
bool learning_enabled;
 
-   /* for study */
-   u8 study_state;
/* carrier period = 1 / frequency */
u32 carrier;
 };
 
-/* study states */
-#define ST_STUDY_NONE  0x0
-#define ST_STUDY_START 0x1
-#define ST_STUDY_CARRIER   0x2
-#define ST_STUDY_ALL_RECV  0x4
-
-/* receive states */
-#define ST_RX_WAIT_7F  0x1
-#define ST_RX_WAIT_HEAD0x2
-#define ST_RX_WAIT_SILENT_END  0x4
-
 /* send states */
 #define ST_TX_NONE 0x0
 #define ST_TX_REQUEST  0x2
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 7/9] media: rc: nuvoton: simplify interrupt handling code

2016-06-23 Thread Heiner Kallweit
Simplify interupt handling code.

Signed-off-by: Heiner Kallweit 
---
 drivers/media/rc/nuvoton-cir.c | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 5ce0238..180f589 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -906,17 +906,12 @@ static irqreturn_t nvt_cir_isr(int irq, void *data)
if (status & CIR_IRSTS_RFO)
nvt_handle_rx_fifo_overrun(nvt);
 
-   if (status & CIR_IRSTS_RTR) {
+   else if (status & (CIR_IRSTS_RTR | CIR_IRSTS_PE)) {
/* We only do rx if not tx'ing */
if (nvt_cir_tx_inactive(nvt))
nvt_get_rx_ir_data(nvt);
}
 
-   if (status & CIR_IRSTS_PE) {
-   if (nvt_cir_tx_inactive(nvt))
-   nvt_get_rx_ir_data(nvt);
-   }
-
spin_unlock_irqrestore(>nvt_lock, flags);
 
if (status & CIR_IRSTS_TE)
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/9] media: rc: nuvoton: remove wake states

2016-06-23 Thread Heiner Kallweit
Wake states have never been in use and now that we can set the
wakeup sequence via sysfs there's in general no need for them.

Signed-off-by: Heiner Kallweit 
---
 drivers/media/rc/nuvoton-cir.c | 1 -
 drivers/media/rc/nuvoton-cir.h | 7 ---
 2 files changed, 8 deletions(-)

diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index c8999cc..c405c83 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -1207,7 +1207,6 @@ static int nvt_suspend(struct pnp_dev *pdev, pm_message_t 
state)
 
/* zero out misc state tracking */
nvt->study_state = ST_STUDY_NONE;
-   nvt->wake_state = ST_WAKE_NONE;
 
/* disable all CIR interrupts */
nvt_cir_reg_write(nvt, 0, CIR_IREN);
diff --git a/drivers/media/rc/nuvoton-cir.h b/drivers/media/rc/nuvoton-cir.h
index 68431f0..8bd35bd 100644
--- a/drivers/media/rc/nuvoton-cir.h
+++ b/drivers/media/rc/nuvoton-cir.h
@@ -117,8 +117,6 @@ struct nvt_dev {
/* rx settings */
bool learning_enabled;
 
-   /* track cir wake state */
-   u8 wake_state;
/* for study */
u8 study_state;
/* carrier period = 1 / frequency */
@@ -131,11 +129,6 @@ struct nvt_dev {
 #define ST_STUDY_CARRIER   0x2
 #define ST_STUDY_ALL_RECV  0x4
 
-/* wake states */
-#define ST_WAKE_NONE   0x0
-#define ST_WAKE_START  0x1
-#define ST_WAKE_FINISH 0x2
-
 /* receive states */
 #define ST_RX_WAIT_7F  0x1
 #define ST_RX_WAIT_HEAD0x2
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/9] media: rc: nuvoton: clean up initialization of wakeup registers

2016-06-23 Thread Heiner Kallweit
The registers defining wakeup sequence handling are set when the
wakeup sequence is set via sysfs. There's no need to initialize them
otherwise.

Signed-off-by: Heiner Kallweit 
---
 drivers/media/rc/nuvoton-cir.c | 25 +++--
 1 file changed, 3 insertions(+), 22 deletions(-)

diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index b32f3bf..c8999cc 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -564,34 +564,15 @@ static void nvt_cir_regs_init(struct nvt_dev *nvt)
 
 static void nvt_cir_wake_regs_init(struct nvt_dev *nvt)
 {
-   /* set number of bytes needed for wake from s3 (default 65) */
-   nvt_cir_wake_reg_write(nvt, CIR_WAKE_FIFO_CMP_BYTES,
-  CIR_WAKE_FIFO_CMP_DEEP);
-
-   /* set tolerance/variance allowed per byte during wake compare */
-   nvt_cir_wake_reg_write(nvt, CIR_WAKE_CMP_TOLERANCE,
-  CIR_WAKE_FIFO_CMP_TOL);
-
-   /* set sample limit count (PE interrupt raised when reached) */
-   nvt_cir_wake_reg_write(nvt, CIR_RX_LIMIT_COUNT >> 8, CIR_WAKE_SLCH);
-   nvt_cir_wake_reg_write(nvt, CIR_RX_LIMIT_COUNT & 0xff, CIR_WAKE_SLCL);
-
-   /* set cir wake fifo rx trigger level (currently 67) */
-   nvt_cir_wake_reg_write(nvt, CIR_WAKE_FIFOCON_RX_TRIGGER_LEV,
-  CIR_WAKE_FIFOCON);
-
/*
-* Enable TX and RX, specific carrier on = low, off = high, and set
-* sample period (currently 50us)
+* Disable RX, set specific carrier on = low, off = high,
+* and sample period (currently 50us)
 */
-   nvt_cir_wake_reg_write(nvt, CIR_WAKE_IRCON_MODE0 | CIR_WAKE_IRCON_RXEN |
+   nvt_cir_wake_reg_write(nvt, CIR_WAKE_IRCON_MODE0 |
   CIR_WAKE_IRCON_R | CIR_WAKE_IRCON_RXINV |
   CIR_WAKE_IRCON_SAMPLE_PERIOD_SEL,
   CIR_WAKE_IRCON);
 
-   /* clear cir wake rx fifo */
-   nvt_clear_cir_wake_fifo(nvt);
-
/* clear any and all stray interrupts */
nvt_cir_wake_reg_write(nvt, 0xff, CIR_WAKE_IRSTS);
 
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 9/9] media: rc: nuvoton: remove two unused elements in struct nvt_dev

2016-06-23 Thread Heiner Kallweit
These two fields are not used and can be removed.

Signed-off-by: Heiner Kallweit 
---
 drivers/media/rc/nuvoton-cir.h | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/media/rc/nuvoton-cir.h b/drivers/media/rc/nuvoton-cir.h
index 65324ef..acf735f 100644
--- a/drivers/media/rc/nuvoton-cir.h
+++ b/drivers/media/rc/nuvoton-cir.h
@@ -111,12 +111,8 @@ struct nvt_dev {
u8 chip_minor;
 
/* hardware features */
-   bool hw_learning_capable;
bool hw_tx_capable;
 
-   /* rx settings */
-   bool learning_enabled;
-
/* carrier period = 1 / frequency */
u32 carrier;
 };
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/9] media: rc: nuvoton: several clean-ups / removal of dead code

2016-06-23 Thread Heiner Kallweit
This patch set for the nuvoton-cir driver includes several
clean-ups and removes dead code.

Heiner Kallweit (9):
  media: rc: nuvoton: remove interrupt handling for wakeup
  media: rc: nuvoton: clean up initialization of wakeup registers
  media: rc: nuvoton: remove wake states
  media: rc: nuvoton: simplify a few functions
  media: rc: nuvoton: remove unneeded code in nvt_process_rx_ir_data
  media: rc: nuvoton: remove study states
  media: rc: nuvoton: simplify interrupt handling code
  media: rc: nuvoton: remove unneeded check in nvt_get_rx_ir_data
  media: rc: nuvoton: remove two unused elements in struct nvt_dev

 drivers/media/rc/nuvoton-cir.c | 123 -
 drivers/media/rc/nuvoton-cir.h |  25 -
 2 files changed, 10 insertions(+), 138 deletions(-)

-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 8/9] media: rc: nuvoton: remove unneeded check in nvt_get_rx_ir_data

2016-06-23 Thread Heiner Kallweit
If the logical device is disabled then it can not generate interrupts.
Therefore this check is not needed.

Signed-off-by: Heiner Kallweit 
---
 drivers/media/rc/nuvoton-cir.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 180f589..7a6f6c4 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -806,9 +806,6 @@ static void nvt_get_rx_ir_data(struct nvt_dev *nvt)
 
/* Get count of how many bytes to read from RX FIFO */
fifocount = nvt_cir_reg_read(nvt, CIR_RXFCONT);
-   /* if we get 0xff, probably means the logical dev is disabled */
-   if (fifocount == 0xff)
-   return;
 
nvt_dbg("attempting to fetch %u bytes from hw rx fifo", fifocount);
 
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/9] media: rc: nuvoton: remove unneeded code in nvt_process_rx_ir_data

2016-06-23 Thread Heiner Kallweit
The definition of rawir includes the initialization already.

Signed-off-by: Heiner Kallweit 
---
 drivers/media/rc/nuvoton-cir.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 1d99f10..9d9717d 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -757,8 +757,6 @@ static void nvt_process_rx_ir_data(struct nvt_dev *nvt)
 
nvt_dbg_verbose("Processing buffer of len %d", nvt->pkts);
 
-   init_ir_raw_event();
-
for (i = 0; i < nvt->pkts; i++) {
sample = nvt->buf[i];
 
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/9] media: rc: nuvoton: simplify a few functions

2016-06-23 Thread Heiner Kallweit
Simplify a few functions.

Signed-off-by: Heiner Kallweit 
---
 drivers/media/rc/nuvoton-cir.c | 16 +++-
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index c405c83..1d99f10 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -139,11 +139,7 @@ static inline void nvt_cir_reg_write(struct nvt_dev *nvt, 
u8 val, u8 offset)
 /* read val from cir config register */
 static u8 nvt_cir_reg_read(struct nvt_dev *nvt, u8 offset)
 {
-   u8 val;
-
-   val = inb(nvt->cir_addr + offset);
-
-   return val;
+   return inb(nvt->cir_addr + offset);
 }
 
 /* write val to cir wake register */
@@ -156,11 +152,7 @@ static inline void nvt_cir_wake_reg_write(struct nvt_dev 
*nvt,
 /* read val from cir wake config register */
 static u8 nvt_cir_wake_reg_read(struct nvt_dev *nvt, u8 offset)
 {
-   u8 val;
-
-   val = inb(nvt->cir_wake_addr + offset);
-
-   return val;
+   return inb(nvt->cir_wake_addr + offset);
 }
 
 /* don't override io address if one is set already */
@@ -487,9 +479,7 @@ static void nvt_cir_wake_ldev_init(struct nvt_dev *nvt)
 /* clear out the hardware's cir rx fifo */
 static void nvt_clear_cir_fifo(struct nvt_dev *nvt)
 {
-   u8 val;
-
-   val = nvt_cir_reg_read(nvt, CIR_FIFOCON);
+   u8 val = nvt_cir_reg_read(nvt, CIR_FIFOCON);
nvt_cir_reg_write(nvt, val | CIR_FIFOCON_RXFIFOCLR, CIR_FIFOCON);
 }
 
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Who wants 'Open Hardware' _truly_ universal USB DTV receiver ?

2016-06-23 Thread Abylay Ospan
Hello Everybody,

I'm developing truly universal USB DTV receiver with CI-slot. And I'v
decided to make it Open Hardware, but I need your help :) Please,
donate $1-20 or pre-order for $70 on my indiegogo campaign located
here:
https://igg.me/at/jokertv/x

I'v decided to make following things:

* If this campaign will be funded for 100% ($50k) I will make this
project Open Hardware ! All schematic and PCB will be available on
http://jokersys.com website.

* If this campaign will be funded for 200% ($100k) I will donate 10
pcs. of Joker TV gadget for educational organizations (just drop me
email with brief description of your educational program).

* If this campaign will be funded for 300% ($150k) I will prepare OSx
drivers for MacBooks. Open source, of course :) Linux/Windows drivers
will be available on open-source by default.

Let's make best DTV receiver together ! Please share this info with
friends or on open-source/open-hardware sites/forums, etc !
Big thanks for all !

-- 
Abylay Ospan,
NetUP Inc.
http://www.netup.tv

P.S.
Sorry, if this message looks like advertisement or commercial. Hope
for your understanding !
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


cron job: media_tree daily build: OK

2016-06-23 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for
the kernels and architectures in the list below.

Results of the daily build of media_tree:

date:   Fri Jun 24 04:00:17 CEST 2016
git branch: test
git hash:   59f0bc11848f8f3242bc1fefae670e745929cd7b
gcc version:i686-linux-gcc (GCC) 5.3.0
sparse version: v0.5.0-56-g7647c77
smatch version: v0.5.0-3428-gdfe27cf
host hardware:  x86_64
host os:4.6.0-164

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-exynos: OK
linux-git-arm-mtk: OK
linux-git-arm-mx: OK
linux-git-arm-omap: OK
linux-git-arm-pxa: OK
linux-git-blackfin-bf561: OK
linux-git-i686: OK
linux-git-m32r: OK
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
linux-2.6.36.4-i686: OK
linux-2.6.37.6-i686: OK
linux-2.6.38.8-i686: OK
linux-2.6.39.4-i686: OK
linux-3.0.60-i686: OK
linux-3.1.10-i686: OK
linux-3.2.37-i686: OK
linux-3.3.8-i686: OK
linux-3.4.27-i686: OK
linux-3.5.7-i686: OK
linux-3.6.11-i686: OK
linux-3.7.4-i686: OK
linux-3.8-i686: OK
linux-3.9.2-i686: OK
linux-3.10.1-i686: OK
linux-3.11.1-i686: OK
linux-3.12.23-i686: OK
linux-3.13.11-i686: OK
linux-3.14.9-i686: OK
linux-3.15.2-i686: OK
linux-3.16.7-i686: OK
linux-3.17.8-i686: OK
linux-3.18.7-i686: OK
linux-3.19-i686: OK
linux-4.0-i686: OK
linux-4.1.1-i686: OK
linux-4.2-i686: OK
linux-4.3-i686: OK
linux-4.4-i686: OK
linux-4.5-i686: OK
linux-4.6-i686: OK
linux-4.7-rc1-i686: OK
linux-2.6.36.4-x86_64: OK
linux-2.6.37.6-x86_64: OK
linux-2.6.38.8-x86_64: OK
linux-2.6.39.4-x86_64: OK
linux-3.0.60-x86_64: OK
linux-3.1.10-x86_64: OK
linux-3.2.37-x86_64: OK
linux-3.3.8-x86_64: OK
linux-3.4.27-x86_64: OK
linux-3.5.7-x86_64: OK
linux-3.6.11-x86_64: OK
linux-3.7.4-x86_64: OK
linux-3.8-x86_64: OK
linux-3.9.2-x86_64: OK
linux-3.10.1-x86_64: OK
linux-3.11.1-x86_64: OK
linux-3.12.23-x86_64: OK
linux-3.13.11-x86_64: OK
linux-3.14.9-x86_64: OK
linux-3.15.2-x86_64: OK
linux-3.16.7-x86_64: OK
linux-3.17.8-x86_64: OK
linux-3.18.7-x86_64: OK
linux-3.19-x86_64: OK
linux-4.0-x86_64: OK
linux-4.1.1-x86_64: OK
linux-4.2-x86_64: OK
linux-4.3-x86_64: OK
linux-4.4-x86_64: OK
linux-4.5-x86_64: OK
linux-4.6-x86_64: OK
linux-4.7-rc1-x86_64: OK
apps: OK
spec-git: OK
sparse: WARNINGS
smatch: WARNINGS

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Friday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Friday.tar.bz2

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/media.html
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 1/9] [media] v4l2-core: Add support for touch devices

2016-06-23 Thread Dmitry Torokhov
On Wed, Jun 22, 2016 at 11:08:25PM +0100, Nick Dyer wrote:
> Some touch controllers send out touch data in a similar way to a
> greyscale frame grabber.
> 
> Use a new device prefix v4l-touch for these devices, to stop generic
> capture software from treating them as webcams.
> 
> Add formats:
> - V4L2_TCH_FMT_DELTA_TD16 for signed 16-bit touch deltas
> - V4L2_TCH_FMT_DELTA_TD08 for signed 16-bit touch deltas
> - V4L2_TCH_FMT_TU16 for unsigned 16-bit touch data
> - V4L2_TCH_FMT_TU08 for unsigned 8-bit touch data
> 
> This support will be used by:
> * Atmel maXTouch (atmel_mxt_ts)
> * Synaptics RMI4.
> * sur40
> 
> Signed-off-by: Nick Dyer 

Hans/Mauro, when you merge this can you make a stable branch (maybe
based on 4.6) so I can pull it in as well and then merge the rest?

Thanks!

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RESEND PATCH v2 0/5] ir-rx51 driver fixes

2016-06-23 Thread Pali Rohár
On Wednesday 22 June 2016 21:22:16 Ivaylo Dimitrov wrote:
> ir-rx51 is a driver for Nokia N900 IR transmitter. The current series
> fixes the remaining problems in the driver:
> 
>  - replace GP timer 9 with PWM framework usage
>  - replace pulse width timer dmtimer usage with hrtimer
>  - add DT support to the driver
>  - add driver to the board DTS
> 
> Patch 2 is needed so the driver to function correctly, without it PWM
> refuses to set the needed carrier frequency.
> 
> Changes compared to v1:
>  - removed [PATCH 5/7] ARM: OMAP: dmtimer: Do not call PM runtime
>functions when not needed.
>  - DT compatible string changed to "nokia,n900-ir"
> 
> Ivaylo Dimitrov (5):
>   ir-rx51: Fix build after multiarch changes broke it
>   pwm: omap-dmtimer: Allow for setting dmtimer clock source
>   ir-rx51: use PWM framework instead of OMAP dmtimer
>   ir-rx51: add DT support to driver
>   ir-rx51: use hrtimer instead of dmtimer
> 
>  .../devicetree/bindings/media/nokia,n900-ir|  20 ++
>  .../devicetree/bindings/pwm/pwm-omap-dmtimer.txt   |   4 +
>  arch/arm/mach-omap2/board-rx51-peripherals.c   |   5 -
>  arch/arm/mach-omap2/pdata-quirks.c |  10 +-
>  drivers/media/rc/Kconfig   |   2 +-
>  drivers/media/rc/ir-rx51.c | 229
> +++-- drivers/pwm/pwm-omap-dmtimer.c
> |  12 +- include/linux/platform_data/media/ir-rx51.h|  
> 3 -
>  8 files changed, 111 insertions(+), 174 deletions(-)
>  create mode 100644
> Documentation/devicetree/bindings/media/nokia,n900-ir

Looks good, you can add my Acked-by.

-- 
Pali Rohár
pali.ro...@gmail.com


signature.asc
Description: This is a digitally signed message part.


Re: [RESEND PATCH v2 1/5] ir-rx51: Fix build after multiarch changes broke it

2016-06-23 Thread Pali Rohár
On Wednesday 22 June 2016 21:22:17 Ivaylo Dimitrov wrote:
> The ir-rx51 driver for n900 has been disabled since the multiarch
> changes as plat include directory no longer is SoC specific.
> 
> Let's fix it with minimal changes to pass the dmtimer calls in
> pdata. Then the following changes can be done while things can
> be tested to be working for each change:
> 
> 1. Change the non-pwm dmtimer to use just hrtimer if possible
> 
> 2. Change the pwm dmtimer to use Linux PWM API with the new
>drivers/pwm/pwm-omap-dmtimer.c and remove the direct calls
>to dmtimer functions
> 
> 3. Parse configuration from device tree and drop the pdata
> 
> Note compilation of this depends on the previous patch
> "ARM: OMAP2+: Add more functions to pwm pdata for ir-rx51".

I think that this extensive description is not needed for commit 
message. Just for email discussion.

> Cc: Mauro Carvalho Chehab 
> Cc: Neil Armstrong 
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Tony Lindgren 
> Signed-off-by: Ivaylo Dimitrov 
> Acked-by: Pavel Machek 
> ---

-- 
Pali Rohár
pali.ro...@gmail.com


signature.asc
Description: This is a digitally signed message part.


Re: [PATCH v5 8/9] Input: synaptics-rmi4 - add support for F54 diagnostics

2016-06-23 Thread Dmitry Torokhov
Hi Nick,

On Wed, Jun 22, 2016 at 11:08:32PM +0100, Nick Dyer wrote:
> Function 54 implements access to various RMI4 diagnostic features.
> 
> This patch adds support for retrieving this data. It registers a V4L2
> device to output the data to user space.
> 
> Signed-off-by: Nick Dyer 
> ---
>  drivers/input/rmi4/Kconfig  |  11 +
>  drivers/input/rmi4/Makefile |   1 +
>  drivers/input/rmi4/rmi_bus.c|   3 +
>  drivers/input/rmi4/rmi_driver.h |   1 +
>  drivers/input/rmi4/rmi_f54.c| 730 
> 
>  5 files changed, 746 insertions(+)
>  create mode 100644 drivers/input/rmi4/rmi_f54.c
> 
> diff --git a/drivers/input/rmi4/Kconfig b/drivers/input/rmi4/Kconfig
> index f73df24..f3418b6 100644
> --- a/drivers/input/rmi4/Kconfig
> +++ b/drivers/input/rmi4/Kconfig
> @@ -61,3 +61,14 @@ config RMI4_F30
>  
> Function 30 provides GPIO and LED support for RMI4 devices. This
> includes support for buttons on TouchPads and ClickPads.
> +
> +config RMI4_F54
> + bool "RMI4 Function 54 (Analog diagnostics)"
> + depends on RMI4_CORE
> + depends on VIDEO_V4L2
> + select VIDEOBUF2_VMALLOC
> + help
> +   Say Y here if you want to add support for RMI4 function 54
> +
> +   Function 54 provides access to various diagnostic features in certain
> +   RMI4 touch sensors.
> diff --git a/drivers/input/rmi4/Makefile b/drivers/input/rmi4/Makefile
> index 95c00a7..0bafc85 100644
> --- a/drivers/input/rmi4/Makefile
> +++ b/drivers/input/rmi4/Makefile
> @@ -7,6 +7,7 @@ rmi_core-$(CONFIG_RMI4_2D_SENSOR) += rmi_2d_sensor.o
>  rmi_core-$(CONFIG_RMI4_F11) += rmi_f11.o
>  rmi_core-$(CONFIG_RMI4_F12) += rmi_f12.o
>  rmi_core-$(CONFIG_RMI4_F30) += rmi_f30.o
> +rmi_core-$(CONFIG_RMI4_F54) += rmi_f54.o
>  
>  # Transports
>  obj-$(CONFIG_RMI4_I2C) += rmi_i2c.o
> diff --git a/drivers/input/rmi4/rmi_bus.c b/drivers/input/rmi4/rmi_bus.c
> index b368b05..3aedc65 100644
> --- a/drivers/input/rmi4/rmi_bus.c
> +++ b/drivers/input/rmi4/rmi_bus.c
> @@ -315,6 +315,9 @@ static struct rmi_function_handler *fn_handlers[] = {
>  #ifdef CONFIG_RMI4_F30
>   _f30_handler,
>  #endif
> +#ifdef CONFIG_RMI4_F54
> + _f54_handler,
> +#endif
>  };
>  
>  static void __rmi_unregister_function_handlers(int start_idx)
> diff --git a/drivers/input/rmi4/rmi_driver.h b/drivers/input/rmi4/rmi_driver.h
> index 6e140fa..8dfbebe 100644
> --- a/drivers/input/rmi4/rmi_driver.h
> +++ b/drivers/input/rmi4/rmi_driver.h
> @@ -102,4 +102,5 @@ extern struct rmi_function_handler rmi_f01_handler;
>  extern struct rmi_function_handler rmi_f11_handler;
>  extern struct rmi_function_handler rmi_f12_handler;
>  extern struct rmi_function_handler rmi_f30_handler;
> +extern struct rmi_function_handler rmi_f54_handler;
>  #endif
> diff --git a/drivers/input/rmi4/rmi_f54.c b/drivers/input/rmi4/rmi_f54.c
> new file mode 100644
> index 000..df4c821
> --- /dev/null
> +++ b/drivers/input/rmi4/rmi_f54.c
> @@ -0,0 +1,730 @@
> +/*
> + * Copyright (c) 2012-2015 Synaptics Incorporated
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License version 2 as published 
> by
> + * the Free Software Foundation.
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include "rmi_driver.h"
> +
> +#define F54_NAME "rmi4_f54"
> +
> +/* F54 data offsets */
> +#define F54_REPORT_DATA_OFFSET  3
> +#define F54_FIFO_OFFSET 1
> +#define F54_NUM_TX_OFFSET   1
> +#define F54_NUM_RX_OFFSET   0
> +
> +/* F54 commands */
> +#define F54_GET_REPORT  1
> +#define F54_FORCE_CAL   2
> +
> +/* Fixed sizes of reports */
> +#define F54_QUERY_LEN27
> +
> +/* F54 capabilities */
> +#define F54_CAP_BASELINE (1 << 2)
> +#define F54_CAP_IMAGE8   (1 << 3)
> +#define F54_CAP_IMAGE16  (1 << 6)
> +
> +enum rmi_f54_report_type {
> + F54_REPORT_NONE = 0,
> + F54_8BIT_IMAGE = 1,
> + F54_16BIT_IMAGE = 2,
> + F54_RAW_16BIT_IMAGE = 3,
> + F54_TRUE_BASELINE = 9,
> + F54_FULL_RAW_CAP = 19,
> + F54_FULL_RAW_CAP_RX_COUPLING_COMP = 20,
> + F54_MAX_REPORT_TYPE,
> +};
> +
> +const char *rmi_f54_report_type_names[] = {
> + [F54_REPORT_NONE]   = "No report",
> + [F54_8BIT_IMAGE]= "8 bit image",
> + [F54_16BIT_IMAGE]   = "16 bit image",
> + [F54_RAW_16BIT_IMAGE]   = "Raw 16 bit image",
> + [F54_TRUE_BASELINE] = "True baseline",
> + [F54_FULL_RAW_CAP]  = "Full raw cap",
> + [F54_FULL_RAW_CAP_RX_COUPLING_COMP]
> + = "Full raw cap RX coupling comp",
> + [F54_MAX_REPORT_TYPE]   = "Max report type",
> +};
> +
> +#define f54_reptype_name(a) (((unsigned)(a)) < 
> 

Re: [alsa-devel] [very-RFC 0/8] TSN driver for the kernel

2016-06-23 Thread Richard Cochran
On Thu, Jun 23, 2016 at 12:38:48PM +0200, Henrik Austad wrote:
> Richard: is it fair to assume that if ptp4l is running and is part of a PTP 
> domain, ktime_get() will return PTP-adjusted time for the system?

No.

> Or do I also need to run phc2sys in order to sync the system-time
> to PTP-time?

Yes, unless you are using SW time stamping, in which case ptp4l will
steer the system clock directly.

HTH,
Richard



--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [alsa-devel] [very-RFC 0/8] TSN driver for the kernel

2016-06-23 Thread Henrik Austad
On Tue, Jun 21, 2016 at 10:45:18AM -0700, Pierre-Louis Bossart wrote:
> On 6/20/16 5:18 AM, Richard Cochran wrote:
> >On Mon, Jun 20, 2016 at 01:08:27PM +0200, Pierre-Louis Bossart wrote:
> >>The ALSA API provides support for 'audio' timestamps (playback/capture rate
> >>defined by audio subsystem) and 'system' timestamps (typically linked to
> >>TSC/ART) with one option to take synchronized timestamps should the hardware
> >>support them.
> >
> >Thanks for the info.  I just skimmed 
> >Documentation/sound/alsa/timestamping.txt.
> >
> >That is fairly new, only since v4.1.  Are then any apps in the wild
> >that I can look at?  AFAICT, OpenAVB, gstreamer, etc, don't use the
> >new API.
> 
> The ALSA API supports a generic .get_time_info callback, its implementation
> is for now limited to a regular 'DMA' or 'link' timestamp for HDaudio - the
> difference being which counters are used and how close they are to the link
> serializer. The synchronized part is still WIP but should come 'soon'

Interesting, would you mind CCing me in on those patches?

> >>The intent was that the 'audio' timestamps are translated to a shared time
> >>reference managed in userspace by gPTP, which in turn would define if
> >>(adaptive) audio sample rate conversion is needed. There is no support at
> >>the moment for a 'play_at' function in ALSA, only means to control a
> >>feedback loop.
> >
> >Documentation/sound/alsa/timestamping.txt says:
> >
> >  If supported in hardware, the absolute link time could also be used
> >  to define a precise start time (patches WIP)
> >
> >Two questions:
> >
> >1. Where are the patches?  (If some are coming, I would appreciate
> >   being on CC!)
> >
> >2. Can you mention specific HW that would support this?
> 
> You can experiment with the 'dma' and 'link' timestamps today on any
> HDaudio-based device. Like I said the synchronized part has not been
> upstreamed yet (delays + dependency on ART-to-TSC conversions that made it
> in the kernel recently)

Ok, I think I see a way to hook this into timestamps from the skbuf on 
incoming frames and a somewhat messy way on outgoing. Having time coupled 
with 'avail' and 'delay' is useful, and from the looks of it, 'link'-time 
is the appropriate level to add this.

I'm working on storing the time in the tsn_link struct I use, and then read 
that from the avb_alsa-shim. Details are still a bit fuzzy though, but I 
plan to do that and then see what audio-time gives me once it is up and 
running.

Richard: is it fair to assume that if ptp4l is running and is part of a PTP 
domain, ktime_get() will return PTP-adjusted time for the system? -Or do I 
also need to run phc2sys in order to sync the system-time to PTP-time? Note 
that this is for outgoing traffic, Rx should perhaps use the timestamp 
in skb.

Hooking into ktime_get() instead of directly to the PTP-subsystem (if that 
is even possible) makes it a lot easier to debug when running this in a VM 
as it doesn't *have* to use PTP-time when I'm crashing a new kernel :)

Thanks!

-- 
Henrik Austad


signature.asc
Description: Digital signature


Re: [RESEND PATCH v2 2/5] pwm: omap-dmtimer: Allow for setting dmtimer clock source

2016-06-23 Thread Thierry Reding
On Wed, Jun 22, 2016 at 10:22:18PM +0300, Ivaylo Dimitrov wrote:
> OMAP GP timers can have different input clocks that allow different PWM
> frequencies. However, there is no other way of setting the clock source but
> through clocks or clock-names properties of the timer itself. This limits
> PWM functionality to only the frequencies allowed by the particular clock
> source. Allowing setting the clock source by PWM rather than by timer
> allows different PWMs to have different ranges by not hard-wiring the clock
> source to the timer.
> 
> Signed-off-by: Ivaylo Dimitrov 
> Acked-by: Rob Herring 
> ---
>  Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt |  4 
>  drivers/pwm/pwm-omap-dmtimer.c | 12 +++-
>  2 files changed, 11 insertions(+), 5 deletions(-)

Acked-by: Thierry Reding 


signature.asc
Description: PGP signature


Re: dvb usb stick Hauppauge WinTV-soloHD

2016-06-23 Thread Thomas Stein
Am 22.06.16 um 21:25 schrieb Olli Salonen:
> Hi Thomas,

Hi Olli.

> I made some more investigation and figured out that you have a DVB-T2
> mux at 642 MHz in Berlin, and can also see that your w_scan actually
> locks on that DVB-T2 mux as you wrote. Sorry, I did not read properly
> what you were saying in the beginning.
> 
> Then it should be just a question of finding software that will work
> with your DVB-T2 channels as well. I've got no experience of VLC, but
> as far as I have understood it should support DVB-T2 as well. I've
> used dvbv5-zap and tvheadend with good success, but there are many
> others as well. Basically it is important the software implements the
> version 5 of the DVB API (DVBv5) instead of the older version 3.

Thanks for tipps. Tried them both yesterday. Right now i'm having trouble 
getting an initial 
file for dvbv5-scan.

thanks again
t.

> Cheers,
> -olli
> 
> 
> 
> On 22 June 2016 at 22:10, Olli Salonen  wrote:
>> Hi Thomas,
>>
>> Ok, the correct firmwares are there:
>> [  101.423697] si2168 11-0064: found a 'Silicon Labs Si2168-B40'
>> [  101.428693] si2168 11-0064: downloading firmware from file
>> 'dvb-demod-si2168-b40-01.fw'
>> [  101.657999] si2168 11-0064: firmware version: 4.0.11
>> [  101.661225] si2157 12-0060: found a 'Silicon Labs Si2157-A30'
>> [  101.709738] si2157 12-0060: firmware version: 3.0.5
>>
>> Basically everything looks good. Does this work on a Windows computer
>> using the same antenna cable and the same USB tuner?
>>
>> DVB-T2 support in w_scan has been evolving also, so make sure you've
>> got quite recent version.
>>
>> I've found that dvbv5-scan does the best job when scanning for
>> channels. However that needs initial scan table to start with. The
>> initial scan tables for Berlin don't seem to contain any DVB-T2 muxes
>> though: https://git.linuxtv.org/dtv-scan-tables.git/tree/dvb-t/de-Berlin
>> This means they're probably a bit out  of date. If you know the DVB-T2
>> mux details, you can add them yourself and try dvbv5-scan.
>>
>> Cheers,
>> -olli
>>
>> On 18 June 2016 at 20:17, Thomas Stein  wrote:
>>> Hi Olli.
>>>
>>> Thanks for your answer.
>>>
>>> Here we go.
>>>
>>> [0.00] Linux version 4.6.2 (root@rather) (gcc version 5.3.0 (Gentoo
>>> 5.3.0 p1.0, pie-0.6.5) ) #3 SMP Sat Jun 18 13:34:40 CEST 2016
>>> [0.00] Command line: BOOT_IMAGE=/kernel-4.6.2 root=/dev/sda3 ro
>>> net.ifnames=0
>>> [0.00] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
>>> [0.00] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point
>>> registers'
>>> [0.00] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
>>> [0.00] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
>>> [0.00] x86/fpu: Enabled xstate features 0x7, context size is 832
>>> bytes, using 'standard' format.
>>> [0.00] x86/fpu: Using 'eager' FPU context switches.
>>> [0.00] e820: BIOS-provided physical RAM map:
>>> [0.00] BIOS-e820: [mem 0x-0x0009cfff] usable
>>> [0.00] BIOS-e820: [mem 0x0009d000-0x0009]
>>> reserved
>>> [0.00] BIOS-e820: [mem 0x000e-0x000f]
>>> reserved
>>> [0.00] BIOS-e820: [mem 0x0010-0xce20] usable
>>> [0.00] BIOS-e820: [mem 0xce21-0xdcd3efff]
>>> reserved
>>> [0.00] BIOS-e820: [mem 0xdcd3f000-0xdce7efff] ACPI
>>> NVS
>>> [0.00] BIOS-e820: [mem 0xdce7f000-0xdcefefff] ACPI
>>> data
>>> [0.00] BIOS-e820: [mem 0xdceff000-0xdfa0]
>>> reserved
>>> [0.00] BIOS-e820: [mem 0xf800-0xfbff]
>>> reserved
>>> [0.00] BIOS-e820: [mem 0xfe101000-0xfe112fff]
>>> reserved
>>> [0.00] BIOS-e820: [mem 0xfec0-0xfec00fff]
>>> reserved
>>> [0.00] BIOS-e820: [mem 0xfed08000-0xfed08fff]
>>> reserved
>>> [0.00] BIOS-e820: [mem 0xfed1-0xfed19fff]
>>> reserved
>>> [0.00] BIOS-e820: [mem 0xfed1c000-0xfed1]
>>> reserved
>>> [0.00] BIOS-e820: [mem 0xfee0-0xfee00fff]
>>> reserved
>>> [0.00] BIOS-e820: [mem 0xffc0-0x]
>>> reserved
>>> [0.00] BIOS-e820: [mem 0x0001-0x00021f5f] usable
>>> [0.00] NX (Execute Disable) protection: active
>>> [0.00] SMBIOS 2.7 present.
>>> [0.00] DMI: LENOVO 20A7005MGE/20A7005MGE, BIOS GRET46WW (1.23 )
>>> 11/04/2015
>>> [0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
>>> [0.00] e820: remove [mem 0x000a-0x000f] usable
>>> [0.00] e820: last_pfn = 0x21f600 max_arch_pfn = 0x4
>>> [0.00] MTRR default type: write-back
>>> [0.00] MTRR fixed ranges enabled:
>>> [0.00]   

Re: [PATCH v5 9/9] Input: sur40 - use new V4L2 touch input type

2016-06-23 Thread Florian Echtler
On 23.06.2016 00:08, Nick Dyer wrote:
> diff --git a/drivers/input/touchscreen/sur40.c 
> b/drivers/input/touchscreen/sur40.c
> index 880c40b..841e045 100644
> --- a/drivers/input/touchscreen/sur40.c
> +++ b/drivers/input/touchscreen/sur40.c
> @@ -599,7 +599,7 @@ static int sur40_probe(struct usb_interface *interface,
>   sur40->vdev.queue = >queue;
>   video_set_drvdata(>vdev, sur40);
>  
> - error = video_register_device(>vdev, VFL_TYPE_GRABBER, -1);
> + error = video_register_device(>vdev, VFL_TYPE_TOUCH, -1);
>   if (error) {
>   dev_err(>dev,
>   "Unable to register video subdevice.");

As far as I could tell from looking at patch 1/9, the only visible
change for userspace will be the device name, so I'd be fine with this.

> @@ -794,7 +794,7 @@ static int sur40_vidioc_enum_fmt(struct file *file, void 
> *priv,
>   if (f->index != 0)
>   return -EINVAL;
>   strlcpy(f->description, "8-bit greyscale", sizeof(f->description));
> - f->pixelformat = V4L2_PIX_FMT_GREY;
> + f->pixelformat = V4L2_TCH_FMT_TU08;

I would suggest to leave the pixel format as it is. Rationale: the data
really is greyscale image intensity data (as also evidenced by [1]), not
just a synthetic image, and changing the pixel format would break all
userspace tools.

[1] https://github.com/mkalten/reacTIVision/issues/3#issuecomment-99931807

Best, Florian
-- 
SENT FROM MY DEC VT50 TERMINAL



signature.asc
Description: OpenPGP digital signature