media updates for v4.11-rc1

-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJYrH0jAAoJEAhfPr2O5OEVwaAQAJDaz4Qs7qt8mNDUerxT/ec0
 soiA5Bg8Xaa2WXmGgfPNXBTy5N6X0ArhvGoUQxMp6ef1Wjw8btjs36PnPUmMfbq6
 /Hb6mnU7g8hkXRCeSRI9ATCAxcQy+pR0by48+BX5Do/KS0b9DICMT83sMkikAmAb
 Y1ATUpc2kmCLY7RgSOI/HXOWV/2pC4OwhscXjj6BE9BLmiRY9eYOsbcFQ+cJoz6G
 jiTUL68M0MZxkxeFiuWzTgRJ0F00HTqjXFeI2ccynmwKO4etXmI0kFi2om2bXVsc
 cLHn6SJTByoHeIbtBhh2InsBvyT7oODOnNcwkpV8PUuBnmQc9F3uUufxgVRTwQTW
 6wv3pqJ4fHpNOWWejYNehmCVVHN9w1Bx8r4T1DB5a6UdlZ5yModOW93NV3JtPFSD
 xfsIR6fiETcVpsxrKmBzqvUnxEKduinQPPCQi/Xcr9Ups1WRSHkEaHqGtRhYqYKp
 gDp5QAwXmGphrJKuJHo/v3wl9l3b5qvKsoyt+ScNwr56qlMkgWf95zahRg0BMh88
 ytu+mE3EpxhZzXKTHw0F9OdU54uXPfN0VzzIvP4mUyDVpJLa+OWDGSw0HGLAGrvt
 YHSvs9KYqW4m9Gr/+zwMQAm3CDD26vIGRIhyC8yRIRtf8a8fpPGxbyjse+RhaWmO
 Rj/UZhR3incKUurT0cqI
 =LgNQ
 -----END PGP SIGNATURE-----

Merge tag 'media/v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:

 - new drivers:
       - i.MX6 Video Data Order Adapter's (VDOA)
       - Toshiba et8ek8 5MP sensor
       - STM DELTA multi-format video decoder V4L2 driver
       - SPI connected IR LED
       - Mediatek IR remote receiver
       - ZyDAS ZD1301 DVB USB interface driver

 - new RC keymaps

 - some very old LIRC drivers got removed from staging

 - RC core gained support encoding IR scan codes

 - DVB si2168 gained support for DVBv5 statistics

 - lirc_sir driver ported to rc-core and promoted from staging

 - other bug fixes, board additions and driver improvements

* tag 'media/v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (230 commits)
  [media] mtk-vcodec: fix build warnings without DEBUG
  [media] zd1301: fix building interface driver without demodulator
  [media] usbtv: add sharpness control
  [media] cxusb: Use a dma capable buffer also for reading
  [media] ttpci: address stringop overflow warning
  [media] dvb-usb-v2: avoid use-after-free
  [media] add Hama Hybrid DVB-T Stick support
  [media] et8ek8: Fix compiler / Coccinelle warnings
  [media] media: fix semicolon.cocci warnings
  [media] media: exynos4-is: add flags to dummy Exynos IS i2c adapter
  [media] v4l: of: check for unique lanes in data-lanes and clock-lanes
  [media] coda/imx-vdoa: constify structs
  [media] st-delta: debug: trace stream/frame information & summary
  [media] st-delta: add mjpeg support
  [media] st-delta: EOS (End Of Stream) support
  [media] st-delta: rpmsg ipc support
  [media] st-delta: add memory allocator helper functions
  [media] st-delta: STiH4xx multi-format video decoder v4l2 driver
  [media] MAINTAINERS: add st-delta driver
  [media] ARM: multi_v7_defconfig: enable STMicroelectronics DELTA Support
  ...
This commit is contained in:
Linus Torvalds 2017-02-21 16:58:32 -08:00
commit ff58d005cd
863 changed files with 14521 additions and 9041 deletions

View File

@ -62,18 +62,18 @@ Description:
This value may be reset to 0 if the current protocol is altered.
What: /sys/class/rc/rcN/wakeup_protocols
Date: Feb 2014
KernelVersion: 3.15
Date: Feb 2017
KernelVersion: 4.11
Contact: Mauro Carvalho Chehab <m.chehab@samsung.com>
Description:
Reading this file returns a list of available protocols to use
for the wakeup filter, something like:
"rc5 rc6 nec jvc [sony]"
"rc-5 nec nec-x rc-6-0 rc-6-6a-24 [rc-6-6a-32] rc-6-mce"
Note that protocol variants are listed, so "nec", "sony",
"rc-5", "rc-6" have their different bit length encodings
listed if available.
The enabled wakeup protocol is shown in [] brackets.
Writing "+proto" will add a protocol to the list of enabled
wakeup protocols.
Writing "-proto" will remove a protocol from the list of enabled
wakeup protocols.
Only one protocol can be selected at a time.
Writing "proto" will use "proto" for wakeup events.
Writing "none" will disable wakeup.
Write fails with EINVAL if an invalid protocol combination or

View File

@ -0,0 +1,29 @@
Device tree bindings for IR LED connected through SPI bus which is used as
remote controller.
The IR LED switch is connected to the MOSI line of the SPI device and the data
are delivered thourgh that.
Required properties:
- compatible: should be "ir-spi-led".
Optional properties:
- duty-cycle: 8 bit balue that represents the percentage of one period
in which the signal is active. It can be 50, 60, 70, 75, 80 or 90.
- led-active-low: boolean value that specifies whether the output is
negated with a NOT gate.
- power-supply: specifies the power source. It can either be a regulator
or a gpio which enables a regulator, i.e. a regulator-fixed as
described in
Documentation/devicetree/bindings/regulator/fixed-regulator.txt
Example:
irled@0 {
compatible = "ir-spi-led";
reg = <0x0>;
spi-max-frequency = <5000000>;
power-supply = <&vdd_led>;
led-active-low;
duty-cycle = /bits/ 8 <60>;
};

View File

@ -0,0 +1,21 @@
Freescale Video Data Order Adapter
==================================
The Video Data Order Adapter (VDOA) is present on the i.MX6q. Its sole purpose
is to reorder video data from the macroblock tiled order produced by the CODA
960 VPU to the conventional raster-scan order for scanout.
Required properties:
- compatible: must be "fsl,imx6q-vdoa"
- reg: the register base and size for the device registers
- interrupts: the VDOA interrupt
- clocks: the vdoa clock
Example:
vdoa@21e4000 {
compatible = "fsl,imx6q-vdoa";
reg = <0x021e4000 0x4000>;
interrupts = <0 18 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6QDL_CLK_VDOA>;
};

View File

@ -5,7 +5,8 @@ Required properties:
- gpios: specifies GPIO used for IR signal reception.
Optional properties:
- linux,rc-map-name: Linux specific remote control map name.
- linux,rc-map-name: see rc.txt file in the same
directory.
Example node:

View File

@ -10,7 +10,7 @@ Required properties:
- clocks: clock phandle and specifier pair.
Optional properties:
- linux,rc-map-name : Remote control map name.
- linux,rc-map-name: see rc.txt file in the same directory.
- hisilicon,power-syscon: DEPRECATED. Don't use this in new dts files.
Provide correct clocks instead.

View File

@ -0,0 +1,48 @@
Toshiba et8ek8 5MP sensor
Toshiba et8ek8 5MP sensor is an image sensor found in Nokia N900 device
More detailed documentation can be found in
Documentation/devicetree/bindings/media/video-interfaces.txt .
Mandatory properties
--------------------
- compatible: "toshiba,et8ek8"
- reg: I2C address (0x3e, or an alternative address)
- vana-supply: Analogue voltage supply (VANA), 2.8 volts
- clocks: External clock to the sensor
- clock-frequency: Frequency of the external clock to the sensor. Camera
driver will set this frequency on the external clock. The clock frequency is
a pre-determined frequency known to be suitable to the board.
- reset-gpios: XSHUTDOWN GPIO. The XSHUTDOWN signal is active low. The sensor
is in hardware standby mode when the signal is in the low state.
Endpoint node mandatory properties
----------------------------------
- remote-endpoint: A phandle to the bus receiver's endpoint node.
Example
-------
&i2c3 {
clock-frequency = <400000>;
cam1: camera@3e {
compatible = "toshiba,et8ek8";
reg = <0x3e>;
vana-supply = <&vaux4>;
clocks = <&isp 0>;
clock-frequency = <9600000>;
reset-gpio = <&gpio4 6 GPIO_ACTIVE_HIGH>; /* 102 */
port {
csi_cam1: endpoint {
remote-endpoint = <&csi_out1>;
};
};
};
};

View File

@ -8,6 +8,9 @@ Required properties:
- reg : physical base address and length of the device registers
- interrupts : a single specifier for the interrupt from the device
Optional properties:
- linux,rc-map-name: see rc.txt file in the same directory.
Example:
ir-receiver@c8100480 {

View File

@ -0,0 +1,24 @@
Device-Tree bindings for Mediatek consumer IR controller
found in Mediatek SoC family
Required properties:
- compatible : "mediatek,mt7623-cir"
- clocks : list of clock specifiers, corresponding to
entries in clock-names property;
- clock-names : should contain "clk" entries;
- interrupts : should contain IR IRQ number;
- reg : should contain IO map address for IR.
Optional properties:
- linux,rc-map-name : see rc.txt file in the same directory.
Example:
cir: cir@10013000 {
compatible = "mediatek,mt7623-cir";
reg = <0 0x10013000 0 0x1000>;
interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_LOW>;
clocks = <&infracfg CLK_INFRA_IRRX>;
clock-names = "clk";
linux,rc-map-name = "rc-rc6-mce";
};

View File

@ -0,0 +1,117 @@
The following properties are common to the infrared remote controllers:
- linux,rc-map-name: string, specifies the scancode/key mapping table
defined in-kernel for the remote controller. Support values are:
* "rc-adstech-dvb-t-pci"
* "rc-alink-dtu-m"
* "rc-anysee"
* "rc-apac-viewcomp"
* "rc-asus-pc39"
* "rc-asus-ps3-100"
* "rc-ati-tv-wonder-hd-600"
* "rc-ati-x10"
* "rc-avermedia-a16d"
* "rc-avermedia-cardbus"
* "rc-avermedia-dvbt"
* "rc-avermedia-m135a"
* "rc-avermedia-m733a-rm-k6"
* "rc-avermedia-rm-ks"
* "rc-avermedia"
* "rc-avertv-303"
* "rc-azurewave-ad-tu700"
* "rc-behold-columbus"
* "rc-behold"
* "rc-budget-ci-old"
* "rc-cec"
* "rc-cinergy-1400"
* "rc-cinergy"
* "rc-delock-61959"
* "rc-dib0700-nec"
* "rc-dib0700-rc5"
* "rc-digitalnow-tinytwin"
* "rc-digittrade"
* "rc-dm1105-nec"
* "rc-dntv-live-dvbt-pro"
* "rc-dntv-live-dvb-t"
* "rc-dtt200u"
* "rc-dvbsky"
* "rc-empty"
* "rc-em-terratec"
* "rc-encore-enltv2"
* "rc-encore-enltv-fm53"
* "rc-encore-enltv"
* "rc-evga-indtube"
* "rc-eztv"
* "rc-flydvb"
* "rc-flyvideo"
* "rc-fusionhdtv-mce"
* "rc-gadmei-rm008z"
* "rc-geekbox"
* "rc-genius-tvgo-a11mce"
* "rc-gotview7135"
* "rc-hauppauge"
* "rc-imon-mce"
* "rc-imon-pad"
* "rc-iodata-bctv7e"
* "rc-it913x-v1"
* "rc-it913x-v2"
* "rc-kaiomy"
* "rc-kworld-315u"
* "rc-kworld-pc150u"
* "rc-kworld-plus-tv-analog"
* "rc-leadtek-y04g0051"
* "rc-lirc"
* "rc-lme2510"
* "rc-manli"
* "rc-medion-x10"
* "rc-medion-x10-digitainer"
* "rc-medion-x10-or2x"
* "rc-msi-digivox-ii"
* "rc-msi-digivox-iii"
* "rc-msi-tvanywhere-plus"
* "rc-msi-tvanywhere"
* "rc-nebula"
* "rc-nec-terratec-cinergy-xs"
* "rc-norwood"
* "rc-npgtech"
* "rc-pctv-sedna"
* "rc-pinnacle-color"
* "rc-pinnacle-grey"
* "rc-pinnacle-pctv-hd"
* "rc-pixelview-new"
* "rc-pixelview"
* "rc-pixelview-002t"
* "rc-pixelview-mk12"
* "rc-powercolor-real-angel"
* "rc-proteus-2309"
* "rc-purpletv"
* "rc-pv951"
* "rc-hauppauge"
* "rc-rc5-tv"
* "rc-rc6-mce"
* "rc-real-audio-220-32-keys"
* "rc-reddo"
* "rc-snapstream-firefly"
* "rc-streamzap"
* "rc-tbs-nec"
* "rc-technisat-ts35"
* "rc-technisat-usb2"
* "rc-terratec-cinergy-c-pci"
* "rc-terratec-cinergy-s2-hd"
* "rc-terratec-cinergy-xs"
* "rc-terratec-slim"
* "rc-terratec-slim-2"
* "rc-tevii-nec"
* "rc-tivo"
* "rc-total-media-in-hand"
* "rc-total-media-in-hand-02"
* "rc-trekstor"
* "rc-tt-1500"
* "rc-twinhan-dtv-cab-ci"
* "rc-twinhan1027"
* "rc-videomate-k100"
* "rc-videomate-s350"
* "rc-videomate-tv-pvr"
* "rc-winfast"
* "rc-winfast-usbii-deluxe"
* "rc-su3000"

View File

@ -0,0 +1,17 @@
* STMicroelectronics DELTA multi-format video decoder
Required properties:
- compatible: should be "st,st-delta".
- clocks: from common clock binding: handle hardware IP needed clocks, the
number of clocks may depend on the SoC type.
See ../clock/clock-bindings.txt for details.
- clock-names: names of the clocks listed in clocks property in the same order.
Example:
delta0 {
compatible = "st,st-delta";
clock-names = "delta", "delta-st231", "delta-flash-promip";
clocks = <&clk_s_c0_flexgen CLK_VID_DMU>,
<&clk_s_c0_flexgen CLK_ST231_DMU>,
<&clk_s_c0_flexgen CLK_FLASH_PROMIP>;
};

View File

@ -9,7 +9,7 @@ Required properties:
- reg : should contain IO map address for IR.
Optional properties:
- linux,rc-map-name : Remote control map name.
- linux,rc-map-name: see rc.txt file in the same directory.
- resets : phandle + reset specifier pair
Example:

View File

@ -0,0 +1,83 @@
Texas Instruments VPIF
----------------------
The TI Video Port InterFace (VPIF) is the primary component for video
capture and display on the DA850/AM18x family of TI DaVinci/Sitara
SoCs.
TI Document reference: SPRUH82C, Chapter 35
http://www.ti.com/lit/pdf/spruh82
Required properties:
- compatible: must be "ti,da850-vpif"
- reg: physical base address and length of the registers set for the device;
- interrupts: should contain IRQ line for the VPIF
Video Capture:
VPIF has a 16-bit parallel bus input, supporting 2 8-bit channels or a
single 16-bit channel. It should contain at least one port child node
with child 'endpoint' node. Please refer to the bindings defined in
Documentation/devicetree/bindings/media/video-interfaces.txt.
Example using 2 8-bit input channels, one of which is connected to an
I2C-connected TVP5147 decoder:
vpif: vpif@217000 {
compatible = "ti,da850-vpif";
reg = <0x217000 0x1000>;
interrupts = <92>;
port {
vpif_ch0: endpoint@0 {
reg = <0>;
bus-width = <8>;
remote-endpoint = <&composite>;
};
vpif_ch1: endpoint@1 {
reg = <1>;
bus-width = <8>;
data-shift = <8>;
};
};
};
[ ... ]
&i2c0 {
tvp5147@5d {
compatible = "ti,tvp5147";
reg = <0x5d>;
status = "okay";
port {
composite: endpoint {
hsync-active = <1>;
vsync-active = <1>;
pclk-sample = <0>;
/* VPIF channel 0 (lower 8-bits) */
remote-endpoint = <&vpif_ch0>;
bus-width = <8>;
};
};
};
};
Alternatively, an example when the bus is configured as a single
16-bit input (e.g. for raw-capture mode):
vpif: vpif@217000 {
compatible = "ti,da850-vpif";
reg = <0x217000 0x1000>;
interrupts = <92>;
port {
vpif_ch0: endpoint {
bus-width = <16>;
};
};
};

View File

@ -162,13 +162,13 @@ framework provides a depth-first graph traversal API for that purpose.
currently defined as 16.
Drivers initiate a graph traversal by calling
:c:func:`media_entity_graph_walk_start()`
:c:func:`media_graph_walk_start()`
The graph structure, provided by the caller, is initialized to start graph
traversal at the given entity.
Drivers can then retrieve the next entity by calling
:c:func:`media_entity_graph_walk_next()`
:c:func:`media_graph_walk_next()`
When the graph traversal is complete the function will return ``NULL``.
@ -206,7 +206,7 @@ Pipelines and media streams
When starting streaming, drivers must notify all entities in the pipeline to
prevent link states from being modified during streaming by calling
:c:func:`media_entity_pipeline_start()`.
:c:func:`media_pipeline_start()`.
The function will mark all entities connected to the given entity through
enabled links, either directly or indirectly, as streaming.
@ -218,17 +218,17 @@ in higher-level pipeline structures and can then access the
pipeline through the struct :c:type:`media_entity`
pipe field.
Calls to :c:func:`media_entity_pipeline_start()` can be nested.
Calls to :c:func:`media_pipeline_start()` can be nested.
The pipeline pointer must be identical for all nested calls to the function.
:c:func:`media_entity_pipeline_start()` may return an error. In that case,
:c:func:`media_pipeline_start()` may return an error. In that case,
it will clean up any of the changes it did by itself.
When stopping the stream, drivers must notify the entities with
:c:func:`media_entity_pipeline_stop()`.
:c:func:`media_pipeline_stop()`.
If multiple calls to :c:func:`media_entity_pipeline_start()` have been
made the same number of :c:func:`media_entity_pipeline_stop()` calls
If multiple calls to :c:func:`media_pipeline_start()` have been
made the same number of :c:func:`media_pipeline_stop()` calls
are required to stop streaming.
The :c:type:`media_entity`.\ ``pipe`` field is reset to ``NULL`` on the last
nested stop call.
@ -245,7 +245,7 @@ operation must be done with the media_device graph_mutex held.
Link validation
^^^^^^^^^^^^^^^
Link validation is performed by :c:func:`media_entity_pipeline_start()`
Link validation is performed by :c:func:`media_pipeline_start()`
for any entity which has sink pads in the pipeline. The
:c:type:`media_entity`.\ ``link_validate()`` callback is used for that
purpose. In ``link_validate()`` callback, entity driver should check

View File

@ -94,9 +94,17 @@ Generic Error Codes
- Permission denied. Can be returned if the device needs write
permission, or some special capabilities is needed (e. g. root)
- .. row 11
- ``EIO``
- I/O error. Typically used when there are problems communicating with
a hardware device. This could indicate broken or flaky hardware.
It's a 'Something is wrong, I give up!' type of error.
.. note::
#. This list is not exaustive; ioctls may return other error codes.
#. This list is not exhaustive; ioctls may return other error codes.
Since errors may have side effects such as a driver reset,
applications should abort on unexpected errors, or otherwise
assume that the device is in a bad state.

View File

@ -92,15 +92,16 @@ This value may be reset to 0 if the current protocol is altered.
Reading this file returns a list of available protocols to use for the
wakeup filter, something like:
``rc5 rc6 nec jvc [sony]``
``rc-5 nec nec-x rc-6-0 rc-6-6a-24 [rc-6-6a-32] rc-6-mce``
Note that protocol variants are listed, so "nec", "sony", "rc-5", "rc-6"
have their different bit length encodings listed if available.
Note that all protocol variants are listed.
The enabled wakeup protocol is shown in [] brackets.
Writing "+proto" will add a protocol to the list of enabled wakeup
protocols.
Writing "-proto" will remove a protocol from the list of enabled wakeup
protocols.
Only one protocol can be selected at a time.
Writing "proto" will use "proto" for wakeup events.

View File

@ -2423,6 +2423,14 @@ W: https://linuxtv.org
S: Supported
F: drivers/media/platform/sti/bdisp
DELTA ST MEDIA DRIVER
M: Hugues Fruchet <hugues.fruchet@st.com>
L: linux-media@vger.kernel.org
T: git git://linuxtv.org/media_tree.git
W: https://linuxtv.org
S: Supported
F: drivers/media/platform/sti/delta
BEFS FILE SYSTEM
M: Luis de Bethencourt <luisbg@osg.samsung.com>
M: Salah Triki <salah.triki@gmail.com>
@ -5738,16 +5746,6 @@ L: linux-parisc@vger.kernel.org
S: Maintained
F: sound/parisc/harmony.*
HD29L2 MEDIA DRIVER
M: Antti Palosaari <crope@iki.fi>
L: linux-media@vger.kernel.org
W: https://linuxtv.org
W: http://palosaari.fi/linux/
Q: http://patchwork.linuxtv.org/project/linux-media/list/
T: git git://linuxtv.org/anttip/media_tree.git
S: Maintained
F: drivers/media/dvb-frontends/hd29l2*
HEWLETT PACKARD ENTERPRISE ILO NMI WATCHDOG DRIVER
M: Jimmy Vance <jimmy.vance@hpe.com>
S: Supported
@ -8825,6 +8823,22 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2.git
S: Maintained
F: arch/nios2/
NOKIA N900 CAMERA SUPPORT (ET8EK8 SENSOR, AD5820 FOCUS)
M: Pavel Machek <pavel@ucw.cz>
M: Sakari Ailus <sakari.ailus@iki.fi>
L: linux-media@vger.kernel.org
S: Maintained
F: drivers/media/i2c/et8ek8
F: drivers/media/i2c/ad5820.c
NOKIA N900 CAMERA SUPPORT (ET8EK8 SENSOR, AD5820 FOCUS)
M: Pavel Machek <pavel@ucw.cz>
M: Sakari Ailus <sakari.ailus@iki.fi>
L: linux-media@vger.kernel.org
S: Maintained
F: drivers/media/i2c/et8ek8
F: drivers/media/i2c/ad5820.c
NOKIA N900 POWER SUPPLY DRIVERS
R: Pali Rohár <pali.rohar@gmail.com>
F: include/linux/power/bq2415x_charger.h
@ -13660,6 +13674,24 @@ L: zd1211-devs@lists.sourceforge.net (subscribers-only)
S: Maintained
F: drivers/net/wireless/zydas/zd1211rw/
ZD1301_DEMOD MEDIA DRIVER
M: Antti Palosaari <crope@iki.fi>
L: linux-media@vger.kernel.org
W: https://linuxtv.org/
W: http://palosaari.fi/linux/
Q: https://patchwork.linuxtv.org/project/linux-media/list/
S: Maintained
F: drivers/media/dvb-frontends/zd1301_demod*
ZD1301 MEDIA DRIVER
M: Antti Palosaari <crope@iki.fi>
L: linux-media@vger.kernel.org
W: https://linuxtv.org/
W: http://palosaari.fi/linux/
Q: https://patchwork.linuxtv.org/project/linux-media/list/
S: Maintained
F: drivers/media/usb/dvb-usb-v2/zd1301*
ZPOOL COMPRESSED PAGE STORAGE API
M: Dan Streetman <ddstreet@ieee.org>
L: linux-mm@kvack.org

View File

@ -1166,8 +1166,10 @@
};
vdoa@021e4000 {
compatible = "fsl,imx6q-vdoa";
reg = <0x021e4000 0x4000>;
interrupts = <0 18 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6QDL_CLK_VDOA>;
};
uart2: serial@021e8000 {

View File

@ -1003,5 +1003,15 @@
status = "disabled";
};
delta0 {
compatible = "st,st-delta";
clock-names = "delta",
"delta-st231",
"delta-flash-promip";
clocks = <&clk_s_c0_flexgen CLK_VID_DMU>,
<&clk_s_c0_flexgen CLK_ST231_DMU>,
<&clk_s_c0_flexgen CLK_FLASH_PROMIP>;
};
};
};

View File

@ -569,6 +569,7 @@ CONFIG_VIDEO_SAMSUNG_S5P_MFC=m
CONFIG_VIDEO_SAMSUNG_EXYNOS_GSC=m
CONFIG_VIDEO_STI_BDISP=m
CONFIG_VIDEO_STI_HVA=m
CONFIG_VIDEO_STI_DELTA=m
CONFIG_VIDEO_RENESAS_JPU=m
CONFIG_VIDEO_RENESAS_VSP1=m
CONFIG_V4L_TEST_DRIVERS=y

View File

@ -484,15 +484,15 @@ static struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = {
};
#endif
static struct lirc_rx51_platform_data __maybe_unused rx51_lirc_data = {
static struct ir_rx51_platform_data __maybe_unused rx51_ir_data = {
.set_max_mpu_wakeup_lat = omap_pm_set_max_mpu_wakeup_lat,
};
static struct platform_device __maybe_unused rx51_lirc_device = {
.name = "lirc_rx51",
static struct platform_device __maybe_unused rx51_ir_device = {
.name = "ir_rx51",
.id = -1,
.dev = {
.platform_data = &rx51_lirc_data,
.platform_data = &rx51_ir_data,
},
};
@ -533,7 +533,7 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
&omap3_iommu_pdata),
OF_DEV_AUXDATA("ti,omap3-hsmmc", 0x4809c000, "4809c000.mmc", &mmc_pdata[0]),
OF_DEV_AUXDATA("ti,omap3-hsmmc", 0x480b4000, "480b4000.mmc", &mmc_pdata[1]),
OF_DEV_AUXDATA("nokia,n900-ir", 0, "n900-ir", &rx51_lirc_data),
OF_DEV_AUXDATA("nokia,n900-ir", 0, "n900-ir", &rx51_ir_data),
/* Only on am3517 */
OF_DEV_AUXDATA("ti,davinci_mdio", 0x5c030000, "davinci_mdio.0", NULL),
OF_DEV_AUXDATA("ti,am3517-emac", 0x5c000000, "davinci_emac.0",

View File

@ -108,13 +108,12 @@ int picolcd_init_cir(struct picolcd_data *data, struct hid_report *report)
struct rc_dev *rdev;
int ret = 0;
rdev = rc_allocate_device();
rdev = rc_allocate_device(RC_DRIVER_IR_RAW);
if (!rdev)
return -ENOMEM;
rdev->priv = data;
rdev->driver_type = RC_DRIVER_IR_RAW;
rdev->allowed_protocols = RC_BIT_ALL;
rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER;
rdev->open = picolcd_cir_open;
rdev->close = picolcd_cir_close;
rdev->input_name = data->hdev->name;

View File

@ -239,7 +239,7 @@ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,
#if IS_REACHABLE(CONFIG_RC_CORE)
/* Prepare the RC input device */
adap->rc = rc_allocate_device();
adap->rc = rc_allocate_device(RC_DRIVER_SCANCODE);
if (!adap->rc) {
pr_err("cec-%s: failed to allocate memory for rc_dev\n",
name);
@ -259,7 +259,6 @@ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,
adap->rc->input_id.vendor = 0;
adap->rc->input_id.product = 0;
adap->rc->input_id.version = 1;
adap->rc->driver_type = RC_DRIVER_SCANCODE;
adap->rc->driver_name = CEC_NAME;
adap->rc->allowed_protocols = RC_BIT_CEC;
adap->rc->priv = adap;

View File

@ -24,8 +24,7 @@
/* Can we use the specified front-end? Remember that if we are compiled
* into the kernel we can't call code that's in modules. */
#define FE_SUPPORTED(fe) (defined(CONFIG_DVB_##fe) || \
(defined(CONFIG_DVB_##fe##_MODULE) && defined(MODULE)))
#define FE_SUPPORTED(fe) IS_REACHABLE(CONFIG_DVB_ ## fe)
#if FE_SUPPORTED(BCM3510) || (FE_SUPPORTED(CX24120) && FE_SUPPORTED(ISL6421))
static int flexcop_fe_request_firmware(struct dvb_frontend *fe,

View File

@ -25,10 +25,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "flexcop.h"

View File

@ -12,10 +12,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

View File

@ -11,10 +11,6 @@
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
*
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "sms-cards.h"

View File

@ -11,10 +11,6 @@
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
*
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __SMS_CARDS_H__

View File

@ -15,10 +15,6 @@
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
*
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "smscoreapi.h"

View File

@ -58,7 +58,7 @@ int sms_ir_init(struct smscore_device_t *coredev)
struct rc_dev *dev;
pr_debug("Allocating rc device\n");
dev = rc_allocate_device();
dev = rc_allocate_device(RC_DRIVER_IR_RAW);
if (!dev)
return -ENOMEM;
@ -86,8 +86,7 @@ int sms_ir_init(struct smscore_device_t *coredev)
#endif
dev->priv = coredev;
dev->driver_type = RC_DRIVER_IR_RAW;
dev->allowed_protocols = RC_BIT_ALL;
dev->allowed_protocols = RC_BIT_ALL_IR_DECODER;
dev->map_name = sms_get_board(board_id)->rc_codes;
dev->driver_name = MODULE_NAME;

View File

@ -22,10 +22,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

View File

@ -21,10 +21,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef __DEMUX_H

View File

@ -14,10 +14,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#define pr_fmt(fmt) "dmxdev: " fmt
@ -151,6 +147,7 @@ static int dvb_dvr_open(struct inode *inode, struct file *file)
if ((file->f_flags & O_ACCMODE) == O_RDONLY) {
void *mem;
if (!dvbdev->readers) {
mutex_unlock(&dmxdev->mutex);
return -EBUSY;
@ -202,6 +199,7 @@ static int dvb_dvr_release(struct inode *inode, struct file *file)
dvbdev->readers++;
if (dmxdev->dvr_buffer.data) {
void *mem = dmxdev->dvr_buffer.data;
/*memory barrier*/
mb();
spin_lock_irq(&dmxdev->lock);
dmxdev->dvr_buffer.data = NULL;
@ -876,7 +874,7 @@ static int dvb_dmxdev_pes_filter_set(struct dmxdev *dmxdev,
dvb_dmxdev_filter_stop(dmxdevfilter);
dvb_dmxdev_filter_reset(dmxdevfilter);
if ((unsigned)params->pes_type > DMX_PES_OTHER)
if ((unsigned int)params->pes_type > DMX_PES_OTHER)
return -EINVAL;
dmxdevfilter->type = DMXDEV_TYPE_PES;
@ -1125,7 +1123,7 @@ static int dvb_demux_release(struct inode *inode, struct file *file)
mutex_lock(&dmxdev->mutex);
dmxdev->dvbdev->users--;
if(dmxdev->dvbdev->users==1 && dmxdev->exit==1) {
if (dmxdev->dvbdev->users == 1 && dmxdev->exit == 1) {
mutex_unlock(&dmxdev->mutex);
wake_up(&dmxdev->dvbdev->wait_queue);
} else
@ -1263,14 +1261,14 @@ EXPORT_SYMBOL(dvb_dmxdev_init);
void dvb_dmxdev_release(struct dmxdev *dmxdev)
{
dmxdev->exit=1;
dmxdev->exit = 1;
if (dmxdev->dvbdev->users > 1) {
wait_event(dmxdev->dvbdev->wait_queue,
dmxdev->dvbdev->users==1);
dmxdev->dvbdev->users == 1);
}
if (dmxdev->dvr_dvbdev->users > 1) {
wait_event(dmxdev->dvr_dvbdev->wait_queue,
dmxdev->dvr_dvbdev->users==1);
dmxdev->dvr_dvbdev->users == 1);
}
dvb_unregister_device(dmxdev->dvbdev);

View File

@ -14,10 +14,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _DMXDEV_H_

View File

@ -73,11 +73,13 @@
#define USB_VID_GIGABYTE 0x1044
#define USB_VID_YUAN 0x1164
#define USB_VID_XTENSIONS 0x1ae7
#define USB_VID_ZYDAS 0x0ace
#define USB_VID_HUMAX_COEX 0x10b9
#define USB_VID_774 0x7a69
#define USB_VID_EVOLUTEPC 0x1e59
#define USB_VID_AZUREWAVE 0x13d3
#define USB_VID_TECHNISAT 0x14f7
#define USB_VID_HAMA 0x147f
/* Product IDs */
#define USB_PID_ADSTECH_USB2_COLD 0xa333
@ -412,5 +414,6 @@
#define USB_PID_SVEON_STV27 0xd3af
#define USB_PID_TURBOX_DTT_2000 0xd3a4
#define USB_PID_WINTV_SOLOHD 0x0264
#define USB_PID_EVOLVEO_XTRATV_STICK 0xa115
#define USB_PID_EVOLVEO_XTRATV_STICK 0xa115
#define USB_PID_HAMA_DVBT_HYBRID 0x2758
#endif

View File

@ -21,11 +21,8 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*/
#define pr_fmt(fmt) "dvb_ca_en50221: " fmt

View File

@ -15,10 +15,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#define pr_fmt(fmt) "dvb_demux: " fmt

View File

@ -14,10 +14,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _DVB_DEMUX_H_

View File

@ -18,11 +18,8 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*/
/* Enables DVBv3 compatibility bits at the headers */
@ -2536,9 +2533,13 @@ static int dvb_frontend_open(struct inode *inode, struct file *file)
fepriv->voltage = -1;
#ifdef CONFIG_MEDIA_CONTROLLER_DVB
if (fe->dvb->mdev && fe->dvb->mdev->enable_source) {
ret = fe->dvb->mdev->enable_source(dvbdev->entity,
if (fe->dvb->mdev) {
mutex_lock(&fe->dvb->mdev->graph_mutex);
if (fe->dvb->mdev->enable_source)
ret = fe->dvb->mdev->enable_source(
dvbdev->entity,
&fepriv->pipe);
mutex_unlock(&fe->dvb->mdev->graph_mutex);
if (ret) {
dev_err(fe->dvb->device,
"Tuner is busy. Error %d\n", ret);
@ -2562,8 +2563,12 @@ static int dvb_frontend_open(struct inode *inode, struct file *file)
err3:
#ifdef CONFIG_MEDIA_CONTROLLER_DVB
if (fe->dvb->mdev && fe->dvb->mdev->disable_source)
fe->dvb->mdev->disable_source(dvbdev->entity);
if (fe->dvb->mdev) {
mutex_lock(&fe->dvb->mdev->graph_mutex);
if (fe->dvb->mdev->disable_source)
fe->dvb->mdev->disable_source(dvbdev->entity);
mutex_unlock(&fe->dvb->mdev->graph_mutex);
}
err2:
#endif
dvb_generic_release(inode, file);
@ -2595,8 +2600,12 @@ static int dvb_frontend_release(struct inode *inode, struct file *file)
if (dvbdev->users == -1) {
wake_up(&fepriv->wait_queue);
#ifdef CONFIG_MEDIA_CONTROLLER_DVB
if (fe->dvb->mdev && fe->dvb->mdev->disable_source)
fe->dvb->mdev->disable_source(dvbdev->entity);
if (fe->dvb->mdev) {
mutex_lock(&fe->dvb->mdev->graph_mutex);
if (fe->dvb->mdev->disable_source)
fe->dvb->mdev->disable_source(dvbdev->entity);
mutex_unlock(&fe->dvb->mdev->graph_mutex);
}
#endif
if (fe->exit != DVB_FE_NO_EXIT)
wake_up(&dvbdev->wait_queue);

View File

@ -13,10 +13,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/bitops.h>

View File

@ -13,10 +13,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __DVB_MATH_H

View File

@ -23,11 +23,8 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*/
/*

View File

@ -13,10 +13,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _DVB_NET_H_

View File

@ -18,10 +18,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

View File

@ -15,10 +15,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#define pr_fmt(fmt) "dvbdev: " fmt

View File

@ -14,10 +14,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _DVBDEV_H_

View File

@ -447,13 +447,6 @@ config DVB_EC100
help
Say Y when you want to support this frontend.
config DVB_HD29L2
tristate "HDIC HD29L2"
depends on DVB_CORE && I2C
default m if !MEDIA_SUBDRV_AUTOSELECT
help
Say Y when you want to support this frontend.
config DVB_STV0367
tristate "ST STV0367 based"
depends on DVB_CORE && I2C
@ -513,6 +506,13 @@ config DVB_AS102_FE
depends on DVB_CORE
default DVB_AS102
config DVB_ZD1301_DEMOD
tristate "ZyDAS ZD1301"
depends on DVB_CORE && I2C
default m if !MEDIA_SUBDRV_AUTOSELECT
help
Say Y when you want to support this frontend.
config DVB_GP8PSK_FE
tristate
depends on DVB_CORE
@ -619,7 +619,7 @@ config DVB_LGDT3305
config DVB_LGDT3306A
tristate "LG Electronics LGDT3306A based"
depends on DVB_CORE && I2C
depends on DVB_CORE && I2C && I2C_MUX
default m if !MEDIA_SUBDRV_AUTOSELECT
help
An ATSC 8VSB and QAM-B 64/256 demodulator module. Say Y when you want
@ -852,6 +852,7 @@ config DVB_M88RS2000
config DVB_AF9033
tristate "Afatech AF9033 DVB-T demodulator"
depends on DVB_CORE && I2C
select REGMAP_I2C
default m if !MEDIA_SUBDRV_AUTOSELECT
config DVB_HORUS3A

View File

@ -99,7 +99,6 @@ obj-$(CONFIG_DVB_MN88472) += mn88472.o
obj-$(CONFIG_DVB_MN88473) += mn88473.o
obj-$(CONFIG_DVB_ISL6423) += isl6423.o
obj-$(CONFIG_DVB_EC100) += ec100.o
obj-$(CONFIG_DVB_HD29L2) += hd29l2.o
obj-$(CONFIG_DVB_DS3000) += ds3000.o
obj-$(CONFIG_DVB_TS2020) += ts2020.o
obj-$(CONFIG_DVB_MB86A16) += mb86a16.o
@ -126,3 +125,4 @@ obj-$(CONFIG_DVB_TC90522) += tc90522.o
obj-$(CONFIG_DVB_HORUS3A) += horus3a.o
obj-$(CONFIG_DVB_ASCOT2E) += ascot2e.o
obj-$(CONFIG_DVB_HELENE) += helene.o
obj-$(CONFIG_DVB_ZD1301_DEMOD) += zd1301_demod.o

View File

@ -16,10 +16,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#include "af9013_priv.h"

View File

@ -16,10 +16,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef AF9013_H

View File

@ -16,10 +16,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef AF9013_PRIV_H

File diff suppressed because it is too large Load Diff

View File

@ -13,18 +13,13 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef AF9033_H
#define AF9033_H
/*
* I2C address (TODO: are these in 8-bit format?)
* 0x38, 0x3a, 0x3c, 0x3e
* I2C address: 0x1c, 0x1d, 0x1e, 0x1f
*/
struct af9033_config {
/*
@ -88,6 +83,12 @@ struct af9033_config {
* returned by that driver
*/
struct dvb_frontend **fe;
/*
* regmap for IT913x integrated tuner driver
* returned by that driver
*/
struct regmap *regmap;
};
struct af9033_ops {

View File

@ -13,10 +13,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef AF9033_PRIV_H
@ -25,6 +21,9 @@
#include "dvb_frontend.h"
#include "af9033.h"
#include <linux/math64.h>
#include <linux/regmap.h>
#include <linux/kernel.h>
#include "dvb_math.h"
struct reg_val {
u32 reg;
@ -68,7 +67,7 @@ static const struct clock_adc clock_adc_lut[] = {
{ 12000000, 20250000 },
};
/* pre-calculated coeff lookup table */
/* Pre-calculated coeff lookup table */
static const struct coeff coeff_lut[] = {
/* 12.000 MHz */
{ 12000000, 8000000, {
@ -91,102 +90,9 @@ static const struct coeff coeff_lut[] = {
},
};
/* QPSK SNR lookup table */
static const struct val_snr qpsk_snr_lut[] = {
{ 0x0b4771, 0 },
{ 0x0c1aed, 1 },
{ 0x0d0d27, 2 },
{ 0x0e4d19, 3 },
{ 0x0e5da8, 4 },
{ 0x107097, 5 },
{ 0x116975, 6 },
{ 0x1252d9, 7 },
{ 0x131fa4, 8 },
{ 0x13d5e1, 9 },
{ 0x148e53, 10 },
{ 0x15358b, 11 },
{ 0x15dd29, 12 },
{ 0x168112, 13 },
{ 0x170b61, 14 },
{ 0x17a532, 15 },
{ 0x180f94, 16 },
{ 0x186ed2, 17 },
{ 0x18b271, 18 },
{ 0x18e118, 19 },
{ 0x18ff4b, 20 },
{ 0x190af1, 21 },
{ 0x191451, 22 },
{ 0xffffff, 23 },
};
/* QAM16 SNR lookup table */
static const struct val_snr qam16_snr_lut[] = {
{ 0x04f0d5, 0 },
{ 0x05387a, 1 },
{ 0x0573a4, 2 },
{ 0x05a99e, 3 },
{ 0x05cc80, 4 },
{ 0x05eb62, 5 },
{ 0x05fecf, 6 },
{ 0x060b80, 7 },
{ 0x062501, 8 },
{ 0x064865, 9 },
{ 0x069604, 10 },
{ 0x06f356, 11 },
{ 0x07706a, 12 },
{ 0x0804d3, 13 },
{ 0x089d1a, 14 },
{ 0x093e3d, 15 },
{ 0x09e35d, 16 },
{ 0x0a7c3c, 17 },
{ 0x0afaf8, 18 },
{ 0x0b719d, 19 },
{ 0x0bda6a, 20 },
{ 0x0c0c75, 21 },
{ 0x0c3f7d, 22 },
{ 0x0c5e62, 23 },
{ 0x0c6c31, 24 },
{ 0x0c7925, 25 },
{ 0xffffff, 26 },
};
/* QAM64 SNR lookup table */
static const struct val_snr qam64_snr_lut[] = {
{ 0x0256d0, 0 },
{ 0x027a65, 1 },
{ 0x029873, 2 },
{ 0x02b7fe, 3 },
{ 0x02cf1e, 4 },
{ 0x02e234, 5 },
{ 0x02f409, 6 },
{ 0x030046, 7 },
{ 0x030844, 8 },
{ 0x030a02, 9 },
{ 0x030cde, 10 },
{ 0x031031, 11 },
{ 0x03144c, 12 },
{ 0x0315dd, 13 },
{ 0x031920, 14 },
{ 0x0322d0, 15 },
{ 0x0339fc, 16 },
{ 0x0364a1, 17 },
{ 0x038bcc, 18 },
{ 0x03c7d3, 19 },
{ 0x0408cc, 20 },
{ 0x043bed, 21 },
{ 0x048061, 22 },
{ 0x04be95, 23 },
{ 0x04fa7d, 24 },
{ 0x052405, 25 },
{ 0x05570d, 26 },
{ 0x059feb, 27 },
{ 0x05bf38, 28 },
{ 0x05f78f, 29 },
{ 0x0612c3, 30 },
{ 0x0626be, 31 },
{ 0xffffff, 32 },
};
/*
* Afatech AF9033 demod init
*/
static const struct reg_val ofsm_init[] = {
{ 0x800051, 0x01 },
{ 0x800070, 0x0a },
@ -298,8 +204,10 @@ static const struct reg_val ofsm_init[] = {
{ 0x80fd8b, 0x00 },
};
/* Infineon TUA 9001 tuner init
AF9033_TUNER_TUA9001 = 0x27 */
/*
* Infineon TUA 9001 tuner init
* AF9033_TUNER_TUA9001 = 0x27
*/
static const struct reg_val tuner_init_tua9001[] = {
{ 0x800046, 0x27 },
{ 0x800057, 0x00 },
@ -340,8 +248,10 @@ static const struct reg_val tuner_init_tua9001[] = {
{ 0x80f1e6, 0x00 },
};
/* Fitipower fc0011 tuner init
AF9033_TUNER_FC0011 = 0x28 */
/*
* Fitipower FC0011 tuner init
* AF9033_TUNER_FC0011 = 0x28
*/
static const struct reg_val tuner_init_fc0011[] = {
{ 0x800046, 0x28 },
{ 0x800057, 0x00 },
@ -401,8 +311,10 @@ static const struct reg_val tuner_init_fc0011[] = {
{ 0x80f1e6, 0x00 },
};
/* Fitipower FC0012 tuner init
AF9033_TUNER_FC0012 = 0x2e */
/*
* Fitipower FC0012 tuner init
* AF9033_TUNER_FC0012 = 0x2e
*/
static const struct reg_val tuner_init_fc0012[] = {
{ 0x800046, 0x2e },
{ 0x800057, 0x00 },
@ -444,8 +356,10 @@ static const struct reg_val tuner_init_fc0012[] = {
{ 0x80f1e6, 0x00 },
};
/* MaxLinear MxL5007T tuner init
AF9033_TUNER_MXL5007T = 0xa0 */
/*
* MaxLinear MxL5007T tuner init
* AF9033_TUNER_MXL5007T = 0xa0
*/
static const struct reg_val tuner_init_mxl5007t[] = {
{ 0x800046, 0x1b },
{ 0x800057, 0x01 },
@ -479,8 +393,10 @@ static const struct reg_val tuner_init_mxl5007t[] = {
{ 0x80f1e6, 0x00 },
};
/* NXP TDA 18218HN tuner init
AF9033_TUNER_TDA18218 = 0xa1 */
/*
* NXP TDA18218HN tuner init
* AF9033_TUNER_TDA18218 = 0xa1
*/
static const struct reg_val tuner_init_tda18218[] = {
{0x800046, 0xa1},
{0x800057, 0x01},
@ -513,7 +429,10 @@ static const struct reg_val tuner_init_tda18218[] = {
{0x80f1e6, 0x00},
};
/* FCI FC2580 tuner init */
/*
* FCI FC2580 tuner init
* AF9033_TUNER_FC2580 = 0x32
*/
static const struct reg_val tuner_init_fc2580[] = {
{ 0x800046, 0x32 },
{ 0x800057, 0x01 },
@ -551,6 +470,9 @@ static const struct reg_val tuner_init_fc2580[] = {
{ 0x80f1e6, 0x01 },
};
/*
* IT9133 AX demod init
*/
static const struct reg_val ofsm_init_it9135_v1[] = {
{ 0x800051, 0x01 },
{ 0x800070, 0x0a },
@ -662,8 +584,10 @@ static const struct reg_val ofsm_init_it9135_v1[] = {
{ 0x80fd8b, 0x00 },
};
/* ITE Tech IT9135 Omega tuner init
AF9033_TUNER_IT9135_38 = 0x38 */
/*
* ITE Tech IT9133 AX Omega tuner init
* AF9033_TUNER_IT9135_38 = 0x38
*/
static const struct reg_val tuner_init_it9135_38[] = {
{ 0x800043, 0x00 },
{ 0x800046, 0x38 },
@ -879,8 +803,10 @@ static const struct reg_val tuner_init_it9135_38[] = {
{ 0x80fd8b, 0x00 },
};
/* ITE Tech IT9135 Omega LNA config 1 tuner init
AF9033_TUNER_IT9135_51 = 0x51 */
/*
* ITE Tech IT9133 AX Omega LNA config 1 tuner init
* AF9033_TUNER_IT9135_51 = 0x51
*/
static const struct reg_val tuner_init_it9135_51[] = {
{ 0x800043, 0x00 },
{ 0x800046, 0x51 },
@ -1096,8 +1022,10 @@ static const struct reg_val tuner_init_it9135_51[] = {
{ 0x80fd8b, 0x00 },
};
/* ITE Tech IT9135 Omega LNA config 2 tuner init
AF9033_TUNER_IT9135_52 = 0x52 */
/*
* ITE Tech IT9133 AX Omega LNA config 2 tuner init
* AF9033_TUNER_IT9135_52 = 0x52
*/
static const struct reg_val tuner_init_it9135_52[] = {
{ 0x800043, 0x00 },
{ 0x800046, 0x52 },
@ -1313,6 +1241,9 @@ static const struct reg_val tuner_init_it9135_52[] = {
{ 0x80fd8b, 0x00 },
};
/*
* ITE Tech IT9133 BX demod init
*/
static const struct reg_val ofsm_init_it9135_v2[] = {
{ 0x800051, 0x01 },
{ 0x800070, 0x0a },
@ -1411,8 +1342,10 @@ static const struct reg_val ofsm_init_it9135_v2[] = {
{ 0x80fd8b, 0x00 },
};
/* ITE Tech IT9135 Omega v2 tuner init
AF9033_TUNER_IT9135_60 = 0x60 */
/*
* ITE Tech IT9133 BX Omega tuner init
* AF9033_TUNER_IT9135_60 = 0x60
*/
static const struct reg_val tuner_init_it9135_60[] = {
{ 0x800043, 0x00 },
{ 0x800046, 0x60 },
@ -1625,8 +1558,10 @@ static const struct reg_val tuner_init_it9135_60[] = {
{ 0x80fd8b, 0x00 },
};
/* ITE Tech IT9135 Omega v2 LNA config 1 tuner init
AF9033_TUNER_IT9135_61 = 0x61 */
/*
* ITE Tech IT9133 BX Omega LNA config 1 tuner init
* AF9033_TUNER_IT9135_61 = 0x61
*/
static const struct reg_val tuner_init_it9135_61[] = {
{ 0x800043, 0x00 },
{ 0x800046, 0x61 },
@ -1839,8 +1774,10 @@ static const struct reg_val tuner_init_it9135_61[] = {
{ 0x80fd8b, 0x00 },
};
/* ITE Tech IT9135 Omega v2 LNA config 2 tuner init
AF9033_TUNER_IT9135_62 = 0x62 */
/*
* ITE Tech IT9133 BX Omega LNA config 2 tuner init
* AF9033_TUNER_IT9135_62 = 0x62
*/
static const struct reg_val tuner_init_it9135_62[] = {
{ 0x800043, 0x00 },
{ 0x800046, 0x62 },

View File

@ -13,10 +13,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <asm/div64.h>

View File

@ -13,10 +13,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __ATBM8830_H__

View File

@ -13,10 +13,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __ATBM8830_PRIV_H

View File

@ -13,11 +13,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
/* Developer notes:

View File

@ -14,10 +14,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef BCM3510_H
#define BCM3510_H

View File

@ -14,10 +14,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __BCM3510_PRIV_H__
#define __BCM3510_PRIV_H__

View File

@ -14,11 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*
*
* the project's page is at https://linuxtv.org

View File

@ -12,11 +12,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*
*
* the project's page is at https://linuxtv.org

View File

@ -12,11 +12,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*
*
* the project's page is at https://linuxtv.org

View File

@ -15,10 +15,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/slab.h>

View File

@ -13,10 +13,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef CX24113_H

View File

@ -16,10 +16,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/slab.h>
@ -653,7 +649,7 @@ static int cx24123_pll_tune(struct dvb_frontend *fe)
dprintk("frequency=%i\n", p->frequency);
if (cx24123_pll_calculate(fe) != 0) {
err("%s: cx24123_pll_calcutate failed\n", __func__);
err("%s: cx24123_pll_calculate failed\n", __func__);
return -EINVAL;
}

View File

@ -615,6 +615,7 @@ static int cxd2820r_probe(struct i2c_client *client,
}
priv->client[0] = client;
priv->fe.demodulator_priv = priv;
priv->i2c = client->adapter;
priv->ts_mode = pdata->ts_mode;
priv->ts_clk_inv = pdata->ts_clk_inv;
@ -697,7 +698,6 @@ static int cxd2820r_probe(struct i2c_client *client,
memcpy(&priv->fe.ops, &cxd2820r_ops, sizeof(priv->fe.ops));
if (!pdata->attach_in_use)
priv->fe.ops.release = NULL;
priv->fe.demodulator_priv = priv;
i2c_set_clientdata(client, priv);
/* Setup callbacks */

View File

@ -14,10 +14,6 @@
*
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
* This code is more or less generated from another driver, please
* excuse some codingstyle oddities.

View File

@ -14,10 +14,6 @@
*
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
* This code is more or less generated from another driver, please
* excuse some codingstyle oddities.

View File

@ -805,13 +805,19 @@ static int dib7000p_set_agc_config(struct dib7000p_state *state, u8 band)
return 0;
}
static void dib7000p_set_dds(struct dib7000p_state *state, s32 offset_khz)
static int dib7000p_set_dds(struct dib7000p_state *state, s32 offset_khz)
{
u32 internal = dib7000p_get_internal_freq(state);
s32 unit_khz_dds_val = 67108864 / (internal); /* 2**26 / Fsampling is the unit 1KHz offset */
s32 unit_khz_dds_val;
u32 abs_offset_khz = ABS(offset_khz);
u32 dds = state->cfg.bw->ifreq & 0x1ffffff;
u8 invert = !!(state->cfg.bw->ifreq & (1 << 25));
if (internal == 0) {
pr_warn("DIB7000P: dib7000p_get_internal_freq returned 0\n");
return -1;
}
/* 2**26 / Fsampling is the unit 1KHz offset */
unit_khz_dds_val = 67108864 / (internal);
dprintk("setting a frequency offset of %dkHz internal freq = %d invert = %d\n", offset_khz, internal, invert);
@ -828,6 +834,7 @@ static void dib7000p_set_dds(struct dib7000p_state *state, s32 offset_khz)
dib7000p_write_word(state, 21, (u16) (((dds >> 16) & 0x1ff) | (0 << 10) | (invert << 9)));
dib7000p_write_word(state, 22, (u16) (dds & 0xffff));
}
return 0;
}
static int dib7000p_agc_startup(struct dvb_frontend *demod)
@ -867,7 +874,9 @@ static int dib7000p_agc_startup(struct dvb_frontend *demod)
frequency_offset = (s32)frequency_tuner / 1000 - ch->frequency / 1000;
}
dib7000p_set_dds(state, frequency_offset);
if (dib7000p_set_dds(state, frequency_offset) < 0)
return -1;
ret = 7;
(*agc_state)++;
break;

View File

@ -13,10 +13,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.=
*/
#ifndef DRX39XXJ_H

View File

@ -13,12 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*/
#ifndef _DRXD_H_

View File

@ -13,12 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*/
/* TODO: generate this file with a script from a settings file */

View File

@ -13,12 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*/
#ifndef _DRXD_FIRM_H_

View File

@ -13,12 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*/
#include <linux/kernel.h>

View File

@ -13,12 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*/
#ifndef __DRX3973D_MAP__H__

View File

@ -13,12 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

View File

@ -12,10 +12,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

View File

@ -13,10 +13,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.=
*/
#include <linux/module.h>

View File

@ -13,10 +13,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.=
*/
#ifndef DVB_DUMMY_FE_H

View File

@ -13,10 +13,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#include "dvb_frontend.h"

View File

@ -13,10 +13,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef EC100_H

View File

@ -1,870 +0,0 @@
/*
* HDIC HD29L2 DMB-TH demodulator driver
*
* Copyright (C) 2011 Metropolia University of Applied Sciences, Electria R&D
*
* Author: Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "hd29l2_priv.h"
#define HD29L2_MAX_LEN (3)
/* write multiple registers */
static int hd29l2_wr_regs(struct hd29l2_priv *priv, u8 reg, u8 *val, int len)
{
int ret;
u8 buf[2 + HD29L2_MAX_LEN];
struct i2c_msg msg[1] = {
{
.addr = priv->cfg.i2c_addr,
.flags = 0,
.len = 2 + len,
.buf = buf,
}
};
if (len > HD29L2_MAX_LEN)
return -EINVAL;
buf[0] = 0x00;
buf[1] = reg;
memcpy(&buf[2], val, len);
ret = i2c_transfer(priv->i2c, msg, 1);
if (ret == 1) {
ret = 0;
} else {
dev_warn(&priv->i2c->dev,
"%s: i2c wr failed=%d reg=%02x len=%d\n",
KBUILD_MODNAME, ret, reg, len);
ret = -EREMOTEIO;
}
return ret;
}
/* read multiple registers */
static int hd29l2_rd_regs(struct hd29l2_priv *priv, u8 reg, u8 *val, int len)
{
int ret;
u8 buf[2] = { 0x00, reg };
struct i2c_msg msg[2] = {
{
.addr = priv->cfg.i2c_addr,
.flags = 0,
.len = 2,
.buf = buf,
}, {
.addr = priv->cfg.i2c_addr,
.flags = I2C_M_RD,
.len = len,
.buf = val,
}
};
ret = i2c_transfer(priv->i2c, msg, 2);
if (ret == 2) {
ret = 0;
} else {
dev_warn(&priv->i2c->dev,
"%s: i2c rd failed=%d reg=%02x len=%d\n",
KBUILD_MODNAME, ret, reg, len);
ret = -EREMOTEIO;
}
return ret;
}
/* write single register */
static int hd29l2_wr_reg(struct hd29l2_priv *priv, u8 reg, u8 val)
{
return hd29l2_wr_regs(priv, reg, &val, 1);
}
/* read single register */
static int hd29l2_rd_reg(struct hd29l2_priv *priv, u8 reg, u8 *val)
{
return hd29l2_rd_regs(priv, reg, val, 1);
}
/* write single register with mask */
static int hd29l2_wr_reg_mask(struct hd29l2_priv *priv, u8 reg, u8 val, u8 mask)
{
int ret;
u8 tmp;
/* no need for read if whole reg is written */
if (mask != 0xff) {
ret = hd29l2_rd_regs(priv, reg, &tmp, 1);
if (ret)
return ret;
val &= mask;
tmp &= ~mask;
val |= tmp;
}
return hd29l2_wr_regs(priv, reg, &val, 1);
}
/* read single register with mask */
static int hd29l2_rd_reg_mask(struct hd29l2_priv *priv, u8 reg, u8 *val, u8 mask)
{
int ret, i;
u8 tmp;
ret = hd29l2_rd_regs(priv, reg, &tmp, 1);
if (ret)
return ret;
tmp &= mask;
/* find position of the first bit */
for (i = 0; i < 8; i++) {
if ((mask >> i) & 0x01)
break;
}
*val = tmp >> i;
return 0;
}
static int hd29l2_soft_reset(struct hd29l2_priv *priv)
{
int ret;
u8 tmp;
ret = hd29l2_rd_reg(priv, 0x26, &tmp);
if (ret)
goto err;
ret = hd29l2_wr_reg(priv, 0x26, 0x0d);
if (ret)
goto err;
usleep_range(10000, 20000);
ret = hd29l2_wr_reg(priv, 0x26, tmp);
if (ret)
goto err;
return 0;
err:
dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret);
return ret;
}
static int hd29l2_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
{
int ret, i;
struct hd29l2_priv *priv = fe->demodulator_priv;
u8 tmp;
dev_dbg(&priv->i2c->dev, "%s: enable=%d\n", __func__, enable);
/* set tuner address for demod */
if (!priv->tuner_i2c_addr_programmed && enable) {
/* no need to set tuner address every time, once is enough */
ret = hd29l2_wr_reg(priv, 0x9d, priv->cfg.tuner_i2c_addr << 1);
if (ret)
goto err;
priv->tuner_i2c_addr_programmed = true;
}
/* open / close gate */
ret = hd29l2_wr_reg(priv, 0x9f, enable);
if (ret)
goto err;
/* wait demod ready */
for (i = 10; i; i--) {
ret = hd29l2_rd_reg(priv, 0x9e, &tmp);
if (ret)
goto err;
if (tmp == enable)
break;
usleep_range(5000, 10000);
}
dev_dbg(&priv->i2c->dev, "%s: loop=%d\n", __func__, i);
return ret;
err:
dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret);
return ret;
}
static int hd29l2_read_status(struct dvb_frontend *fe, enum fe_status *status)
{
int ret;
struct hd29l2_priv *priv = fe->demodulator_priv;
u8 buf[2];
*status = 0;
ret = hd29l2_rd_reg(priv, 0x05, &buf[0]);
if (ret)
goto err;
if (buf[0] & 0x01) {
/* full lock */
*status |= FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI |
FE_HAS_SYNC | FE_HAS_LOCK;
} else {
ret = hd29l2_rd_reg(priv, 0x0d, &buf[1]);
if (ret)
goto err;
if ((buf[1] & 0xfe) == 0x78)
/* partial lock */
*status |= FE_HAS_SIGNAL | FE_HAS_CARRIER |
FE_HAS_VITERBI | FE_HAS_SYNC;
}
priv->fe_status = *status;
return 0;
err:
dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret);
return ret;
}
static int hd29l2_read_snr(struct dvb_frontend *fe, u16 *snr)
{
int ret;
struct hd29l2_priv *priv = fe->demodulator_priv;
u8 buf[2];
u16 tmp;
if (!(priv->fe_status & FE_HAS_LOCK)) {
*snr = 0;
ret = 0;
goto err;
}
ret = hd29l2_rd_regs(priv, 0x0b, buf, 2);
if (ret)
goto err;
tmp = (buf[0] << 8) | buf[1];
/* report SNR in dB * 10 */
#define LOG10_20736_24 72422627 /* log10(20736) << 24 */
if (tmp)
*snr = (LOG10_20736_24 - intlog10(tmp)) / ((1 << 24) / 100);
else
*snr = 0;
return 0;
err:
dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret);
return ret;
}
static int hd29l2_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
{
int ret;
struct hd29l2_priv *priv = fe->demodulator_priv;
u8 buf[2];
u16 tmp;
*strength = 0;
ret = hd29l2_rd_regs(priv, 0xd5, buf, 2);
if (ret)
goto err;
tmp = buf[0] << 8 | buf[1];
tmp = ~tmp & 0x0fff;
/* scale value to 0x0000-0xffff from 0x0000-0x0fff */
*strength = tmp * 0xffff / 0x0fff;
return 0;
err:
dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret);
return ret;
}
static int hd29l2_read_ber(struct dvb_frontend *fe, u32 *ber)
{
int ret;
struct hd29l2_priv *priv = fe->demodulator_priv;
u8 buf[2];
if (!(priv->fe_status & FE_HAS_SYNC)) {
*ber = 0;
ret = 0;
goto err;
}
ret = hd29l2_rd_regs(priv, 0xd9, buf, 2);
if (ret) {
*ber = 0;
goto err;
}
/* LDPC BER */
*ber = ((buf[0] & 0x0f) << 8) | buf[1];
return 0;
err:
dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret);
return ret;
}
static int hd29l2_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
{
/* no way to read? */
*ucblocks = 0;
return 0;
}
static enum dvbfe_search hd29l2_search(struct dvb_frontend *fe)
{
int ret, i;
struct hd29l2_priv *priv = fe->demodulator_priv;
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
u8 tmp, buf[3];
u8 modulation, carrier, guard_interval, interleave, code_rate;
u64 num64;
u32 if_freq, if_ctl;
bool auto_mode;
dev_dbg(&priv->i2c->dev, "%s: delivery_system=%d frequency=%d " \
"bandwidth_hz=%d modulation=%d inversion=%d " \
"fec_inner=%d guard_interval=%d\n", __func__,
c->delivery_system, c->frequency, c->bandwidth_hz,
c->modulation, c->inversion, c->fec_inner,
c->guard_interval);
/* as for now we detect always params automatically */
auto_mode = true;
/* program tuner */
if (fe->ops.tuner_ops.set_params)
fe->ops.tuner_ops.set_params(fe);
/* get and program IF */
if (fe->ops.tuner_ops.get_if_frequency)
fe->ops.tuner_ops.get_if_frequency(fe, &if_freq);
else
if_freq = 0;
if (if_freq) {
/* normal IF */
/* calc IF control value */
num64 = if_freq;
num64 *= 0x800000;
num64 = div_u64(num64, HD29L2_XTAL);
num64 -= 0x800000;
if_ctl = num64;
tmp = 0xfc; /* tuner type normal */
} else {
/* zero IF */
if_ctl = 0;
tmp = 0xfe; /* tuner type Zero-IF */
}
buf[0] = ((if_ctl >> 0) & 0xff);
buf[1] = ((if_ctl >> 8) & 0xff);
buf[2] = ((if_ctl >> 16) & 0xff);
/* program IF control */
ret = hd29l2_wr_regs(priv, 0x14, buf, 3);
if (ret)
goto err;
/* program tuner type */
ret = hd29l2_wr_reg(priv, 0xab, tmp);
if (ret)
goto err;
dev_dbg(&priv->i2c->dev, "%s: if_freq=%d if_ctl=%x\n",
__func__, if_freq, if_ctl);
if (auto_mode) {
/*
* use auto mode
*/
/* disable quick mode */
ret = hd29l2_wr_reg_mask(priv, 0xac, 0 << 7, 0x80);
if (ret)
goto err;
ret = hd29l2_wr_reg_mask(priv, 0x82, 1 << 1, 0x02);
if (ret)
goto err;
/* enable auto mode */
ret = hd29l2_wr_reg_mask(priv, 0x7d, 1 << 6, 0x40);
if (ret)
goto err;
ret = hd29l2_wr_reg_mask(priv, 0x81, 1 << 3, 0x08);
if (ret)
goto err;
/* soft reset */
ret = hd29l2_soft_reset(priv);
if (ret)
goto err;
/* detect modulation */
for (i = 30; i; i--) {
msleep(100);
ret = hd29l2_rd_reg(priv, 0x0d, &tmp);
if (ret)
goto err;
if ((((tmp & 0xf0) >= 0x10) &&
((tmp & 0x0f) == 0x08)) || (tmp >= 0x2c))
break;
}
dev_dbg(&priv->i2c->dev, "%s: loop=%d\n", __func__, i);
if (i == 0)
/* detection failed */
return DVBFE_ALGO_SEARCH_FAILED;
/* read modulation */
ret = hd29l2_rd_reg_mask(priv, 0x7d, &modulation, 0x07);
if (ret)
goto err;
} else {
/*
* use manual mode
*/
modulation = HD29L2_QAM64;
carrier = HD29L2_CARRIER_MULTI;
guard_interval = HD29L2_PN945;
interleave = HD29L2_INTERLEAVER_420;
code_rate = HD29L2_CODE_RATE_08;
tmp = (code_rate << 3) | modulation;
ret = hd29l2_wr_reg_mask(priv, 0x7d, tmp, 0x5f);
if (ret)
goto err;
tmp = (carrier << 2) | guard_interval;
ret = hd29l2_wr_reg_mask(priv, 0x81, tmp, 0x0f);
if (ret)
goto err;
tmp = interleave;
ret = hd29l2_wr_reg_mask(priv, 0x82, tmp, 0x03);
if (ret)
goto err;
}
/* ensure modulation validy */
/* 0=QAM4_NR, 1=QAM4, 2=QAM16, 3=QAM32, 4=QAM64 */
if (modulation > (ARRAY_SIZE(reg_mod_vals_tab[0].val) - 1)) {
dev_dbg(&priv->i2c->dev, "%s: modulation=%d not valid\n",
__func__, modulation);
goto err;
}
/* program registers according to modulation */
for (i = 0; i < ARRAY_SIZE(reg_mod_vals_tab); i++) {
ret = hd29l2_wr_reg(priv, reg_mod_vals_tab[i].reg,
reg_mod_vals_tab[i].val[modulation]);
if (ret)
goto err;
}
/* read guard interval */
ret = hd29l2_rd_reg_mask(priv, 0x81, &guard_interval, 0x03);
if (ret)
goto err;
/* read carrier mode */
ret = hd29l2_rd_reg_mask(priv, 0x81, &carrier, 0x04);
if (ret)
goto err;
dev_dbg(&priv->i2c->dev,
"%s: modulation=%d guard_interval=%d carrier=%d\n",
__func__, modulation, guard_interval, carrier);
if ((carrier == HD29L2_CARRIER_MULTI) && (modulation == HD29L2_QAM64) &&
(guard_interval == HD29L2_PN945)) {
dev_dbg(&priv->i2c->dev, "%s: C=3780 && QAM64 && PN945\n",
__func__);
ret = hd29l2_wr_reg(priv, 0x42, 0x33);
if (ret)
goto err;
ret = hd29l2_wr_reg(priv, 0xdd, 0x01);
if (ret)
goto err;
}
usleep_range(10000, 20000);
/* soft reset */
ret = hd29l2_soft_reset(priv);
if (ret)
goto err;
/* wait demod lock */
for (i = 30; i; i--) {
msleep(100);
/* read lock bit */
ret = hd29l2_rd_reg_mask(priv, 0x05, &tmp, 0x01);
if (ret)
goto err;
if (tmp)
break;
}
dev_dbg(&priv->i2c->dev, "%s: loop=%d\n", __func__, i);
if (i == 0)
return DVBFE_ALGO_SEARCH_AGAIN;
return DVBFE_ALGO_SEARCH_SUCCESS;
err:
dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret);
return DVBFE_ALGO_SEARCH_ERROR;
}
static int hd29l2_get_frontend_algo(struct dvb_frontend *fe)
{
return DVBFE_ALGO_CUSTOM;
}
static int hd29l2_get_frontend(struct dvb_frontend *fe,
struct dtv_frontend_properties *c)
{
int ret;
struct hd29l2_priv *priv = fe->demodulator_priv;
u8 buf[3];
u32 if_ctl;
char *str_constellation, *str_code_rate, *str_constellation_code_rate,
*str_guard_interval, *str_carrier, *str_guard_interval_carrier,
*str_interleave, *str_interleave_;
ret = hd29l2_rd_reg(priv, 0x7d, &buf[0]);
if (ret)
goto err;
ret = hd29l2_rd_regs(priv, 0x81, &buf[1], 2);
if (ret)
goto err;
/* constellation, 0x7d[2:0] */
switch ((buf[0] >> 0) & 0x07) {
case 0: /* QAM4NR */
str_constellation = "QAM4NR";
c->modulation = QAM_AUTO; /* FIXME */
break;
case 1: /* QAM4 */
str_constellation = "QAM4";
c->modulation = QPSK; /* FIXME */
break;
case 2:
str_constellation = "QAM16";
c->modulation = QAM_16;
break;
case 3:
str_constellation = "QAM32";
c->modulation = QAM_32;
break;
case 4:
str_constellation = "QAM64";
c->modulation = QAM_64;
break;
default:
str_constellation = "?";
}
/* LDPC code rate, 0x7d[4:3] */
switch ((buf[0] >> 3) & 0x03) {
case 0: /* 0.4 */
str_code_rate = "0.4";
c->fec_inner = FEC_AUTO; /* FIXME */
break;
case 1: /* 0.6 */
str_code_rate = "0.6";
c->fec_inner = FEC_3_5;
break;
case 2: /* 0.8 */
str_code_rate = "0.8";
c->fec_inner = FEC_4_5;
break;
default:
str_code_rate = "?";
}
/* constellation & code rate set, 0x7d[6] */
switch ((buf[0] >> 6) & 0x01) {
case 0:
str_constellation_code_rate = "manual";
break;
case 1:
str_constellation_code_rate = "auto";
break;
default:
str_constellation_code_rate = "?";
}
/* frame header, 0x81[1:0] */
switch ((buf[1] >> 0) & 0x03) {
case 0: /* PN945 */
str_guard_interval = "PN945";
c->guard_interval = GUARD_INTERVAL_AUTO; /* FIXME */
break;
case 1: /* PN595 */
str_guard_interval = "PN595";
c->guard_interval = GUARD_INTERVAL_AUTO; /* FIXME */
break;
case 2: /* PN420 */
str_guard_interval = "PN420";
c->guard_interval = GUARD_INTERVAL_AUTO; /* FIXME */
break;
default:
str_guard_interval = "?";
}
/* carrier, 0x81[2] */
switch ((buf[1] >> 2) & 0x01) {
case 0:
str_carrier = "C=1";
break;
case 1:
str_carrier = "C=3780";
break;
default:
str_carrier = "?";
}
/* frame header & carrier set, 0x81[3] */
switch ((buf[1] >> 3) & 0x01) {
case 0:
str_guard_interval_carrier = "manual";
break;
case 1:
str_guard_interval_carrier = "auto";
break;
default:
str_guard_interval_carrier = "?";
}
/* interleave, 0x82[0] */
switch ((buf[2] >> 0) & 0x01) {
case 0:
str_interleave = "M=720";
break;
case 1:
str_interleave = "M=240";
break;
default:
str_interleave = "?";
}
/* interleave set, 0x82[1] */
switch ((buf[2] >> 1) & 0x01) {
case 0:
str_interleave_ = "manual";
break;
case 1:
str_interleave_ = "auto";
break;
default:
str_interleave_ = "?";
}
/*
* We can read out current detected NCO and use that value next
* time instead of calculating new value from targed IF.
* I think it will not effect receiver sensitivity but gaining lock
* after tune could be easier...
*/
ret = hd29l2_rd_regs(priv, 0xb1, &buf[0], 3);
if (ret)
goto err;
if_ctl = (buf[0] << 16) | ((buf[1] - 7) << 8) | buf[2];
dev_dbg(&priv->i2c->dev, "%s: %s %s %s | %s %s %s | %s %s | NCO=%06x\n",
__func__, str_constellation, str_code_rate,
str_constellation_code_rate, str_guard_interval,
str_carrier, str_guard_interval_carrier, str_interleave,
str_interleave_, if_ctl);
return 0;
err:
dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret);
return ret;
}
static int hd29l2_init(struct dvb_frontend *fe)
{
int ret, i;
struct hd29l2_priv *priv = fe->demodulator_priv;
u8 tmp;
static const struct reg_val tab[] = {
{ 0x3a, 0x06 },
{ 0x3b, 0x03 },
{ 0x3c, 0x04 },
{ 0xaf, 0x06 },
{ 0xb0, 0x1b },
{ 0x80, 0x64 },
{ 0x10, 0x38 },
};
dev_dbg(&priv->i2c->dev, "%s:\n", __func__);
/* reset demod */
/* it is recommended to HW reset chip using RST_N pin */
if (fe->callback) {
ret = fe->callback(fe, DVB_FRONTEND_COMPONENT_DEMOD, 0, 0);
if (ret)
goto err;
/* reprogramming needed because HW reset clears registers */
priv->tuner_i2c_addr_programmed = false;
}
/* init */
for (i = 0; i < ARRAY_SIZE(tab); i++) {
ret = hd29l2_wr_reg(priv, tab[i].reg, tab[i].val);
if (ret)
goto err;
}
/* TS params */
ret = hd29l2_rd_reg(priv, 0x36, &tmp);
if (ret)
goto err;
tmp &= 0x1b;
tmp |= priv->cfg.ts_mode;
ret = hd29l2_wr_reg(priv, 0x36, tmp);
if (ret)
goto err;
ret = hd29l2_rd_reg(priv, 0x31, &tmp);
tmp &= 0xef;
if (!(priv->cfg.ts_mode >> 7))
/* set b4 for serial TS */
tmp |= 0x10;
ret = hd29l2_wr_reg(priv, 0x31, tmp);
if (ret)
goto err;
return ret;
err:
dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret);
return ret;
}
static void hd29l2_release(struct dvb_frontend *fe)
{
struct hd29l2_priv *priv = fe->demodulator_priv;
kfree(priv);
}
static const struct dvb_frontend_ops hd29l2_ops;
struct dvb_frontend *hd29l2_attach(const struct hd29l2_config *config,
struct i2c_adapter *i2c)
{
int ret;
struct hd29l2_priv *priv = NULL;
u8 tmp;
/* allocate memory for the internal state */
priv = kzalloc(sizeof(struct hd29l2_priv), GFP_KERNEL);
if (priv == NULL)
goto err;
/* setup the state */
priv->i2c = i2c;
memcpy(&priv->cfg, config, sizeof(struct hd29l2_config));
/* check if the demod is there */
ret = hd29l2_rd_reg(priv, 0x00, &tmp);
if (ret)
goto err;
/* create dvb_frontend */
memcpy(&priv->fe.ops, &hd29l2_ops, sizeof(struct dvb_frontend_ops));
priv->fe.demodulator_priv = priv;
return &priv->fe;
err:
kfree(priv);
return NULL;
}
EXPORT_SYMBOL(hd29l2_attach);
static const struct dvb_frontend_ops hd29l2_ops = {
.delsys = { SYS_DVBT },
.info = {
.name = "HDIC HD29L2 DMB-TH",
.frequency_min = 474000000,
.frequency_max = 858000000,
.frequency_stepsize = 10000,
.caps = FE_CAN_FEC_AUTO |
FE_CAN_QPSK |
FE_CAN_QAM_16 |
FE_CAN_QAM_32 |
FE_CAN_QAM_64 |
FE_CAN_QAM_AUTO |
FE_CAN_TRANSMISSION_MODE_AUTO |
FE_CAN_BANDWIDTH_AUTO |
FE_CAN_GUARD_INTERVAL_AUTO |
FE_CAN_HIERARCHY_AUTO |
FE_CAN_RECOVER
},
.release = hd29l2_release,
.init = hd29l2_init,
.get_frontend_algo = hd29l2_get_frontend_algo,
.search = hd29l2_search,
.get_frontend = hd29l2_get_frontend,
.read_status = hd29l2_read_status,
.read_snr = hd29l2_read_snr,
.read_signal_strength = hd29l2_read_signal_strength,
.read_ber = hd29l2_read_ber,
.read_ucblocks = hd29l2_read_ucblocks,
.i2c_gate_ctrl = hd29l2_i2c_gate_ctrl,
};
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");
MODULE_DESCRIPTION("HDIC HD29L2 DMB-TH demodulator driver");
MODULE_LICENSE("GPL");

View File

@ -1,65 +0,0 @@
/*
* HDIC HD29L2 DMB-TH demodulator driver
*
* Copyright (C) 2011 Metropolia University of Applied Sciences, Electria R&D
*
* Author: Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef HD29L2_H
#define HD29L2_H
#include <linux/dvb/frontend.h>
struct hd29l2_config {
/*
* demodulator I2C address
*/
u8 i2c_addr;
/*
* tuner I2C address
* only needed when tuner is behind demod I2C-gate
*/
u8 tuner_i2c_addr;
/*
* TS settings
*/
#define HD29L2_TS_SERIAL 0x00
#define HD29L2_TS_PARALLEL 0x80
#define HD29L2_TS_CLK_NORMAL 0x40
#define HD29L2_TS_CLK_INVERTED 0x00
#define HD29L2_TS_CLK_GATED 0x20
#define HD29L2_TS_CLK_FREE 0x00
u8 ts_mode;
};
#if IS_REACHABLE(CONFIG_DVB_HD29L2)
extern struct dvb_frontend *hd29l2_attach(const struct hd29l2_config *config,
struct i2c_adapter *i2c);
#else
static inline struct dvb_frontend *hd29l2_attach(
const struct hd29l2_config *config, struct i2c_adapter *i2c)
{
pr_warn("%s: driver disabled by Kconfig\n", __func__);
return NULL;
}
#endif
#endif /* HD29L2_H */

View File

@ -1,301 +0,0 @@
/*
* HDIC HD29L2 DMB-TH demodulator driver
*
* Copyright (C) 2011 Metropolia University of Applied Sciences, Electria R&D
*
* Author: Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef HD29L2_PRIV
#define HD29L2_PRIV
#include <linux/dvb/version.h>
#include "dvb_frontend.h"
#include "dvb_math.h"
#include "hd29l2.h"
#define HD29L2_XTAL 30400000 /* Hz */
#define HD29L2_QAM4NR 0x00
#define HD29L2_QAM4 0x01
#define HD29L2_QAM16 0x02
#define HD29L2_QAM32 0x03
#define HD29L2_QAM64 0x04
#define HD29L2_CODE_RATE_04 0x00
#define HD29L2_CODE_RATE_06 0x08
#define HD29L2_CODE_RATE_08 0x10
#define HD29L2_PN945 0x00
#define HD29L2_PN595 0x01
#define HD29L2_PN420 0x02
#define HD29L2_CARRIER_SINGLE 0x00
#define HD29L2_CARRIER_MULTI 0x01
#define HD29L2_INTERLEAVER_720 0x00
#define HD29L2_INTERLEAVER_420 0x01
struct reg_val {
u8 reg;
u8 val;
};
struct reg_mod_vals {
u8 reg;
u8 val[5];
};
struct hd29l2_priv {
struct i2c_adapter *i2c;
struct dvb_frontend fe;
struct hd29l2_config cfg;
u8 tuner_i2c_addr_programmed:1;
enum fe_status fe_status;
};
static const struct reg_mod_vals reg_mod_vals_tab[] = {
/* REG, QAM4NR, QAM4,QAM16,QAM32,QAM64 */
{ 0x01, { 0x10, 0x10, 0x10, 0x10, 0x10 } },
{ 0x02, { 0x07, 0x07, 0x07, 0x07, 0x07 } },
{ 0x03, { 0x10, 0x10, 0x10, 0x10, 0x10 } },
{ 0x04, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0x05, { 0x61, 0x60, 0x60, 0x61, 0x60 } },
{ 0x06, { 0xff, 0xff, 0xff, 0xff, 0xff } },
{ 0x07, { 0xff, 0xff, 0xff, 0xff, 0xff } },
{ 0x08, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0x09, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0x0a, { 0x15, 0x15, 0x03, 0x03, 0x03 } },
{ 0x0d, { 0x78, 0x78, 0x88, 0x78, 0x78 } },
{ 0x0e, { 0xa0, 0x90, 0xa0, 0xa0, 0xa0 } },
{ 0x0f, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0x10, { 0xa0, 0xa0, 0x58, 0x38, 0x38 } },
{ 0x11, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0x12, { 0x5a, 0x5a, 0x5a, 0x5a, 0x5a } },
{ 0x13, { 0xa2, 0xa2, 0xa2, 0xa2, 0xa2 } },
{ 0x17, { 0x40, 0x40, 0x40, 0x40, 0x40 } },
{ 0x18, { 0x21, 0x21, 0x42, 0x52, 0x42 } },
{ 0x19, { 0x21, 0x21, 0x62, 0x72, 0x62 } },
{ 0x1a, { 0x32, 0x43, 0xa9, 0xb9, 0xa9 } },
{ 0x1b, { 0x32, 0x43, 0xb9, 0xd8, 0xb9 } },
{ 0x1c, { 0x02, 0x02, 0x03, 0x02, 0x03 } },
{ 0x1d, { 0x0c, 0x0c, 0x01, 0x02, 0x02 } },
{ 0x1e, { 0x02, 0x02, 0x02, 0x01, 0x02 } },
{ 0x1f, { 0x02, 0x02, 0x01, 0x02, 0x04 } },
{ 0x20, { 0x01, 0x02, 0x01, 0x01, 0x01 } },
{ 0x21, { 0x08, 0x08, 0x0a, 0x0a, 0x0a } },
{ 0x22, { 0x06, 0x06, 0x04, 0x05, 0x05 } },
{ 0x23, { 0x06, 0x06, 0x05, 0x03, 0x05 } },
{ 0x24, { 0x08, 0x08, 0x05, 0x07, 0x07 } },
{ 0x25, { 0x16, 0x10, 0x10, 0x0a, 0x10 } },
{ 0x26, { 0x14, 0x14, 0x04, 0x04, 0x04 } },
{ 0x27, { 0x58, 0x58, 0x58, 0x5c, 0x58 } },
{ 0x28, { 0x0a, 0x0a, 0x0a, 0x0a, 0x0a } },
{ 0x29, { 0x0a, 0x0a, 0x0a, 0x0a, 0x0a } },
{ 0x2a, { 0x08, 0x0a, 0x08, 0x08, 0x08 } },
{ 0x2b, { 0x08, 0x08, 0x08, 0x08, 0x08 } },
{ 0x2c, { 0x06, 0x06, 0x06, 0x06, 0x06 } },
{ 0x2d, { 0x05, 0x06, 0x06, 0x06, 0x06 } },
{ 0x2e, { 0x21, 0x21, 0x21, 0x21, 0x21 } },
{ 0x2f, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0x30, { 0x14, 0x14, 0x14, 0x14, 0x14 } },
{ 0x33, { 0xb7, 0xb7, 0xb7, 0xb7, 0xb7 } },
{ 0x34, { 0x81, 0x81, 0x81, 0x81, 0x81 } },
{ 0x35, { 0x80, 0x80, 0x80, 0x80, 0x80 } },
{ 0x37, { 0x70, 0x70, 0x70, 0x70, 0x70 } },
{ 0x38, { 0x04, 0x04, 0x02, 0x02, 0x02 } },
{ 0x39, { 0x07, 0x07, 0x05, 0x05, 0x05 } },
{ 0x3a, { 0x06, 0x06, 0x06, 0x06, 0x06 } },
{ 0x3b, { 0x03, 0x03, 0x03, 0x03, 0x03 } },
{ 0x3c, { 0x07, 0x06, 0x04, 0x04, 0x04 } },
{ 0x3d, { 0xf0, 0xf0, 0xf0, 0xf0, 0x80 } },
{ 0x3e, { 0x60, 0x60, 0x60, 0x60, 0xff } },
{ 0x3f, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0x40, { 0x5b, 0x5b, 0x5b, 0x57, 0x50 } },
{ 0x41, { 0x30, 0x30, 0x30, 0x30, 0x18 } },
{ 0x42, { 0x20, 0x20, 0x20, 0x00, 0x30 } },
{ 0x43, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0x44, { 0x3f, 0x3f, 0x3f, 0x3f, 0x3f } },
{ 0x45, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0x46, { 0x0a, 0x0a, 0x0a, 0x0a, 0x0a } },
{ 0x47, { 0x00, 0x00, 0x95, 0x00, 0x95 } },
{ 0x48, { 0xc0, 0xc0, 0xc0, 0xc0, 0xc0 } },
{ 0x49, { 0xc0, 0xc0, 0xc0, 0xc0, 0xc0 } },
{ 0x4a, { 0x40, 0x40, 0x33, 0x11, 0x11 } },
{ 0x4b, { 0x40, 0x40, 0x00, 0x00, 0x00 } },
{ 0x4c, { 0x40, 0x40, 0x99, 0x11, 0x11 } },
{ 0x4d, { 0x40, 0x40, 0x00, 0x00, 0x00 } },
{ 0x4e, { 0x40, 0x40, 0x66, 0x77, 0x77 } },
{ 0x4f, { 0x40, 0x40, 0x00, 0x00, 0x00 } },
{ 0x50, { 0x40, 0x40, 0x88, 0x33, 0x11 } },
{ 0x51, { 0x40, 0x40, 0x00, 0x00, 0x00 } },
{ 0x52, { 0x40, 0x40, 0x88, 0x02, 0x02 } },
{ 0x53, { 0x40, 0x40, 0x00, 0x02, 0x02 } },
{ 0x54, { 0x00, 0x00, 0x88, 0x33, 0x33 } },
{ 0x55, { 0x40, 0x40, 0x00, 0x00, 0x00 } },
{ 0x56, { 0x00, 0x00, 0x00, 0x0b, 0x00 } },
{ 0x57, { 0x40, 0x40, 0x0a, 0x0b, 0x0a } },
{ 0x58, { 0xaa, 0x00, 0x00, 0x00, 0x00 } },
{ 0x59, { 0x7a, 0x40, 0x02, 0x02, 0x02 } },
{ 0x5a, { 0x18, 0x18, 0x01, 0x01, 0x01 } },
{ 0x5b, { 0x18, 0x18, 0x01, 0x01, 0x01 } },
{ 0x5c, { 0x18, 0x18, 0x01, 0x01, 0x01 } },
{ 0x5d, { 0x18, 0x18, 0x01, 0x01, 0x01 } },
{ 0x5e, { 0xc0, 0xc0, 0xc0, 0xff, 0xc0 } },
{ 0x5f, { 0xc0, 0xc0, 0xc0, 0xff, 0xc0 } },
{ 0x60, { 0x40, 0x40, 0x00, 0x30, 0x30 } },
{ 0x61, { 0x40, 0x40, 0x10, 0x30, 0x30 } },
{ 0x62, { 0x40, 0x40, 0x00, 0x30, 0x30 } },
{ 0x63, { 0x40, 0x40, 0x05, 0x30, 0x30 } },
{ 0x64, { 0x40, 0x40, 0x06, 0x00, 0x30 } },
{ 0x65, { 0x40, 0x40, 0x06, 0x08, 0x30 } },
{ 0x66, { 0x40, 0x40, 0x00, 0x00, 0x20 } },
{ 0x67, { 0x40, 0x40, 0x01, 0x04, 0x20 } },
{ 0x68, { 0x00, 0x00, 0x30, 0x00, 0x20 } },
{ 0x69, { 0xa0, 0xa0, 0x00, 0x08, 0x20 } },
{ 0x6a, { 0x00, 0x00, 0x30, 0x00, 0x25 } },
{ 0x6b, { 0xa0, 0xa0, 0x00, 0x06, 0x25 } },
{ 0x6c, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0x6d, { 0xa0, 0x60, 0x0c, 0x03, 0x0c } },
{ 0x6e, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0x6f, { 0xa0, 0x60, 0x04, 0x01, 0x04 } },
{ 0x70, { 0x58, 0x58, 0xaa, 0xaa, 0xaa } },
{ 0x71, { 0x58, 0x58, 0xaa, 0xaa, 0xaa } },
{ 0x72, { 0x58, 0x58, 0xff, 0xff, 0xff } },
{ 0x73, { 0x58, 0x58, 0xff, 0xff, 0xff } },
{ 0x74, { 0x06, 0x06, 0x09, 0x05, 0x05 } },
{ 0x75, { 0x06, 0x06, 0x0a, 0x10, 0x10 } },
{ 0x76, { 0x10, 0x10, 0x06, 0x0a, 0x0a } },
{ 0x77, { 0x12, 0x18, 0x28, 0x10, 0x28 } },
{ 0x78, { 0xf8, 0xf8, 0xf8, 0xf8, 0xf8 } },
{ 0x79, { 0x15, 0x15, 0x03, 0x03, 0x03 } },
{ 0x7a, { 0x02, 0x02, 0x01, 0x04, 0x03 } },
{ 0x7b, { 0x01, 0x02, 0x03, 0x03, 0x03 } },
{ 0x7c, { 0x28, 0x28, 0x28, 0x28, 0x28 } },
{ 0x7f, { 0x25, 0x92, 0x5f, 0x17, 0x2d } },
{ 0x80, { 0x64, 0x64, 0x64, 0x74, 0x64 } },
{ 0x83, { 0x06, 0x03, 0x04, 0x04, 0x04 } },
{ 0x84, { 0xff, 0xff, 0xff, 0xff, 0xff } },
{ 0x85, { 0x05, 0x05, 0x05, 0x05, 0x05 } },
{ 0x86, { 0x00, 0x00, 0x11, 0x11, 0x11 } },
{ 0x87, { 0x03, 0x03, 0x03, 0x03, 0x03 } },
{ 0x88, { 0x09, 0x09, 0x09, 0x09, 0x09 } },
{ 0x89, { 0x20, 0x20, 0x30, 0x20, 0x20 } },
{ 0x8a, { 0x03, 0x03, 0x02, 0x03, 0x02 } },
{ 0x8b, { 0x00, 0x07, 0x09, 0x00, 0x09 } },
{ 0x8c, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0x8d, { 0x4f, 0x4f, 0x4f, 0x3f, 0x4f } },
{ 0x8e, { 0xf0, 0xf0, 0x60, 0xf0, 0xa0 } },
{ 0x8f, { 0xe8, 0xe8, 0xe8, 0xe8, 0xe8 } },
{ 0x90, { 0x10, 0x10, 0x10, 0x10, 0x10 } },
{ 0x91, { 0x40, 0x40, 0x70, 0x70, 0x10 } },
{ 0x92, { 0x00, 0x00, 0x00, 0x00, 0x04 } },
{ 0x93, { 0x60, 0x60, 0x60, 0x60, 0x60 } },
{ 0x94, { 0x00, 0x00, 0x00, 0x00, 0x03 } },
{ 0x95, { 0x09, 0x09, 0x47, 0x47, 0x47 } },
{ 0x96, { 0x80, 0xa0, 0xa0, 0x40, 0xa0 } },
{ 0x97, { 0x60, 0x60, 0x60, 0x60, 0x60 } },
{ 0x98, { 0x50, 0x50, 0x50, 0x30, 0x50 } },
{ 0x99, { 0x10, 0x10, 0x10, 0x10, 0x10 } },
{ 0x9a, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0x9b, { 0x40, 0x40, 0x40, 0x30, 0x40 } },
{ 0x9c, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xa0, { 0xf0, 0xf0, 0xf0, 0xf0, 0xf0 } },
{ 0xa1, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xa2, { 0x30, 0x30, 0x00, 0x30, 0x00 } },
{ 0xa3, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xa4, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xa5, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xa6, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xa7, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xa8, { 0x77, 0x77, 0x77, 0x77, 0x77 } },
{ 0xa9, { 0x02, 0x02, 0x02, 0x02, 0x02 } },
{ 0xaa, { 0x40, 0x40, 0x40, 0x40, 0x40 } },
{ 0xac, { 0x1f, 0x1f, 0x1f, 0x1f, 0x1f } },
{ 0xad, { 0x14, 0x14, 0x14, 0x14, 0x14 } },
{ 0xae, { 0x78, 0x78, 0x78, 0x78, 0x78 } },
{ 0xaf, { 0x06, 0x06, 0x06, 0x06, 0x07 } },
{ 0xb0, { 0x1b, 0x1b, 0x1b, 0x19, 0x1b } },
{ 0xb1, { 0x18, 0x17, 0x17, 0x18, 0x17 } },
{ 0xb2, { 0x35, 0x82, 0x82, 0x38, 0x82 } },
{ 0xb3, { 0xb6, 0xce, 0xc7, 0x5c, 0xb0 } },
{ 0xb4, { 0x3f, 0x3e, 0x3e, 0x3f, 0x3e } },
{ 0xb5, { 0x70, 0x58, 0x50, 0x68, 0x50 } },
{ 0xb6, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xb7, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xb8, { 0x03, 0x03, 0x01, 0x01, 0x01 } },
{ 0xb9, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xba, { 0x06, 0x06, 0x0a, 0x05, 0x0a } },
{ 0xbb, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xbc, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xbd, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xbe, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xbf, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xc0, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xc1, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xc2, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xc3, { 0x00, 0x00, 0x88, 0x66, 0x88 } },
{ 0xc4, { 0x10, 0x10, 0x00, 0x00, 0x00 } },
{ 0xc5, { 0x00, 0x00, 0x44, 0x60, 0x44 } },
{ 0xc6, { 0x10, 0x0a, 0x00, 0x00, 0x00 } },
{ 0xc7, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xc8, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xc9, { 0x90, 0x04, 0x00, 0x00, 0x00 } },
{ 0xca, { 0x90, 0x08, 0x01, 0x01, 0x01 } },
{ 0xcb, { 0xa0, 0x04, 0x00, 0x44, 0x00 } },
{ 0xcc, { 0xa0, 0x10, 0x03, 0x00, 0x03 } },
{ 0xcd, { 0x06, 0x06, 0x06, 0x05, 0x06 } },
{ 0xce, { 0x05, 0x05, 0x01, 0x01, 0x01 } },
{ 0xcf, { 0x40, 0x20, 0x18, 0x18, 0x18 } },
{ 0xd0, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xd1, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xd2, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xd3, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xd4, { 0x05, 0x05, 0x05, 0x05, 0x05 } },
{ 0xd5, { 0x05, 0x05, 0x05, 0x03, 0x05 } },
{ 0xd6, { 0xac, 0x22, 0xca, 0x8f, 0xca } },
{ 0xd7, { 0x20, 0x20, 0x20, 0x20, 0x20 } },
{ 0xd8, { 0x01, 0x01, 0x01, 0x01, 0x01 } },
{ 0xd9, { 0x00, 0x00, 0x0f, 0x00, 0x0f } },
{ 0xda, { 0x00, 0xff, 0xff, 0x0e, 0xff } },
{ 0xdb, { 0x0a, 0x0a, 0x0a, 0x0a, 0x0a } },
{ 0xdc, { 0x0a, 0x0a, 0x0a, 0x0a, 0x0a } },
{ 0xdd, { 0x05, 0x05, 0x05, 0x05, 0x05 } },
{ 0xde, { 0x0a, 0x0a, 0x0a, 0x0a, 0x0a } },
{ 0xdf, { 0x42, 0x42, 0x44, 0x44, 0x04 } },
{ 0xe0, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xe1, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xe2, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xe3, { 0x00, 0x00, 0x26, 0x06, 0x26 } },
{ 0xe4, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xe5, { 0x01, 0x0a, 0x01, 0x01, 0x01 } },
{ 0xe6, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xe7, { 0x08, 0x08, 0x08, 0x08, 0x08 } },
{ 0xe8, { 0x63, 0x63, 0x63, 0x63, 0x63 } },
{ 0xe9, { 0x59, 0x59, 0x59, 0x59, 0x59 } },
{ 0xea, { 0x80, 0x80, 0x20, 0x80, 0x80 } },
{ 0xeb, { 0x37, 0x37, 0x78, 0x37, 0x77 } },
{ 0xec, { 0x1f, 0x1f, 0x25, 0x25, 0x25 } },
{ 0xed, { 0x0a, 0x0a, 0x0a, 0x0a, 0x0a } },
{ 0xee, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
{ 0xef, { 0x70, 0x70, 0x58, 0x38, 0x58 } },
{ 0xf0, { 0x00, 0x00, 0x00, 0x00, 0x00 } },
};
#endif /* HD29L2_PRIV */

View File

@ -15,11 +15,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*
*
* the project's page is at https://linuxtv.org

View File

@ -15,11 +15,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*
*
* the project's page is at https://linuxtv.org

View File

@ -15,11 +15,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*
*
* the project's page is at https://linuxtv.org

View File

@ -15,11 +15,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
* To obtain the license, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*
*
* the project's page is at https://linuxtv.org

View File

@ -13,10 +13,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.=
*/
#include <linux/module.h>

View File

@ -13,10 +13,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.=
*/
#ifndef ITD1000_H

View File

@ -13,10 +13,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.=
*/
#ifndef ITD1000_PRIV_H

View File

@ -12,10 +12,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#include <linux/module.h>

View File

@ -11,10 +11,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef DVB_IX2505V_H

View File

@ -13,10 +13,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#include <linux/jiffies.h>

View File

@ -13,10 +13,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef _LG2160_H_

View File

@ -15,10 +15,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#include <asm/div64.h>

View File

@ -13,10 +13,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef _LGDT3305_H_

View File

@ -22,6 +22,7 @@
#include <linux/dvb/frontend.h>
#include "dvb_math.h"
#include "lgdt3306a.h"
#include <linux/i2c-mux.h>
static int debug;
@ -65,6 +66,8 @@ struct lgdt3306a_state {
enum fe_modulation current_modulation;
u32 current_frequency;
u32 snr;
struct i2c_mux_core *muxc;
};
/*
@ -2131,6 +2134,111 @@ static const struct dvb_frontend_ops lgdt3306a_ops = {
.search = lgdt3306a_search,
};
static int lgdt3306a_select(struct i2c_mux_core *muxc, u32 chan)
{
struct i2c_client *client = i2c_mux_priv(muxc);
struct lgdt3306a_state *state = i2c_get_clientdata(client);
return lgdt3306a_i2c_gate_ctrl(&state->frontend, 1);
}
static int lgdt3306a_deselect(struct i2c_mux_core *muxc, u32 chan)
{
struct i2c_client *client = i2c_mux_priv(muxc);
struct lgdt3306a_state *state = i2c_get_clientdata(client);
return lgdt3306a_i2c_gate_ctrl(&state->frontend, 0);
}
static int lgdt3306a_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct lgdt3306a_config *config;
struct lgdt3306a_state *state;
struct dvb_frontend *fe;
int ret;
config = kzalloc(sizeof(struct lgdt3306a_config), GFP_KERNEL);
if (config == NULL) {
ret = -ENOMEM;
goto fail;
}
memcpy(config, client->dev.platform_data,
sizeof(struct lgdt3306a_config));
config->i2c_addr = client->addr;
fe = lgdt3306a_attach(config, client->adapter);
if (fe == NULL) {
ret = -ENODEV;
goto err_fe;
}
i2c_set_clientdata(client, fe->demodulator_priv);
state = fe->demodulator_priv;
/* create mux i2c adapter for tuner */
state->muxc = i2c_mux_alloc(client->adapter, &client->dev,
1, 0, I2C_MUX_LOCKED,
lgdt3306a_select, lgdt3306a_deselect);
if (!state->muxc) {
ret = -ENOMEM;
goto err_kfree;
}
state->muxc->priv = client;
ret = i2c_mux_add_adapter(state->muxc, 0, 0, 0);
if (ret)
goto err_kfree;
/* create dvb_frontend */
fe->ops.i2c_gate_ctrl = NULL;
*config->i2c_adapter = state->muxc->adapter[0];
*config->fe = fe;
return 0;
err_kfree:
kfree(state);
err_fe:
kfree(config);
fail:
dev_dbg(&client->dev, "failed=%d\n", ret);
return ret;
}
static int lgdt3306a_remove(struct i2c_client *client)
{
struct lgdt3306a_state *state = i2c_get_clientdata(client);
i2c_mux_del_adapters(state->muxc);
state->frontend.ops.release = NULL;
state->frontend.demodulator_priv = NULL;
kfree(state->cfg);
kfree(state);
return 0;
}
static const struct i2c_device_id lgdt3306a_id_table[] = {
{"lgdt3306a", 0},
{}
};
MODULE_DEVICE_TABLE(i2c, lgdt3306a_id_table);
static struct i2c_driver lgdt3306a_driver = {
.driver = {
.name = "lgdt3306a",
.suppress_bind_attrs = true,
},
.probe = lgdt3306a_probe,
.remove = lgdt3306a_remove,
.id_table = lgdt3306a_id_table,
};
module_i2c_driver(lgdt3306a_driver);
MODULE_DESCRIPTION("LG Electronics LGDT3306A ATSC/QAM-B Demodulator Driver");
MODULE_AUTHOR("Fred Richter <frichter@hauppauge.com>");
MODULE_LICENSE("GPL");

View File

@ -56,6 +56,10 @@ struct lgdt3306a_config {
/* demod clock freq in MHz; 24 or 25 supported */
int xtalMHz;
/* returned by driver if using i2c bus multiplexing */
struct dvb_frontend **fe;
struct i2c_adapter **i2c_adapter;
};
#if IS_REACHABLE(CONFIG_DVB_LGDT3306A)

View File

@ -13,10 +13,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
/*

Some files were not shown because too many files have changed in this diff Show More