History log of /drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
Revision Date Author Comments
7a707b89202f905bd9f9fbde326933c59a81214c 03-Jul-2011 Paul Gortmaker <paul.gortmaker@windriver.com> drivers/media: Add module.h to all files using it implicitly

A pending cleanup will mean that module.h won't be implicitly
everywhere anymore. Make sure the modular drivers in clocksource
are actually calling out for <module.h> explicitly in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.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>
4999e27a62eaf28e88bc69ab8cf11697e0dda261 17-Jan-2011 Andy Walls <awalls@md.metrocast.net> [media] pvrusb2: Provide more information about IR units to lirc_zilog and ir-kbd-i2c

When registering an IR Rx device with the I2C subsystem, provide more detailed
information about the IR device and default remote configuration for the IR
driver modules.

Also explicitly register any IR Tx device with the I2C subsystem.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
4b1c83cc51381c3d523452353204247398f5116c 25-Nov-2009 Mike Isely <isely@pobox.com> V4L/DVB (13498): pvrusb2: Bind I2C address 0x71 for Zilog IR devices

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
e81516c58ef84663ee05a43760a53a416d529de7 19-Jun-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (12343): Stop defining I2C adapter IDs nobody uses

There is no point in defining I2C adapter IDs when no code is using
them. As this field might go away in the future, stop using it when
we don't need to.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
7e1111859204ea76ddb8bb682d8b4097cada4385 13-May-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (11850): pvrusb2: Instantiate ir_video I2C device by default

Now that the ir-kbd-i2c driver has been converted to a new-style i2c
driver, we can instantiate the ir_video I2C device by default. The
pvr2_disable_ir_video is kept to disable the IR receiver, either
because the user doesn't use it, or for debugging purpose.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
96e56c1ac45ac2c1df4ab355057e5866b92f030f 02-May-2009 Mike Isely <isely@pobox.com> V4L/DVB (11746): pvrusb2: Set ir_video autoloading to default disabled

This sets the disable_autoload_ir_video module option to being set,
which disables any attempt by the driver to autoload IR support. This
changes preserves previous behavior, for now. This change can be set
back concurrent with other changes that finally update i2c-kbd-i2c to
use the new i2c binding model.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
cd85b7afe1b76e899c387a5d1fd727021aff4a51 02-May-2009 Mike Isely <isely@pobox.com> V4L/DVB (11745): pvrusb2: Update to work with upcoming ir_video changes in v4l-dvb core

The ir-kbd-i2c module is about to be updated to match the new style
i2c binding model. These pvrusb2 changes maintain compatibility with
that change. Note that this does not actually break anything even
without the expected ir-kbd-i2c changes yet because previously the
pvrusb2 didn't autoload ir-kbd-i2c anyway.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
27eab3840baaee469eb6377607520ca2128b66f7 06-Apr-2009 Mike Isely <isely@pobox.com> V4L/DVB (11744): pvrusb2: Select, track, and report IR scheme in use with the device

This change defines all possible "IR schemes" related to the pvrusb2
driver, on a per-device basis. That information is then set according
to the hardware in use. The idea here is to make possible a more
intelligent future decision on which, if any, IR receiver driver might
be loaded during initialization.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
6c4b75578043e986121a4cc1c26fd0194ca54b62 04-Apr-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (11437): pvrusb2: Drop client_register/unregister stubs

The client_register and client_unregister methods are optional so
there is no point in defining stub ones. Especially when these methods
are likely to be removed soon.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
5a3bab8eb02f9413b802540530ea390d8d063e43 08-Mar-2009 Mike Isely <isely@pobox.com> V4L/DVB (11204): pvrusb2: Remove old i2c layer; we use v4l2-subdev now

This change removes the old i2c module controlling layer from the
pvrusb2 driver. This is code that first had appeared in the driver
back in December 2005. It's history. Now we use v4l2-subdev. Please
note also that with this change, the driver will no longer be usable
in kernels older that 2.6.22.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15b474423f0642e6ff78f1963b816155e80fc932 07-Mar-2009 Mike Isely <isely@pobox.com> V4L/DVB (11161): pvrusb2: Set i2c autoprobing to be off by default

In order to keep a sub-device from promiscuously attaching to the
pvrusb2 driver, the i2c adapter's class must be cleared. This change
clears that class by default.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
e9c64a78dbd7c4f6c4a31c4040f340f732bf4ec5 07-Mar-2009 Mike Isely <isely@pobox.com> V4L/DVB (11158): pvrusb2: New device attribute mechanism to specify sub-devices

Set up new mechanism for declaring and loading appropriate sub-devices
when driver initializes. This is another part of the v4l2-subdev
adoption.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
59af33679592dd6e7bc7aa955098389724684a74 07-Mar-2009 Mike Isely <isely@pobox.com> V4L/DVB (11154): pvrusb2: Split i2c module handling from i2c adapter

This is the first step in the effort to move the pvrusb2 driver over
to using the v4l2-subdev framework. This commit involves mainly
splitting apart pvrusb2-i2c-core - part of it is the driver's I2C
adapter driver and the rest is the old i2c module handling logic. The
i2c module handling junk is moved out to pvrusb2-i2c-track and various
header references are correspondingly updated. Yes, this patch has a
huge pile of checkpatch complaints, but I'm NOT going to fix any of
it. Why? First, I'm moving a large chunk of existing code and I'm
not going to spend time adjusting it to match someone's idea of coding
style. Second, in the end I expect all that moved code to go away by
the time the rework is done so wasting time on it now to adhere to the
standard is in the end a large waste of time.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2cc3b6bff46129374ee31236f804637278c5f323 16-Jan-2009 Mike Isely <isely@pobox.com> V4L/DVB (10258): pvrusb2: Issue VIDIOC_INT_INIT to v4l2 modules when they first attach

It appears that various v4l-dvb drivers are changing to require
explicit initialization before use. This change to the pvrusb2 driver
implements an automatic issuance of VIDIOC_INT_INIT when a module is
bound to the driver, thus conforming to the new behavior.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
d45b9b8ab43c8973a9630ac54f4ede6c3e009f9e 04-Sep-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (8906): v4l-dvb: fix assorted sparse warnings

Fix sparse warnings. None are serious, but cutting down on these helps find
future serious sparse warnings/errors.

Redid the av7710.c patch based on a suggestion by Oliver Endriss.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2bb87c24d7d5639bff65b41b1306542d6d2bf7d0 04-Sep-2008 Mike Isely <isely@pobox.com> V4L/DVB (8902): pvrusb2: Remove comment lines which refer to checkpatch's behavior

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
0cc118671282044b2a87621e16d7722d5e60cd08 01-Sep-2008 Mike Isely <isely@pobox.com> V4L/DVB (8901): pvrusb2: Disable virtual IR device when not needed.

Disable "virtual" IR receiver on for 24xxx devices that have an
internal IR blaster. In that case there's another another IR
receiver present and to leave the virtual receiver available
just causes confusion. This means that 24xxx users will no
longer see a phantom IR chip.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
432907f750b27aa2b41e1bf398e6eb711ead448f 01-Sep-2008 Mike Isely <isely@pobox.com> V4L/DVB (8900): pvrusb2: Implement cropping pass through

This builds upon the previous pvrusb2 change to more formally
implement full cropping support. This enables access from the
driver's V4L interface, and enables access to full capabilities from
sysfs as well. Note that this is only effective when in analog mode.
It also will only work when the underlying digitizer's driver (saa7115
or cx25840 depending on the hardware) also implements the appropriate
functions.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
31335b13ca3925f361702ca4fc895ab165beddb9 26-Jul-2008 Mike Isely <isely@pobox.com> V4L/DVB (8474): pvrusb2: Enable IR chip on HVR-1900 class devices

The Zilog IR chip on HVR-1900 devices is held in reset when the device
initializes. We have to bring this chip out of reset before LIRC has
any chance of operating the chip. So do it.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
64723b301846636accbfb1539ebda0835f683a72 25-May-2008 Mike Isely <isely@pobox.com> V4L/DVB (7936): pvrusb2: Remove svn Id keyword from all sources

Signed-off-by: Mike Isely <isely@pobox.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>
056d1a899201f02777a35a32f8e6c9a2aac63f63 26-Nov-2007 Mike Isely <isely@pobox.com> V4L/DVB (6699): pvrusb2: Use of virtual IR chip is a device-specific attribute

For Hauppauge 24xxx devices, the IR receiver is a custom piece of
logic that is very specific to the device. The pvrusb2 driver can
virtualize this to make it look like a more normal IR receiver found
in other Hauppauge devices. The decision of whether or not to enable
this virtualization however is a device-specific attribute, thus this
changeset.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
989eb154eafad00c3b5039a3eca03e108dac1df8 26-Nov-2007 Mike Isely <isely@pobox.com> V4L/DVB (6692): pvrusb2: Centralize device specific attributes into a single place

The pvrusb2 driver currently supports two variants of the Hauppauge
PVR USB2. However there are other hardware types potentially
supportable, but the driver at the moment is not structured to make it
easy to describe these minor variations. This changeset is the first
set of changes to make such additional device support possible.
Device attributes are held in several tables all contained within
pvrusb2-devattr.c; all other device-specific driver behavior now
derives from these tables.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
681c739944018d80dbcf7f19997eba97676c7116 26-Nov-2007 Mike Isely <isely@pobox.com> V4L/DVB (6691): pvrusb2: Rework pipeline state control

This is a new implementation for video pipeline control within the
pvrusb2 driver. Actual start/stop of the pipeline is moved to the
driver's kernel thread. Pipeline stages are controlled autonomously
based on surrounding pipeline or application control state. Kernel
thread management is also cleaned up and moved into the internal
control structure of the driver, solving a set up / tear down race
along the way. Better failure recovery is implemented with this new
control strategy. Also with this change comes better control of the
cx23416 encoder, building on additional information learned about the
peculiarities of controlling this part (this information was the
original trigger for this rework). With this change, overall encoder
stability should be considerably improved. Yes, this is a large
change for this driver, but due to the nature of the feature being
worked on, the changes are fairly pervasive and would be difficult to
break into smaller pieces with any semblence of step-wise stability.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
3be27d37c257fa5f99363f9c8e06e405cbad712e 13-Oct-2007 David Brownell <david-b@pacbell.net> i2c: Remove NOP i2c_algorithm.algo_control() methods

This removes NOP implementations of i2c_algorithm.algo_control.

With this change, there are no implementations of this hook in
the kernel.org tree ... that hook seems about ripe to remove.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
e77e2c2f2989eefff7e1c0fff9cb72afaedf6796 10-Oct-2007 Trent Piepho <xyzzy@speakeasy.org> V4L/DVB (6315): pvrusb2: Change list_for_each+list_entry to list_for_each_entry

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Reviewed-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
7fb0dfc853735ccf4e580b0d71510bad96d37c4f 09-Sep-2007 Jean Delvare <khali@linux-fr.org> V4L/DVB (6212): pvrusb2: I2C adapter tweaks from Jean Delvare

* I2C adapters aren't expected to handle I2C_M_NOSTART unless they
really have to. As the pvrusb2 driver doesn't support it, I take it
that it doesn't need it so it shouldn't mention it at all.
* I2C_FUNC_SMBUS_EMUL includes I2C_FUNC_SMBUS_BYTE_DATA so listing
both is redundant.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
5c808e641741ecd7a7d5e65e38f740378d7406fc 29-Apr-2007 Mike Isely <isely@pobox.com> V4L/DVB (5575): Pvrusb2: Implement ability to disable IR receiver

Anyone using multiple PVR USB2 devices really only want one of them
acting as the actual IR receiver.

Implemented here is a new per-instance module option (ir_mode) which is
a flag to enable the IR receiver. The default is enabled.

IR reception is disabled by blocking access to the IR receiver chip in
the device.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
8d3643637e18e6590969436734c22151805d0350 22-Jan-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (5169): Pvrusb2: Use macro names for FX2 commands

This is a maintainability cleanup; use nice names for all the FX2
commands instead of raw bytes. This way we can easily find where we
issue FX commands.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
ca545f7c39476c6c4c6e639452180a2b38342669 20-Jan-2007 Mike Isely <isely@pobox.com> V4L/DVB (5091): Pvrusb2: Use kzalloc in place of kmalloc/memset pairs

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
eca8ebfc11d1935a7dd4c59cb8defb5bdff44ecd 20-Jan-2007 Ahmed S. Darwish <darwish.07@gmail.com> V4L/DVB (5090): Pvrusb2: A patch to use ARRAY_SIZE macro when appropriate

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
293b5d94ebf1e591a6672d0c34d4559e935cd2dc 20-Jan-2007 Mike Isely <isely@pobox.com> V4L/DVB (5087): Pvrusb2: Fix sizeof() calculation foul-up

This bug caused uninitalized data to be returned during a G_TUNER status poll.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
8433544ea9ebc4227bb5aaaf361b0a1879964f7d 20-Jan-2007 Mike Isely <isely@pobox.com> V4L/DVB (5085): Pvrusb2: trace print added

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18103c57b0168ebc0401702d483fe131f0aecc7a 20-Jan-2007 Mike Isely <isely@pobox.com> V4L/DVB (5081): Pvrusb2: VIDIOC_G_TUNER cleanup

Clean up use of VIDIOC_G_TUNER; we now correctly gather info from all
the I2C client modules. Also abide by V4L2_TUNER_CAP_LOW
appropriately.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
12a917f69d1468c91d646dbad8408dd0d39d6207 13-Feb-2007 Jean Delvare <khali@linux-fr.org> i2c: Declare more i2c_adapter parent devices

Declare the parent device of i2c_adapter devices each time we can
easily do so. It makes the i2c_adapter appear at the right place in
the device tree, rather than as a platform device.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Len Brown <len.brown@intel.com>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Cc: Jody McIntyre <scjody@modernduck.com>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: v4l-dvb-maintainer@linuxtv.org
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
cc75aede1b1ce29a478911ad7dadee94ecd45bbf 16-Oct-2006 Mike Isely <isely@pobox.com> V4L/DVB (4763): Pvrusb2: Implement IR reception for 24xxx devices

Unlike 29xxx devices, the 24xxx model series does not have a dedicated
I2C device for reception of IR codes. Instead IR is handled directly
by the FX2 microcontroller and the results are communicated via
commands to the FX2. Rather than implement a whole new IR reception
pathway for 24xxx devices, this changeset instead emulates the
presence of the 29xxx device's I2C based IR receiver by intercepting
commands to that chip and issuing appropriate FX2 commands to do the
needed action. This has the result of allowing all the usual IR
frameworks (ir-kbd-i2c or lirc) to continue working unmodified for
24xxx devices.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
7f19d0278c86c7f27df287fd0bd5170fe75dc7d2 02-Sep-2006 Mike Isely <isely@pobox.com> V4L/DVB (4595): Remove CONFIG_VIDEO_PVRUSB2_24XXX from pvrusb2 driver

Support for 24xxx devices was previously explicitly bracketed with
CONFIG_VIDEO_PVRUSB2_24XXX inside the code because we didn't trust the
stability of these changes. We trust it now; so there's no reason to
leave this out of the driver anymore.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
a0fd1cb171e8b17339a9a18ae7cf09c50022010f 30-Jun-2006 Mike Isely <isely@pobox.com> V4L/DVB (4288): Clean out a zillion sparse warnings in pvrusb2

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
07e337eeab3660559cbe1fee6907d1092037aea7 30-Jun-2006 Adrian Bunk <bunk@stusta.de> V4L/DVB (4287): Pvrusb2/: possible cleanups

This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 unused global functions

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
d855497edbfbf9e19a17f4a1154bca69cb4bd9ba 27-Jun-2006 Mike Isely <isely@isely.net> V4L/DVB (4228a): pvrusb2 to kernel 2.6.18

Implement V4L2 driver for the Hauppauge PVR USB2 TV tuner.

The Hauppauge PVR USB2 is a USB connected TV tuner with an embedded
cx23416 hardware MPEG2 encoder. There are two major variants of this
device; this driver handles both. Any V4L2 application which
understands MPEG2 video stream data should be able to work with this
device.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>