[media] rtl28xxu: reimplement rtl2832u remote controller

Thanks to Rodrigo for original implementation!

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] rtl28xxu: remove redundant IS_ENABLED macro

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] rtl28xxu: Add USB ID for Leadtek WinFast DTV Dongle mini

USB ID 0413:6a03 is Leadtek WinFast DTV Dongle mini.
Decoder Realtek RTL2832U and tuner Infineon TUA9001.

Signed-off-by: Miroslav Šustek <sustmidown@centrum.cz>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] rtl28xxu: correct some device names

... just because I want to be perfect ;)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] rtl28xxu: map remote for TerraTec Cinergy T Stick Black

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] rtl28xxu: use masked reg write where possible

Use masked register write inside rtl2832u_power_ctrl().

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] Add support for Crypto Redi PC50A device (rtl2832u + FC0012 tuner)

The device has been tested on a MIPSel box with kernel 3.1.1 and backported media_tree drivers
The kernel detects the device with the following output:
usbcore: registered new interface driver dvb_usb_rtl28xxu
usb 1-2: dvb_usb_v2: found a 'Crypto Redi PC50A' in warm state
usb 1-2: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
DVB: registering new adapter (Crypto Redi PC50A)
usb 1-2: DVB: registering adapter 1 frontend 0 (Realtek RTL2832 (DVB-T))...
i2c i2c-4: fc0012: Fitipower FC0012 successfully identified
usb 1-2: dvb_usb_v2: 'Crypto Redi PC50A' successfully initialized and connected

[crope@iki.fi: fix trivial merge conflict]
Signed-off-by: Alessandro Miceli <angelofsky1980@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] rtl28xxu: correct latest device name

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] drxk_hard: don't re-implement log10

X-Patchwork-Delegate: mchehab@redhat.com
Log10 routine is already defined at dvb_math.h and provides a good
enough approximation for 100 x log10(). So, instead of reinventing
the wheel, use the already existing function.
While here, don't use CamelCase on the function name.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] drxk_hard: Don't use CamelCase

X-Patchwork-Delegate: mchehab@redhat.com
Thare are lots of CamelCase warnings produced by checkpatch.pl.
This weren't fixed at the time the driver got submitted due
to the lack of manpower do to such cleanup.
Now that I have one script that automates this task, cleans
it. That makes the driver almost checkpatch-compliant,
except for 80 column warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] drxk_hard: use pr_info/pr_warn/pr_err/... macros

X-Patchwork-Delegate: mchehab@redhat.com
replace all occurrences of  printk(KERN_* by
pr_info/pr_warn/pr_err/pr_debug/pr_cont macros.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] drxk_hard: don't split strings across lines

X-Patchwork-Delegate: mchehab@redhat.com
WARNING: quoted string split across lines
	#5416: FILE: media/dvb-frontends/drxk_hard.c:5416:
	+		dprintk(1, "Could not set demodulator parameters. Make "
	+			"sure qam_demod_parameter_count (%d) is correct for "
	WARNING: quoted string split across lines
	#5423: FILE: media/dvb-frontends/drxk_hard.c:5423:
	+		dprintk(1, "Auto-probing the correct QAM demodulator command "
	+			"parameters was successful - using %d parameters.\n",

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] drxk_hard: use usleep_range()

X-Patchwork-Delegate: mchehab@redhat.com
Fixes the following checkpatch.pl warnings:
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+			msleep(10);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+		msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+			msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+		msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+		msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+		msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+		msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+		msleep(1);

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] drxk_hard.h: Remove some alien comment markups

X-Patchwork-Delegate: mchehab@redhat.com
The comments markup language used on Kernel is defined at:
	Documentation/kernel-doc-nano-HOWTO.txt
Remove invalid markups from the header file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] drxk_hard.h: don't use more than 80 columns

X-Patchwork-Delegate: mchehab@redhat.com
Almost all 80-col warnings are related to comments. There's
one, however, that it is due to a one-line enum declaration
for enum agc_ctrl_mode.
Break it into one line per enumered data.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] drxk_hard: remove needless parenthesis

X-Patchwork-Delegate: mchehab@redhat.com
There are several places where: state->var = (some_var)
The parenthesis there are doing nothing but making it
harder to read and breaking the 80 columns soft limits.
Just get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] drxk_hard: Remove most 80-cols checkpatch warnings

X-Patchwork-Delegate: mchehab@redhat.com
There are a few cases where breaking the code into separate
lines make it worse to read. However, on several places,
breaking it to make checkpatch.pl happier is OK and improves
code readability.
So, break longer lines where that won't cause harm.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
MIPS: PowerTV: use free_reserved_area() to simplify code

Use common help function free_reserved_area() to simplify code.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Minchan Kim <minchan@kernel.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Jianguo Wu <wujianguo@huawei.com>
Cc: linux-mm@kvack.org
Cc: linux-arch@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/5248/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
MIPS: OCTEON: Rename Kconfig CAVIUM_OCTEON_REFERENCE_BOARD to CAVIUM_OCTEON_SOC

CAVIUM_OCTEON_SOC most place we used to use CPU_CAVIUM_OCTEON.  This
allows us to CPU_CAVIUM_OCTEON in places where we have no OCTEON SOC.

Remove CAVIUM_OCTEON_SIMULATOR as it doesn't really do anything, we can
get the same configuration with CAVIUM_OCTEON_SOC.

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: linux-ide@vger.kernel.org
Cc: linux-edac@vger.kernel.org
Cc: linux-i2c@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: spi-devel-general@lists.sourceforge.net
Cc: devel@driverdev.osuosl.org
Cc: linux-usb@vger.kernel.org
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Patchwork: https://patchwork.linux-mips.org/patch/5295/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
MIPS: Octeon: Remove vestiges of CONFIG_CAVIUM_DECODE_RSL

This config option doesn't exist any more, remove the leftover code
for it too.

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5302/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>