Skip to contentSkip to conversation

Remove v4l2-i2c-drv.h and most of i2c-id.h

PATCH Applied Hans Verkuil 5 participants 12 messages Sep 15, 2010 – Sep 26, 2010 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove v4l2-i2c-drv.h and most of i2c-id.h

Mauro, Jean, Janne,

This patch series finally retires the hackish v4l2-i2c-drv.h. It served honorably, but now that the hg repository no longer supports kernels <2.6.26 it is time to remove it.

Note that this patch series builds on the vtx-removal patch series.

Several patches at the end remove unused i2c-id.h includes and remove bogus uses of the I2C_HW_ defines (as found in i2c-id.h).

After applying this patch series I get the following if I grep for I2C_HW_ in the kernel sources:

<skip some false positives in drivers/gpu>

drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x)
drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c:              if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c:      if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR)
drivers/video/riva/rivafb-i2c.c:        chan->adapter.id                = I2C_HW_B_RIVA;
drivers/media/video/ir-kbd-i2c.c:       if (ir->c->adapter->id == I2C_HW_SAA7134 && ir->c->addr == 0x30)

drivers/media/video/ir-kbd-i2c.c: if (adap->id == I2C_HW_B_CX2388x) {
drivers/media/video/saa7134/saa7134-i2c.c: .id = I2C_HW_SAA7134,
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;

Jean, I guess the one in rivafb-i2c.c can just be removed, right?

Janne, the HDPVR checks in lirc no longer work since hdpvr never sets the adapter ID (nor should it). This lirc code should be checked. I haven't been following the IR changes, but there must be a better way of doing this.

The same is true for the CX2388x and SAA7134 checks. These all relate to the IR subsystem.

Once we fixed these remaining users of the i2c-id.h defines, then Jean can remove that header together with the adapter's 'id' field.

Regards,

Hans

The following changes since commit 991403c594f666a2ed46297c592c60c3b9f4e1e2:
Mauro Carvalho Chehab (1):
V4L/DVB: cx231xx: Avoid an OOPS when card is unknown (card=0)

are available in the git repository at:

ssh://linuxtv.org/git/hverkuil/v4l-dvb.git i2c

Hans Verkuil (49):
saa5246a/saa5249: Remove obsolete teletext drivers
videotext: remove this obsolete API
Documentation: update now that the vtx/videotext API has been removed. Merge branch 'vtx' into i2c

The patches above are the same as the vtx patch series posted before. This patch series requires that vtx is merged first as there is no point to convert i2c drivers that are going to be removed anyway!

vp27smpx: remove obsolete v4l2-i2c-drv.h header
wm8739: remove obsolete v4l2-i2c-drv.h header
cs5345: remove obsolete v4l2-i2c-drv.h header
saa717x: remove obsolete v4l2-i2c-drv.h header
saa7115: remove obsolete v4l2-i2c-drv.h header.
tda9840: remove obsolete v4l2-i2c-drv.h header
ov7670: remove obsolete v4l2-i2c-drv.h header
mt9v011: remove obsolete v4l2-i2c-drv.h header
upd64031a: remove obsolete v4l2-i2c-drv.h header
saa6588: remove obsolete v4l2-i2c-drv.h header
saa6752hs: remove obsolete v4l2-i2c-drv.h header
bt819: remove obsolete v4l2-i2c-drv.h header
indycam: remove obsolete v4l2-i2c-drv.h header
m52790: remove obsolete v4l2-i2c-drv.h header
saa7185: remove obsolete v4l2-i2c-drv.h header
msp3400: remove obsolete v4l2-i2c-drv.h header
bt866: remove obsolete v4l2-i2c-drv.h header
tea6415c: remove obsolete v4l2-i2c-drv.h header
tvaudio: remove obsolete v4l2-i2c-drv.h header
wm8775: remove obsolete v4l2-i2c-drv.h header
adv7175: remove obsolete v4l2-i2c-drv.h header
saa7191: remove obsolete v4l2-i2c-drv.h header
bt856: remove obsolete v4l2-i2c-drv.h header
tlv320aic23b: remove obsolete v4l2-i2c-drv.h header
tuner: remove obsolete v4l2-i2c-drv.h header
tda9875: remove obsolete v4l2-i2c-drv.h header
saa7110: remove obsolete v4l2-i2c-drv.h header
tda7432: remove obsolete v4l2-i2c-drv.h header
tea6420: remove obsolete v4l2-i2c-drv.h header
cs53l32a: remove obsolete v4l2-i2c-drv.h header
vpx3220: remove obsolete v4l2-i2c-drv.h header
tvp5150: remove obsolete v4l2-i2c-drv.h header
upd64083: remove obsolete v4l2-i2c-drv.h header
saa7127: remove obsolete v4l2-i2c-drv.h header
cx25840: remove obsolete v4l2-i2c-drv.h header
adv7170: remove obsolete v4l2-i2c-drv.h header
ks0127: remove obsolete v4l2_i2c_drv.h header
au8522_decoder: remove obsolete v4l2-i2c-drv.h header
s2250: remove obsolete v4l2-i2c-drv.h header
v4l: remove unused i2c-id.h headers
tvaudio: remove obsolete tda8425 initialization saa7146/tuner: remove mxb hack
ir-kbd-i2c: remove obsolete I2C_HW_B_CX2341X test
tm6000: removed unused i2c adapter ID
v4l: remove obsolete include/media/v4l2-i2c-drv.h file

 Documentation/DocBook/v4l/compat.xml         |   24 +-
 Documentation/DocBook/v4l/dev-teletext.xml   |   29 +-
 Documentation/DocBook/v4l/v4l2.xml           |   10 +-
 Documentation/feature-removal-schedule.txt   |   23 -
 Documentation/ioctl/ioctl-number.txt         |    1 -
 Documentation/video4linux/bttv/MAKEDEV       |    1 -
 Documentation/video4linux/v4l2-framework.txt |    5 +-
 drivers/media/common/saa7146_i2c.c           |    1 -
 drivers/media/dvb/frontends/au8522_decoder.c |   27 +-
 drivers/media/radio/tef6862.c                |    1 -
 drivers/media/video/Kconfig                  |   20 -
 drivers/media/video/Makefile                 |    2 -
 drivers/media/video/adv7170.c                |   28 +-
 drivers/media/video/adv7175.c                |   28 +-
 drivers/media/video/adv7180.c                |    1 -
 drivers/media/video/bt819.c                  |   28 +-
 drivers/media/video/bt856.c                  |   28 +-
 drivers/media/video/bt866.c                  |   28 +-
 drivers/media/video/cs5345.c                 |   27 +-
 drivers/media/video/cs53l32a.c               |   27 +-
 drivers/media/video/cx18/cx18-ioctl.c        |    1 -
 drivers/media/video/cx25840/cx25840-core.c   |   27 +-
 drivers/media/video/indycam.c                |   27 +-
 drivers/media/video/ir-kbd-i2c.c             |    6 +-
 drivers/media/video/ivtv/ivtv-ioctl.c        |    1 -
 drivers/media/video/ks0127.c                 |   27 +-
 drivers/media/video/m52790.c                 |   28 +-
 drivers/media/video/msp3400-driver.c         |   31 +-
 drivers/media/video/mt9v011.c                |   29 +-
 drivers/media/video/mxb.c                    |    5 -
 drivers/media/video/ov7670.c                 |   27 +-
 drivers/media/video/saa5246a.c               | 1123 --------------------------
 drivers/media/video/saa5249.c                |  650 ---------------
 drivers/media/video/saa6588.c                |   27 +-
 drivers/media/video/saa7110.c                |   27 +-
 drivers/media/video/saa7115.c                |   33 +-
 drivers/media/video/saa7127.c                |   27 +-
 drivers/media/video/saa7134/saa6752hs.c      |   27 +-
 drivers/media/video/saa717x.c                |   27 +-
 drivers/media/video/saa7185.c                |   28 +-
 drivers/media/video/saa7191.c                |   27 +-
 drivers/media/video/tda7432.c                |   27 +-
 drivers/media/video/tda9840.c                |   27 +-
 drivers/media/video/tda9875.c                |   27 +-
 drivers/media/video/tea6415c.c               |   27 +-
 drivers/media/video/tea6420.c                |   27 +-
 drivers/media/video/tlv320aic23b.c           |   28 +-
 drivers/media/video/tuner-core.c             |   39 +-
 drivers/media/video/tvaudio.c                |   40 +-
 drivers/media/video/tvp5150.c                |   27 +-
 drivers/media/video/upd64031a.c              |   27 +-
 drivers/media/video/upd64083.c               |   27 +-
 drivers/media/video/v4l2-dev.c               |   11 +-
 drivers/media/video/vp27smpx.c               |   28 +-
 drivers/media/video/vpx3220.c                |   27 +-
 drivers/media/video/wm8739.c                 |   27 +-
 drivers/media/video/wm8775.c                 |   28 +-
 drivers/staging/go7007/s2250-board.c         |   27 +-
 drivers/staging/tm6000/tm6000-i2c.c          |    3 -
 include/linux/Kbuild                         |    1 -
 include/linux/videotext.h                    |  125 ---
 include/media/v4l2-dev.h                     |    3 +-
 include/media/v4l2-i2c-drv.h                 |   80 --
 63 files changed, 872 insertions(+), 2355 deletions(-)
 delete mode 100644 drivers/media/video/saa5246a.c
 delete mode 100644 drivers/media/video/saa5249.c
 delete mode 100644 include/linux/videotext.h
 delete mode 100644 include/media/v4l2-i2c-drv.h
Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG, part of Cisco
#1 lore raw
Quoted 28 lines · Hans Verkuil

Mauro, Jean, Janne,

This patch series finally retires the hackish v4l2-i2c-drv.h. It served honorably, but now that the hg repository no longer supports kernels <2.6.26 it is time to remove it.

Note that this patch series builds on the vtx-removal patch series.

Several patches at the end remove unused i2c-id.h includes and remove bogus uses of the I2C_HW_ defines (as found in i2c-id.h).

After applying this patch series I get the following if I grep for I2C_HW_ in the kernel sources:

<skip some false positives in drivers/gpu>

drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x)
drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c:              if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c:      if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR)
drivers/video/riva/rivafb-i2c.c:        chan->adapter.id                = I2C_HW_B_RIVA;
drivers/media/video/ir-kbd-i2c.c:       if (ir->c->adapter->id == I2C_HW_SAA7134 && ir->c->addr == 0x30)

drivers/media/video/ir-kbd-i2c.c: if (adap->id == I2C_HW_B_CX2388x) {
drivers/media/video/saa7134/saa7134-i2c.c: .id = I2C_HW_SAA7134,
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;

Quoted 5 lines

Jean, I guess the one in rivafb-i2c.c can just be removed, right?

Janne, the HDPVR checks in lirc no longer work since hdpvr never sets the adapter ID (nor should it). This lirc code should be checked. I haven't been following the IR changes, but there must be a better way of doing this.

The staging/lirc drivers will only be merged after porting them to ir/rc-core. CC-ed Jarod who will work on lirc_zilog.

Quoted 146 lines

The same is true for the CX2388x and SAA7134 checks. These all relate to the IR subsystem.

Once we fixed these remaining users of the i2c-id.h defines, then Jean can remove that header together with the adapter's 'id' field.

Regards,

Hans

The following changes since commit 991403c594f666a2ed46297c592c60c3b9f4e1e2:
Mauro Carvalho Chehab (1):
V4L/DVB: cx231xx: Avoid an OOPS when card is unknown (card=0)

are available in the git repository at:

ssh://linuxtv.org/git/hverkuil/v4l-dvb.git i2c

Hans Verkuil (49):
saa5246a/saa5249: Remove obsolete teletext drivers
videotext: remove this obsolete API
Documentation: update now that the vtx/videotext API has been removed. Merge branch 'vtx' into i2c

The patches above are the same as the vtx patch series posted before. This patch series requires that vtx is merged first as there is no point to convert i2c drivers that are going to be removed anyway!

vp27smpx: remove obsolete v4l2-i2c-drv.h header
wm8739: remove obsolete v4l2-i2c-drv.h header
cs5345: remove obsolete v4l2-i2c-drv.h header
saa717x: remove obsolete v4l2-i2c-drv.h header
saa7115: remove obsolete v4l2-i2c-drv.h header.
tda9840: remove obsolete v4l2-i2c-drv.h header
ov7670: remove obsolete v4l2-i2c-drv.h header
mt9v011: remove obsolete v4l2-i2c-drv.h header
upd64031a: remove obsolete v4l2-i2c-drv.h header
saa6588: remove obsolete v4l2-i2c-drv.h header
saa6752hs: remove obsolete v4l2-i2c-drv.h header
bt819: remove obsolete v4l2-i2c-drv.h header
indycam: remove obsolete v4l2-i2c-drv.h header
m52790: remove obsolete v4l2-i2c-drv.h header
saa7185: remove obsolete v4l2-i2c-drv.h header
msp3400: remove obsolete v4l2-i2c-drv.h header
bt866: remove obsolete v4l2-i2c-drv.h header
tea6415c: remove obsolete v4l2-i2c-drv.h header
tvaudio: remove obsolete v4l2-i2c-drv.h header
wm8775: remove obsolete v4l2-i2c-drv.h header
adv7175: remove obsolete v4l2-i2c-drv.h header
saa7191: remove obsolete v4l2-i2c-drv.h header
bt856: remove obsolete v4l2-i2c-drv.h header
tlv320aic23b: remove obsolete v4l2-i2c-drv.h header
tuner: remove obsolete v4l2-i2c-drv.h header
tda9875: remove obsolete v4l2-i2c-drv.h header
saa7110: remove obsolete v4l2-i2c-drv.h header
tda7432: remove obsolete v4l2-i2c-drv.h header
tea6420: remove obsolete v4l2-i2c-drv.h header
cs53l32a: remove obsolete v4l2-i2c-drv.h header
vpx3220: remove obsolete v4l2-i2c-drv.h header
tvp5150: remove obsolete v4l2-i2c-drv.h header
upd64083: remove obsolete v4l2-i2c-drv.h header
saa7127: remove obsolete v4l2-i2c-drv.h header
cx25840: remove obsolete v4l2-i2c-drv.h header
adv7170: remove obsolete v4l2-i2c-drv.h header
ks0127: remove obsolete v4l2_i2c_drv.h header
au8522_decoder: remove obsolete v4l2-i2c-drv.h header
s2250: remove obsolete v4l2-i2c-drv.h header
v4l: remove unused i2c-id.h headers
tvaudio: remove obsolete tda8425 initialization saa7146/tuner: remove mxb hack
ir-kbd-i2c: remove obsolete I2C_HW_B_CX2341X test
tm6000: removed unused i2c adapter ID
v4l: remove obsolete include/media/v4l2-i2c-drv.h file

 Documentation/DocBook/v4l/compat.xml         |   24 +-
 Documentation/DocBook/v4l/dev-teletext.xml   |   29 +-
 Documentation/DocBook/v4l/v4l2.xml           |   10 +-
 Documentation/feature-removal-schedule.txt   |   23 -
 Documentation/ioctl/ioctl-number.txt         |    1 -
 Documentation/video4linux/bttv/MAKEDEV       |    1 -
 Documentation/video4linux/v4l2-framework.txt |    5 +-
 drivers/media/common/saa7146_i2c.c           |    1 -
 drivers/media/dvb/frontends/au8522_decoder.c |   27 +-
 drivers/media/radio/tef6862.c                |    1 -
 drivers/media/video/Kconfig                  |   20 -
 drivers/media/video/Makefile                 |    2 -
 drivers/media/video/adv7170.c                |   28 +-
 drivers/media/video/adv7175.c                |   28 +-
 drivers/media/video/adv7180.c                |    1 -
 drivers/media/video/bt819.c                  |   28 +-
 drivers/media/video/bt856.c                  |   28 +-
 drivers/media/video/bt866.c                  |   28 +-
 drivers/media/video/cs5345.c                 |   27 +-
 drivers/media/video/cs53l32a.c               |   27 +-
 drivers/media/video/cx18/cx18-ioctl.c        |    1 -
 drivers/media/video/cx25840/cx25840-core.c   |   27 +-
 drivers/media/video/indycam.c                |   27 +-
 drivers/media/video/ir-kbd-i2c.c             |    6 +-
 drivers/media/video/ivtv/ivtv-ioctl.c        |    1 -
 drivers/media/video/ks0127.c                 |   27 +-
 drivers/media/video/m52790.c                 |   28 +-
 drivers/media/video/msp3400-driver.c         |   31 +-
 drivers/media/video/mt9v011.c                |   29 +-
 drivers/media/video/mxb.c                    |    5 -
 drivers/media/video/ov7670.c                 |   27 +-
 drivers/media/video/saa5246a.c               | 1123 --------------------------
 drivers/media/video/saa5249.c                |  650 ---------------
 drivers/media/video/saa6588.c                |   27 +-
 drivers/media/video/saa7110.c                |   27 +-
 drivers/media/video/saa7115.c                |   33 +-
 drivers/media/video/saa7127.c                |   27 +-
 drivers/media/video/saa7134/saa6752hs.c      |   27 +-
 drivers/media/video/saa717x.c                |   27 +-
 drivers/media/video/saa7185.c                |   28 +-
 drivers/media/video/saa7191.c                |   27 +-
 drivers/media/video/tda7432.c                |   27 +-
 drivers/media/video/tda9840.c                |   27 +-
 drivers/media/video/tda9875.c                |   27 +-
 drivers/media/video/tea6415c.c               |   27 +-
 drivers/media/video/tea6420.c                |   27 +-
 drivers/media/video/tlv320aic23b.c           |   28 +-
 drivers/media/video/tuner-core.c             |   39 +-
 drivers/media/video/tvaudio.c                |   40 +-
 drivers/media/video/tvp5150.c                |   27 +-
 drivers/media/video/upd64031a.c              |   27 +-
 drivers/media/video/upd64083.c               |   27 +-
 drivers/media/video/v4l2-dev.c               |   11 +-
 drivers/media/video/vp27smpx.c               |   28 +-
 drivers/media/video/vpx3220.c                |   27 +-
 drivers/media/video/wm8739.c                 |   27 +-
 drivers/media/video/wm8775.c                 |   28 +-
 drivers/staging/go7007/s2250-board.c         |   27 +-
 drivers/staging/tm6000/tm6000-i2c.c          |    3 -
 include/linux/Kbuild                         |    1 -
 include/linux/videotext.h                    |  125 ---
 include/media/v4l2-dev.h                     |    3 +-
 include/media/v4l2-i2c-drv.h                 |   80 --
 63 files changed, 872 insertions(+), 2355 deletions(-)
 delete mode 100644 drivers/media/video/saa5246a.c
 delete mode 100644 drivers/media/video/saa5249.c
 delete mode 100644 include/linux/videotext.h
 delete mode 100644 include/media/v4l2-i2c-drv.h
Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG, part of Cisco
#2 lore raw
In reply to Hans Verkuil

Hi Hans,

Quoted 23 lines · Hans Verkuil

Mauro, Jean, Janne,

This patch series finally retires the hackish v4l2-i2c-drv.h. It served honorably, but now that the hg repository no longer supports kernels <2.6.26 it is time to remove it.

Note that this patch series builds on the vtx-removal patch series.

Several patches at the end remove unused i2c-id.h includes and remove bogus uses of the I2C_HW_ defines (as found in i2c-id.h).

After applying this patch series I get the following if I grep for I2C_HW_ in the kernel sources:

<skip some false positives in drivers/gpu>

drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x)
drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c:              if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c:      if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR)
drivers/video/riva/rivafb-i2c.c:        chan->adapter.id                = I2C_HW_B_RIVA;
drivers/media/video/ir-kbd-i2c.c:       if (ir->c->adapter->id == I2C_HW_SAA7134 && ir->c->addr == 0x30)
Quoted 6 lines

drivers/media/video/ir-kbd-i2c.c: if (adap->id == I2C_HW_B_CX2388x) {
drivers/media/video/saa7134/saa7134-i2c.c: .id = I2C_HW_SAA7134,
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;

Jean, I guess the one in rivafb-i2c.c can just be removed, right?

Correct. The last user for that one was the tvaudio driver and apparently you just cleaned it up.

Quoted 9 lines

Janne, the HDPVR checks in lirc no longer work since hdpvr never sets the adapter ID (nor should it). This lirc code should be checked. I haven't been following the IR changes, but there must be a better way of doing this.

The same is true for the CX2388x and SAA7134 checks. These all relate to the IR subsystem.

Once we fixed these remaining users of the i2c-id.h defines, then Jean can remove that header together with the adapter's 'id' field.

That would be very great. In all honesty I didn't expect it to happen so fast, but if that happens, I'll be very happy! :) Thanks!

Signature · 1 line
Jean Delvare
#3 lore raw
In reply to Hans Verkuil

Em 15-09-2010 17:00, Hans Verkuil escreveu:

Quoted 52 lines

Mauro, Jean, Janne,

This patch series finally retires the hackish v4l2-i2c-drv.h. It served honorably, but now that the hg repository no longer supports kernels <2.6.26 it is time to remove it.

Note that this patch series builds on the vtx-removal patch series.

Several patches at the end remove unused i2c-id.h includes and remove bogus uses of the I2C_HW_ defines (as found in i2c-id.h).

After applying this patch series I get the following if I grep for I2C_HW_ in the kernel sources:

<skip some false positives in drivers/gpu>

drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x)
drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c:              if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c:      if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR)
drivers/video/riva/rivafb-i2c.c:        chan->adapter.id                = I2C_HW_B_RIVA;
drivers/media/video/ir-kbd-i2c.c:       if (ir->c->adapter->id == I2C_HW_SAA7134 && ir->c->addr == 0x30)

drivers/media/video/ir-kbd-i2c.c: if (adap->id == I2C_HW_B_CX2388x) {
drivers/media/video/saa7134/saa7134-i2c.c: .id = I2C_HW_SAA7134,
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;

Jean, I guess the one in rivafb-i2c.c can just be removed, right?

Janne, the HDPVR checks in lirc no longer work since hdpvr never sets the adapter ID (nor should it). This lirc code should be checked. I haven't been following the IR changes, but there must be a better way of doing this.

The same is true for the CX2388x and SAA7134 checks. These all relate to the IR subsystem.

Once we fixed these remaining users of the i2c-id.h defines, then Jean can remove that header together with the adapter's 'id' field.

Regards,

Hans

The following changes since commit 991403c594f666a2ed46297c592c60c3b9f4e1e2:
Mauro Carvalho Chehab (1):
V4L/DVB: cx231xx: Avoid an OOPS when card is unknown (card=0)

are available in the git repository at:

ssh://linuxtv.org/git/hverkuil/v4l-dvb.git i2c

...

Quoted 1 line

tvaudio: remove obsolete tda8425 initialization

...

This patch is incomplete. It removes the initialization, but it forgets to remove other references. This is what grep says about tda8425:

drivers/media/video/Kconfig: tea6320, tea6420, tda8425, ta8874z.
drivers/media/video/tda7432.c: * Which was based on tda8425.c by Greg Alexander (c) 1998 drivers/media/video/tda9875.c: * Which was based on tda8425.c by Greg Alexander (c) 1998
drivers/media/video/tvaudio.c:/* audio chip descriptions - defines+functions for tda8425 */

drivers/media/video/tvaudio.c:#define TDA8425_VL         0x00  /* volume left */
drivers/media/video/tvaudio.c:#define TDA8425_VR         0x01  /* volume right */
drivers/media/video/tvaudio.c:#define TDA8425_BA         0x02  /* bass */
drivers/media/video/tvaudio.c:#define TDA8425_TR         0x03  /* treble */
drivers/media/video/tvaudio.c:#define TDA8425_S1         0x08  /* switch functions */
drivers/media/video/tvaudio.c:#define TDA8425_S1_OFF     0xEE  /* audio off (mute on) */
drivers/media/video/tvaudio.c:#define TDA8425_S1_CH1     0xCE  /* audio channel 1 (mute off) - "linear stereo" mode */
drivers/media/video/tvaudio.c:#define TDA8425_S1_CH2     0xCF  /* audio channel 2 (mute off) - "linear stereo" mode */
drivers/media/video/tvaudio.c:#define TDA8425_S1_MU      0x20  /* mute bit */
drivers/media/video/tvaudio.c:#define TDA8425_S1_STEREO  0x18  /* stereo bits */
drivers/media/video/tvaudio.c:#define TDA8425_S1_STEREO_SPATIAL 0x18 /* spatial stereo */
drivers/media/video/tvaudio.c:#define TDA8425_S1_STEREO_LINEAR  0x08 /* linear stereo */
drivers/media/video/tvaudio.c:#define TDA8425_S1_STEREO_PSEUDO  0x10 /* pseudo stereo */
drivers/media/video/tvaudio.c:#define TDA8425_S1_STEREO_MONO    0x00 /* forced mono */
drivers/media/video/tvaudio.c:#define TDA8425_S1_ML      0x06        /* language selector */
drivers/media/video/tvaudio.c:#define TDA8425_S1_ML_SOUND_A 0x02     /* sound a */
drivers/media/video/tvaudio.c:#define TDA8425_S1_ML_SOUND_B 0x04     /* sound b */
drivers/media/video/tvaudio.c:#define TDA8425_S1_ML_STEREO  0x06     /* stereo */
drivers/media/video/tvaudio.c:#define TDA8425_S1_IS      0x01        /* channel selector */

drivers/media/video/tvaudio.c:static int tda8425_shift10(int val) { return (val >> 10) | 0xc0; } drivers/media/video/tvaudio.c:static int tda8425_shift12(int val) { return (val >> 12) | 0xf0; } drivers/media/video/tvaudio.c:static int tda8425_initialize(struct CHIPSTATE *chip)
drivers/media/video/tvaudio.c: int inputmap[4] = { /* tuner */ TDA8425_S1_CH2, /* radio */ TDA8425_S1_CH1,
drivers/media/video/tvaudio.c: /* extern */ TDA8425_S1_CH1, /* intern */ TDA8425_S1_OFF};
drivers/media/video/tvaudio.c:static void tda8425_setmode(struct CHIPSTATE *chip, int mode)
drivers/media/video/tvaudio.c: int s1 = chip->shadow.bytes[TDA8425_S1+1] & 0xe1;

drivers/media/video/tvaudio.c:		s1 |= TDA8425_S1_ML_SOUND_A;
drivers/media/video/tvaudio.c:		s1 |= TDA8425_S1_STEREO_PSEUDO;
drivers/media/video/tvaudio.c:		s1 |= TDA8425_S1_ML_SOUND_B;
drivers/media/video/tvaudio.c:		s1 |= TDA8425_S1_STEREO_PSEUDO;
drivers/media/video/tvaudio.c:		s1 |= TDA8425_S1_ML_STEREO;

drivers/media/video/tvaudio.c: s1 |= TDA8425_S1_STEREO_MONO;
drivers/media/video/tvaudio.c: s1 |= TDA8425_S1_STEREO_SPATIAL;
drivers/media/video/tvaudio.c: chip_write(chip,TDA8425_S1,s1);
drivers/media/video/tvaudio.c:static int tda8425 = 1; drivers/media/video/tvaudio.c:module_param(tda8425, int, 0444);

drivers/media/video/tvaudio.c:		.name       = "tda8425",
drivers/media/video/tvaudio.c:		.insmodopt  = &tda8425,
drivers/media/video/tvaudio.c:		.addr_lo    = I2C_ADDR_TDA8425 >> 1,
drivers/media/video/tvaudio.c:		.addr_hi    = I2C_ADDR_TDA8425 >> 1,
drivers/media/video/tvaudio.c:		.leftreg    = TDA8425_VL,
drivers/media/video/tvaudio.c:		.rightreg   = TDA8425_VR,
drivers/media/video/tvaudio.c:		.bassreg    = TDA8425_BA,
drivers/media/video/tvaudio.c:		.treblereg  = TDA8425_TR,

drivers/media/video/tvaudio.c: .initialize = tda8425_initialize,
drivers/media/video/tvaudio.c: .volfunc = tda8425_shift10,
drivers/media/video/tvaudio.c: .bassfunc = tda8425_shift12,
drivers/media/video/tvaudio.c: .treblefunc = tda8425_shift12,

drivers/media/video/tvaudio.c:		.setmode    = tda8425_setmode,
drivers/media/video/tvaudio.c:		.inputreg   = TDA8425_S1,
drivers/media/video/tvaudio.c:		.inputmap   = { TDA8425_S1_CH1, TDA8425_S1_CH1, TDA8425_S1_CH1 },
drivers/media/video/tvaudio.c:		.inputmute  = TDA8425_S1_OFF,

I didn't actually saw what you left behind on tvaudio (as it might eventually be used by some other part of the code), but keeping it mentioned in Kconfig is not ok ;)

The rest of the series seem ok.

Applied, thanks!

Cheers,
Mauro

#4 lore raw
Quoted 51 lines · On Thursday, September 23, 2010 00:15:17 Mauro Carvalho Chehab wrote:

Em 15-09-2010 17:00, Hans Verkuil escreveu:

Quoted 50 lines

Mauro, Jean, Janne,

This patch series finally retires the hackish v4l2-i2c-drv.h. It served honorably, but now that the hg repository no longer supports kernels <2.6.26 it is time to remove it.

Note that this patch series builds on the vtx-removal patch series.

Several patches at the end remove unused i2c-id.h includes and remove bogus uses of the I2C_HW_ defines (as found in i2c-id.h).

After applying this patch series I get the following if I grep for I2C_HW_ in the kernel sources:

<skip some false positives in drivers/gpu>

drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x)
drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c:              if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c:      if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR)
drivers/video/riva/rivafb-i2c.c:        chan->adapter.id                = I2C_HW_B_RIVA;
drivers/media/video/ir-kbd-i2c.c:       if (ir->c->adapter->id == I2C_HW_SAA7134 && ir->c->addr == 0x30)

drivers/media/video/ir-kbd-i2c.c: if (adap->id == I2C_HW_B_CX2388x) {
drivers/media/video/saa7134/saa7134-i2c.c: .id = I2C_HW_SAA7134,
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;

Jean, I guess the one in rivafb-i2c.c can just be removed, right?

Janne, the HDPVR checks in lirc no longer work since hdpvr never sets the adapter ID (nor should it). This lirc code should be checked. I haven't been following the IR changes, but there must be a better way of doing this.

The same is true for the CX2388x and SAA7134 checks. These all relate to the IR subsystem.

Once we fixed these remaining users of the i2c-id.h defines, then Jean can remove that header together with the adapter's 'id' field.

Regards,

Hans

The following changes since commit 991403c594f666a2ed46297c592c60c3b9f4e1e2:
Mauro Carvalho Chehab (1):
V4L/DVB: cx231xx: Avoid an OOPS when card is unknown (card=0)

are available in the git repository at:

Quoted 8 lines
Quoted 2 lines

ssh://linuxtv.org/git/hverkuil/v4l-dvb.git i2c

...

Quoted 1 line

tvaudio: remove obsolete tda8425 initialization

...

This patch is incomplete. It removes the initialization, but it forgets to remove other references. This is what grep says about tda8425:

Huh? It's just the initialization function that is bogus. I'm not removing the tda8425 from tvaudio. If you look at that function you'll see that it has some special code when used with an out-of-tree riva TV driver that hasn't been maintained since 6 years and no longer works with tvaudio after all the i2c core probing changes. So it's just dead code now.

Regards,

Hans

Quoted 72 lines

drivers/media/video/Kconfig: tea6320, tea6420, tda8425, ta8874z.
drivers/media/video/tda7432.c: * Which was based on tda8425.c by Greg Alexander (c) 1998 drivers/media/video/tda9875.c: * Which was based on tda8425.c by Greg Alexander (c) 1998
drivers/media/video/tvaudio.c:/* audio chip descriptions - defines+functions for tda8425 */

drivers/media/video/tvaudio.c:#define TDA8425_VL         0x00  /* volume left */
drivers/media/video/tvaudio.c:#define TDA8425_VR         0x01  /* volume right */
drivers/media/video/tvaudio.c:#define TDA8425_BA         0x02  /* bass */
drivers/media/video/tvaudio.c:#define TDA8425_TR         0x03  /* treble */
drivers/media/video/tvaudio.c:#define TDA8425_S1         0x08  /* switch functions */
drivers/media/video/tvaudio.c:#define TDA8425_S1_OFF     0xEE  /* audio off (mute on) */
drivers/media/video/tvaudio.c:#define TDA8425_S1_CH1     0xCE  /* audio channel 1 (mute off) - "linear stereo" mode */
drivers/media/video/tvaudio.c:#define TDA8425_S1_CH2     0xCF  /* audio channel 2 (mute off) - "linear stereo" mode */
drivers/media/video/tvaudio.c:#define TDA8425_S1_MU      0x20  /* mute bit */
drivers/media/video/tvaudio.c:#define TDA8425_S1_STEREO  0x18  /* stereo bits */
drivers/media/video/tvaudio.c:#define TDA8425_S1_STEREO_SPATIAL 0x18 /* spatial stereo */
drivers/media/video/tvaudio.c:#define TDA8425_S1_STEREO_LINEAR  0x08 /* linear stereo */
drivers/media/video/tvaudio.c:#define TDA8425_S1_STEREO_PSEUDO  0x10 /* pseudo stereo */
drivers/media/video/tvaudio.c:#define TDA8425_S1_STEREO_MONO    0x00 /* forced mono */
drivers/media/video/tvaudio.c:#define TDA8425_S1_ML      0x06        /* language selector */
drivers/media/video/tvaudio.c:#define TDA8425_S1_ML_SOUND_A 0x02     /* sound a */
drivers/media/video/tvaudio.c:#define TDA8425_S1_ML_SOUND_B 0x04     /* sound b */
drivers/media/video/tvaudio.c:#define TDA8425_S1_ML_STEREO  0x06     /* stereo */
drivers/media/video/tvaudio.c:#define TDA8425_S1_IS      0x01        /* channel selector */

drivers/media/video/tvaudio.c:static int tda8425_shift10(int val) { return (val >> 10) | 0xc0; } drivers/media/video/tvaudio.c:static int tda8425_shift12(int val) { return (val >> 12) | 0xf0; } drivers/media/video/tvaudio.c:static int tda8425_initialize(struct CHIPSTATE *chip)
drivers/media/video/tvaudio.c: int inputmap[4] = { /* tuner */ TDA8425_S1_CH2, /* radio */ TDA8425_S1_CH1,
drivers/media/video/tvaudio.c: /* extern */ TDA8425_S1_CH1, /* intern */ TDA8425_S1_OFF};
drivers/media/video/tvaudio.c:static void tda8425_setmode(struct CHIPSTATE *chip, int mode)
drivers/media/video/tvaudio.c: int s1 = chip->shadow.bytes[TDA8425_S1+1] & 0xe1;

drivers/media/video/tvaudio.c:		s1 |= TDA8425_S1_ML_SOUND_A;
drivers/media/video/tvaudio.c:		s1 |= TDA8425_S1_STEREO_PSEUDO;
drivers/media/video/tvaudio.c:		s1 |= TDA8425_S1_ML_SOUND_B;
drivers/media/video/tvaudio.c:		s1 |= TDA8425_S1_STEREO_PSEUDO;
drivers/media/video/tvaudio.c:		s1 |= TDA8425_S1_ML_STEREO;

drivers/media/video/tvaudio.c: s1 |= TDA8425_S1_STEREO_MONO;
drivers/media/video/tvaudio.c: s1 |= TDA8425_S1_STEREO_SPATIAL;
drivers/media/video/tvaudio.c: chip_write(chip,TDA8425_S1,s1);
drivers/media/video/tvaudio.c:static int tda8425 = 1; drivers/media/video/tvaudio.c:module_param(tda8425, int, 0444);

drivers/media/video/tvaudio.c:		.name       = "tda8425",
drivers/media/video/tvaudio.c:		.insmodopt  = &tda8425,
drivers/media/video/tvaudio.c:		.addr_lo    = I2C_ADDR_TDA8425 >> 1,
drivers/media/video/tvaudio.c:		.addr_hi    = I2C_ADDR_TDA8425 >> 1,
drivers/media/video/tvaudio.c:		.leftreg    = TDA8425_VL,
drivers/media/video/tvaudio.c:		.rightreg   = TDA8425_VR,
drivers/media/video/tvaudio.c:		.bassreg    = TDA8425_BA,
drivers/media/video/tvaudio.c:		.treblereg  = TDA8425_TR,

drivers/media/video/tvaudio.c: .initialize = tda8425_initialize,
drivers/media/video/tvaudio.c: .volfunc = tda8425_shift10,
drivers/media/video/tvaudio.c: .bassfunc = tda8425_shift12,
drivers/media/video/tvaudio.c: .treblefunc = tda8425_shift12,

drivers/media/video/tvaudio.c:		.setmode    = tda8425_setmode,
drivers/media/video/tvaudio.c:		.inputreg   = TDA8425_S1,
drivers/media/video/tvaudio.c:		.inputmap   = { TDA8425_S1_CH1, TDA8425_S1_CH1, TDA8425_S1_CH1 },
drivers/media/video/tvaudio.c:		.inputmute  = TDA8425_S1_OFF,

I didn't actually saw what you left behind on tvaudio (as it might eventually be used by some other part of the code), but keeping it mentioned in Kconfig is not ok ;)

The rest of the series seem ok.

Applied, thanks!

Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG, part of Cisco
#5 lore raw
In reply to Hans Verkuil

Em 15-09-2010 17:00, Hans Verkuil escreveu:

Quoted 10 lines

Mauro, Jean, Janne,

After applying this patch series I get the following if I grep for I2C_HW_ in the kernel sources:

<skip some false positives in drivers/gpu> drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c: if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c: if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR)

Those are with Janne ;)

Quoted 1 line

drivers/video/riva/rivafb-i2c.c: chan->adapter.id = I2C_HW_B_RIVA;

No idea about this one.

Quoted 2 lines

drivers/media/video/ir-kbd-i2c.c: if (ir->c->adapter->id == I2C_HW_SAA7134 && ir->c->addr == 0x30)
drivers/media/video/saa7134/saa7134-i2c.c: .id = I2C_HW_SAA7134,

Those are easy: just add the polling interval into the platform_data. If zero, uses the default value. I'll write a patch for it.

Quoted 1 line

drivers/media/video/ir-kbd-i2c.c: if (adap->id == I2C_HW_B_CX2388x) {

This is not hard to solve. I' ll write a patch for it.

Quoted 4 lines
drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x)
drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x) {

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;

We need to solve lirc_i2c.c issues before being able to remove those. As lirc_i2c has the same implementation as ir-kbd-i2c, it is probably easier to just get rid of it, and then remove those two references. Jarod is working on it.

While touching it, I'll move PV951 to bttv driver, and move all IR initialization code to bttv-input and cx88-input on those two drivers. This will make life easier when porting the code to rc-core, as everything that needs to be changed will be at the same file.

Cheers,
Mauro

#6 lore raw
Quoted 6 lines · On Thursday, September 23, 2010 06:18:37 Mauro Carvalho Chehab wrote:

Em 15-09-2010 17:00, Hans Verkuil escreveu:

Quoted 5 lines

Mauro, Jean, Janne,

After applying this patch series I get the following if I grep for I2C_HW_ in the kernel sources:

Quoted 7 lines
Quoted 5 lines

<skip some false positives in drivers/gpu> drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c: if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c: if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR)

Those are with Janne ;)

Since I2C_HW_B_HDPVR is not actually set anywhere and because it's staging, I'd propose that we just ignore this. It's under an #ifdef, so removing i2c-id.h will not affect this code.

Quoted 3 lines
Quoted 1 line

drivers/video/riva/rivafb-i2c.c: chan->adapter.id = I2C_HW_B_RIVA;

No idea about this one.

This can be removed.

Quoted 6 lines
Quoted 3 lines

drivers/media/video/ir-kbd-i2c.c: if (ir->c->adapter->id == I2C_HW_SAA7134 && ir->c->addr == 0x30)
drivers/media/video/saa7134/saa7134-i2c.c: .id = I2C_HW_SAA7134,

Those are easy: just add the polling interval into the platform_data. If zero, uses the default value. I'll write a patch for it.

Nice!

Quoted 3 lines
Quoted 1 line

drivers/media/video/ir-kbd-i2c.c: if (adap->id == I2C_HW_B_CX2388x) {

This is not hard to solve. I' ll write a patch for it.

Nice!

Quoted 5 lines
Quoted 4 lines
drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x)
drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x) {

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;

Quoted 7 lines

We need to solve lirc_i2c.c issues before being able to remove those. As lirc_i2c has the same implementation as ir-kbd-i2c, it is probably easier to just get rid of it, and then remove those two references. Jarod is working on it.

While touching it, I'll move PV951 to bttv driver, and move all IR initialization code to bttv-input and cx88-input on those two drivers. This will make life easier when porting the code to rc-core, as everything that needs to be changed will be at the same file.

So after my pending tvaudio/tda8425 patch goes in and your patches, then the only remaining user of I2C_HW_B_ is lirc_i2c.c, right? Jean will like that :-)

Jean, I did a grep of who is still including i2c-id.h (excluding media drivers):

drivers/gpu/drm/nouveau/nouveau_i2c.h:#include <linux/i2c-id.h> drivers/gpu/drm/radeon/radeon_mode.h:#include <linux/i2c-id.h> drivers/gpu/drm/i915/intel_drv.h:#include <linux/i2c-id.h> drivers/gpu/drm/i915/intel_i2c.c:#include <linux/i2c-id.h> drivers/video/i810/i810.h:#include <linux/i2c-id.h> drivers/video/intelfb/intelfb_i2c.c:#include <linux/i2c-id.h> drivers/video/savage/savagefb.h:#include <linux/i2c-id.h> drivers/video/aty/radeon_i2c.c:#include <linux/i2c-id.h> drivers/i2c/busses/i2c-s3c2410.c:#include <linux/i2c-id.h> drivers/i2c/busses/i2c-pxa.c:#include <linux/i2c-id.h> drivers/i2c/busses/i2c-ibm_iic.c:#include <linux/i2c-id.h>

AFAIK none of these actually need this include. It's probably a good idea for you to remove together with this obsolete I2C_HW_B_RIVA:

drivers/video/riva/rivafb-i2c.c: chan->adapter.id = I2C_HW_B_RIVA;

Regards,

Hans

Quoted 8 lines

Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG, part of Cisco
#7 lore raw

Hi Hans,

Quoted 13 lines · Hans Verkuil

Jean, I did a grep of who is still including i2c-id.h (excluding media drivers):

drivers/gpu/drm/nouveau/nouveau_i2c.h:#include <linux/i2c-id.h> drivers/gpu/drm/radeon/radeon_mode.h:#include <linux/i2c-id.h> drivers/gpu/drm/i915/intel_drv.h:#include <linux/i2c-id.h> drivers/gpu/drm/i915/intel_i2c.c:#include <linux/i2c-id.h> drivers/video/i810/i810.h:#include <linux/i2c-id.h> drivers/video/intelfb/intelfb_i2c.c:#include <linux/i2c-id.h> drivers/video/savage/savagefb.h:#include <linux/i2c-id.h> drivers/video/aty/radeon_i2c.c:#include <linux/i2c-id.h> drivers/i2c/busses/i2c-s3c2410.c:#include <linux/i2c-id.h> drivers/i2c/busses/i2c-pxa.c:#include <linux/i2c-id.h> drivers/i2c/busses/i2c-ibm_iic.c:#include <linux/i2c-id.h>

I additionally have drivers/i2c/busses/i2c-nuc900.c.

Quoted 2 lines

AFAIK none of these actually need this include. It's probably a good idea for you to remove together with

Will do, thanks for suggesting.

Quoted 3 lines

this obsolete I2C_HW_B_RIVA:

drivers/video/riva/rivafb-i2c.c: chan->adapter.id = I2C_HW_B_RIVA;

I'll have to wait for your cleanup to hit upstream before I can remove that one.

Signature · 1 line
Jean Delvare
#8 lore raw
Quoted 27 lines

Hi Hans,

Quoted 14 lines · Hans Verkuil

Jean, I did a grep of who is still including i2c-id.h (excluding media drivers):

drivers/gpu/drm/nouveau/nouveau_i2c.h:#include <linux/i2c-id.h> drivers/gpu/drm/radeon/radeon_mode.h:#include <linux/i2c-id.h> drivers/gpu/drm/i915/intel_drv.h:#include <linux/i2c-id.h> drivers/gpu/drm/i915/intel_i2c.c:#include <linux/i2c-id.h> drivers/video/i810/i810.h:#include <linux/i2c-id.h> drivers/video/intelfb/intelfb_i2c.c:#include <linux/i2c-id.h> drivers/video/savage/savagefb.h:#include <linux/i2c-id.h> drivers/video/aty/radeon_i2c.c:#include <linux/i2c-id.h> drivers/i2c/busses/i2c-s3c2410.c:#include <linux/i2c-id.h> drivers/i2c/busses/i2c-pxa.c:#include <linux/i2c-id.h> drivers/i2c/busses/i2c-ibm_iic.c:#include <linux/i2c-id.h>

I additionally have drivers/i2c/busses/i2c-nuc900.c.

Quoted 3 lines

AFAIK none of these actually need this include. It's probably a good idea for
you to remove together with

Will do, thanks for suggesting.

Quoted 7 lines
Quoted 4 lines

this obsolete I2C_HW_B_RIVA:

drivers/video/riva/rivafb-i2c.c: chan->adapter.id
= I2C_HW_B_RIVA;

I'll have to wait for your cleanup to hit upstream before I can remove that one.

No need to wait. All that happens if this is removed is that the bogus initialization function in tvaudio is no longer doing anything. And when my patch is merged, then that function is removed completely.

Regards,

Hans

Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG, part of Cisco
#9 lore raw
Quoted 6 lines · Hans Verkuil
Quoted 6 lines · Hans Verkuil
Quoted 4 lines

this obsolete I2C_HW_B_RIVA:

drivers/video/riva/rivafb-i2c.c: chan->adapter.id
= I2C_HW_B_RIVA;

Quoted 6 lines
Quoted 2 lines

I'll have to wait for your cleanup to hit upstream before I can remove that one.

No need to wait. All that happens if this is removed is that the bogus initialization function in tvaudio is no longer doing anything. And when my patch is merged, then that function is removed completely.

Sure, but I still think it's easier to let you merge your changes first. After that, I can kill the whole thing without a thinking and without the need to explain why it is safe to do - because it will be totally obvious then.

Thanks a lot for your work!

Signature · 1 line
Jean Delvare
#10 lore raw
In reply to Hans Verkuil

Em 23-09-2010 03:14, Hans Verkuil escreveu:

Quoted 32 lines · On Thursday, September 23, 2010 06:18:37 Mauro Carvalho Chehab wrote:
Quoted 6 lines

Em 15-09-2010 17:00, Hans Verkuil escreveu:

Quoted 5 lines

Mauro, Jean, Janne,

After applying this patch series I get the following if I grep for I2C_HW_ in the kernel sources:

Quoted 7 lines
Quoted 5 lines

<skip some false positives in drivers/gpu> drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c: if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c: if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR)

Those are with Janne ;)

Since I2C_HW_B_HDPVR is not actually set anywhere and because it's staging, I'd propose that we just ignore this. It's under an #ifdef, so removing i2c-id.h will not affect this code.

Quoted 3 lines
Quoted 1 line

drivers/video/riva/rivafb-i2c.c: chan->adapter.id = I2C_HW_B_RIVA;

No idea about this one.

This can be removed.

Quoted 6 lines
Quoted 3 lines

drivers/media/video/ir-kbd-i2c.c: if (ir->c->adapter->id == I2C_HW_SAA7134 && ir->c->addr == 0x30)
drivers/media/video/saa7134/saa7134-i2c.c: .id = I2C_HW_SAA7134,

Those are easy: just add the polling interval into the platform_data. If zero, uses the default value. I'll write a patch for it.

Quoted 20 lines

Nice!

Quoted 3 lines
Quoted 1 line

drivers/media/video/ir-kbd-i2c.c: if (adap->id == I2C_HW_B_CX2388x) {

This is not hard to solve. I' ll write a patch for it.

Nice!

Quoted 12 lines
Quoted 4 lines
drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x)
drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x) {

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;

We need to solve lirc_i2c.c issues before being able to remove those. As lirc_i2c has the same implementation as ir-kbd-i2c, it is probably easier to just get rid of it, and then remove those two references. Jarod is working on it.

While touching it, I'll move PV951 to bttv driver, and move all IR initialization code to bttv-input and cx88-input on those two drivers. This will make life easier when porting the code to rc-core, as everything that needs to be changed will be at the same file.

The above were already merged.

Quoted 3 lines

So after my pending tvaudio/tda8425 patch goes in and your patches, then the only remaining user of I2C_HW_B_ is lirc_i2c.c, right? Jean will like that :-)

Patch applied. The remaining places are:

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;

drivers/staging/lirc/lirc_i2c.c:          if (adap->id == I2C_HW_B_CX2388x)
drivers/staging/lirc/lirc_i2c.c:          if (adap->id == I2C_HW_B_CX2388x) {

drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c: if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c: if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR)
drivers/video/riva/rivafb-i2c.c: chan->adapter.id = I2C_HW_B_RIVA;

I'll try to review lirc_i2c. Maybe we can just remove it entirely, and then remove the entries on cx88 driver.

Cheers,
Mauro.

#11 lore raw
Quoted 65 lines · Mauro Carvalho Chehab

Em 23-09-2010 03:14, Hans Verkuil escreveu:

Quoted 32 lines · On Thursday, September 23, 2010 06:18:37 Mauro Carvalho Chehab wrote:
Quoted 6 lines

Em 15-09-2010 17:00, Hans Verkuil escreveu:

Quoted 5 lines

Mauro, Jean, Janne,

After applying this patch series I get the following if I grep for I2C_HW_ in the kernel sources:

Quoted 7 lines
Quoted 5 lines

<skip some false positives in drivers/gpu> drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c: if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c: if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR)

Those are with Janne ;)

Since I2C_HW_B_HDPVR is not actually set anywhere and because it's staging, I'd propose that we just ignore this. It's under an #ifdef, so removing i2c-id.h will not affect this code.

Quoted 3 lines
Quoted 1 line

drivers/video/riva/rivafb-i2c.c: chan->adapter.id = I2C_HW_B_RIVA;

No idea about this one.

This can be removed.

Quoted 6 lines
Quoted 3 lines

drivers/media/video/ir-kbd-i2c.c: if (ir->c->adapter->id == I2C_HW_SAA7134 && ir->c->addr == 0x30)
drivers/media/video/saa7134/saa7134-i2c.c: .id = I2C_HW_SAA7134,

Those are easy: just add the polling interval into the platform_data. If zero, uses the default value. I'll write a patch for it.

Quoted 20 lines

Nice!

Quoted 3 lines
Quoted 1 line

drivers/media/video/ir-kbd-i2c.c: if (adap->id == I2C_HW_B_CX2388x) {

This is not hard to solve. I' ll write a patch for it.

Nice!

Quoted 12 lines
Quoted 4 lines
drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x)
drivers/staging/lirc/lirc_i2c.c:                if (adap->id == I2C_HW_B_CX2388x) {

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;

We need to solve lirc_i2c.c issues before being able to remove those. As lirc_i2c has the same implementation as ir-kbd-i2c, it is probably easier to just get rid of it, and then remove those two references. Jarod is working on it.

While touching it, I'll move PV951 to bttv driver, and move all IR initialization code to bttv-input and cx88-input on those two drivers. This will make life easier when porting the code to rc-core, as everything that needs to be changed will be at the same file.

The above were already merged.

Quoted 3 lines

So after my pending tvaudio/tda8425 patch goes in and your patches, then the only remaining user of I2C_HW_B_ is lirc_i2c.c, right? Jean will like that :-)

Patch applied. The remaining places are:

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;

drivers/staging/lirc/lirc_i2c.c:          if (adap->id == I2C_HW_B_CX2388x)
drivers/staging/lirc/lirc_i2c.c:          if (adap->id == I2C_HW_B_CX2388x) {
Quoted 8 lines

drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c: if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR) {
drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR
drivers/staging/lirc/lirc_zilog.c: if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR)
drivers/video/riva/rivafb-i2c.c: chan->adapter.id = I2C_HW_B_RIVA;

I'll try to review lirc_i2c. Maybe we can just remove it entirely, and then remove the entries on cx88 driver.

With lirc_i2c, I think the only hardware we *really* care about is the Hauppague PVR-150 (variants w/o the zilog chip that includes tx abilities), PVR-250 and PVR-350. Given that ir-kbd-i2c supports all of those cards right now, I'm entirely in favor of lirc_i2c just going away.

Signature · 2 lines
Jarod Wilson
[email protected]