Re: [PATCH 1/6] Input: add support for large scancodes

2010-10-29 Thread James Hogan
diff --git a/include/linux/input.h b/include/linux/input.h index 7892651..0057698 100644 --- a/include/linux/input.h +++ b/include/linux/input.h snip +/** + * struct input_keymap_entry - used by EVIOCGKEYCODE/EVIOCSKEYCODE ioctls + * @scancode: scancode represented in machine-endian form.

Re: [PATCH 1/6] Input: add support for large scancodes

2010-10-29 Thread James Hogan
On Friday 29 October 2010 22:36:06 James Hogan wrote: I thought I better point out that this breaks make htmldocs (see below) because of the '' characters in a kernel doc'd struct. This is with 12ba8d1e9262ce81a695795410bd9ee5c9407ba1 from Linus' tree (2.6.36). Moving the #define below

[PATCH] ir-nec-decoder: fix extended NEC scancodes

2010-11-26 Thread James Hogan
-by: James Hogan ja...@albanarts.com --- drivers/media/IR/ir-nec-decoder.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/IR/ir-nec-decoder.c b/drivers/media/IR/ir-nec-decoder.c index 70993f7..11d3e78 100644 --- a/drivers/media/IR/ir-nec-decoder.c +++ b

Re: [PATCH] ir-nec-decoder: fix extended NEC scancodes

2010-11-26 Thread James Hogan
be consistent, so I'll go by the NEC datasheet and submit a patch to winbond-cir instead. Cheers James James Hogan ja...@albanarts.com wrote: Could somebody check this as I'm unable to test it. I'm also not entirely certain it isn't winbond-cir that is in error instead of ir-nec-decoder

Re: [RFC] What are the goals for the architecture of an in-kernel IR system?

2010-04-09 Thread James Hogan
Hi, On Thursday 25 March 2010 14:42:33 Mauro Carvalho Chehab wrote: Comments? I haven't seen this mentioned yet, but are there any plans for a sysfs interface to set up waking from suspend/standby on a particular IR scancode (for hardware decoders that support masking of comparing of the IR

Re: [RFC] What are the goals for the architecture of an in-kernel IR system?

2010-04-09 Thread James Hogan
On Fri, Apr 09, 2010 at 06:50:26AM -0400, Andy Walls wrote: If you're waiting for me to get that working, I'll advise you to plan on getting off the couch and pushing the power switch for some time to come. ;) :-) On Friday 09 April 2010 14:01:46 Mauro Carvalho Chehab wrote: The additions at

[PATCH] rc/ir-raw: use kfifo_rec_ptr_1 instead of kfifo

2012-02-15 Thread James Hogan
the BUG_ON(retval != sizeof(ev)) gets hit too. According to samples/kfifo/record-example.c struct kfifo_rec_ptr_1 can handle records of a length between 0 and 255 bytes, so change struct ir_raw_event_ctrl to use that instead of struct kfifo. Signed-off-by: James Hogan james.ho...@imgtec.com

[BUG] divide by zero in uvc_video_clock_update, v3.3-rc4

2012-02-19 Thread James Hogan
Hi, I just tried v3.3-rc4 on an Acer Aspire One Happy 2 netbook. I happened to open the settings dialog box of kopete, which shows a view of the webcam. The kernel switched to a text console with a register dump (see below), indicating a divide error in uvc_video_clock_update. The IP is on 7482,

[PATCH] media: ir-sony-decoder: 15bit function decode fix

2012-02-20 Thread James Hogan
7:1 (0b1110). The old mask had the effect of dropping the MSB of the function number from bit 6, and leaving the LSB of the device number in bit 7. Signed-off-by: James Hogan james.ho...@imgtec.com --- (note, i don't have a 15bit sony remote to test this with, but i'm pretty confident of it's

Re: [PATCH v2 1/1] rc: Add support for GPIO based IR Receiver driver.

2012-02-20 Thread James Hogan
On Mon, Feb 20, 2012 at 03:17:52PM +0530, Ravi Kumar V wrote: Adds GPIO based IR Receiver driver. It decodes signals using decoders available in rc framework. Signed-off-by: Ravi Kumar V kumar...@codeaurora.org --- drivers/media/rc/Kconfig|9 ++ drivers/media/rc/Makefile

[PATCH RESEND] rc/ir-raw: fix BUG_ON, using kfifo_rec_ptr_1 instead of kfifo

2012-02-22 Thread James Hogan
the BUG_ON(retval != sizeof(ev)) gets hit too. According to samples/kfifo/record-example.c struct kfifo_rec_ptr_1 can handle records of a length between 0 and 255 bytes, so change struct ir_raw_event_ctrl to use that instead of struct kfifo. Signed-off-by: James Hogan james.ho...@imgtec.com

[RESEND] [PATCH] media: ir-sony-decoder: 15bit function decode fix

2012-02-27 Thread James Hogan
7:1 (0b1110). The old mask had the effect of dropping the MSB of the function number from bit 6, and leaving the LSB of the device number in bit 7. Signed-off-by: James Hogan james.ho...@imgtec.com --- (note, i don't have a 15bit sony remote to test this with, but i'm pretty confident of it's

Re: [PATCH v3 1/1] rc: Add support for GPIO based IR Receiver driver.

2012-02-28 Thread James Hogan
On Tue, Feb 28, 2012 at 11:21:40AM +0530, Ravi Kumar V wrote: Adds GPIO based IR Receiver driver. It decodes signals using decoders available in rc framework. Signed-off-by: Ravi Kumar V kumar...@codeaurora.org Looks good to me (but I'm no expert). Cheers James ---

[RESEND 2] [PATCH] rc/ir-raw: fix BUG_ON, using kfifo_rec_ptr_1 instead of kfifo

2012-02-29 Thread James Hogan
the BUG_ON(retval != sizeof(ev)) gets hit too. According to samples/kfifo/record-example.c struct kfifo_rec_ptr_1 can handle records of a length between 0 and 255 bytes, so change struct ir_raw_event_ctrl to use that instead of struct kfifo. Signed-off-by: James Hogan james.ho...@imgtec.com

Re: [RESEND] [PATCH] media: ir-sony-decoder: 15bit function decode fix

2012-03-05 Thread James Hogan
Ping Another week's gone by with no response. It's a trivial patch, so can somebody please take a look at it? (or if I'm missing somebody relevant from CC, please add them) Thanks James On 27/02/12 11:53, James Hogan wrote: The raw Sony IR decoder decodes 15bit messages slightly incorrectly

Re: [RESEND] [PATCH] media: ir-sony-decoder: 15bit function decode fix

2012-03-05 Thread James Hogan
On 5 March 2012 17:17, Mauro Carvalho Chehab mche...@redhat.com wrote: Em 05-03-2012 11:32, Trilok Soni escreveu: Hi James, On 3/5/2012 5:27 PM, James Hogan wrote: Ping Another week's gone by with no response. It's a trivial patch, so can somebody please take a look

[PATCH 10/11] media: rc: img-ir: add Sharp decoder module

2013-12-13 Thread James Hogan
Add an img-ir module for decoding the Sharp infrared protocol. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- drivers/media/rc/img-ir/Kconfig| 7 ++ drivers/media/rc/img-ir/Makefile | 1

[PATCH 03/11] media: rc: img-ir: add raw driver

2013-12-13 Thread James Hogan
Add raw IR remote control input driver for the ImgTec Infrared decoder block raw edge interrupts. Generic software protocol decoders are used to allow multiple protocols to be supported at a time, including those not supported by the hardware decoder. Signed-off-by: James Hogan james.ho

[PATCH 06/11] media: rc: img-ir: add NEC decoder module

2013-12-13 Thread James Hogan
Add an img-ir module for decoding the NEC and extended NEC infrared protocols. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- drivers/media/rc/img-ir/Kconfig | 7 ++ drivers/media/rc/img-ir/Makefile

[PATCH 02/11] media: rc: img-ir: add base driver

2013-12-13 Thread James Hogan
Add base driver for the ImgTec Infrared decoder block. The driver is split into separate components for raw (software) decode and hardware decoder which are in following commits. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media

[PATCH 11/11] media: rc: img-ir: add Sanyo decoder module

2013-12-13 Thread James Hogan
Add an img-ir module for decoding the Sanyo infrared protocol. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- drivers/media/rc/img-ir/Kconfig| 7 ++ drivers/media/rc/img-ir/Makefile | 1

[PATCH 08/11] media: rc: img-ir: add Sony decoder module

2013-12-13 Thread James Hogan
Add an img-ir module for decoding the Sony infrared protocol. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- drivers/media/rc/img-ir/Kconfig | 7 ++ drivers/media/rc/img-ir/Makefile | 1

[PATCH 00/11] media: rc: ImgTec IR decoder driver

2013-12-13 Thread James Hogan
...@linaro.org Cc: Rob Herring rob.herr...@calxeda.com Cc: devicet...@vger.kernel.org James Hogan (11): dt: binding: add binding for ImgTec IR block media: rc: img-ir: add base driver media: rc: img-ir: add raw driver media: rc: img-ir: add hardware decoder driver media: rc: img-ir: add

[PATCH 01/11] dt: binding: add binding for ImgTec IR block

2013-12-13 Thread James Hogan
Add device tree binding for ImgTec Consumer Infrared block. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org Cc: Rob Herring rob.herr...@calxeda.com Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl

[PATCH 04/11] media: rc: img-ir: add hardware decoder driver

2013-12-13 Thread James Hogan
filter conversion function are provided as separate modules for each protocol which this part of the driver can use. The scan code filter value and mask (and the same again for wake from sleep) are specified via sysfs files in /sys/class/rc/rcX/. Signed-off-by: James Hogan james.ho...@imgtec.com Cc

[PATCH 05/11] media: rc: img-ir: add to build

2013-12-13 Thread James Hogan
Add ImgTec IR decoder driver to the build system. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- drivers/media/rc/Kconfig | 2 ++ drivers/media/rc/Makefile| 1 + drivers/media/rc/img-ir

[PATCH 07/11] media: rc: img-ir: add JVC decoder module

2013-12-13 Thread James Hogan
Add an img-ir module for decoding the JVC infrared protocol. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- drivers/media/rc/img-ir/Kconfig | 7 +++ drivers/media/rc/img-ir/Makefile | 1 + drivers

[PATCH 09/11] media: rc: add Sharp infrared protocol

2013-12-13 Thread James Hogan
Add Sharp infrared protocol constants RC_TYPE_SHARP and RC_BIT_SHARP. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- drivers/media/rc/rc-main.c | 1 + include/media/rc-map.h | 4 +++- 2 files changed, 4

Re: [PATCH] rc-core: add separate defines for protocol bitmaps and numbers

2012-12-17 Thread James Hogan
On 12 October 2012 00:11, David Härdeman da...@hardeman.nu wrote: The RC_TYPE_* defines are currently used both where a single protocol is expected and where a bitmap of protocols is expected. This patch tries to separate the two in preparation for the following patches. The intended use is

Re: [PATCH 01/11] dt: binding: add binding for ImgTec IR block

2013-12-23 Thread James Hogan
On 22/12/13 12:48, Tomasz Figa wrote: diff --git a/Documentation/devicetree/bindings/media/img-ir.txt b/Documentation/devicetree/bindings/media/img-ir.txt new file mode 100644 index ..6f623b094ea6 --- /dev/null +++ b/Documentation/devicetree/bindings/media/img-ir.txt @@ -0,0

Re: [PATCH 06/11] media: rc: img-ir: add NEC decoder module

2013-12-23 Thread James Hogan
On 22/12/13 13:49, Mauro Carvalho Chehab wrote: Em Fri, 13 Dec 2013 15:12:54 + James Hogan james.ho...@imgtec.com escreveu: +/* Convert NEC data to a scancode */ +static int img_ir_nec_scancode(int len, u64 raw, u64 protocols) +{ +unsigned int addr, addr_inv, data, data_inv

Re: [PATCH 10/11] media: rc: img-ir: add Sharp decoder module

2013-12-23 Thread James Hogan
On 22/12/13 14:01, Mauro Carvalho Chehab wrote: Em Fri, 13 Dec 2013 15:12:58 + James Hogan james.ho...@imgtec.com escreveu: Add an img-ir module for decoding the Sharp infrared protocol. Patches 5 and 7-11 look OK to me. Thanks very much for reviewing. While not required

Re: [PATCH 04/11] media: rc: img-ir: add hardware decoder driver

2013-12-23 Thread James Hogan
Hi Mauro, On 22/12/13 13:40, Mauro Carvalho Chehab wrote: Em Fri, 13 Dec 2013 15:12:52 + James Hogan james.ho...@imgtec.com escreveu: Add remote control input driver for the ImgTec Infrared block hardware decoder, which is set up with timings for a specific protocol and supports mask

[PATCH] media: rc: only turn on LED if keypress generated

2014-01-16 Thread James Hogan
inside the keycode check. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Sean Young s...@mess.org Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- Was that the original intent? If not it could be tweaked to set dev-keypressed in either case instead, so

[PATCH v2 03/15] media: rc: add raw decoder for Sharp protocol

2014-01-17 Thread James Hogan
the echo message which is an inverted version of the main message except for the address bits. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- v2: - new patch (suggested by Mauro). --- drivers/media/rc/Kconfig

[PATCH v2 05/15] media: rc: change 32bit NEC scancode format

2014-01-17 Thread James Hogan
. The TiVo keymap is updated accordingly. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: Jarod Wilson ja...@redhat.com Cc: linux-media@vger.kernel.org --- v2: - New patch. --- drivers/media/rc/ir-nec-decoder.c | 5 ++- drivers/media/rc/keymaps/rc

[PATCH v2 04/15] media: rc: add sysfs scancode filtering interface

2014-01-17 Thread James Hogan
filter to be applied at the right time. Drivers can convert the scancode filter into a raw IR data filter, which can be applied immediately or later (for wake up filters). Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org

[PATCH v2 01/15] media: rc: document rc class sysfs API

2014-01-17 Thread James Hogan
Briefly document /sys/class/rc/ API for remote controller devices in Documentation/ABI/teting. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org Cc: Rob Landley r...@landley.net Cc: linux-...@vger.kernel.org --- v2

[PATCH v2 11/15] media: rc: img-ir: add NEC decoder module

2014-01-17 Thread James Hogan
Add an img-ir module for decoding the NEC and extended NEC infrared protocols. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- v2: - Update scancode and filter callbacks to handle 32-bit NEC as used by Apple

[PATCH v2 12/15] media: rc: img-ir: add JVC decoder module

2014-01-17 Thread James Hogan
Add an img-ir module for decoding the JVC infrared protocol. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- v2: - Update to new scancode interface (32-bit NEC). - Update to new filtering interface (generic

[PATCH v2 13/15] media: rc: img-ir: add Sony decoder module

2014-01-17 Thread James Hogan
Add an img-ir module for decoding the Sony infrared protocol. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- v2: - Update to new scancode interface (32-bit NEC). - Update to new filtering interface (generic

[PATCH v2 15/15] media: rc: img-ir: add Sanyo decoder module

2014-01-17 Thread James Hogan
Add an img-ir module for decoding the Sanyo infrared protocol. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- v2: - Update to new scancode interface (32-bit NEC). - Update to new filtering interface (generic

[PATCH v2 06/15] dt: binding: add binding for ImgTec IR block

2014-01-17 Thread James Hogan
Add device tree binding for ImgTec Consumer Infrared block, specifically major revision 1 of the hardware. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org Cc: Rob Herring robh...@kernel.org Cc: Pawel Moll pawel.m

[PATCH v2 08/15] media: rc: img-ir: add raw driver

2014-01-17 Thread James Hogan
Add raw IR remote control input driver for the ImgTec Infrared decoder block's raw edge interrupts. Generic software protocol decoders are used to allow multiple protocols to be supported at a time, including those not supported by the hardware decoder. Signed-off-by: James Hogan james.ho

[PATCH v2 07/15] media: rc: img-ir: add base driver

2014-01-17 Thread James Hogan
Add base driver for the ImgTec Infrared decoder block. The driver is split into separate components for raw (software) decode and hardware decoder which are in following commits. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media

[PATCH v2 09/15] media: rc: img-ir: add hardware decoder driver

2014-01-17 Thread James Hogan
filter conversion function will be provided in separate files for each protocol which this part of the driver can use. The new generic scan code filter interface is made use of to reduce interrupts and control wake events. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab

[PATCH v2 14/15] media: rc: img-ir: add Sharp decoder module

2014-01-17 Thread James Hogan
Add an img-ir module for decoding the Sharp infrared protocol. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- v2: - Update to new scancode interface (32-bit NEC). - Update to new filtering interface (generic

[PATCH v2 10/15] media: rc: img-ir: add to build

2014-01-17 Thread James Hogan
Add ImgTec IR decoder driver to the build system. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- drivers/media/rc/Kconfig | 2 ++ drivers/media/rc/Makefile| 1 + drivers/media/rc/img-ir

[PATCH v2 00/15] media: rc: ImgTec IR decoder driver

2014-01-17 Thread James Hogan
-media@vger.kernel.org Cc: Grant Likely grant.lik...@linaro.org Cc: Rob Herring robh...@kernel.org Cc: devicet...@vger.kernel.org Cc: Rob Landley r...@landley.net Cc: linux-...@vger.kernel.org Cc: Tomasz Figa tomasz.f...@gmail.com James Hogan (15): media: rc: document rc class sysfs API media: rc

Re: [RFC PATCH 0/4] rc: Adding support for sysfs wakeup scancodes

2014-02-05 Thread James Hogan
Hi Antti, On 05/02/14 07:03, Antti Seppälä wrote: To wake up with nuvoton-cir we need to program several raw ir pulse/space lengths to the hardware and not a scancode. James's approach doesn't support this. Do the raw pulse/space lengths your hardware requires correspond to a single IR packet

Re: [RFC PATCH 0/4] rc: Adding support for sysfs wakeup scancodes

2014-02-05 Thread James Hogan
On 05/02/14 09:39, James Hogan wrote: Hi Antti, On 05/02/14 07:03, Antti Seppälä wrote: To wake up with nuvoton-cir we need to program several raw ir pulse/space lengths to the hardware and not a scancode. James's approach doesn't support this. Do the raw pulse/space lengths your

[PATCH] rc: ir-raw: Load ir-sharp-decoder module at init

2014-02-05 Thread James Hogan
Commit 1d184b0bc13d ([media] media: rc: add raw decoder for Sharp protocol) added a new raw IR decoder for the sharp protocol, but didn't add the code to load the module at init as is done for other raw decoders, so add that code now. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro

Re: [RFC PATCH 0/4] rc: Adding support for sysfs wakeup scancodes

2014-02-06 Thread James Hogan
On 05/02/14 21:21, Mauro Carvalho Chehab wrote: Em Wed, 05 Feb 2014 20:16:04 +0200 Antti Seppälä a.sepp...@gmail.com escreveu: On 5 February 2014 11:42, James Hogan james.ho...@imgtec.com wrote: On 05/02/14 09:39, James Hogan wrote: Hi Antti, On 05/02/14 07:03, Antti Seppälä wrote

Re: [PATCH v2 06/15] dt: binding: add binding for ImgTec IR block

2014-02-06 Thread James Hogan
Hi Rob, On 06/02/14 14:33, Rob Herring wrote: On Fri, Jan 17, 2014 at 7:58 AM, James Hogan james.ho...@imgtec.com wrote: +Required properties: +- compatible: Should be img,ir1 Kind of short for a name. I don't have anything much better, but how about img,ir-rev1. Okay

[RFC 1/4] rc: ir-raw: add scancode encoder callback

2014-02-06 Thread James Hogan
Add a callback to raw ir handlers for encoding and modulating a scancode to a set of raw events. This could be used for transmit, or for converting a wakeup scancode filter to a form that is more suitable for raw hardware wake up filters. Signed-off-by: James Hogan james.ho...@imgtec.com

[RFC 3/4] rc: ir-nec-decoder: add encode capability

2014-02-06 Thread James Hogan
Add the capability to encode NEC scancodes as raw events. The scancode_to_raw is pretty much taken from the img-ir NEC filter() callback, and modulation uses the pulse distance helper added in a previous commit. Signed-off-by: James Hogan james.ho...@imgtec.com --- drivers/media/rc/ir-nec

[RFC 2/4] rc: ir-raw: add modulation helpers

2014-02-06 Thread James Hogan
Add IR encoding helpers, particularly for pulse-distance modulation as used by the NEC protocol. Signed-off-by: James Hogan james.ho...@imgtec.com --- drivers/media/rc/ir-raw.c | 33 +++ drivers/media/rc/rc-core-priv.h | 44

[RFC 0/4] rc: ir-raw: Add encode, implement NEC encode

2014-02-06 Thread James Hogan
similarly to any raw ir driver to try it out. James Hogan (4): rc: ir-raw: add scancode encoder callback rc: ir-raw: add modulation helpers rc: ir-nec-decoder: add encode capability DEBUG: rc: img-ir: raw: Add loopback on s_filter drivers/media/rc/img-ir/img-ir-raw.c | 30 drivers

[RFC 4/4] DEBUG: rc: img-ir: raw: Add loopback on s_filter

2014-02-06 Thread James Hogan
Purely for the purposes of debugging the raw IR encode, add the s_filter callback to the img-ir-raw driver, which instead of setting the filter just feeds it back through the input device so that it can be verified. --- drivers/media/rc/img-ir/img-ir-raw.c | 30 ++ 1

[PATCH v3 06/15] dt: binding: add binding for ImgTec IR block

2014-02-07 Thread James Hogan
Add device tree binding for ImgTec Consumer Infrared block, specifically major revision 1 of the hardware. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org Cc: Rob Herring robh...@kernel.org Cc: Pawel Moll pawel.m

[PATCH v3 07/15] media: rc: img-ir: add base driver

2014-02-07 Thread James Hogan
Add base driver for the ImgTec Infrared decoder block. The driver is split into separate components for raw (software) decode and hardware decoder which are in following commits. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media

Re: [RFC 0/4] rc: ir-raw: Add encode, implement NEC encode

2014-02-10 Thread James Hogan
Hi Antti, On 08/02/14 11:30, Antti Seppälä wrote: The first patch adds an encode callback to the existing raw ir handler struct and a helper function to encode a scancode for a given protocol. The mechanism used here to encode works fine as long as there is only one protocol selected. If

Re: [RFC PATCH 1/3] rc-core: Add Manchester encoder (phase encoder) support to rc-core

2014-02-10 Thread James Hogan
Hi Antti, On 08/02/14 12:07, Antti Seppälä wrote: Adding a simple Manchester encoder to rc-core. Manchester coding is used by at least RC-5 protocol and its variants. Signed-off-by: Antti Seppälä a.sepp...@gmail.com --- drivers/media/rc/ir-raw.c | 44

Re: [RFC PATCH 2/3] ir-rc5-sz: Add ir encoding support

2014-02-10 Thread James Hogan
Hi Antti, On 08/02/14 12:07, Antti Seppälä wrote: The encoding in rc5-sz first inserts a pulse and then simply utilizes the generic Manchester encoder available in rc-core. Signed-off-by: Antti Seppälä a.sepp...@gmail.com --- drivers/media/rc/ir-rc5-sz-decoder.c | 35

Re: [RFC PATCH 2/3] ir-rc5-sz: Add ir encoding support

2014-02-10 Thread James Hogan
Hi Antti, On Monday 10 February 2014 22:09:33 Antti Seppälä wrote: +static int ir_rc5_sz_encode(u64 protocols, + const struct rc_scancode_filter *scancode, + struct ir_raw_event *events, unsigned int max) +{ + int ret; + struct

[PATCH] rc-main: store_filter: pass errors to userland

2014-02-10 Thread James Hogan
on success of s_filter, but the write always reported success back to userland. Reported-by: Antti Seppälä a.sepp...@gmail.com Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- drivers/media/rc/rc-main.c | 2 +- 1 file

Re: [RFC PATCH 2/3] ir-rc5-sz: Add ir encoding support

2014-02-11 Thread James Hogan
On Tuesday 11 February 2014 20:14:19 Antti Seppälä wrote: On 10 February 2014 22:50, James Hogan james.ho...@imgtec.com wrote: I suspect it needs some more space at the end too, to be sure that no more bits afterwards are accepted. I'm sorry but I'm not sure I completely understood

Re: [RFC PATCH 2/3] ir-rc5-sz: Add ir encoding support

2014-02-27 Thread James Hogan
On Sunday 16 February 2014 19:04:01 Antti Seppälä wrote: On 12 February 2014 01:39, James Hogan james.ho...@imgtec.com wrote: On Tuesday 11 February 2014 20:14:19 Antti Seppälä wrote: Are you working on the wakeup protocol selector sysfs interface? I gave it a try yesterday, but it's

Re: [PATCH v3 06/15] dt: binding: add binding for ImgTec IR block

2014-02-27 Thread James Hogan
Hi Rob, Mark + DT maintainers, On Friday 07 February 2014 15:49:15 James Hogan wrote: Add device tree binding for ImgTec Consumer Infrared block, specifically major revision 1 of the hardware. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com

Re: [PATCH v3 06/15] dt: binding: add binding for ImgTec IR block

2014-02-28 Thread James Hogan
On 28/02/14 01:28, Rob Herring wrote: On Thu, Feb 27, 2014 at 4:52 PM, James Hogan james.ho...@imgtec.com wrote: v3: - Rename compatible string to img,ir-rev1 (Rob Herring). - Specify ordering of clocks explicitly (Rob Herring). I'd appreciate if somebody could give this another glance after

[PATCH 1/5] rc-main: add generic scancode filtering

2014-02-28 Thread James Hogan
to filter out the corner cases. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: Antti Seppälä a.sepp...@gmail.com Cc: linux-media@vger.kernel.org --- drivers/media/rc/rc-main.c | 20 +--- 1 file changed, 13 insertions(+), 7

[PATCH 3/5] rc: add allowed/enabled wakeup protocol masks

2014-02-28 Thread James Hogan
the first element (RC_FILTER_NORMAL), and add a couple more helper functions for drivers to use for setting the allowed and enabled wakeup protocols. We also rename allowed_protos to allowed_protocols while we're at it, which is more consistent with enabled_protocols. Signed-off-by: James Hogan

[PATCH 5/5] rc-main: automatically refresh filter on protocol change

2014-02-28 Thread James Hogan
callback to be omitted entirely if there is only a single available wakeup protocol at a time, since selecting no protocol will automatically clear the wakeup filter, disabling wakeup. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: Antti Seppälä

[PATCH 4/5] rc: add wakeup_protocols sysfs file

2014-02-28 Thread James Hogan
Add a wakeup_protocols sysfs file which controls the new rc_dev::enabled_protocols[RC_FILTER_WAKEUP], which is the mask of protocols that are used for the wakeup filter. A new RC driver callback change_wakeup_protocol() is called to change the wakeup protocol mask. Signed-off-by: James Hogan

[PATCH 2/5] rc: abstract access to allowed/enabled protocols

2014-02-28 Thread James Hogan
The allowed and enabled protocol masks need to be expanded to be per filter type in order to support wakeup filter protocol selection. To ease that process abstract access to the rc_dev::allowed_protos and rc_dev::enabled_protocols members with inline functions. Signed-off-by: James Hogan

[PATCH 0/5] rc: scancode filtering improvements

2014-02-28 Thread James Hogan
Carvalho Chehab m.che...@samsung.com Cc: Bruno Prémont bonb...@linux-vserver.org Cc: Maxim Levitsky maximlevit...@gmail.com Cc: Sean Young s...@mess.org Cc: David Härdeman da...@hardeman.nu Cc: Jiri Kosina jkos...@suse.cz Cc: Antti Seppälä a.sepp...@gmail.com James Hogan (5): rc-main: add generic

[PATCH v4 00/10] media: rc: ImgTec IR decoder driver

2014-02-28 Thread James Hogan
-...@vger.kernel.org Cc: Tomasz Figa tomasz.f...@gmail.com James Hogan (10): dt: binding: add binding for ImgTec IR block rc: img-ir: add base driver rc: img-ir: add raw driver rc: img-ir: add hardware decoder driver rc: img-ir: add to build rc: img-ir: add NEC decoder module rc: img-ir: add JVC

[PATCH v4 01/10] dt: binding: add binding for ImgTec IR block

2014-02-28 Thread James Hogan
Add device tree binding for ImgTec Consumer Infrared block, specifically major revision 1 of the hardware. Signed-off-by: James Hogan james.ho...@imgtec.com Acked-by: Rob Herring r...@kernel.org Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org Cc: Pawel Moll pawel.m

[PATCH v4 02/10] rc: img-ir: add base driver

2014-02-28 Thread James Hogan
Add base driver for the ImgTec Infrared decoder block. The driver is split into separate components for raw (software) decode and hardware decoder which are in following commits. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media

[PATCH v4 05/10] rc: img-ir: add to build

2014-02-28 Thread James Hogan
Add ImgTec IR decoder driver to the build system. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- drivers/media/rc/Kconfig | 2 ++ drivers/media/rc/Makefile| 1 + drivers/media/rc/img-ir

[PATCH v4 07/10] rc: img-ir: add JVC decoder module

2014-02-28 Thread James Hogan
Add an img-ir module for decoding the JVC infrared protocol. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- v2: - Update to new scancode interface (32-bit NEC). - Update to new filtering interface (generic

[PATCH v4 08/10] rc: img-ir: add Sony decoder module

2014-02-28 Thread James Hogan
Add an img-ir module for decoding the Sony infrared protocol. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- v2: - Update to new scancode interface (32-bit NEC). - Update to new filtering interface (generic

[PATCH v4 09/10] rc: img-ir: add Sharp decoder module

2014-02-28 Thread James Hogan
Add an img-ir module for decoding the Sharp infrared protocol. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- v2: - Update to new scancode interface (32-bit NEC). - Update to new filtering interface (generic

[PATCH v4 03/10] rc: img-ir: add raw driver

2014-02-28 Thread James Hogan
Add raw IR remote control input driver for the ImgTec Infrared decoder block's raw edge interrupts. Generic software protocol decoders are used to allow multiple protocols to be supported at a time, including those not supported by the hardware decoder. Signed-off-by: James Hogan james.ho

[PATCH v4 06/10] rc: img-ir: add NEC decoder module

2014-02-28 Thread James Hogan
Add an img-ir module for decoding the NEC and extended NEC infrared protocols. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- v2: - Update scancode and filter callbacks to handle 32-bit NEC as used by Apple

[PATCH v4 10/10] rc: img-ir: add Sanyo decoder module

2014-02-28 Thread James Hogan
Add an img-ir module for decoding the Sanyo infrared protocol. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- v2: - Update to new scancode interface (32-bit NEC). - Update to new filtering interface (generic

[PATCH v4 04/10] rc: img-ir: add hardware decoder driver

2014-02-28 Thread James Hogan
filter conversion function will be provided in separate files for each protocol which this part of the driver can use. The new generic scan code filter interface is made use of to reduce interrupts and control wake events. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab

[PATCH] rc-main: fix missing unlock if no devno left

2014-03-01 Thread James Hogan
device numbers left. The added code doesn't depend on the device lock, so move it before the lock is taken. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org --- drivers/media/rc/rc-main.c | 16 1 file

Re: [PATCH 0/5] rc: scancode filtering improvements

2014-03-05 Thread James Hogan
Hi Antti, On Wednesday 05 March 2014 20:12:15 Antti Seppälä wrote: After reviewing the series and porting my nuvoton changes to it I haven't noticed any errors worth mentioning. In fact I think this series is very well written and should be merged. Thanks for reviewing! James, I hope you

Re: [PATCH v4 10/10] rc: img-ir: add Sanyo decoder module

2014-03-12 Thread James Hogan
On 12/03/14 10:57, Mauro Carvalho Chehab wrote: Hi James, Em Fri, 28 Feb 2014 23:29:00 + James Hogan james.ho...@imgtec.com escreveu: Add an img-ir module for decoding the Sanyo infrared protocol. After applying this series, some new warnings are popping up, when compiled with W=1

[PATCH 1/3] rc: img-ir: hw: Remove unnecessary semi-colon

2014-03-13 Thread James Hogan
Fix a coccicheck warning in img-ir driver: drivers/media/rc/img-ir/img-ir-hw.c:500:2-3: Unneeded semicolon Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com --- I don't object to this patch being squashed into the patch rc: img-ir: add hardware

[PATCH 0/3] rc: img-ir: Fixes a few warnings

2014-03-13 Thread James Hogan
These patches fix a few warnings in the img-ir driver, one from coccinelle and two more from W=1 (thanks Mauro). James Hogan (3): rc: img-ir: hw: Remove unnecessary semi-colon rc: img-ir: hw: Fix min/max bits setup rc: img-ir: jvc: Remove unused no-leader timings drivers/media/rc/img-ir

[PATCH 3/3] rc: img-ir: jvc: Remove unused no-leader timings

2014-03-13 Thread James Hogan
initialization for ‘img_ir_jvc.timings.s01’) [-Woverride-init] Reported-by: Mauro Carvalho Chehab m.che...@samsung.com Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com --- I don't object to this patch being squashed into the patch rc: img-ir: add JVC

[PATCH 2/3] rc: img-ir: hw: Fix min/max bits setup

2014-03-13 Thread James Hogan
-variable] Reported-by: Mauro Carvalho Chehab m.che...@samsung.com Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Mauro Carvalho Chehab m.che...@samsung.com --- I don't object to this patch being squashed into the patch rc: img-ir: add hardware decoder driver. --- drivers/media/rc/img-ir/img-ir

[PATCH v2 5/9] rc: ir-rc5-decoder: Add encode capability

2014-03-14 Thread James Hogan
in both data and mask is unambiguously RC-5X. The Manchester modulation helper is used, and for RC-5X it is used twice with two sets of timings, the first with a short trailer space for the space in the middle, and the second with no leader so that it can continue the space. Signed-off-by: James

[PATCH v2 0/9] rc: Add IR encode based wakeup filtering

2014-03-14 Thread James Hogan
encoder) helper rc: ir-rc5-sz-decoder: Add ir encoding support rc: nuvoton-cir: Add support for writing wakeup samples via sysfs filter callback James Hogan (6): rc: ir-raw: Add scancode encoder callback rc: ir-raw: Add pulse-distance modulation helper rc: ir-nec-decoder: Add encode

[PATCH v2 1/9] rc: ir-raw: Add scancode encoder callback

2014-03-14 Thread James Hogan
Add a callback to raw ir handlers for encoding and modulating a scancode to a set of raw events. This could be used for transmit, or for converting a wakeup scancode filter to a form that is more suitable for raw hardware wake up filters. Signed-off-by: James Hogan ja...@albanarts.com Cc: Mauro

[PATCH v2 3/9] rc: ir-raw: Add Manchester encoder (phase encoder) helper

2014-03-14 Thread James Hogan
From: Antti Seppälä a.sepp...@gmail.com Adding a simple Manchester encoder to rc-core. Manchester coding is used by at least RC-5 protocol and its variants. Signed-off-by: Antti Seppälä a.sepp...@gmail.com Signed-off-by: James Hogan ja...@albanarts.com Cc: Mauro Carvalho Chehab m.che

[PATCH v2 4/9] rc: ir-nec-decoder: Add encode capability

2014-03-14 Thread James Hogan
Add the capability to encode NEC scancodes as raw events. The scancode_to_raw is pretty much taken from the img-ir NEC filter() callback, and modulation uses the pulse distance helper added in a previous commit. Signed-off-by: James Hogan ja...@albanarts.com Cc: Mauro Carvalho Chehab m.che

[PATCH v2 6/9] rc: ir-rc5-sz-decoder: Add ir encoding support

2014-03-14 Thread James Hogan
From: Antti Seppälä a.sepp...@gmail.com The encoding in rc5-sz first inserts a pulse and then simply utilizes the generic Manchester encoder available in rc-core. Signed-off-by: Antti Seppälä a.sepp...@gmail.com Signed-off-by: James Hogan ja...@albanarts.com Cc: Mauro Carvalho Chehab m.che

  1   2   >