History log of /drivers/media/video/ir-kbd-i2c.c
Revision Date Author Comments
c6e8d86fffd8edf1bfccbd441b1812ee919fe3d5 12-Feb-2012 Axel Lin <axel.lin@gmail.com> [media] convert drivers/media/* to use module_i2c_driver()

This patch converts the drivers in drivers/media/* to use the
module_i2_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Heungjun Kim <riverful.kim@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Andrew Chew <achew@nvidia.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: Johannes Obermaier <johannes.obermaier@gmail.com>
Cc: Steven Toth <stoth@kernellabs.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
7528cd273e14020117e6cdb6cc307f223e97c5ed 10-Jan-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] cx231xx: Fix unregister logic

There are several weirdness at the unregister logic.

First of all, IR has a poll thread. This thread needs to be
removed, as it uses some resources associated to the main driver.
So, the driver needs to explicitly unregister the I2C client for
ir-kbd-i2c.

If, for some reason, the driver needs to wait for a close()
to happen, not all memories will be freed, because the free
logic were in the wrong place.

Also, v4l2_device_unregister() seems to be called too early,
as devices are still using it.

Finally, even with the device disconnected, there is one
USB function call that will still try to talk with it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
90bf3aab42937f760e5b645ab63df46d26b5e620 10-Jan-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] cx231xx-input: stop polling if the device got removed.

If the device got removed, stops polling it. Also, un-registers
it at input/evdev, as it won't work anymore. We can't free the
IR structure yet, as the ir_remove method will be called later.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
6e5b960176980852187b6f0bafa3db78130be42f 04-Mar-2011 Jarod Wilson <jarod@redhat.com> [media] ir-kbd-i2c: pass device code w/key in hauppauge case

The new hauppauge key tables use both device code button code.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
206241069ecfa52c3b8873f8d7e31d434d2fcae1 25-Jan-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] rc/keymaps: Remove the obsolete rc-rc5-tv keymap

This keymap were used for the Hauppauge Black remote controller
only. It also contains some keycodes not found there. As the
Hauppauge Black is now part of the hauppauge keymap, just remove
it.

Also, remove the modprobe hacks to select between the Gray
and the Black versions of the remote controller as:
- Both are supported by default by the keymap;
- If the user just wants one keyboard supported,
it is just a matter of changing the keymap via
the userspace tool (ir-keytable), removing
the keys that he doesn't desire. As ir-keytable
auto-loads the keys via udev, this is better than
obscure modprobe parameters.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
af86ce79f020a31e4a30661e41471d31face9985 24-Jan-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map

The rc-hauppauge-new map is a messy thing, as it bundles 3

different remote controllers as if they were just one,
discarding the address byte. Also, some key maps are wrong.

With the conversion to the new rc-core, it is likely that
most of the devices won't be working properly, as the i2c
driver and the raw decoders are now providing 16 bits for
the remote, instead of just 8.

delete mode 100644 drivers/media/rc/keymaps/rc-hauppauge-new.c

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
8df59918b5bc2c3c80e5e0b9386228df7ad54e65 20-Jan-2011 Jarod Wilson <jarod@redhat.com> [media] ir-kbd-i2c: improve remote behavior with z8 behind usb

Add the same "are you ready?" i2c_master_send() poll command to
get_key_haup_xvr found in lirc_zilog, which is apparently seen in
the Windows driver for the PVR-150 w/a z8. This stabilizes what is
received from both the HD-PVR and HVR-1950, even with their polling
intervals at the default of 100, thus the removal of the custom
260ms polling_interval in pvrusb2-i2c-core.c.

Acked-by: Andy Walls <awalls@md.metrocast.net>
Acked-by: Mike Isely <isely@isely.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
c69a4af6f06916936c8afd44a175e2bf1fbefaec 16-Jan-2011 Andy Walls <awalls@md.metrocast.net> [media] ir-kbd-i2c: Add back defaults setting for Zilog Z8's at addr 0x71

This reverts a portion of commit

44243fc2ef99948bc9b046901880885616dd5e89

A commit for which I errantly recommended that defaults for I2C address
0x71 not be set by ir-kbd-i2c.c

The pvrusb2 and bttv drivers currently rely on ir-kbd-i2c setting
defaults for that address. Until I can get those bridge drivers fixed
to properly send IR_i2c_init_data for boards with Zilog Z8 chips,
just add back the default settings for I2C address 0x71.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
e6bcb2f324cf28469d2713e86beace07f25596cf 12-Jan-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] ir-kbd-i2c: Make IR debug messages more useful

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
a9cd591e29b6b50e1212de7b7a86ccd270f5c2a6 29-Dec-2010 Andy Walls <awalls@md.metrocast.net> [media] ir-kbd-i2c: Add HD PVR IR Rx support to ir-kbd-i2c

Add HD PVR IR Rx support to ir-kbd-i2c

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
52b661449aecc47e652a164c0d8078b31e10aca0 17-Nov-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] rc: Rename remote controller type to rc_type instead of ir_type

for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,IR_TYPE,RC_TYPE,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_type,rc_type,g <$i >a && mv a $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
ca86674b8a93ea11c4bb6f4dd0113b1adf1fa841 17-Nov-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] Rename all public generic RC functions from ir_ to rc_

Those functions are not InfraRed specific. So, rename them to properly
reflect it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
6bda96447cef24fbf97a798b1ea664224d5fdc25 17-Nov-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] rc: rename the remaining things to rc_core

The Remote Controller subsystem is meant to be used not only by Infra Red
but also for similar types of Remote Controllers. The core is not specific
to Infra Red. As such, rename:
- ir-core.h to rc-core.h
- IR_CORE to RC_CORE
- namespace inside rc-core.c/rc-core.h

To be consistent with the other changes.

No functional change on this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2eb258327722de3ed4d84ce1b9add2bad21a0ec4 12-Nov-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] ir-kbd-i2c: add rc_dev as a parameter to the driver

There are several fields on rc_dev that drivers can benefit. Allow drivers
to pass it as a parameter to the driver.

For now, the rc_dev parameter is optional. If drivers don't pass it, create
them internally. However, the best is to create rc_dev inside the drivers,
in order to fill other fields, like open(), close(), driver_name, etc.
So, a latter patch making it mandatory and changing the caller drivers is
welcome.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
d8b4b5822f51e2142b731b42c81e3f03eec475b2 29-Oct-2010 David Härdeman <david@hardeman.nu> [media] ir-core: make struct rc_dev the primary interface

This patch merges the ir_input_dev and ir_dev_props structs into a single
struct called rc_dev. The drivers and various functions in rc-core used
by the drivers are also changed to use rc_dev as the primary interface
when dealing with rc-core.

This means that the input_dev is abstracted away from the drivers which
is necessary if we ever want to support multiple input devs per rc device.

The new API is similar to what the input subsystem uses, i.e:
rc_device_alloc()
rc_device_free()
rc_device_register()
rc_device_unregister()

[mchehab@redhat.com: Fix compilation on mceusb and cx231xx, due to merge conflicts]
Signed-off-by: David Härdeman <david@hardeman.nu>
Acked-by: Jarod Wilson <jarod@redhat.com>
Tested-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
62c6503125389763a74911408d984c5dd09eeb97 29-Oct-2010 David Härdeman <david@hardeman.nu> [media] ir-core: remove remaining users of the ir-functions keyhandlers

This patch removes the remaining usages of the ir_input_nokey() and
ir_input_keydown() functions provided by drivers/media/IR/ir-functions.c
by using the corresponding functionality in ir-core instead.

Signed-off-by: David Härdeman <david@hardeman.nu>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
f3dc65dafa651bca6606ac0b41ead1be50d05652 15-Nov-2010 Jean Delvare <khali@linux-fr.org> i2c: Drivers shouldn't include <linux/i2c-id.h>

Drivers don't need to include <linux/i2c-id.h>, especially not when
they don't use anything that header file provides.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Michael Hunold <michael@mihu.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
c72ba8e6ae7376d20e509a9a54a2dd45fb483fc2 23-Sep-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: saa7134: get rid of I2C_HW_SAA7134

The only reason for keeping I2C_HW_SAA7134 is to allow setting a
per-device polling interval. Just move this info to the platform
data, allowing drivers to change it per device, where needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
44243fc2ef99948bc9b046901880885616dd5e89 23-Sep-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: Remove the usage of I2C_HW_B_CX2388x on ir-kbd-i2c.c

Move the cx88 specific initialization for Hauppauge XVR remotes
into cx88-input, removing the need for test it inside ir-kbd-i2c.

The reference at cx88 for this symbol, at:

drivers/media/video/cx88/cx88-i2c.c: core->i2c_adap.id = I2C_HW_B_CX2388x;
drivers/media/video/cx88/cx88-vp3054-i2c.c: vp3054_i2c->adap.id = I2C_HW_B_CX2388x;

Can't be removed yet, since lirc-i2c still uses it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
c0c46826274a4da5d9e312d7cfd4ca0806c0a358 23-Sep-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: bttv: Move PV951 IR to the right driver

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
a40231a67c443c5913366a45e9fc3da20a798790 15-Sep-2010 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB: ir-kbd-i2c: remove obsolete I2C_HW_B_CX2341X test

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
0dc50942d6f23989ffb3024aa2271941ec44aea8 07-Jun-2010 David Härdeman <david@hardeman.nu> V4L/DVB: ir-core: partially convert ir-kbd-i2c.c to not use ir-functions.c

Partially convert drivers/media/video/ir-kbd-i2c.c to
not use ir-functions.c

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
02858eedcb78a664215b918d98cdb753ce432ce6 03-Apr-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: ir-core: Make use of the new IR keymap modules

Instead of using the ugly keymap sequences, use the new rc-*.ko keymap
files. For now, it is still needed to have one keymap loaded, for the
RC code to work. Later patches will remove this depenency.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
b2245ba1644eb1eba400fd04c6e7bb3ab2d4a8fa 02-Apr-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: ir: prepare IR code for a parameter change at register function

A latter patch will reuse the ir_input_register with a different meaning.
Before it, change all occurrences to a temporary name.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
d705d2ab7596b4661a2f13172f4f93ad11bd761f 02-Apr-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: ir: use IR_KEYTABLE where an IR table is needed

Replaces most of the occurences of IR keytables on V4L drivers by a macro
that evaluates to provide the name of the exported symbol.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
727e625cc2c114e449a78f851b0c12edac897a83 13-Mar-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: ir-core: export driver name used by IR via uevent

Now, both driver and keytable names are exported to userspace. This
will help userspace to decide when a table need to be replaced
by another one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
ca39d84d438b609af127f2eb161cd9029afbc9a7 13-Nov-2009 Magnus Alm <magnus.alm@gmail.com> V4L/DVB: em28xx: fix for "Leadtek winfast tv usbii deluxe"

fix Video/Sound support "Leadtek winfast tv usbii deluxe".

Now, it is working Stereo, IR, Radio, TV, Svideo and Composite.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
971e8298dee4835fc2dfbd207a9786702aa01666 14-Dec-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13680): ir: use unsigned long instead of enum

When preparing the linux-next patches, I got those errors:

include/media/ir-core.h:29: warning: left shift count >= width of type
In file included from include/media/ir-common.h:29,
from drivers/media/video/ir-kbd-i2c.c:50:
drivers/media/video/ir-kbd-i2c.c: In function ‘ir_probe’:
drivers/media/video/ir-kbd-i2c.c:324: warning: left shift count >= width of type

Unfortunately, enum is 32 bits on i386. As we define IR_TYPE_OTHER as 1<<63,
it won't work on non 64 bits arch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
e93854da880d6dc357c00625d8371b6a926fd19b 14-Dec-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13634): ir-core: allow passing IR device parameters to ir-core

Adds an structure to ir_input_register to contain IR device characteristics,
like supported protocols and a callback to handle protocol event changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
579e7d60ba0035228aadad69eb2ffeb138c51311 11-Dec-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13617): ir: move input_register_device() to happen inside ir_input_register()

We'll need to register a sysfs class for the IR devices. As such, the better
is to have the input_register_device()/input_unregister_device() inside
the ir register/unregister functions.

Also, solves a naming problem with V4L ir_input_init() function, that were,
in fact, registering a device.

While here, do a few cleanups at budget-ci IR logic.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
38ef6aa884e3fd389f7d444b8dd36c16832e36b4 11-Dec-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13616): IR: rename ir_input_free as ir_input_unregister

Now, ir_input_free does more than just freeing the keytab. Better to
rename it as ir_input_unregister.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
d995a18733a683c1c086a4d48315976f8c25d89b 24-Nov-2009 Lukas Karas <lukas.karas@centrum.cz> V4L/DVB (13591): add support for IR on FlyDVB Trio (saa7134)

saa7134: Add support for IR reciever on card LifeView FlyDVB Trio

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

[mchehab@redhat.com: CodingStyle fixes and ported upstream]
Tested-by: Petr Fiala <petr.fiala@gmail.com>
Signed-off-by: Lukas Karas <lukas.karas@centrum.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
055cd55601f948675006ca90362fc2bfaae90a86 29-Nov-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13537): ir: Prepare the code for dynamic keycode table allocation

Currently, the IR table is initialized by calling ir_input_init(). However,
this function doesn't return any error code, nor has a function to be called
when de-initializing the IR's.

Change the return argment to integer and make sure that each driver will
handle the error code. Also adds a function to free any resources that may
be allocating there: ir_input_free().

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
8573b74af25c279de3e309beddcba984bee9ec15 28-Nov-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13533): ir: use dynamic tables, instead of static ones

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
7ef68e60d9435eb604a346babccb48000b94bc76 02-Oct-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (13236): ir-kbd-i2c: Don't reject unknown I2C addresses

I do not think it makes sense any longer for ir-kbd-i2c to reject
devices at unknown I2C addresses. The caller can provide all the
details about how the device should be handled. Having to add new
addresses to ir-kbd-i2c so that they aren't rejected is a pain we
don't need. Unsupported devices will be spotted a few lines later
anyway.

This already lets us unlist 2 addresses (0x7a and 0x2d) for which
handling details are always provided by the caller (saa7134-input).
Hopefully we can remove more in the future.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
715a223323c8c8bcbe7739e20f6c619f7343b595 29-Aug-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12595): common/ir: use a struct for keycode tables

Currently, V4L uses a scancode table whose index is the scancode and
the value is the keycode. While this works, it has some drawbacks:

1) It requires that the scancode to be at the range 00-7f;

2) keycodes should be masked on 7 bits in order for it to work;

3) due to the 7 bits approach, sometimes it is not possible to replace
the default keyboard to another one with a different encoding rule;

4) it is different than what is done with dvb-usb approach;

5) it requires a typedef for it to work. This is not a recommended
Linux CodingStyle.

This patch is part of a larger series of IR changes. It basically
replaces the IR_KEYTAB_TYPE tables by a structured table:
struct ir_scancode {
u16 scancode;
u32 keycode;
};

This is very close to what dvb does. So, a further integration with DVB
code will be easy.

While we've changed the tables, for now, the IR keycode handling is still
based on the old approach.

The only notable effect is the redution of about 35% of the ir-common
module size:

text data bss dec hex filename
6721 29208 4 35933 8c5d old/ir-common.ko
5756 18040 4 23800 5cf8 new/ir-common.ko

In thesis, we could be using above u8 for scancode, reducing even more the size
of the module, but defining it as u16 is more convenient, since, on dvb, each
scancode has up to 16 bits, and we currently have a few troubles with rc5, as their
scancodes are defined with more than 8 bits.

This patch itself shouldn't be doing any functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
f5d887ae60ea1b05fcdab65e51e1ef88398ed274 28-Jul-2009 Andy Walls <awalls@radix.net> V4L/DVB (12368): ir-kbd-i2c: Add support for Z8F0811/Hauppage IR transceivers

This patch adds support for Zilog Z8F0811 IR transceiver chips on
CX2341[68] based boards to ir-kbd-i2c for both the old i2c binding model
and the new i2c binding model.

Signed-off-by: Andy Walls <awalls@radix.net>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
1b6e59e3f48eecdab97bdd1568422e22f7d2f4f5 28-Jul-2009 Andy Walls <awalls@radix.net> V4L/DVB (12366): ir-kbd-i2c: Allow use of ir-kdb-i2c internal get_key funcs and set ir_type

This patch augments the init data passed by bridge drivers to
ir-kbd-i2c, so that the ir_type can be set explicitly, and so
ir-kbd-i2c internal get_key functions can be reused without
requiring symbols from ir-kbd-i2c in the bridge driver.

Signed-off-by: Andy Walls <awalls@radix.net>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
157da2762c610073e76329bb030e993fb4c2cc77 28-Jul-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (12365): ir-kbd-i2c: Remove superfulous inlines

Functions which are referenced by their address can't be inlined by
definition.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9a4cc5ac991d3b697db4f9e5015a758621a95009 13-May-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (11846): ir-kbd-i2c: Don't assume all IR receivers are supported

The code in ir_probe makes the dangerous assumption that all IR
receivers are supported by the driver. The new i2c model makes it
possible for bridge drivers to instantiate IR devices before they are
supported, therefore the ir-kbd-i2c drivers must be made more robust
to not spam the logs or even crash on unsupported IR devices. Simply,
the driver will not bind to the unsupported devices.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
4d7a2d6721a6380d4ffc26d81d2c8232fd0d2dfc 13-May-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (11845): ir-kbd-i2c: Use initialization data

For specific boards, pass initialization data to ir-kbd-i2c instead
of modifying the settings after the device is initialized. This is
more efficient and easier to read.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
c668f32dca105d876e51862a003a302fa61e4ae4 13-May-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (11844): ir-kbd-i2c: Switch to the new-style device binding model

Let card drivers probe for IR receiver devices and instantiate them if
found. Ultimately it would be better if we could stop probing
completely, but I suspect this won't be possible for all card types.

There's certainly room for cleanups. For example, some drivers are
sharing I2C adapter IDs, so they also had to share the list of I2C
addresses being probed for an IR receiver. Now that each driver
explicitly says which addresses should be probed, maybe some addresses
can be dropped from some drivers.

Also, the special cases in saa7134-i2c should probably be handled on a
per-board basis. This would be more efficient and less risky than always
probing extra addresses on all boards. I'll give it a try later.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
1df8e9861cf9fac5737ccb61c7f7fefa77711d40 13-May-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (11843): ir-kbd-i2c: Don't use i2c_client.name for our own needs

In the standard device driver binding model, the name field of
struct i2c_client is used to match devices to their drivers, so we
must stop using it for internal purposes. Define a separate field
in struct IR_i2c as a replacement, and use it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
c1089bdc07f06b90f0bc50d0789c2a4833097df7 07-Mar-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (10939): ir-kbd-i2c: Prevent general protection fault on rmmod

The removal of the timer which polls the infrared input is racy.
Replacing the timer with a delayed work solves the problem.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
cb3bf504f7c875070d56e84ce1e28aff8c3b6790 12-Feb-2009 Oldřich Jedlička <oldium.pro@seznam.cz> V4L/DVB (10632): Added support for AVerMedia Cardbus Hybrid remote control

Added support for I2C device at address 0x40 and subaddress 0x0d/0x0b
that provides remote control key reading support for AVerMedia Cardbus
Hybrid card, possibly for other AVerMedia Cardbus cards.

The I2C address 0x40 doesn't like the SAA7134's 0xfd quirk, so it was
disabled.

[mchehab@redhat.com: CodingStyle fixes]
Signed-off-by: Oldřich Jedlička <oldium.pro@seznam.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
af128a102c4aee994b4ff6e422b3cfab17127578 30-Oct-2008 Kay Sievers <kay.sievers@vrfy.org> V4L/DVB (9521): V4L: struct device - replace bus_id with dev_name(), dev_set_name()

This patch is part of a larger patch series which will remove
the "char bus_id[20]" name string from struct device. The device
name is managed in the kobject anyway, and without any size
limitation, and just needlessly copied into "struct device".

To set and read the device name dev_name(dev) and dev_set_name(dev)
must be used. If your code uses static kobjects, which it shouldn't
do, "const char *init_name" can be used to statically provide the
name the registered device should have. At registration time, the
init_name field is cleared, to enforce the use of dev_name(dev) to
access the device name at a later time.

We need to get rid of all occurrences of bus_id in the entire tree
to be able to enable the new interface. Please apply this patch,
and possibly convert any remaining remaining occurrences of bus_id.

We want to submit a patch to -next, which will remove bus_id from
"struct device", to find the remaining pieces to convert, and finally
switch over to the new api, which will remove the 20 bytes array
and does no longer have a size limitation.

Thanks,
Kay

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
ba340b40a5f65261731583f67d7ec8cafbf5cfaa 13-Oct-2008 Brian Rogers <brian_rogers@comcast.net> V4L/DVB (9168): Add support for MSI TV@nywhere Plus remote

The IR controller has a couple quirks. It won't respond until some other
device on the bus is probed. To work around that, probe 0x50 first.
Then, since it won't respond to a zero-byte read, probe with a one-byte
read.

Signed-off-by: Brian Rogers <brian_rogers@comcast.net>
[mchehab.redhat.com: Fix merge conflicts and remove an unused var]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
34c080295af9b3ed9f704a881e07eb5ac128e1ed 22-Sep-2008 Darron Broad <darron@kewl.org> V4L/DVB (9016): HVR3000/4000 Hauppauge related IR cleanups

From the author:
This patch-set fixes remote control issues I have experienced
with hauppauge drivers in Linux since the PVR-350 and now
with both a NOVA-S+ and HVR-4000. It has also been confirmed
to work with an HVR-1300 user who had exactly the same issue.

Hauppage remote controls use RC5. RC5 has a bit-field which
represents the target device. The hauppauge windows drivers
have a registry key which can enable filtering, but the linux
drivers will accept any target device in this bit field for
internal processing.

This causes problems with setups such as mythtv where remote
control key presses destined for the TV (target = 0) are
interpreted by the kernel and subsequenctly LIRC then mythtv.

Of the remote controls I have to hand (wintv black, pvr/hvr
silver) the hauppauge remotes send one of two device targets
ids, these are interpreted by the patch which then filters
out any non hauppauge addresses.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
1c22dad8ab86caef7a1f01cf3e9bb446a448aac5 18-Jul-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (8395): saa7134: Fix Kbuild dependency of ir-kbd-i2c

Currently, saa7134 is dependent of ir-kbd-i2c, since it uses a symbol that is
defined there. However, as this symbol is used only on saa7134, there's no
sense on keeping it defined there (or on ir-commons).

So, let's move it to saa7134 and remove one symbol for being exported.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
37c45df740f79c58bb0fc0de151fd2504234032b 26-Apr-2008 Jean Delvare <khali@linux-fr.org> V4L/DVB (7751): ir-kbd-i2c: Save a temporary memory allocation in ir_probe

Using i2c_transfer instead of i2c_master_recv in ir_probe saves a
temporary memory allocation.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
7e28adb2497f6b873516163e2d29210c11777613 09-Apr-2008 Harvey Harrison <harvey.harrison@gmail.com> V4L/DVB (7518): media/video/ replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
d6f34d7adddb144c3b450e15df3749f0e0a651c6 22-Apr-2008 Jean Delvare <khali@linux-fr.org> V4L/DVB (7332): ir-kbd-i2c: Minor optimization in ir_probe

This saves an initialization and a comparison.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
a58858556deb03ea4a464f84fe888692867ce377 22-Apr-2008 Marcin Slusarz <marcin.slusarz@gmail.com> V4L/DVB (7286): limit stack usage of ir-kbd-i2c.c

ir_probe allocated struct i2c_client on stack;
it's pretty big structure, so allocate it with kzalloc

make checkstack output without this patch:
x059d ir_probe [ir-kbd-i2c]: 1000

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
ff699e6bd02eb1c6d02c7c2b576c2ee6caab201c 22-Apr-2008 Douglas Schilling Landgraf <dougsland@gmail.com> V4L/DVB (7094): static memory

- Static memory is always initialized with 0.
- Replaced in some cases C99 comments for /* */

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
d3135846f6c1858dbad6ccb780a42e6c98953e6d 19-Apr-2008 Matthew Wilcox <matthew@wil.cx> drivers: Remove unnecessary inclusions of asm/semaphore.h

None of these files use any of the functionality promised by
asm/semaphore.h. It's possible that they rely on it dragging in some
unrelated header file, but I can't build all these files, so we'll have
fix any build failures as they come up.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
e8018c9e78b0ff4bb0290e46f4045fb4ea589ae8 07-Jan-2008 Andrey J. Melnikoff (TEMHOTA) <temnota@kmv.ru> V4L/DVB (6973): Add Beholder TV 401/405/407/409/505/507/609/M6 support

This patch updates cardlist for Beholder TV tuners:
old models (with GPIO ir) 401, 403, 405, 407, 409, 505, 507
and add support for 607, 609, M6 cards with new i2c-ir.

Signed-off-by: Igor Kuznetsov <igk72@yandex.ru>
Signed-off-by: Andrey J. Melnikov <temnota@kmv.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
415a1975923722f729211a9efca550c60c519bf3 16-Oct-2007 Trent Piepho <xyzzy@speakeasy.org> V4L/DVB (6352): ir-kbd-i2c: Missing break statement

Someone added a new case without adding a break to the one before it.

Thanks to Margus <b-berski at mbox200 dot swipnet dot se> for spotting this.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
9bc37caadffe8327683980b2323371691fa182e3 08-Sep-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6196): cx23885: add support for DViCO FusionHDTV 5 Express

This patch adds digital ATSC / QAM support for the DViCO FusionHDTV5 Express.
Remote control is supported by ir-kbd-i2c, RTC is supported by rtc-isl1208.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
3c44358c49ee4142d0f868509b5b3b02759fa16a 24-Aug-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6179): Clean up FusionHDTV ir code

- fixed missing buttons in keymap.

- make function names & descriptions more generic,
since this same ir receiver and remote is used in
many FusionHDTV products.

- miscellaneous cleanups.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
d54d6980916d5521ad47fa61e5b6ff8733221714 24-Aug-2007 Chaogui Zhang <czhang1974@gmail.com> V4L/DVB (6178): add IR remote support for FusionHDTV 5 RT Gold

This patch adds support for the built-in IR receiver of the DViCO
Fusion HDTV5 RT GOLD PCI card, using FusionHDTV MCE remote controller.

Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
9c12224a607a4b22ab86784e3394b52810b9507c 21-Aug-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media files

Since at least kernel 2.6.12-rc2, module.h includes moduleparm.h. This
patch removes all occurences of moduleparm.h from drivers/media files.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
39cf1e810a6b464a8469bf318f21206d84ffb1d8 25-Jun-2007 Jan Frey <jfrey@gmx.de> V4L/DVB (5786): Ir-kbd-i2c: add support for Hauppauge HVR1300 remote

- add support for the I2C based IR transceiver of the Hauppauge HVR-1300
- remove bad code from cx88-input.c

Signed-off-by: Jan Frey <jfrey@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
8083c5200e74a5db11c9671bfc1bcaefe8c48737 21-May-2007 Dmitry Torokhov <dtor@insightbb.com> V4L/DVB (5684): V4L: ir-kbd-i2c - switch to using msecs_to_jiffies()

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
53c4e9551c2930767fcdaa54323616c32ed6e9c6 29-Mar-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (5479): Use ARRAY_SIZE instead of a magic number

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
cd354f1ae75e6466a7e31b727faede57a1f89ca5 14-Feb-2007 Tim Schmielau <tim@physik3.uni-rostock.de> [PATCH] remove many unneeded #includes of sched.h

After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there. Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.

To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.

Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm. I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
177aaaf826856cd8c82e790cf125186b5634f492 30-Nov-2006 Thomas Genty <tomlohave@gmail.com> V4L/DVB (4898): Saa7134: add support for remote control of Hauppauge HVR1110

This patch adds support for the remote control bundled with the
Hauppauge HVR1110

Signed-off-by: Thomas Genty <tomlohave@gmail.com>
Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
b07b4783fb30dee8c542fc76ed8993108d46d6aa 20-Nov-2006 Dmitry Torokhov <dtor@insightbb.com> V4L/DVB (4854): Handle errors from input_register_device()

Also sprinkled some input_sync() throughout the code.
Acked-by: Ricardo Cerqueira <v4l@cerqueira.org>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Acked-by: Andrew de Quincey <adq_dvb@lidskialf.net>

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
c4028958b6ecad064b1a6303a6a5906d4fe48d73 22-Nov-2006 David Howells <dhowells@redhat.com> WorkStruct: make allyesconfig

Fix up for make allyesconfig.

Signed-Off-By: David Howells <dhowells@redhat.com>
cc7093df3cf7ace678284c0ad3a6cfb3a1d5efd9 26-Sep-2006 David Hardeman <david@hardeman.nu> V4L/DVB (4670): Allow RC5 codes 64 - 127 in ir-kbd-i2c.c

The RC5 coding has for a long time supported commands 64-127 in addition
to 0-63. This is controlled by the second bit of the RC5 packet (see
The attached patch modifies ir-kbd-i2c.c to allow for commands 64-127,
tested with a PVR350 card in combination with a programmable remote.

Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
b93eedb62e358588c5e595b07fb85efa1f597a9f 26-Mar-2006 Sylvain Pasche <sylvain.pasche@gmail.com> V4L/DVB (4023): Subject: Pinnacle PCTV grey remote control support

This adds support for the older (?) Pinnacle PCTV remotes (with all buttons
colored in grey). There's no autodetection for the type of remote, though;
saa7134 defaults to the colored one, to use the grey remote the
"pinnacle_remote=1" option must be passed to the saa7134 module

Signed-off-by: Sylvain Pasche <sylvain.pasche@gmail.com>
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
c097b04520a3ab69a94f63f3f1d6716864c07300 31-Mar-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3696): Previous change for cx2341X boards broke the remote support

Partially revert previous change to fix IR support.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
51dab14e66a876ca124ef115fda08121ad9533fc 25-Mar-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3605): Add support for I2C_HW_B_CX2341X board adapter

- Add missing class check to tveeprom_attach_adapter.
- Add CX2341X specific IR probe address list.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
4c0f631e14b849782259519c749414b1f1ddbfa8 23-Jan-2006 Ricardo Cerqueira <v4l@cerqueira.org> V4L/DVB (3393): Move all IR keymaps to ir-common module

- All the keymaps have the same structure, and can be shared between different
chips, so it makes no sense having them scattered between the input files.
This aggregates them all at ir-common module.
- Added new Hauppauge remote (Hauppauge grey), contributed by J.O. Aho
<trizt@iname.com> (with some small changes)
Changed KEY_KPx (keypad numerals) references to KEY_x, to avoid problems
when NumLock is off (suggested by Peter Missel <peter.missel@onlinehome.de>)
- Some cleanups at IR code

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
bf47e4e43e4dcf88fef61b1b4139ce2da20e1f73 23-Jan-2006 J.O. Aho <trizt@iname.com> V4L/DVB (3395): Hauppauge Grey Remote support

- For the Hauppauge PVR cards there are at least two different remotes, one
completly black and one that is Grey and black, they keys differ in values
eg Black remotes 'mute' has the same value as Grey remotes 'menu'.
- This enables the user to select which keymapping to use by using the
hauppauge parm. Unlike to the black remote keys, all keys are
mapped for the grey remote and the ATi usb remote mappings has been
followed.

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
cab462f716cdd522edc71436482d8734e8258489 09-Jan-2006 Mauro Carvalho Chehab <mchehab@brturbo.com.br> V4L/DVB (3307): Some cleanups at I2C modules

- i2c names shorten
- removed obsoleted flags on newer modules
- small cleanups

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
d21838dd7d098e102ced2fafed62dcb133c4d71c 09-Jan-2006 Mauro Carvalho Chehab <mchehab@brturbo.com.br> V4L/DVB (3123b): syncs V4L subsystem tree with kernel

- This patch makes kernel in sync with v4l subsystem tree.
- some lines reordered to be sync.
- some reduntant codes removed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2b48716d1d2f2edb1e7cbc5ecf1cb2cb39373e33 07-Dec-2005 Greg Kroah-Hartman <gregkh@suse.de> [PATCH] I2C: Remove .owner setting from i2c_driver as it's no longer needed

Now that i2c_add_driver() doesn't need the module owner to be set by
hand, we can delete it from the drivers. This patch catches all of the
drivers that I found in the current tree (if a driver sets the .owner by
hand, it's not a problem, just not needed.)

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Jean Delvare <khali@linux-fr.org>
604f28e2b8d34cbaf08f0351374645f161335a82 26-Nov-2005 Laurent Riffard <laurent.riffard@free.fr> [PATCH] i2c: Drop i2c_driver.{owner,name}, 5 of 11

We should use the i2c_driver.driver's .name and .owner fields
instead of the i2c_driver's ones.

This patch updates the drivers/media/video and usb/media drivers.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
8a9947552d43b0d20d5fa23ac0ba435d526be454 26-Nov-2005 Jean Delvare <khali@linux-fr.org> [PATCH] i2c: Drop i2c_driver.flags, 2 of 3

Just about every i2c chip driver sets the I2C_DF_NOTIFY flag, so we
can simply make it the default and drop the flag. If any driver really
doesn't want to be notified when i2c adapters are added, that driver
can simply omit to set .attach_adapter. This approach is also more
robust as it prevents accidental NULL pointer dereferences.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
dd815408106f3c56c3050493dda97f9355aa4971 12-Dec-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] V4L/DVB: (3151) I2C ID renamed to I2C_DRIVERID_INFRARED

I2C ID renamed to I2C_DRIVERID_INFRARED

Acked-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
674434c691e10015660022fc00b04985a23ef87b 12-Dec-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] V4L/DVB: (3086c) Whitespaces cleanups part 4

Clean up whitespaces at v4l/dvb files

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
afd1a0c9ac281eed3b22b293ccd92af7b0d60889 12-Dec-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] V4L/DVB: (3086c) Whitespaces cleanups part 3

Clean up whitespaces at v4l/dvb files

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
769e24382dd47434dfda681f360868c4acd8b6e2 01-Dec-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] V4L: Some funcions now static and I2C hw code for IR

- Some funcions are now declared as static
- Added a I2C code for InfraRed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
8069695c9e7da7ab7cd8ee749e8d5aa9e6e0660b 14-Nov-2005 Ricardo Cerqueira <v4l@cerqueira.org> [PATCH] v4l: (935) Moved common IR stuff to ir-common.c

- The pinnacle handler & remote are common to saa7134 PCI boards and em28xx
USB boards, so the keymap was moved to ir-common and the keyhandler is back
to ir-kbd-i2c

- request_module("ir-kbd-i2c") is no longer necessary at saa7134-core since
saa7134.ko now depends on ir-kbd-i2c.ko to get the keyhandler

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
b296fc6017e0ec6bc6cd0f40275f268035eb6b8b 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 898: em2820 i2c fix

- Miscelaneous fixes for em28xx
- I2C hardware named changed to wright value.
- utsname included to em28xx-video.c
- Makefile fixes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
ac9cd97640a8bcad75dc7305761365c3e339bbc5 09-Nov-2005 Ricardo Cerqueira <v4l@cerqueira.org> [PATCH] v4l: 817: saa713x keymaps and key builders were moved from ir kbd i2c c

- SAA713x keymaps and key builders were moved from ir-kbd-i2c.c

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
c2f6f9d866d3ea25eebe32c6c51e47e5141669cf 09-Nov-2005 Ricardo Cerqueira <v4l@cerqueira.org> [PATCH] v4l: 812: supports the pinnacle pctv 110i board video inputs and remote

- Supports the Pinnacle PCTV 110i board, video inputs, and remote.

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
4ac97914c6c35f6bf132071c718e034d0846b9f5 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 800: whitespace cleanups

- Whitespace Cleanups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
4f9c05aa727a3b27e28972f2f3938b29ad81b833 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 791: codingstyle fixes

- CodingStyle fixes

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
e43f14af143921ac6680aa3ddfff111bef4e034a 09-Nov-2005 Markus Rechberger <mrechberger@gmail.com> [PATCH] v4l: 790: added support for terratec cinergy 250 usb

- Added support for Terratec Cinergy 250 USB

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
d5e5265315770bda46c50ecaa64e2b9790f2064c 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 784: several improvement on i2c ir handling for em2820

- Several Improvement on I2C IR handling for em2820:
- moved Pinnacle IR table (ir_codes_em2820) to em2820-input.c
- IR struct renamed and moved to a header file.
- New file to handle em2820-specific IR.
- Some cleanups.
- attach now detects I2C IR and calls em2820-specific IR code
- IR compat code moved to compat.h
- New header with struct IR_i2c there, to allow it to be
used by board-specific input handlers.

- Some improvements at em28xx board detection:
- Board detection message improved to show interface and class.
- Now it doesn't touch audio interfaces.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
da45a2a5b96afd7188c058a55eb2917d6524c0cf 09-Nov-2005 Markus Rechberger <mrechberger@gmail.com> [PATCH] v4l: 783: fixed bad em2820 remote layout values

- Fixed bad em2820 remote layout values
- set KNC One and Purple TV layouts back to default
- added pinnacle ir remote i2c address to the i2c scanner

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2f4710b1b1c62da3050c4eac08a5f08227e0e0f0 09-Nov-2005 Markus Rechberger <mrechberger@gmail.com> [PATCH] v4l: 782: ir-kbd-i2c.c updates

- fixed probe function
- em2820 remote layout
- disabled em2820 pinnacle ir support
- whitespace cleanups

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
c365864faf8c68db9d1a64d4356758da9f206ff1 09-Nov-2005 Markus Rechberger <mrechberger@gmail.com> [PATCH] v4l: 762: added support for the terratec cinergy 250 usb tv remote

- Added support for the terratec cinergy 250 usb tv remote

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
46a3a575bcc6a82b8538dd7a02fef634853ad31e 09-Nov-2005 Michael Krufky <mkrufky@m1k.net> [PATCH] v4l: 672: fix build for 2.6.14

- Fix build for 2.6.14

Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
b7df3910c1298fee8ed7b9dfd2da74b85df5539c 15-Sep-2005 Dmitry Torokhov <dtor_core@ameritech.net> [PATCH] drivers/media: convert to dynamic input_dev allocation

Input: convert drivers/media to dynamic input_dev allocation

This is required for input_dev sysfs integration

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
793cf9e6a54c698e109a599c8b8e303658fcaae6 09-Sep-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: common part Updates and tuner additions

- Remove $Id CVS logs for V4L files
- Included newer cards.
- Added a new NEC protocol for ir based on pulse distance.
- Enable ATSC support for DViCO FusionHDTV5 Gold.
- Added tuner LG NTSC (TALN mini series).
- Fixed tea5767 autodetection.
- Resolve more tuner types.
- Commented debug function removed from mainstream.
- Remove comments from mainstream. Still on development tree.
- linux/version dependencies removed.
- BTSC Lang1 now is set to auto_stereo mode.
- New tuner standby API.
- i2c-core.c uses hexadecimal for the i2c address, so it should stay consistent.

Signed-off-by: Uli Luckas <luckas@musoft.de>
Signed-off-by: Mac Michaels <wmichaels1@earthlink.net>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Hermann Pitton <hermann.pitton@onlinehome.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fae91e72b79ba9a21f0ce7551a1fd7e8984c85a6 15-Aug-2005 Jean Delvare <khali@linux-fr.org> [PATCH] I2C: Drop I2C_DEVNAME and i2c_clientname

I2C_DEVNAME and i2c_clientname were introduced in 2.5.68 [1] to help
media/video driver authors who wanted their code to be compatible with
both Linux 2.4 and 2.6. The cause of the incompatibility has gone since
[2], so I think we can get rid of them, as they tend to make the code
harder to read and longer to preprocess/compile for no more benefit.

I'd hope nobody seriously attempts to keep media/video driver compatible
across Linux trees anymore, BTW.

[1] http://marc.theaimsgroup.com/?l=linux-kernel&m=104930186524598&w=2
[2] http://www.linuxhq.com/kernel/v2.6/0-test3/include/linux/i2c.h

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1684a984303abbfc39aa8b59b0fe825c717811a9 11-Aug-2005 Jean Delvare <khali@linux-fr.org> [PATCH] I2C: Kill i2c_algorithm.id (6/7)

In theory, there should be no more users of I2C_ALGO_* at this point.
However, it happens that several drivers were using I2C_ALGO_* for
adapter ids, so we need to correct these before we can get rid of all
the I2C_ALGO_* definitions.

Note that this also fixes a bug in media/video/tvaudio.c:

/* don't attach on saa7146 based cards,
because dedicated drivers are used */
if ((adap->id & I2C_ALGO_SAA7146))
return 0;

This test was plain broken, as it would succeed for many more adapters
than just the saa7146: any those id would share at least one bit with
the saa7146 id. We are really lucky that the few other adapters we want
this driver to work with did not fulfill that condition.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
c7a46533ff7ef9e1c51bae6e54208527c5275b24 11-Aug-2005 Jean Delvare <khali@linux-fr.org> [PATCH] I2C: Kill i2c_algorithm.id (5/7)

Merge the algorithm id part (16 upper bits) of the i2c adapters ids
into the definition of the adapters ids directly. After that, we don't
need to OR both ids together for each i2c_adapter structure.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
de9c634270df3e27675a3c0e95545d2b3f754e3f 12-Jul-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: BTTV input

Changes to comply with CodingStyle: // comments converted to /* */

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!