[GIT PULL FOR v3.18] Add driver for tw68xx PCI grabber boards
This adds the tw68 PCI driver. These two patches are identical to the v3 patch series I posted earlier: http://comments.gmane.org/gmane.linux.drivers.video-input-infrastructure/81407 Regards, Hans The following changes since commit b250392f7b5062cf026b1423e27265e278fd6b30: [media] media: ttpci: fix av7110 build to be compatible with CONFIG_INPUT_EVDEV (2014-08-21 15:25:38 -0500) are available in the git repository at: git://linuxtv.org/hverkuil/media_tree.git tw68 for you to fetch changes up to f9c0c8edba28682cd6ab7254f2da911272053989: MAINTAINERS: add tw68 entry (2014-08-26 08:26:39 +0200) Hans Verkuil (2): tw68: add support for Techwell tw68xx PCI grabber boards MAINTAINERS: add tw68 entry MAINTAINERS |8 + drivers/media/pci/Kconfig |1 + drivers/media/pci/Makefile |1 + drivers/media/pci/tw68/Kconfig | 10 + drivers/media/pci/tw68/Makefile |3 + drivers/media/pci/tw68/tw68-core.c | 434 drivers/media/pci/tw68/tw68-reg.h | 195 drivers/media/pci/tw68/tw68-risc.c | 230 +++ drivers/media/pci/tw68/tw68-video.c | 1060 +++ drivers/media/pci/tw68/tw68.h | 231 +++ 10 files changed, 2173 insertions(+) create mode 100644 drivers/media/pci/tw68/Kconfig create mode 100644 drivers/media/pci/tw68/Makefile create mode 100644 drivers/media/pci/tw68/tw68-core.c create mode 100644 drivers/media/pci/tw68/tw68-reg.h create mode 100644 drivers/media/pci/tw68/tw68-risc.c create mode 100644 drivers/media/pci/tw68/tw68-video.c create mode 100644 drivers/media/pci/tw68/tw68.h -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL FOR v3.18] Add vivid test driver, remove old vivi test driver
Hi Mauro, This adds the new vivid driver as a replacement for the old vivi. This pull request is identical to the v2 patch series posted earlier: http://comments.gmane.org/gmane.linux.drivers.video-input-infrastructure/81354 except for the final patch that removes the vivi driver which is new to this pull request. One question: the vivid driver (like the vivi driver) is not build by default. Should that be changed? In my opinion this driver should be enabled by distros, so I am in favor of changing Kconfig. Let me know if you agree and I'll make a follow up patch or you can change this yourself. Regards, Hans The following changes since commit b250392f7b5062cf026b1423e27265e278fd6b30: [media] media: ttpci: fix av7110 build to be compatible with CONFIG_INPUT_EVDEV (2014-08-21 15:25:38 -0500) are available in the git repository at: git://linuxtv.org/hverkuil/media_tree.git vivid2 for you to fetch changes up to d5f410f54e87ba420de839dec4e806707cc2aff2: vivi: remove driver, it's replaced by vivid. (2014-08-25 13:49:53 +0200) Hans Verkuil (13): vb2: fix multiplanar read() with non-zero data_offset vivid.txt: add documentation for the vivid driver vivid: add core driver code vivid: add the control handling code vivid: add the video capture and output parts vivid: add VBI capture and output code vivid: add the kthread code that controls the video rate vivid: add a simple framebuffer device for overlay testing vivid: add the Test Pattern Generator vivid: add support for radio receivers and transmitters vivid: add support for software defined radio vivid: enable the vivid driver vivi: remove driver, it's replaced by vivid. Documentation/video4linux/vivid.txt | 1109 +++ drivers/media/platform/Kconfig| 15 +- drivers/media/platform/Makefile |2 +- drivers/media/platform/vivi.c | 1542 - drivers/media/platform/vivid/Kconfig | 19 + drivers/media/platform/vivid/Makefile |6 + drivers/media/platform/vivid/vivid-core.c | 1390 ++ drivers/media/platform/vivid/vivid-core.h | 520 ++ drivers/media/platform/vivid/vivid-ctrls.c| 1502 +++ drivers/media/platform/vivid/vivid-ctrls.h| 34 ++ drivers/media/platform/vivid/vivid-kthread-cap.c | 885 + drivers/media/platform/vivid/vivid-kthread-cap.h | 26 ++ drivers/media/platform/vivid/vivid-kthread-out.c | 304 + drivers/media/platform/vivid/vivid-kthread-out.h | 26 ++ drivers/media/platform/vivid/vivid-osd.c | 400 + drivers/media/platform/vivid/vivid-osd.h | 27 ++ drivers/media/platform/vivid/vivid-radio-common.c | 189 drivers/media/platform/vivid/vivid-radio-common.h | 40 ++ drivers/media/platform/vivid/vivid-radio-rx.c | 287 drivers/media/platform/vivid/vivid-radio-rx.h | 31 ++ drivers/media/platform/vivid/vivid-radio-tx.c | 141 ++ drivers/media/platform/vivid/vivid-radio-tx.h | 29 ++ drivers/media/platform/vivid/vivid-rds-gen.c | 165 +++ drivers/media/platform/vivid/vivid-rds-gen.h | 53 +++ drivers/media/platform/vivid/vivid-sdr-cap.c | 499 + drivers/media/platform/vivid/vivid-sdr-cap.h | 34 ++ drivers/media/platform/vivid/vivid-tpg-colors.c | 310 + drivers/media/platform/vivid/vivid-tpg-colors.h | 64 +++ drivers/media/platform/vivid/vivid-tpg.c | 1439 drivers/media/platform/vivid/vivid-tpg.h | 438 +++ drivers/media/platform/vivid/vivid-vbi-cap.c | 356 +++ drivers/media/platform/vivid/vivid-vbi-cap.h | 40 ++ drivers/media/platform/vivid/vivid-vbi-gen.c | 248 +++ drivers/media/platform/vivid/vivid-vbi-gen.h | 33 ++ drivers/media/platform/vivid/vivid-vbi-out.c | 247 +++ drivers/media/platform/vivid/vivid-vbi-out.h | 34 ++ drivers/media/platform/vivid/vivid-vid-cap.c | 1729 + drivers/media/platform/vivid/vivid-vid-cap.h | 71 +++ drivers/media/platform/vivid/vivid-vid-common.c | 571 drivers/media/platform/vivid/vivid-vid-common.h | 61 +++ drivers/media/platform/vivid/vivid-vid-out.c | 1205 +++ drivers/media/platform/vivid/vivid-vid-out.h | 57 +++
[GIT PULL FOR v3.18] cx23885: convert to the latest frameworks, including vb2
Hi Mauro, This pull request converts the cx23885 driver to the latest V4L2 core frameworks, removing about 1000 lines in the process. It now passes the v4l2-compliance tests and, frankly, feels much more robust. I have tested this with my HVR-1800 board with video (compressed and uncompressed), vbi, dvb and alsa, including several duration stress tests. As usual, the vb2 conversion is a beast of a patch. But the vb2 conversion affected video, vbi, dvb and alsa, so it's all over the place. And it is all or nothing. See the commit log of that patch for some more information. It also changed the risc code to simplify the code and to get rid of all the timeouts that were copied-and-pasted from cx88. If anyone knows of a reason for these timeouts, please let me know. I have tried to separate the risc code changes from the vb2 changes, but that was impossible to get to work with vb1. I dropped the vb2 fix I included in my earlier pull request since that fix will appear in v3.17 (i.e. before this driver is upstreamed) anyway. Regards, Hans The following changes since commit b250392f7b5062cf026b1423e27265e278fd6b30: [media] media: ttpci: fix av7110 build to be compatible with CONFIG_INPUT_EVDEV (2014-08-21 15:25:38 -0500) are available in the git repository at: git://linuxtv.org/hverkuil/media_tree.git cx23b for you to fetch changes up to 7552750cc31d5925b9d44eb2a5c98504fa64c38b: cx23885: Add busy checks before changing formats (2014-08-29 08:31:53 +0200) Hans Verkuil (20): cx23885: fix querycap cx23885: fix audio input handling cx23885: support v4l2_fh and g/s_priority cx23885: use core locking, switch to unlocked_ioctl. cx23885: convert to the control framework cx23885: convert 417 to the control framework cx23885: fix format colorspace compliance error cx23885: map invalid fields to a valid field. cx23885: drop radio-related dead code cx23885: drop type field from struct cx23885_fh cx23885: drop unused clip fields from struct cx23885_fh cx23885: fmt, width and height are global, not per-fh. cx23885: drop videobuf abuse in cx23885-alsa cx23885: use video_drvdata to get cx23885_dev pointer cx23885: convert to vb2 cx23885: fix field handling cx23885: fix weird sizes. cx23885: remove FSF address as per checkpatch cx23885: remove btcx-risc dependency cx23885: Add busy checks before changing formats drivers/media/pci/cx23885/Kconfig |5 +- drivers/media/pci/cx23885/Makefile|1 - drivers/media/pci/cx23885/altera-ci.c |8 +- drivers/media/pci/cx23885/altera-ci.h |4 - drivers/media/pci/cx23885/cimax2.c|4 - drivers/media/pci/cx23885/cimax2.h|4 - drivers/media/pci/cx23885/cx23885-417.c | 501 ++- drivers/media/pci/cx23885/cx23885-alsa.c | 109 +-- drivers/media/pci/cx23885/cx23885-av.c|5 - drivers/media/pci/cx23885/cx23885-av.h|5 - drivers/media/pci/cx23885/cx23885-cards.c |6 - drivers/media/pci/cx23885/cx23885-core.c | 362 --- drivers/media/pci/cx23885/cx23885-dvb.c | 136 ++--- drivers/media/pci/cx23885/cx23885-f300.c |4 - drivers/media/pci/cx23885/cx23885-i2c.c | 12 - drivers/media/pci/cx23885/cx23885-input.c |5 - drivers/media/pci/cx23885/cx23885-input.h |5 - drivers/media/pci/cx23885/cx23885-ioctl.c | 10 +- drivers/media/pci/cx23885/cx23885-ioctl.h |4 - drivers/media/pci/cx23885/cx23885-ir.c|5 - drivers/media/pci/cx23885/cx23885-ir.h|5 - drivers/media/pci/cx23885/cx23885-reg.h |4 - drivers/media/pci/cx23885/cx23885-vbi.c | 282 -- drivers/media/pci/cx23885/cx23885-video.c | 1294 + drivers/media/pci/cx23885/cx23885-video.h |5 - drivers/media/pci/cx23885/cx23885.h | 127 +++- drivers/media/pci/cx23885/cx23888-ir.c|5 - drivers/media/pci/cx23885/cx23888-ir.h|5 - drivers/media/pci/cx23885/netup-eeprom.c |4 - drivers/media/pci/cx23885/netup-eeprom.h |4 - drivers/media/pci/cx23885/netup-init.c|4 - drivers/media/pci/cx23885/netup-init.h|4 - 32 files changed, 951 insertions(+), 1987 deletions(-) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] drivers: media: radio: radio-miropcm20.c: include missing header file
with -Werror=implicit-function-declaration build failed with error : error: implicit declaration of function 'inb' error: implicit declaration of function 'outb' Reported-by: Jim Davis jim.ep...@gmail.com Signed-off-by: Sudip Mukherjee su...@vectorindi.org --- Jim reported for next-20140828 , but the error still persists in next-20140829 also. drivers/media/radio/radio-miropcm20.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/radio/radio-miropcm20.c b/drivers/media/radio/radio-miropcm20.c index 998919e..3309f7c 100644 --- a/drivers/media/radio/radio-miropcm20.c +++ b/drivers/media/radio/radio-miropcm20.c @@ -36,6 +36,7 @@ #include media/v4l2-fh.h #include media/v4l2-event.h #include sound/aci.h +#includelinux/io.h #define RDS_DATASHIFT 2 /* Bit 2 */ #define RDS_DATAMASK(1 RDS_DATASHIFT) -- 1.8.1.2 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/5] dvb-core: add a new tuner ops to dvb_frontend for APIv5
moikka, Start polling thread, which polls once per 2 sec or so, which reads RSSI and writes value to struct dtv_frontend_properties. That it is, in my understanding. Same for all those DVBv5 stats. Mauro knows better as he designed that functionality. I understand that RSSI property should be set directly in the tuner driver, but I'm afraid that creating a kthread just for updating RSSI would be overkill and complicate matters. Would you give me an advice? Mauro regards, akihiro -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL FOR v3.17] cx18: fix kernel oops
The following changes since commit b250392f7b5062cf026b1423e27265e278fd6b30: [media] media: ttpci: fix av7110 build to be compatible with CONFIG_INPUT_EVDEV (2014-08-21 15:25:38 -0500) are available in the git repository at: git://linuxtv.org/hverkuil/media_tree.git cx18 for you to fetch changes up to cda8742f8990ab5e2ca405d6cbe038b7f03e61e4: cx18: fix kernel oops with tda8290 tuner (2014-08-26 08:20:08 +0200) Hans Verkuil (1): cx18: fix kernel oops with tda8290 tuner drivers/media/pci/cx18/cx18-driver.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL FOR v3.18] Fix sparse warnings
We still have too many sparse warnings, so this is another round of sparse warning cleanups. Regards, Hans The following changes since commit b250392f7b5062cf026b1423e27265e278fd6b30: [media] media: ttpci: fix av7110 build to be compatible with CONFIG_INPUT_EVDEV (2014-08-21 15:25:38 -0500) are available in the git repository at: git://linuxtv.org/hverkuil/media_tree.git sparse for you to fetch changes up to 7207dddb8cb0328c817f88f0447cd651703560a7: v4l2-compat-ioctl32: fix sparse warnings (2014-08-29 13:19:41 +0200) Hans Verkuil (41): img-ir: fix sparse warnings solo6x10: fix sparse warnings dibusb: fix sparse warnings af9015: fix sparse warning radio-tea5764: fix sparse warnings dw2102: fix sparse warnings mxl111sf: fix sparse warnings opera1: fix sparse warnings pctv452e: fix sparse warnings go7007: fix sparse warnings dib7000p: fix sparse warning kinect: fix sparse warnings ddbridge: fix sparse warnings ngene: fix sparse warnings drxj: fix sparse warnings uvc: fix sparse warning usbtv: fix sparse warnings mb86a16/mb86a20s: fix sparse warnings mantis: fix sparse warnings wl128x: fix sparse warnings bcm3510: fix sparse warnings s2255drv: fix sparse warning dvb_usb_core: fix sparse warning pwc: fix sparse warning stv0367: fix sparse warnings si2165: fix sparse warning imon: fix sparse warnings v4l2-ioctl: fix sparse warnings lirc_dev: fix sparse warnings mt2063: fix sparse warnings via-camera: fix sparse warning cx25821: fix sparse warning cx231xx: fix sparse warnings dm1105: fix sparse warning cxusb: fix sparse warning cx23885: fix sparse warning ivtv: fix sparse warnings cx18: fix sparse warnings em28xx: fix sparse warnings videodev2.h: add __user to v4l2_ext_control pointers v4l2-compat-ioctl32: fix sparse warnings drivers/media/dvb-frontends/bcm3510.c | 4 ++-- drivers/media/dvb-frontends/dib7000p.c | 2 +- drivers/media/dvb-frontends/drx39xyj/drxj.c| 38 +++--- drivers/media/dvb-frontends/mb86a16.c | 2 +- drivers/media/dvb-frontends/mb86a20s.c | 14 +++--- drivers/media/dvb-frontends/si2165.c | 2 +- drivers/media/dvb-frontends/stv0367.c | 4 ++-- drivers/media/pci/cx18/cx18-firmware.c | 2 +- drivers/media/pci/cx23885/cx23885-dvb.c| 2 +- drivers/media/pci/cx25821/cx25821-video-upstream.c | 5 +++-- drivers/media/pci/ddbridge/ddbridge-core.c | 30 ++ drivers/media/pci/ddbridge/ddbridge.h | 12 +--- drivers/media/pci/dm1105/dm1105.c | 2 +- drivers/media/pci/ivtv/ivtv-irq.c | 12 +--- drivers/media/pci/mantis/hopper_vp3028.c | 2 +- drivers/media/pci/mantis/mantis_common.h | 2 +- drivers/media/pci/mantis/mantis_vp1033.c | 4 ++-- drivers/media/pci/mantis/mantis_vp1034.c | 2 +- drivers/media/pci/mantis/mantis_vp1041.c | 4 ++-- drivers/media/pci/mantis/mantis_vp2033.c | 4 ++-- drivers/media/pci/mantis/mantis_vp2040.c | 4 ++-- drivers/media/pci/mantis/mantis_vp3030.c | 4 ++-- drivers/media/pci/ngene/ngene-cards.c | 2 +- drivers/media/pci/ngene/ngene-core.c | 14 ++ drivers/media/pci/ngene/ngene-dvb.c| 5 ++--- drivers/media/pci/ngene/ngene.h| 2 +- drivers/media/pci/solo6x10/solo6x10-disp.c | 4 ++-- drivers/media/pci/solo6x10/solo6x10-eeprom.c | 8 drivers/media/pci/solo6x10/solo6x10.h | 4 ++-- drivers/media/platform/via-camera.c| 2 +- drivers/media/radio/radio-tea5764.c| 12 ++-- drivers/media/radio/wl128x/fmdrv_common.c | 11 ++- drivers/media/radio/wl128x/fmdrv_rx.c | 10 +- drivers/media/radio/wl128x/fmdrv_tx.c | 2 +- drivers/media/rc/img-ir/img-ir-hw.c| 6 -- drivers/media/rc/img-ir/img-ir-hw.h| 6 ++ drivers/media/rc/imon.c| 8 drivers/media/rc/lirc_dev.c| 14 +++--- drivers/media/tuners/mt2063.c | 26 +- drivers/media/usb/cx231xx/cx231xx-avcore.c | 12 ++-- drivers/media/usb/cx231xx/cx231xx-core.c | 2 +- drivers/media/usb/cx231xx/cx231xx-dvb.c| 4 ++-- drivers/media/usb/dvb-usb-v2/af9015.c | 2 +- drivers/media/usb/dvb-usb-v2/dvb_usb_core.c| 2 +- drivers/media/usb/dvb-usb-v2/mxl111sf.c
Re: [GIT PULL FOR v3.18] Fix sparse warnings
On 08/29/2014 01:21 PM, Hans Verkuil wrote: We still have too many sparse warnings, so this is another round of sparse warning cleanups. I forgot to mention that this pull request combines these two patch series: https://www.mail-archive.com/linux-media@vger.kernel.org/msg78429.html https://www.mail-archive.com/linux-media@vger.kernel.org/msg78485.html They are rebased but otherwise unchanged. Regards, Hans Regards, Hans The following changes since commit b250392f7b5062cf026b1423e27265e278fd6b30: [media] media: ttpci: fix av7110 build to be compatible with CONFIG_INPUT_EVDEV (2014-08-21 15:25:38 -0500) are available in the git repository at: git://linuxtv.org/hverkuil/media_tree.git sparse for you to fetch changes up to 7207dddb8cb0328c817f88f0447cd651703560a7: v4l2-compat-ioctl32: fix sparse warnings (2014-08-29 13:19:41 +0200) Hans Verkuil (41): img-ir: fix sparse warnings solo6x10: fix sparse warnings dibusb: fix sparse warnings af9015: fix sparse warning radio-tea5764: fix sparse warnings dw2102: fix sparse warnings mxl111sf: fix sparse warnings opera1: fix sparse warnings pctv452e: fix sparse warnings go7007: fix sparse warnings dib7000p: fix sparse warning kinect: fix sparse warnings ddbridge: fix sparse warnings ngene: fix sparse warnings drxj: fix sparse warnings uvc: fix sparse warning usbtv: fix sparse warnings mb86a16/mb86a20s: fix sparse warnings mantis: fix sparse warnings wl128x: fix sparse warnings bcm3510: fix sparse warnings s2255drv: fix sparse warning dvb_usb_core: fix sparse warning pwc: fix sparse warning stv0367: fix sparse warnings si2165: fix sparse warning imon: fix sparse warnings v4l2-ioctl: fix sparse warnings lirc_dev: fix sparse warnings mt2063: fix sparse warnings via-camera: fix sparse warning cx25821: fix sparse warning cx231xx: fix sparse warnings dm1105: fix sparse warning cxusb: fix sparse warning cx23885: fix sparse warning ivtv: fix sparse warnings cx18: fix sparse warnings em28xx: fix sparse warnings videodev2.h: add __user to v4l2_ext_control pointers v4l2-compat-ioctl32: fix sparse warnings drivers/media/dvb-frontends/bcm3510.c | 4 ++-- drivers/media/dvb-frontends/dib7000p.c | 2 +- drivers/media/dvb-frontends/drx39xyj/drxj.c| 38 +++--- drivers/media/dvb-frontends/mb86a16.c | 2 +- drivers/media/dvb-frontends/mb86a20s.c | 14 +++--- drivers/media/dvb-frontends/si2165.c | 2 +- drivers/media/dvb-frontends/stv0367.c | 4 ++-- drivers/media/pci/cx18/cx18-firmware.c | 2 +- drivers/media/pci/cx23885/cx23885-dvb.c| 2 +- drivers/media/pci/cx25821/cx25821-video-upstream.c | 5 +++-- drivers/media/pci/ddbridge/ddbridge-core.c | 30 ++ drivers/media/pci/ddbridge/ddbridge.h | 12 +--- drivers/media/pci/dm1105/dm1105.c | 2 +- drivers/media/pci/ivtv/ivtv-irq.c | 12 +--- drivers/media/pci/mantis/hopper_vp3028.c | 2 +- drivers/media/pci/mantis/mantis_common.h | 2 +- drivers/media/pci/mantis/mantis_vp1033.c | 4 ++-- drivers/media/pci/mantis/mantis_vp1034.c | 2 +- drivers/media/pci/mantis/mantis_vp1041.c | 4 ++-- drivers/media/pci/mantis/mantis_vp2033.c | 4 ++-- drivers/media/pci/mantis/mantis_vp2040.c | 4 ++-- drivers/media/pci/mantis/mantis_vp3030.c | 4 ++-- drivers/media/pci/ngene/ngene-cards.c | 2 +- drivers/media/pci/ngene/ngene-core.c | 14 ++ drivers/media/pci/ngene/ngene-dvb.c| 5 ++--- drivers/media/pci/ngene/ngene.h| 2 +- drivers/media/pci/solo6x10/solo6x10-disp.c | 4 ++-- drivers/media/pci/solo6x10/solo6x10-eeprom.c | 8 drivers/media/pci/solo6x10/solo6x10.h | 4 ++-- drivers/media/platform/via-camera.c| 2 +- drivers/media/radio/radio-tea5764.c| 12 ++-- drivers/media/radio/wl128x/fmdrv_common.c | 11 ++- drivers/media/radio/wl128x/fmdrv_rx.c | 10 +- drivers/media/radio/wl128x/fmdrv_tx.c | 2 +- drivers/media/rc/img-ir/img-ir-hw.c| 6 -- drivers/media/rc/img-ir/img-ir-hw.h| 6 ++ drivers/media/rc/imon.c| 8 drivers/media/rc/lirc_dev.c| 14 +++---
[PATCH 1/2] Allow DT parsing of secondary devices
This is based on reg and reg-names in DT. Example: reg = 0x10 0x20 0x30; reg-names = main, io, test; This function will create dummy devices io and test with addresses 0x20 and 0x30 respectively. Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com --- drivers/i2c/i2c-core.c | 20 include/linux/i2c.h| 6 ++ 2 files changed, 26 insertions(+) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 632057a..5eb414d 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -798,6 +798,26 @@ struct i2c_client *i2c_new_dummy(struct i2c_adapter *adapter, u16 address) } EXPORT_SYMBOL_GPL(i2c_new_dummy); +struct i2c_client *i2c_new_secondary_device(struct i2c_client *client, + const char *name, + u32 default_addr) +{ + int i, addr; + struct device_node *np; + + np = client-dev.of_node; + i = of_property_match_string(np, reg-names, name); + if (i = 0) + of_property_read_u32_index(np, reg, i, addr); + else + addr = default_addr; + + dev_dbg(client-adapter-dev, Address for %s : 0x%x\n, name, addr); + return i2c_new_dummy(client-adapter, addr); +} +EXPORT_SYMBOL_GPL(i2c_new_secondary_device); + + /* - */ /* I2C bus adapters -- one roots each I2C or SMBUS segment */ diff --git a/include/linux/i2c.h b/include/linux/i2c.h index a95efeb..2d143d7 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -322,6 +322,12 @@ extern int i2c_probe_func_quick_read(struct i2c_adapter *, unsigned short addr); extern struct i2c_client * i2c_new_dummy(struct i2c_adapter *adap, u16 address); +/* Use reg/reg-names in DT in order to get extra addresses */ +extern struct i2c_client * +i2c_new_secondary_device(struct i2c_client *client, + const char *name, + u32 default_addr); + extern void i2c_unregister_device(struct i2c_client *); #endif /* I2C */ -- 2.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] adv7604: Use DT parsing in dummy creation
This patch uses DT in order to parse addresses for dummy devices of adv7604. If nothing is defined, it uses default addresses. The main prupose is using two adv76xx on the same i2c bus. Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com --- .../devicetree/bindings/media/i2c/adv7604.txt | 7 ++- drivers/media/i2c/adv7604.c| 56 ++ 2 files changed, 42 insertions(+), 21 deletions(-) diff --git a/Documentation/devicetree/bindings/media/i2c/adv7604.txt b/Documentation/devicetree/bindings/media/i2c/adv7604.txt index c27cede..221b75c 100644 --- a/Documentation/devicetree/bindings/media/i2c/adv7604.txt +++ b/Documentation/devicetree/bindings/media/i2c/adv7604.txt @@ -10,6 +10,7 @@ Required Properties: - compatible: Must contain one of the following - adi,adv7611 for the ADV7611 +- adi,adv7604 for the ADV7604 - reg: I2C slave address @@ -32,6 +33,8 @@ The digital output port node must contain at least one endpoint. Optional Properties: - reset-gpios: Reference to the GPIO connected to the device's reset pin. + - reg-names : Names of registers to be reprogrammed. + Refer to source code for possible values. Optional Endpoint Properties: @@ -50,7 +53,9 @@ Example: hdmi_receiver@4c { compatible = adi,adv7611; - reg = 0x4c; + /* edid page will be accessible @ 0x66 on i2c bus*/ + reg = 0x4c 0x66; + reg-names = main, edid; reset-gpios = ioexp 0 GPIO_ACTIVE_LOW; hpd-gpios = ioexp 2 GPIO_ACTIVE_HIGH; diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index d4fa213..4e660a2 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -326,6 +326,22 @@ static const struct adv7604_video_standards adv7604_prim_mode_hdmi_gr[] = { { }, }; +static const char const *adv7604_secondary_names[] = { + main, /* ADV7604_PAGE_IO */ + avlink, /* ADV7604_PAGE_AVLINK */ + cec, /* ADV7604_PAGE_CEC */ + infoframe, /* ADV7604_PAGE_INFOFRAME */ + esdp, /* ADV7604_PAGE_ESDP */ + dpp, /* ADV7604_PAGE_DPP */ + afe, /* ADV7604_PAGE_AFE */ + rep, /* ADV7604_PAGE_REP */ + edid, /* ADV7604_PAGE_EDID */ + hdmi, /* ADV7604_PAGE_HDMI */ + test, /* ADV7604_PAGE_TEST */ + cp, /* ADV7604_PAGE_CP */ + vdp /* ADV7604_PAGE_VDP */ +}; + /* --- */ static inline struct adv7604_state *to_state(struct v4l2_subdev *sd) @@ -2528,13 +2544,27 @@ static void adv7604_unregister_clients(struct adv7604_state *state) } static struct i2c_client *adv7604_dummy_client(struct v4l2_subdev *sd, - u8 addr, u8 io_reg) + unsigned int i) { struct i2c_client *client = v4l2_get_subdevdata(sd); + struct adv7604_platform_data *pdata = client-dev.platform_data; + unsigned int io_reg = 0xf2 + i; + struct i2c_client *new_client; + + /* Try to find it in DT */ + new_client = i2c_new_secondary_device(client, + adv7604_secondary_names[i], io_read(sd, io_reg) 1); - if (addr) - io_write(sd, io_reg, addr 1); - return i2c_new_dummy(client-adapter, io_read(sd, io_reg) 1); + if (!new_client) + /* if not defined in DT, use default if available */ + if (pdata pdata-i2c_addresses[i]) + new_client = i2c_new_dummy(client-adapter, + pdata-i2c_addresses[i]); + + if (new_client) + io_write(sd, io_reg, new_client-addr 1); + + return new_client; } static const struct adv7604_reg_seq adv7604_recommended_settings_afe[] = { @@ -2677,6 +2707,7 @@ MODULE_DEVICE_TABLE(i2c, adv7604_i2c_id); static struct of_device_id adv7604_of_id[] __maybe_unused = { { .compatible = adi,adv7611, .data = adv7604_chip_info[ADV7611] }, + { .compatible = adi,adv7604, .data = adv7604_chip_info[ADV7604] }, { } }; MODULE_DEVICE_TABLE(of, adv7604_of_id); @@ -2717,20 +2748,6 @@ static int adv7604_parse_dt(struct adv7604_state *state) /* Disable the interrupt for now as no DT-based board uses it. */ state-pdata.int1_config = ADV7604_INT1_CONFIG_DISABLED; - /* Use the default I2C addresses. */ - state-pdata.i2c_addresses[ADV7604_PAGE_AVLINK] = 0x42; - state-pdata.i2c_addresses[ADV7604_PAGE_CEC] = 0x40; - state-pdata.i2c_addresses[ADV7604_PAGE_INFOFRAME] = 0x3e; - state-pdata.i2c_addresses[ADV7604_PAGE_ESDP] = 0x38; - state-pdata.i2c_addresses[ADV7604_PAGE_DPP] = 0x3c; - state-pdata.i2c_addresses[ADV7604_PAGE_AFE] = 0x26; - state-pdata.i2c_addresses[ADV7604_PAGE_REP] = 0x32; -
Bug: s5p-mfc should allow multiple call to REQBUFS before we start streaming
Hi Kamil, after a discussion on IRC, we concluded that s5p-mfc have this bug that disallow multiple reqbufs calls before streaming. This has the impact that it forces to call REQBUFS(0) before setting the new number of buffers during re-negotiation, and is against the spec too. As an example, in reqbufs_output() REQBUFS is only allowed in QUEUE_FREE state, and setting buffers exits this state. We think that the call to http://lxr.free-electrons.com/ident?i=reqbufs_outputs5p_mfc_open_mfc_inst() should be post-poned until STREAMON is called. http://lxr.free-electrons.com/ident?i=reqbufs_output cheers, Nicolas http://lxr.free-electrons.com/ident?i=reqbufs_output -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] adv7604: Use DT parsing in dummy creation
On 08/29/2014 03:28 PM, Jean-Michel Hautbois wrote: This patch uses DT in order to parse addresses for dummy devices of adv7604. If nothing is defined, it uses default addresses. The main prupose is using two adv76xx on the same i2c bus. Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com --- .../devicetree/bindings/media/i2c/adv7604.txt | 7 ++- drivers/media/i2c/adv7604.c| 56 ++ 2 files changed, 42 insertions(+), 21 deletions(-) diff --git a/Documentation/devicetree/bindings/media/i2c/adv7604.txt b/Documentation/devicetree/bindings/media/i2c/adv7604.txt index c27cede..221b75c 100644 --- a/Documentation/devicetree/bindings/media/i2c/adv7604.txt +++ b/Documentation/devicetree/bindings/media/i2c/adv7604.txt @@ -10,6 +10,7 @@ Required Properties: - compatible: Must contain one of the following - adi,adv7611 for the ADV7611 +- adi,adv7604 for the ADV7604 - reg: I2C slave address @@ -32,6 +33,8 @@ The digital output port node must contain at least one endpoint. Optional Properties: - reset-gpios: Reference to the GPIO connected to the device's reset pin. + - reg-names : Names of registers to be reprogrammed. + Refer to source code for possible values. Optional Endpoint Properties: @@ -50,7 +53,9 @@ Example: hdmi_receiver@4c { compatible = adi,adv7611; - reg = 0x4c; + /* edid page will be accessible @ 0x66 on i2c bus*/ + reg = 0x4c 0x66; + reg-names = main, edid; reset-gpios = ioexp 0 GPIO_ACTIVE_LOW; hpd-gpios = ioexp 2 GPIO_ACTIVE_HIGH; diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index d4fa213..4e660a2 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -326,6 +326,22 @@ static const struct adv7604_video_standards adv7604_prim_mode_hdmi_gr[] = { { }, }; +static const char const *adv7604_secondary_names[] = { + main, /* ADV7604_PAGE_IO */ + avlink, /* ADV7604_PAGE_AVLINK */ + cec, /* ADV7604_PAGE_CEC */ + infoframe, /* ADV7604_PAGE_INFOFRAME */ + esdp, /* ADV7604_PAGE_ESDP */ + dpp, /* ADV7604_PAGE_DPP */ + afe, /* ADV7604_PAGE_AFE */ + rep, /* ADV7604_PAGE_REP */ + edid, /* ADV7604_PAGE_EDID */ + hdmi, /* ADV7604_PAGE_HDMI */ + test, /* ADV7604_PAGE_TEST */ + cp, /* ADV7604_PAGE_CP */ + vdp /* ADV7604_PAGE_VDP */ +}; + /* --- */ static inline struct adv7604_state *to_state(struct v4l2_subdev *sd) @@ -2528,13 +2544,27 @@ static void adv7604_unregister_clients(struct adv7604_state *state) } static struct i2c_client *adv7604_dummy_client(struct v4l2_subdev *sd, - u8 addr, u8 io_reg) + unsigned int i) { struct i2c_client *client = v4l2_get_subdevdata(sd); + struct adv7604_platform_data *pdata = client-dev.platform_data; + unsigned int io_reg = 0xf2 + i; + struct i2c_client *new_client; + + /* Try to find it in DT */ + new_client = i2c_new_secondary_device(client, + adv7604_secondary_names[i], io_read(sd, io_reg) 1); Does this work if CONFIG_OF isn't set? I suspect not. - if (addr) - io_write(sd, io_reg, addr 1); - return i2c_new_dummy(client-adapter, io_read(sd, io_reg) 1); + if (!new_client) + /* if not defined in DT, use default if available */ + if (pdata pdata-i2c_addresses[i]) + new_client = i2c_new_dummy(client-adapter, + pdata-i2c_addresses[i]); This is not the same as the original code. If pdata-i2c_addresses[i] == 0, then it should use io_read(sd, io_reg) 1 as the address for i2c_new_dummy. This would break existing code that uses platform_data (such as on our PCIe board). Regards, Hans + + if (new_client) + io_write(sd, io_reg, new_client-addr 1); + + return new_client; } static const struct adv7604_reg_seq adv7604_recommended_settings_afe[] = { @@ -2677,6 +2707,7 @@ MODULE_DEVICE_TABLE(i2c, adv7604_i2c_id); static struct of_device_id adv7604_of_id[] __maybe_unused = { { .compatible = adi,adv7611, .data = adv7604_chip_info[ADV7611] }, + { .compatible = adi,adv7604, .data = adv7604_chip_info[ADV7604] }, { } }; MODULE_DEVICE_TABLE(of, adv7604_of_id); @@ -2717,20 +2748,6 @@ static int adv7604_parse_dt(struct adv7604_state *state) /* Disable the interrupt for now as no DT-based board uses it. */ state-pdata.int1_config = ADV7604_INT1_CONFIG_DISABLED; - /* Use the default I2C addresses. */ - state-pdata.i2c_addresses[ADV7604_PAGE_AVLINK] = 0x42;
Re: [PATCH 2/2] adv7604: Use DT parsing in dummy creation
Hi, On Fri, Aug 29, 2014 at 02:28:17PM +0100, Jean-Michel Hautbois wrote: This patch uses DT in order to parse addresses for dummy devices of adv7604. If nothing is defined, it uses default addresses. The main prupose is using two adv76xx on the same i2c bus. This is rather opaque. It seems from the code below that a single adv7611 device has multiple I2C addresses at which different registers may be accessed. I guess the secondary instances of the unit have different addresses for all of the pages? Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com --- .../devicetree/bindings/media/i2c/adv7604.txt | 7 ++- drivers/media/i2c/adv7604.c| 56 ++ 2 files changed, 42 insertions(+), 21 deletions(-) diff --git a/Documentation/devicetree/bindings/media/i2c/adv7604.txt b/Documentation/devicetree/bindings/media/i2c/adv7604.txt index c27cede..221b75c 100644 --- a/Documentation/devicetree/bindings/media/i2c/adv7604.txt +++ b/Documentation/devicetree/bindings/media/i2c/adv7604.txt @@ -10,6 +10,7 @@ Required Properties: - compatible: Must contain one of the following - adi,adv7611 for the ADV7611 +- adi,adv7604 for the ADV7604 - reg: I2C slave address This should be updated, at least to say address(es). @@ -32,6 +33,8 @@ The digital output port node must contain at least one endpoint. Optional Properties: - reset-gpios: Reference to the GPIO connected to the device's reset pin. + - reg-names : Names of registers to be reprogrammed. This doesn't describe _which_ names you expect, and I have no idea what is meant by to be reprogrammed. + Refer to source code for possible values. Bindings shouldn't say things like this. The binding should describe the contract between the DTB and the OS, which this clearly doesn't. A binding document shouldn't necessitate reading code. Optional Endpoint Properties: @@ -50,7 +53,9 @@ Example: hdmi_receiver@4c { compatible = adi,adv7611; - reg = 0x4c; + /* edid page will be accessible @ 0x66 on i2c bus*/ + reg = 0x4c 0x66; + reg-names = main, edid; What about the other IDs? Are they accessible or not? Why didn't we always list the full set of IDs in the first place? That would have made this far less painful. Thanks, Mark. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 2/2] adv7604: Use DT parsing in dummy creation
This patch uses DT in order to parse addresses for dummy devices of adv7604. The ADV7604 has thirteen 256-byte maps that can be accessed via the main I²C ports. Each map has it own I²C address and acts as a standard slave device on the I²C bus. If nothing is defined, it uses default addresses. The main prupose is using two adv76xx on the same i2c bus. Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com --- .../devicetree/bindings/media/i2c/adv7604.txt | 17 +- drivers/media/i2c/adv7604.c| 60 ++ 2 files changed, 55 insertions(+), 22 deletions(-) diff --git a/Documentation/devicetree/bindings/media/i2c/adv7604.txt b/Documentation/devicetree/bindings/media/i2c/adv7604.txt index c27cede..8486b5c 100644 --- a/Documentation/devicetree/bindings/media/i2c/adv7604.txt +++ b/Documentation/devicetree/bindings/media/i2c/adv7604.txt @@ -10,8 +10,12 @@ Required Properties: - compatible: Must contain one of the following - adi,adv7611 for the ADV7611 +- adi,adv7604 for the ADV7604 - - reg: I2C slave address + - reg: I2C slave addresses +The ADV7604 has thirteen 256-byte maps that can be accessed via the main +I²C ports. Each map has it own I²C address and acts +as a standard slave device on the I²C bus. - hpd-gpios: References to the GPIOs that control the HDMI hot-plug detection pins, one per HDMI input. The active flag indicates the GPIO @@ -32,6 +36,12 @@ The digital output port node must contain at least one endpoint. Optional Properties: - reset-gpios: Reference to the GPIO connected to the device's reset pin. + - reg-names : Names of maps with programmable addresses. + It can contain any map needing another address than default one. + Possible maps names are : +ADV7604 : main, avlink, cec, infoframe, esdp, dpp, afe, rep, + edid, hdmi, test, cp, vdp +ADV7611 : main, cec, infoframe, afe, rep, edid, hdmi, cp Optional Endpoint Properties: @@ -50,7 +60,10 @@ Example: hdmi_receiver@4c { compatible = adi,adv7611; - reg = 0x4c; + /* edid page will be accessible @ 0x66 on i2c bus */ + /* other maps keep their default addresses */ + reg = 0x4c 0x66; + reg-names = main, edid; reset-gpios = ioexp 0 GPIO_ACTIVE_LOW; hpd-gpios = ioexp 2 GPIO_ACTIVE_HIGH; diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index d4fa213..56037dd 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -326,6 +326,22 @@ static const struct adv7604_video_standards adv7604_prim_mode_hdmi_gr[] = { { }, }; +static const char const *adv7604_secondary_names[] = { + main, /* ADV7604_PAGE_IO */ + avlink, /* ADV7604_PAGE_AVLINK */ + cec, /* ADV7604_PAGE_CEC */ + infoframe, /* ADV7604_PAGE_INFOFRAME */ + esdp, /* ADV7604_PAGE_ESDP */ + dpp, /* ADV7604_PAGE_DPP */ + afe, /* ADV7604_PAGE_AFE */ + rep, /* ADV7604_PAGE_REP */ + edid, /* ADV7604_PAGE_EDID */ + hdmi, /* ADV7604_PAGE_HDMI */ + test, /* ADV7604_PAGE_TEST */ + cp, /* ADV7604_PAGE_CP */ + vdp /* ADV7604_PAGE_VDP */ +}; + /* --- */ static inline struct adv7604_state *to_state(struct v4l2_subdev *sd) @@ -2528,13 +2544,31 @@ static void adv7604_unregister_clients(struct adv7604_state *state) } static struct i2c_client *adv7604_dummy_client(struct v4l2_subdev *sd, - u8 addr, u8 io_reg) + unsigned int i) { struct i2c_client *client = v4l2_get_subdevdata(sd); + struct adv7604_platform_data *pdata = client-dev.platform_data; + unsigned int io_reg = 0xf2 + i; + unsigned int default_addr = io_read(sd, io_reg) 1; + struct i2c_client *new_client; + + if (IS_ENABLED(CONFIG_OF)) { + /* Try to find it in DT */ + new_client = i2c_new_secondary_device(client, + adv7604_secondary_names[i], default_addr); + } else if (pdata) { + if (pdata-i2c_addresses[i]) + new_client = i2c_new_dummy(client-adapter, + pdata-i2c_addresses[i]); + else + new_client = i2c_new_dummy(client-adapter, + default_addr); + } - if (addr) - io_write(sd, io_reg, addr 1); - return i2c_new_dummy(client-adapter, io_read(sd, io_reg) 1); + if (new_client) + io_write(sd, io_reg, new_client-addr 1); + + return new_client; } static const struct adv7604_reg_seq adv7604_recommended_settings_afe[] = { @@ -2677,6 +2711,7 @@
[PATCH v2 1/2] Allow DT parsing of secondary devices
This is based on reg and reg-names in DT. Example: reg = 0x10 0x20 0x30; reg-names = main, io, test; This function will create dummy devices io and test with addresses 0x20 and 0x30 respectively. Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com --- drivers/i2c/i2c-core.c | 20 include/linux/i2c.h| 6 ++ 2 files changed, 26 insertions(+) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 632057a..5eb414d 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -798,6 +798,26 @@ struct i2c_client *i2c_new_dummy(struct i2c_adapter *adapter, u16 address) } EXPORT_SYMBOL_GPL(i2c_new_dummy); +struct i2c_client *i2c_new_secondary_device(struct i2c_client *client, + const char *name, + u32 default_addr) +{ + int i, addr; + struct device_node *np; + + np = client-dev.of_node; + i = of_property_match_string(np, reg-names, name); + if (i = 0) + of_property_read_u32_index(np, reg, i, addr); + else + addr = default_addr; + + dev_dbg(client-adapter-dev, Address for %s : 0x%x\n, name, addr); + return i2c_new_dummy(client-adapter, addr); +} +EXPORT_SYMBOL_GPL(i2c_new_secondary_device); + + /* - */ /* I2C bus adapters -- one roots each I2C or SMBUS segment */ diff --git a/include/linux/i2c.h b/include/linux/i2c.h index a95efeb..2d143d7 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -322,6 +322,12 @@ extern int i2c_probe_func_quick_read(struct i2c_adapter *, unsigned short addr); extern struct i2c_client * i2c_new_dummy(struct i2c_adapter *adap, u16 address); +/* Use reg/reg-names in DT in order to get extra addresses */ +extern struct i2c_client * +i2c_new_secondary_device(struct i2c_client *client, + const char *name, + u32 default_addr); + extern void i2c_unregister_device(struct i2c_client *); #endif /* I2C */ -- 2.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/2] Allow DT parsing of secondary devices
On 08/29/2014 05:15 PM, Jean-Michel Hautbois wrote: This is based on reg and reg-names in DT. Example: reg = 0x10 0x20 0x30; reg-names = main, io, test; This function will create dummy devices io and test with addresses 0x20 and 0x30 respectively. Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com This needs a better description explaining the problem and how it is solved. How about i2c: Add generic support passing secondary devices addresses Some I2C devices have multiple addresses assigned, for example each address corresponding to a different internal register map page of the device. So far drivers which need support for this have handled this with a driver specific and non-generic implementation, e.g. passing the additional address via platform data. This patch provides a new helper function called i2c_new_secondary_device() which is intended to provide a generic way to get the secondary address as well as instantiate a struct i2c_client for the secondary address. The function expects a pointer to the primary i2c_client, a name for the secondary address and an optional default address. The name is used as a handle to specify which secondary address to get. The default address is used as a fallback in case no secondary address was explicitly specified. In case no secondary address and no default address were specified the function returns NULL. For now the function only supports look-up of the secondary address from devicetree, but it can be extended in the future to for example support board files and/or ACPI. The patch should also update the I2C devicetree bindings documentation to explain how bindings for devices with multiple addresses work. --- drivers/i2c/i2c-core.c | 20 include/linux/i2c.h| 6 ++ 2 files changed, 26 insertions(+) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 632057a..5eb414d 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -798,6 +798,26 @@ struct i2c_client *i2c_new_dummy(struct i2c_adapter *adapter, u16 address) } EXPORT_SYMBOL_GPL(i2c_new_dummy); The function needs a kernel doc description. +struct i2c_client *i2c_new_secondary_device(struct i2c_client *client, + const char *name, + u32 default_addr) The I2C framework commonly uses u16 for the type of a I2C address. +{ + int i, addr; addr needs to be u32 here since it is passed to of_property_read_u32_index(). + struct device_node *np; + + np = client-dev.of_node; of_node can be NULL, this needs to be handled. Ideally by using the default address. + i = of_property_match_string(np, reg-names, name); + if (i = 0) + of_property_read_u32_index(np, reg, i, addr); of_property_read_u32_index() can fail, this needs to be handled. + else + addr = default_addr; If no address was specified and default_addr is 0 the function should return NULL. + + dev_dbg(client-adapter-dev, Address for %s : 0x%x\n, name, addr); + return i2c_new_dummy(client-adapter, addr); +} +EXPORT_SYMBOL_GPL(i2c_new_secondary_device); + + /* - */ /* I2C bus adapters -- one roots each I2C or SMBUS segment */ diff --git a/include/linux/i2c.h b/include/linux/i2c.h index a95efeb..2d143d7 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -322,6 +322,12 @@ extern int i2c_probe_func_quick_read(struct i2c_adapter *, unsigned short addr); extern struct i2c_client * i2c_new_dummy(struct i2c_adapter *adap, u16 address); +/* Use reg/reg-names in DT in order to get extra addresses */ The comment should go into i2c-core.c and be in proper kernel doc fully explaining the function, its parameters and the behavior. +extern struct i2c_client * +i2c_new_secondary_device(struct i2c_client *client, + const char *name, + u32 default_addr); + extern void i2c_unregister_device(struct i2c_client *); #endif /* I2C */ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/2] Allow DT parsing of secondary devices
On 08/29/2014 05:15 PM, Jean-Michel Hautbois wrote: This is based on reg and reg-names in DT. Example: reg = 0x10 0x20 0x30; reg-names = main, io, test; This function will create dummy devices io and test with addresses 0x20 and 0x30 respectively. Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com This needs a better description explaining the problem and how it is solved. How about i2c: Add generic support passing secondary devices addresses Some I2C devices have multiple addresses assigned, for example each address corresponding to a different internal register map page of the device. So far drivers which need support for this have handled this with a driver specific and non-generic implementation, e.g. passing the additional address via platform data. This patch provides a new helper function called i2c_new_secondary_device() which is intended to provide a generic way to get the secondary address as well as instantiate a struct i2c_client for the secondary address. The function expects a pointer to the primary i2c_client, a name for the secondary address and an optional default address. The name is used as a handle to specify which secondary address to get. The default address is used as a fallback in case no secondary address was explicitly specified. In case no secondary address and no default address were specified the function returns NULL. For now the function only supports look-up of the secondary address from devicetree, but it can be extended in the future to for example support board files and/or ACPI. --- drivers/i2c/i2c-core.c | 20 include/linux/i2c.h| 6 ++ 2 files changed, 26 insertions(+) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 632057a..5eb414d 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -798,6 +798,26 @@ struct i2c_client *i2c_new_dummy(struct i2c_adapter *adapter, u16 address) } EXPORT_SYMBOL_GPL(i2c_new_dummy); The function needs a kernel doc description. +struct i2c_client *i2c_new_secondary_device(struct i2c_client *client, + const char *name, + u32 default_addr) The I2C framework commonly uses u16 for the type of a I2C address. +{ + int i, addr; addr needs to be u32 here since it is passed to of_property_read_u32_index(). + struct device_node *np; + + np = client-dev.of_node; of_node can be NULL, this needs to be handled. Ideally by using the default address. + i = of_property_match_string(np, reg-names, name); + if (i = 0) + of_property_read_u32_index(np, reg, i, addr); of_property_read_u32_index() can fail, this needs to be handled. + else + addr = default_addr; If no address was specified and default_addr is 0 the function should return NULL. + + dev_dbg(client-adapter-dev, Address for %s : 0x%x\n, name, addr); + return i2c_new_dummy(client-adapter, addr); +} +EXPORT_SYMBOL_GPL(i2c_new_secondary_device); + + /* - */ /* I2C bus adapters -- one roots each I2C or SMBUS segment */ diff --git a/include/linux/i2c.h b/include/linux/i2c.h index a95efeb..2d143d7 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -322,6 +322,12 @@ extern int i2c_probe_func_quick_read(struct i2c_adapter *, unsigned short addr); extern struct i2c_client * i2c_new_dummy(struct i2c_adapter *adap, u16 address); +/* Use reg/reg-names in DT in order to get extra addresses */ The comment should go into i2c-core.c and be in proper kernel doc fully explaining the function, its parameters and the behavior. +extern struct i2c_client * +i2c_new_secondary_device(struct i2c_client *client, + const char *name, + u32 default_addr); + extern void i2c_unregister_device(struct i2c_client *); #endif /* I2C */ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
randconfig build error with next-20140829, in drivers/media/usb/dvb-usb/technisat-usb2.c
Building with the attached random configuration file, LD init/built-in.o drivers/built-in.o: In function `technisat_usb2_set_voltage': technisat-usb2.c:(.text+0x3b4919): undefined reference to `stv090x_set_gpio' make: *** [vmlinux] Error 1 # # Automatically generated file; DO NOT EDIT. # Linux/x86 3.17.0-rc2 Kernel Configuration # CONFIG_64BIT=y CONFIG_X86_64=y CONFIG_X86=y CONFIG_INSTRUCTION_DECODER=y CONFIG_OUTPUT_FORMAT=elf64-x86-64 CONFIG_ARCH_DEFCONFIG=arch/x86/configs/x86_64_defconfig CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_MMU=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NEED_SG_DMA_LENGTH=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y CONFIG_GENERIC_HWEIGHT=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_ARCH_WANT_GENERAL_HUGETLB=y CONFIG_ZONE_DMA32=y CONFIG_AUDIT_ARCH=y CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_ARCH_HWEIGHT_CFLAGS=-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11 CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config CONFIG_CONSTRUCTORS=y CONFIG_IRQ_WORK=y CONFIG_BUILDTIME_EXTABLE_SORT=y # # General setup # CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_CROSS_COMPILE= CONFIG_COMPILE_TEST=y CONFIG_LOCALVERSION= # CONFIG_LOCALVERSION_AUTO is not set CONFIG_HAVE_KERNEL_GZIP=y CONFIG_HAVE_KERNEL_BZIP2=y CONFIG_HAVE_KERNEL_LZMA=y CONFIG_HAVE_KERNEL_XZ=y CONFIG_HAVE_KERNEL_LZO=y CONFIG_HAVE_KERNEL_LZ4=y CONFIG_KERNEL_GZIP=y # CONFIG_KERNEL_BZIP2 is not set # CONFIG_KERNEL_LZMA is not set # CONFIG_KERNEL_XZ is not set # CONFIG_KERNEL_LZO is not set # CONFIG_KERNEL_LZ4 is not set CONFIG_DEFAULT_HOSTNAME=(none) CONFIG_SWAP=y # CONFIG_SYSVIPC is not set # CONFIG_POSIX_MQUEUE is not set # CONFIG_CROSS_MEMORY_ATTACH is not set CONFIG_FHANDLE=y CONFIG_USELIB=y # CONFIG_AUDIT is not set CONFIG_HAVE_ARCH_AUDITSYSCALL=y # # IRQ subsystem # CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_IRQ_LEGACY_ALLOC_HWIRQ=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_DEBUG=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y CONFIG_CLOCKSOURCE_WATCHDOG=y CONFIG_ARCH_CLOCKSOURCE_DATA=y CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y CONFIG_GENERIC_CMOS_UPDATE=y # # Timers subsystem # CONFIG_TICK_ONESHOT=y CONFIG_NO_HZ_COMMON=y # CONFIG_HZ_PERIODIC is not set CONFIG_NO_HZ_IDLE=y CONFIG_NO_HZ=y # CONFIG_HIGH_RES_TIMERS is not set # # CPU/Task time and stats accounting # CONFIG_TICK_CPU_ACCOUNTING=y # CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set # CONFIG_IRQ_TIME_ACCOUNTING is not set CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set # CONFIG_TASKSTATS is not set # # RCU Subsystem # CONFIG_TINY_RCU=y # CONFIG_PREEMPT_RCU is not set CONFIG_RCU_STALL_COMMON=y # CONFIG_TREE_RCU_TRACE is not set CONFIG_BUILD_BIN2C=y CONFIG_IKCONFIG=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y CONFIG_ARCH_SUPPORTS_INT128=y CONFIG_CGROUPS=y # CONFIG_CGROUP_DEBUG is not set CONFIG_CGROUP_FREEZER=y # CONFIG_CGROUP_DEVICE is not set # CONFIG_CPUSETS is not set CONFIG_CGROUP_CPUACCT=y # CONFIG_RESOURCE_COUNTERS is not set CONFIG_CGROUP_PERF=y CONFIG_CGROUP_SCHED=y CONFIG_FAIR_GROUP_SCHED=y CONFIG_CFS_BANDWIDTH=y # CONFIG_RT_GROUP_SCHED is not set # CONFIG_BLK_CGROUP is not set CONFIG_CHECKPOINT_RESTORE=y CONFIG_NAMESPACES=y CONFIG_UTS_NS=y # CONFIG_USER_NS is not set # CONFIG_PID_NS is not set CONFIG_NET_NS=y CONFIG_SCHED_AUTOGROUP=y CONFIG_SYSFS_DEPRECATED=y # CONFIG_SYSFS_DEPRECATED_V2 is not set CONFIG_RELAY=y CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE= CONFIG_RD_GZIP=y CONFIG_RD_BZIP2=y CONFIG_RD_LZMA=y CONFIG_RD_XZ=y # CONFIG_RD_LZO is not set # CONFIG_RD_LZ4 is not set # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_ANON_INODES=y CONFIG_HAVE_UID16=y CONFIG_SYSCTL_EXCEPTION_TRACE=y CONFIG_HAVE_PCSPKR_PLATFORM=y CONFIG_EXPERT=y CONFIG_UID16=y # CONFIG_SGETMASK_SYSCALL is not set CONFIG_SYSFS_SYSCALL=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y CONFIG_PRINTK=y CONFIG_BUG=y # CONFIG_PCSPKR_PLATFORM is not set CONFIG_BASE_FULL=y # CONFIG_FUTEX is not set # CONFIG_EPOLL is not set # CONFIG_SIGNALFD is not set # CONFIG_TIMERFD is not set CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_AIO=y # CONFIG_PCI_QUIRKS is not set CONFIG_EMBEDDED=y CONFIG_HAVE_PERF_EVENTS=y # # Kernel Performance Events And Counters # CONFIG_PERF_EVENTS=y #
cron job: media_tree daily build: WARNINGS
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Sat Aug 30 04:00:20 CEST 2014 git branch: test git hash: b250392f7b5062cf026b1423e27265e278fd6b30 gcc version:i686-linux-gcc (GCC) 4.9.1 sparse version: v0.5.0-20-g7abd8a7 host hardware: x86_64 host os:3.16-1.slh.1-amd64 linux-git-arm-at91: OK linux-git-arm-davinci: OK linux-git-arm-exynos: OK linux-git-arm-mx: OK linux-git-arm-omap: OK linux-git-arm-omap1: OK linux-git-arm-pxa: OK linux-git-blackfin: OK linux-git-i686: OK linux-git-m32r: OK linux-git-mips: OK linux-git-powerpc64: OK linux-git-sh: OK linux-git-x86_64: OK linux-2.6.32.27-i686: OK linux-2.6.33.7-i686: OK linux-2.6.34.7-i686: OK linux-2.6.35.9-i686: OK linux-2.6.36.4-i686: OK linux-2.6.37.6-i686: OK linux-2.6.38.8-i686: OK linux-2.6.39.4-i686: OK linux-3.0.60-i686: OK linux-3.1.10-i686: OK linux-3.2.37-i686: OK linux-3.3.8-i686: OK linux-3.4.27-i686: OK linux-3.5.7-i686: OK linux-3.6.11-i686: OK linux-3.7.4-i686: OK linux-3.8-i686: OK linux-3.9.2-i686: OK linux-3.10.1-i686: OK linux-3.11.1-i686: OK linux-3.12.23-i686: OK linux-3.13.11-i686: OK linux-3.14.9-i686: OK linux-3.15.2-i686: OK linux-3.16-i686: OK linux-3.17-rc1-i686: OK linux-2.6.32.27-x86_64: OK linux-2.6.33.7-x86_64: OK linux-2.6.34.7-x86_64: OK linux-2.6.35.9-x86_64: OK linux-2.6.36.4-x86_64: OK linux-2.6.37.6-x86_64: OK linux-2.6.38.8-x86_64: OK linux-2.6.39.4-x86_64: OK linux-3.0.60-x86_64: OK linux-3.1.10-x86_64: OK linux-3.2.37-x86_64: OK linux-3.3.8-x86_64: OK linux-3.4.27-x86_64: OK linux-3.5.7-x86_64: OK linux-3.6.11-x86_64: OK linux-3.7.4-x86_64: OK linux-3.8-x86_64: OK linux-3.9.2-x86_64: OK linux-3.10.1-x86_64: OK linux-3.11.1-x86_64: OK linux-3.12.23-x86_64: OK linux-3.13.11-x86_64: OK linux-3.14.9-x86_64: OK linux-3.15.2-x86_64: OK linux-3.16-x86_64: OK linux-3.17-rc1-x86_64: OK apps: WARNINGS spec-git: OK sparse: WARNINGS Detailed results are available here: http://www.xs4all.nl/~hverkuil/logs/Saturday.log Full logs are available here: http://www.xs4all.nl/~hverkuil/logs/Saturday.tar.bz2 The Media Infrastructure API from this daily build is here: http://www.xs4all.nl/~hverkuil/spec/media.html -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
TO CLAIM YOUR PRICE CONTACT US VIA: sirneedm...@gmail.com
TO CLAIM YOUR PRICE CONTACT US VIA: sirneedm...@gmail.com - Statement of Confidentiality This message (including attachments) may contain confidential or privileged information intended for a specific individual or organization. If you have received this communication in error, please notify the sender immediately. If you are not the intended recipient, you are not authorized to use, disclose, distribute, copy, print or rely on this email, and should promptly delete this email from your entire computer system. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html