Commit graph

47573 commits

Author SHA1 Message Date
Gilad Ben-Yossef d32a0b6db8 staging: ccree: fix pointer location
Fix location of pointer in variables definitions and dereference.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29 16:38:51 +02:00
Gilad Ben-Yossef 6191eb1dc8 staging: ccree: remove comparisons to NULL
Remove explicit comparisons to NULL in ccree driver.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29 16:38:51 +02:00
Gilad Ben-Yossef 44c891af57 staging: ccree: fix unmatched if/else braces
Fix mismatched braces between if and else.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29 16:38:51 +02:00
Gilad Ben-Yossef a8f6cbaad2 staging: ccree: no need for braces for single statements
Fix several cases of needless braces around single statement blocks.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29 16:38:51 +02:00
Gilad Ben-Yossef b4562b61cf staging: ccree: remove redundant blank lines
Remove redundant blank lines in brace blocks

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29 16:38:51 +02:00
Gilad Ben-Yossef 8683e6272d staging: ccree: fix else placement
Fix cases where the else clause was not located correctly after the if
brace.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29 16:38:50 +02:00
Gilad Ben-Yossef 7331916cff staging: ccree: drop comparsion to true/false
Fix cases in ccree where explicit comparsion to true/false
was made.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29 16:38:50 +02:00
Gilad Ben-Yossef e7258b6a22 staging: ccree: fix missing or redundant spaces
Add and/or remove redundant and/or missing spaces in ccree source

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29 16:38:50 +02:00
Dhananjay Balan 97af1ce278 drivers: staging: sm750: Hold lock irrespective of fb numbers.
Start holding the lock for all cases irrespective of number of fb,
there could be a deadlock since this number could change in the
lifetime of this lock

Signed-off-by: Dhananjay Balan <mail@dbalan.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29 16:38:50 +02:00
Okash Khawaja 8a21ff775f staging: speakup: make ttyio synths use device name
This patch introduces new module parameter, dev, which takes a string
representing the device that the external synth is connected to, e.g.
ttyS0, ttyUSB0 etc. This is then used to communicate with the synth.
That way, speakup can support more than ttyS*. As of this patch, it
only supports ttyS*, ttyUSB* and selected synths for lp*. dev parameter
is only available for tty-migrated synths.

Users will either use dev or ser as both serve same purpose. This patch
maintains backward compatility by allowing ser to be specified. When
both are specified, whichever is non-default, i.e. not ttyS0, is used.
If both are non-default then dev is used.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-27 09:12:33 +02:00
Okash Khawaja a5525dc0b8 staging: speakup: check and convert dev name or ser to dev_t
This patch adds functionality to validate and convert either a device
name or 'ser' memmber of synth into dev_t. Subsequent patch in this set
will call it to convert user-specified device into device number. For
device name, this patch does some basic sanity checks on the string
passed in. It currently supports ttyS*, ttyUSB* and, for selected
synths, lp*.

The patch also introduces a string member variable named 'dev_name' to
struct spk_synth. 'dev_name' represents the device name - ttyUSB0 etc -
which needs conversion to dev_t.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-27 09:12:33 +02:00
Greg Kroah-Hartman 97ae021ab8 Revert "staging: fsl-mc: drop useless #includes"
This reverts commit bb4a64b79f.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 13:51:14 +02:00
Greg Kroah-Hartman 2246ad16be Revert "staging: fsl-mc: decouple the mc-bus public headers from dprc.h"
This reverts commit c6ce019edb.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 13:51:11 +02:00
Greg Kroah-Hartman e903e20d7e Revert "staging: fsl-mc: delete duplicated function prototypes"
This reverts commit 48d3cfb318.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 13:51:08 +02:00
Greg Kroah-Hartman a39476d62a Revert "staging: fsl-mc: delete prototype of unimplemented function"
This reverts commit be6faff74c.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 13:51:05 +02:00
Greg Kroah-Hartman ae74754d54 Revert "staging: fsl-mc: turn several exported functions static"
This reverts commit 10a8593a76.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 13:51:01 +02:00
Greg Kroah-Hartman 3943749bc4 Revert "staging: fsl-mc: move irq domain creation prototype to public header"
This reverts commit b32cdde14e.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 13:50:58 +02:00
Greg Kroah-Hartman 2f81d686ad Revert "staging: fsl-mc: move couple of definitions to public header"
This reverts commit 7eba570ece.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 13:50:54 +02:00
Greg Kroah-Hartman 8a325e9f77 Revert "staging: fsl-mc: move rest of mc-bus.h to private header"
This reverts commit af4376710c.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 13:50:51 +02:00
Greg Kroah-Hartman 1b06739ca6 Revert "staging: fsl-mc: remove dpmng API files"
This reverts commit b065307fe0.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 13:50:48 +02:00
Greg Kroah-Hartman 94ff934d82 Revert "staging: fsl-mc: fix a few implicit includes"
This reverts commit 5776aad3fe.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 13:50:45 +02:00
Greg Kroah-Hartman c409c18b14 Revert "staging: fsl-mc: move mc-sys.h contents in the public header"
This reverts commit 7d6e221d73.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 13:50:41 +02:00
Greg Kroah-Hartman 57ebab2de3 Revert "staging: fsl-mc: move mc-cmd.h contents in the public header"
This reverts commit 9b1aa45539.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 13:50:33 +02:00
Greg Kroah-Hartman 63307cb123 Revert "staging: fsl-mc: make dprc.h header private"
This reverts commit 1877e4ba2d.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 13:49:15 +02:00
Okash Khawaja e4dd8bca3d staging: speakup: fix synth caching when synth init fails
synths[] array caches currently loaded synths. synth_add checks
synths[] before adding a new one. It however ignores the result of
do_synth_init. So when do_synth_init fails, the failed synth is still
cached. Since, as a result module loading fails too, synth_remove -
which is responsible for removing the cached synth - is never called.
Next time the failing synth is added again it succeeds because
synth_add finds it cached inside synths[].

This patch fixes this by caching a synth only after do_synth_init
succeeds.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25 16:31:22 +02:00
Jaya Durga eebdd3f61b Staging: rtl8712 : wifi.h: Fixed Macro argument reuse
CHECK: Macro argument reuse 'pframe' - possible side-effects?

Convert get_tofr_ds macro to inline functions to fix checkpatch check

Signed-off-by: Jaya Durga <rjdurga@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25 16:31:22 +02:00
Derek Robson 24c8bd8feb staging: vt6655 - add parameter names
Fix checkpatch.pl warnings of the form "function definition argument
'foo' should also have an identifier name" in header files.

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25 16:31:22 +02:00
Derek Robson 178f5f0f08 staging: rtl8192u - add parameter names
Fixed checkpatch.pl warnings of "function definition argument FOO should
also have an identifier name"
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25 16:31:22 +02:00
Derek Robson 3fa4b5e58e staging: sm750fb - add parameter names
Fixed checkpatch.pl warnings of the form "function definition argument
'foo' should also have an identifier name" in header files.

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25 16:31:21 +02:00
Derek Robson d1c7b52c96 staging: rtl8723bs - remove asm includes
Fixed checkpatch warnings "Use #include <linux/FOO> instead of <asm/FOO>"
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25 16:31:21 +02:00
Derek Robson b8edc44c42 staging: unisys: visorhba - octal permissions
Fixed style of permissions to octal.
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25 16:31:21 +02:00
Galo Navarro 81a6a4f092 staging: rtl8188eu: style fixes
Fix multiple style issues (CHECK spaces preferred around that $operator).

Signed-off-by: Galo Navarro <anglor@varoa.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25 16:31:21 +02:00
Gilad Ben-Yossef 0f2f02d1b5 staging: ccree: use signal safe completion wait
We were waiting for a completion notification of HW DMA
operation using an interruptible wait which can result
in data corruption if a signal interrupted us while
DMA was not yet completed.

Fix this by moving to uninterrupted wait.

Fixes: abefd6741d ("staging: ccree: introduce CryptoCell HW driver").

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25 16:29:15 +02:00
Gilad Ben-Yossef d255b343f5 staging: ccree: add DT bus coherency detection
The ccree driver has build time configurable support
to work on top of coherent (e.g. ACP) vs. none coherent bus
connections. Turn it to run-time configurable option
based on device tree.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25 16:29:15 +02:00
Gilad Ben-Yossef 675ef02fcb staging: ccree: add clock management support
Some SoC which implement CryptoCell have a dedicated clock
tied to it, some do not. Implement clock support if exists
based on device tree data and tie power management to it.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25 16:29:15 +02:00
Gilad Ben-Yossef b091fadb12 staging: ccree: remove unused function
The function set_ack_last was not used anywhere. Remove it.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25 16:29:15 +02:00
Gilad Ben-Yossef c51831be99 staging: ccree: register setkey for none hash macs
The original ccree driver was registering a useless setkey
method even for non-MAC hash transformations. Somewhere
around v4.9 a check was added that failed hash operations
if a setkey method was registered but was not called,
so during the initial upstream port code was added to
only register the setkey method for MAC type hash transform.

Unfortunately, the ccree driver also registers non-hash based
MAC transforms and the code had a logic error that stopped
it registering a setkey callback even for those, thus rendering
them useless.

This commit fixes the logic mistake, thus correctly registering
a setkey method only for MAC transformations, leaving it out
for non-MAC ones, whether they are hash based on not.

Fixes: 50cfbbb7e6 ("staging: ccree: add ahash support").

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25 16:29:15 +02:00
Gilad Ben-Yossef 454527d0d9 staging: ccree: fix hash import/export
Hash import and export was saving and restoring the wrong context
and therefore disabled. Fix it by restoring intermediate digest
and additional state needed.

The hash and mac transform now pass testmgr partial hash tests.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25 16:29:14 +02:00
Suniel Mahesh 18cd9021ea staging: wlan-ng: Fix struct definition's and variable type
le16_to_cpu() accepts argument of type __le16 and cpu_to_le16()
returns an argument of type __le16. This patch fixes:
(a) the type of the variable that end's up getting return from
    cpu_to_le16().
(b) the member types of struct hfa384x_host_scan_request_data,
    struct hfa384x_bytestr32 and struct hfa384x_hscan_result_sub.

The following type mismatch warnings reported by sparse
have been fixed:
warning: incorrect type in assignment (different base types)
warning: cast to restricted __le16

Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 19:37:38 +02:00
Amitoj Kaur Chawla 428715bac6 staging: rtl8723bs: Remove unnecessary cast in kfree
Remove unnecassary casts in the argument to kfree.

Found using Coccinelle. The semantic patch used to find this is as
follows:

//<smpl>
@@
type T;
expression *f;
@@

- kfree((T *)(f));
+ kfree(f);
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 19:36:49 +02:00
simran singhal 7bb0dffd05 staging: rtl8723bs: hal: Use (true/false) in assignment to bool
This patch assigns (true/false) to boolean EDCCA_State instead of (1/0).
And, there is no need of comparing EDCCA_State explicitly with constant
1.

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 19:36:49 +02:00
Sudip Mukherjee 888db9a6e0 staging: sm750fb: change default screen resolution
The previous patch which updated screen resolution was tested under
wrong environment. sm750 driver does not support 24bpp. It only
supports 8bpp, 16bpp and 32bpp.
Lets update the default screen resolution to use 32bpp for a better
screen performance.

Fixes: ac66925108 ("staging: sm750fb: change default screen resolution")
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 19:36:49 +02:00
Matthew Reed 5ef61f593c staging: fb_xgi: vb_table: Remove white space after tabstop
Remove white space after tabstop on closing bracket as suggested by
checkpatch.pl.  Additional white space removed for page consistency.

Signed-off-by: Matthew Reed <4d5452@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 19:36:49 +02:00
Frans Klaver b9e8caa7a6 staging: fusb302: don't bitshift __le16 type
The header field in struct pd_message is declared as an __le16 type. The
data in the message is supposed to be little endian. This means we don't
have to go and shift the individual bytes into position when we're
filling the buffer, we can just copy the contents right away. As an
added benefit we don't get fishy results on big endian systems anymore.

Signed-off-by: Frans Klaver <fransklaver@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:47:59 +02:00
Laurentiu Tudor 1877e4ba2d staging: fsl-mc: make dprc.h header private
dprc.h is only used in the mc bus driver so move it together with the
sources thus making it private.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:44:01 +02:00
Laurentiu Tudor 9b1aa45539 staging: fsl-mc: move mc-cmd.h contents in the public header
mc-cmd.h contains some low level functions used to encode and decode
commands to the MC. They are used by the drivers so move them to the
public headers and get rid of the mc-cmd.h header.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:44:01 +02:00
Laurentiu Tudor 7d6e221d73 staging: fsl-mc: move mc-sys.h contents in the public header
mc-sys.h contains the API to send commands to the MC and is used
by drivers. Move it to the public headers and get rid of the mc-sys.h
header.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:44:01 +02:00
Laurentiu Tudor 5776aad3fe staging: fsl-mc: fix a few implicit includes
Few files using byte order macros but did not explicitly
included the required kernel header, so add it.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:44:01 +02:00
Laurentiu Tudor b065307fe0 staging: fsl-mc: remove dpmng API files
dpmng.h & dpmng.c files expose an API of just one function which is only
used by the bus driver. Move that single API in the bus source as static
and remove the two files.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:44:01 +02:00
Laurentiu Tudor af4376710c staging: fsl-mc: move rest of mc-bus.h to private header
All the mc-bus.h contents is only used privately in the bus driver so
move everything to the private header and get rid of the mc-bus.h
header file.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:44:00 +02:00
Laurentiu Tudor 7eba570ece staging: fsl-mc: move couple of definitions to public header
Define dev_is_fsl_mc() and the bus type definition (fsl_mc_bus_type)
are used externally so move them to the public header.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:44:00 +02:00
Laurentiu Tudor b32cdde14e staging: fsl-mc: move irq domain creation prototype to public header
fsl_mc_msi_create_irq_domain() will is used from the irqchip glue code
so it needs to be in the public headers.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:44:00 +02:00
Laurentiu Tudor 10a8593a76 staging: fsl-mc: turn several exported functions static
They are never used outside the source they are implemented in and very
likely never will, so it's safe to make them static.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:44:00 +02:00
Laurentiu Tudor be6faff74c staging: fsl-mc: delete prototype of unimplemented function
The function fsl_mc_bus_exists() has a prototype but is never
implemented so delete it from the header file.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:44:00 +02:00
Laurentiu Tudor 48d3cfb318 staging: fsl-mc: delete duplicated function prototypes
These functions already have their prototypes in fsl-mc-private.h
header file so delete them from mc-bus.h.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:44:00 +02:00
Laurentiu Tudor c6ce019edb staging: fsl-mc: decouple the mc-bus public headers from dprc.h
In its current form, the public headers of the mc-bus depend only on a
structure "dprc_obj_desc" defined in dprc.h. Move it to the bus public
header together with its associated defines and, in order to keep the
naming prefixes consistent rename it to "fsl_mc_obj_desc".
This will allow making dprc.h private in future patches.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:44:00 +02:00
Laurentiu Tudor bb4a64b79f staging: fsl-mc: drop useless #includes
These couple of header files are not needed in the source
so remove them.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:44:00 +02:00
Laurentiu Tudor 410ab9b5f8 staging: fsl-mc: drop macros with possible side effects
Several macros were triggering this checkpatch.pl warning:
  "Macro argument reuse '$arg' - possible side-effects?"
Fix the warning by turning them into real functions.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:44:00 +02:00
Laurentiu Tudor d2176b325f staging: fsl-dpaa2/eth: fix a couple of implicit includes
dpni.c is using byte order macros and error codes but does
not explicitly include the required kernel header, so add it.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Acked-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:41:34 +02:00
Ioana Radulescu 30c9dbf317 staging: fsl-mc/dpio: Propagate error code
dpaa2_io_service_register() returns zero even if
qbman_swp_CDAN_set() encountered an error. Fix this
by propagating the error code so the caller is informed
data availability notifications are not properly set
for a channel.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Acked-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 18:41:33 +02:00
Ian Abbott 125178d1eb staging: comedi: use centralized error clean-up in comedi_init()
Centralize the "clean-up on error" handling in `comedi_init()` using
`goto` statements.  Also change some of the explicit `-EIO` return
values to the error return values from the failing functions as there is
no good reason to use `-EIO` explicitly.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:37:07 +08:00
Ian Abbott a9332e9ad0 staging: comedi: fix clean-up of comedi_class in comedi_init()
There is a clean-up bug in the core comedi module initialization
functions, `comedi_init()`.  If the `comedi_num_legacy_minors` module
parameter is non-zero (and valid), it creates that many "legacy" devices
and registers them in SysFS.  A failure causes the function to clean up
and return an error.  Unfortunately, it fails to destroy the "comedi"
class that was created earlier.  Fix it by adding a call to
`class_destroy(comedi_class)` at the appropriate place in the clean-up
sequence.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: <stable@vger.kernel.org> # 3.9+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:37:07 +08:00
Malcolm Priestley f0836fd2a6 staging: rtl8192e: remove dead code rtllib_wpa_supplicant_ioctl
Following removal of _rtl92e_ioctl this function along with associated
macros, structure ieee_param and functions become dead code.

Remove functions rtllib_wpa_enable, rtllib_wpa_assoc_frame, rtllib_wpa_mlme,
rtllib_wpa_set_wpa_ie, rtllib_wpa_set_auth_algs, rtllib_wpa_set_param,
rtllib_wpa_set_encryption and rtllib_wpa_supplicant_ioctl.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:35:07 +08:00
Malcolm Priestley af8d0d97d6 staging: rtl8192e: remove dead private call to _rtl92e_ioctl.
A RTL_IOCTL_WPA_SUPPLICANT call is a proprietary version of
wpa supplicant.

All kernel calls use SIOCSIWENCODEEXT call via wireless handlers
already used in this driver.

Remove dead code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:35:07 +08:00
Andrey Shvetsov 4271eabb48 staging: most: net: hold used net device
This adds the dev_hold and dev_put calls to the functions
aim_resume_tx_channel, aim_rx_data and on_netinfo to postpone the
unregistration of the used net device.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:32:46 +08:00
Andrey Shvetsov 2338652c33 staging: most: net: protect consistency of the state
This introduces the mutex that protects the consistency between the
tx.linked, rx.linked and the presence of the net divice.

Additionally, this patch optimizes the setup of the ch->linked in the
function aim_probe_channel.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:32:46 +08:00
Andrey Shvetsov 606c217597 staging: most: net: make net device lifetime obvious
The function aim_probe_channel calls only one of the functions
alloc_netdev and register_netdev per run.

Correspondingly, the function aim_disconnect_channel calls only one of
the functions unregister_netdev and free_netdev per run.

This patch makes it obvious by using the 'else' part of the 'if'
statement.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:32:46 +08:00
Andrey Shvetsov 3c1746edd1 staging: most: net: remove redundant traces
This removes redundant netdev_info/pr_info.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:32:46 +08:00
Jeremy Sowden d4f3d4b150 staging: ccree: removed spaces after opening parentheses.
Removed spaces after opening parentheses in ssi_ivgen.c.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:27:28 +08:00
Derek Robson 4f71fecd78 staging: ccree: - style fix, spaces and tabs
Changed code indent to be tabs across whole driver
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:27:10 +08:00
Jhih-Ming Hunag 2bd2515130 staging: ccree: move else to follow close brace '}'
Move else to follow close brace '}'

Signed-off-by: Jhih-Ming Hunag <fbihjmeric@gmail.com>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:26:26 +08:00
Jhih-Ming Hunag fe2d182332 staging: ccree: remove improper space
Remove improper space.

Signed-off-by: Jhih-Ming Hunag <fbihjmeric@gmail.com>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:26:26 +08:00
Jhih-Ming Hunag 134a8ca1c9 staging: ccree: move * to close variable name instead of type.
Move * to close variable name instead of type.

Signed-off-by: Jhih-Ming Hunag <fbihjmeric@gmail.com>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:26:26 +08:00
Jhih-Ming Hunag 4e09b077a0 staging: ccree: move '{' to next line for function.
Move '{' to next line for function.

Signed-off-by: Jhih-Ming Hunag <fbihjmeric@gmail.com>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:26:26 +08:00
Jhih-Ming Hunag b803d57df5 staging: ccree: move brace { to previous line for if.
Move brace { to previous line for if.

Signed-off-by: Jhih-Ming Hunag <fbihjmeric@gmail.com>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:26:26 +08:00
Jhih-Ming Hunag b9778d910d Staging: ccree: add space around comma, brace and operator.
Add space around comma, brace, and opertor.

Signed-off-by: Jhih-Ming Hunag <fbihjmeric@gmail.com>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:26:26 +08:00
James Simmons bd9a53e67e staging: lustre: lustre: add all missing indentifier names
Create identifier names missing from function prototypes as
reported by checkpatch.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:17:02 +08:00
James Simmons e7738506c5 staging: lustre: lustre: fix all bare unsigned usage
Turn all bare unsigned usage in the lustre code to proper
unsigned int.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:17:02 +08:00
James Simmons ae839184d3 staging: lustre: lustre: make all struct file_operations constant
Checkpatch reported several cases of struct file_operations
not being const. This resolves those warnings.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:17:02 +08:00
James Simmons 1ada25dc24 staging: lustre: lustre: resolve "use spaces between elements" checkpatch errors
Due to the way the DFID was embedded in our debug strings checkpatch
would report the following error:

CHECK: Concatenated strings should use spaces between elements

This patch introduces proper space to resolve these reports.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-24 00:17:02 +08:00
Marc Zyngier 96f0d93a48 irqchip/MSI: Use irq_domain_update_bus_token instead of an open coded access
Now that we have irq_domain_update_bus_token(), switch everyone over
to it. The debugfs code thanks you for your continued support.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2017-06-22 18:29:17 +02:00
David S. Miller 3d09198243 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Two entries being added at the same time to the IFLA
policy table, whilst parallel bug fixes to decnet
routing dst handling overlapping with the dst gc removal
in net-next.

Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-21 17:35:22 -04:00
yuan linyu b952f4dff2 net: manual clean code which call skb_put_[data:zero]
Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-20 13:30:15 -04:00
yuan linyu de77b966ce net: introduce __skb_put_[zero, data, u8]
follow Johannes Berg, semantic patch file as below,
@@
identifier p, p2;
expression len;
expression skb;
type t, t2;
@@
(
-p = __skb_put(skb, len);
+p = __skb_put_zero(skb, len);
|
-p = (t)__skb_put(skb, len);
+p = __skb_put_zero(skb, len);
)
... when != p
(
p2 = (t2)p;
-memset(p2, 0, len);
|
-memset(p, 0, len);
)

@@
identifier p;
expression len;
expression skb;
type t;
@@
(
-t p = __skb_put(skb, len);
+t p = __skb_put_zero(skb, len);
)
... when != p
(
-memset(p, 0, len);
)

@@
type t, t2;
identifier p, p2;
expression skb;
@@
t *p;
...
(
-p = __skb_put(skb, sizeof(t));
+p = __skb_put_zero(skb, sizeof(t));
|
-p = (t *)__skb_put(skb, sizeof(t));
+p = __skb_put_zero(skb, sizeof(t));
)
... when != p
(
p2 = (t2)p;
-memset(p2, 0, sizeof(*p));
|
-memset(p, 0, sizeof(*p));
)

@@
expression skb, len;
@@
-memset(__skb_put(skb, len), 0, len);
+__skb_put_zero(skb, len);

@@
expression skb, len, data;
@@
-memcpy(__skb_put(skb, len), data, len);
+__skb_put_data(skb, data, len);

@@
expression SKB, C, S;
typedef u8;
identifier fn = {__skb_put};
fresh identifier fn2 = fn ## "_u8";
@@
- *(u8 *)fn(SKB, S) = C;
+ fn2(SKB, C);

Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-20 13:30:14 -04:00
Mauro Carvalho Chehab ff6ccad361 Linux 4.12-rc6
-----BEGIN PGP SIGNATURE-----
 
 iQEbBAABAgAGBQJZR92EAAoJEHm+PkMAQRiGT1oH+KW2FLrRaYxtut+KyGA6l7tc
 R/hFx1n9BibkjXeqD+y6/4SjRTe6/pT8Zkihv3/19eZ5algUWeQa0Hm+/455sl58
 IdIXx/pzuCO3kqR3//fP9ZFD657GNDsuQ0fYnZESItFwiWQtO1TNfZD6KQjkqBdI
 L3MVhDUVBZA2ZtPwC4ERei5/sToV9woykKoJ/A3+OkWjgX6w4SBimqgkSEFk4uE8
 xS0pycyDZci93rJlECi1UueewdODTKSmhwdC80qvGEiYXzsC6UFtaF0Fj66XO1AL
 UMjxqI/gkm5ZuCIjRsmPmJjgL5q1RT6UX/qtw9yn71XTmcgMiPW2/DF/v/OaTg==
 =XbW2
 -----END PGP SIGNATURE-----

Merge tag 'v4.12-rc6' into patchwork

Linux 4.12-rc6

* tag 'v4.12-rc6': (813 commits)
  Linux 4.12-rc6
  mm: larger stack guard gap, between vmas
  virtio_balloon: disable VIOMMU support
  mm: correct the comment when reclaimed pages exceed the scanned pages
  userfaultfd: shmem: handle coredumping in handle_userfault()
  mm: numa: avoid waiting on freed migrated pages
  swap: cond_resched in swap_cgroup_prepare()
  mm/memory-failure.c: use compound_head() flags for huge pages
  perf unwind: Report module before querying isactivation in dwfl unwind
  fs: pass on flags in compat_writev
  objtool: Add fortify_panic as __noreturn function
  powerpc/debug: Add missing warn flag to WARN_ON's non-builtin path
  USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks
  drm: mxsfb_crtc: Reset the eLCDIF controller
  drm/mgag200: Fix to always set HiPri for G200e4 V2
  i2c: ismt: fix wrong device address when unmap the data buffer
  i2c: rcar: use correct length when unmapping DMA
  powerpc/xive: Fix offset for store EOI MMIOs
  drm/tegra: Correct idr_alloc() minimum id
  drm/tegra: Fix lockup on a use of staging API
  ...

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 08:51:56 -03:00
Marek Vasut de2e04569d [media] media: imx: Drop warning upon multiple S_STREAM disable calls
Calling S_STREAM OFF multiple times on a video device is valid, although
dubious, practice. Instead of warning about it and setting stream count
lower than zero, just ignore the subsequent S_STREAM calls and correct
the stream count to zero.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 08:12:20 -03:00
Steve Longerbeam 21e54111d2 [media] media: imx: set and propagate default field, colorimetry
This patch adds a call to imx_media_fill_default_mbus_fields() in the
*_try_fmt() functions at the sink pads, to set empty field order and
colorimetry parameters.

If the field order is set to ANY, choose the currently set field order
at the sink pad. If the colorspace is set to DEFAULT, choose the
current colorspace at the sink pad.  If any of xfer_func, ycbcr_enc
or quantization are set to DEFAULT, either choose the current sink pad
setting, or the default setting for the new colorspace, if non-DEFAULT
colorspace was given.

If a format is destined to be routed through the Image Converter,
fixed quantization and Y`CbCr encoding must be set.

Colorimetry is also propagated from sink to source pads anywhere
this has not already been done.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 08:03:57 -03:00
Russell King c24858c307 [media] media: imx: capture: add frame sizes/interval enumeration
Add support for enumerating frame sizes and frame intervals from the
first subdev via the V4L2 interfaces.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 08:02:56 -03:00
Russell King 949ffdbfdb [media] media: imx: csi: add frame size/interval enumeration
Add frame size and frame interval enumeration to CSI.

CSI can downscale the image independently horizontally and vertically by a
factor of two, which enumerates to four different frame sizes at the
output pads. The input pad supports a range of frame sizes.

CSI can also drop frames, resulting in frame rate reduction, so
enumerate the resulting possible output frame rates.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 08:02:24 -03:00
Philipp Zabel 69e78611ff [media] media: imx: csi: add sink selection rectangles
Move the crop rectangle to the sink pad and add a sink compose rectangle
to configure scaling. Also propagate rectangles from sink pad to crop
rectangle, to compose rectangle, and to the source pads both in ACTIVE
and TRY variants of set_fmt/selection, and initialize the default crop
and compose rectangles.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:52:53 -03:00
Philipp Zabel fb30ee7955 [media] media: imx: csi: add frame skipping support
The CSI can skip any out of up to 6 input frames, allowing to reduce the
frame rate at the output pads by small fractions.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:45:55 -03:00
Philipp Zabel 6f30359239 [media] media: imx: csi: increase burst size for YUV formats
The IDMAC supports burst sizes of up to 32 pixels for interleaved YUV
formats and up to 64 pixels for planar YUV formats.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:43:41 -03:00
Russell King c8da8c03d2 [media] media: imx: csi: add support for bayer formats
Bayer formats must be treated as generic data and passthrough mode must
be used.  Add the correct setup for these formats.

- added check to csi_link_validate() to verify that destination is
  IDMAC output pad when passthrough conditions exist: bayer formats
  and 16-bit parallel buses.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:43:15 -03:00
Steve Longerbeam f5138526e4 [media] media: imx: Add MIPI CSI-2 Receiver subdev driver
Adds MIPI CSI-2 Receiver subdev driver. This subdev is required
for sensors with a MIPI CSI2 interface.

- Switch from the v4l2_of_ APIs to the v4l2_fwnode_ APIs.
- Add the function csi2ipu_gasket_init() to initialize the gasket at
  s_power(ON). The gasket needs to be programmed with the correct color
  component ordering to handle UYVY vs. YUYV ordered mbus formats from
  sensors. Note that the description of the CSI2IPU_GASKET register in
  the i.MX6 reference manual is wrong w.r.t bit 2 (the manual refers to
  this register as CSI2_SW_RST): setting bit 2 selects YUYV order, not UYVY.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Suggested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:42:41 -03:00
Steve Longerbeam f0d9c8924e [media] media: imx: Add IC subdev drivers
This is a set of three media entity subdevice drivers for the i.MX
Image Converter:

- Pre-process Router: Takes input frames from CSI0, CSI1, or VDIC.
  Two output pads enable either or both of the preprocess tasks
  below. If the input is from one of the CSIs, both proprocess task
  links can be enabled to process frames from that CSI simultaneously.
  If the input is the VDIC, only the Pre-processing Viewfinder task
  link can be enabled.

- Pre-processing Encode task: video frames are routed directly from
  the CSI and can be scaled, color-space converted, and rotated.
  Scaled output is limited to 1024x1024 resolution. Output frames
  are routed to the prpenc capture device.

- Pre-processing Viewfinder task: this task can perform the same
  conversions as the pre-process encode task, but in addition can
  be used for hardware motion compensated deinterlacing. Frames can
  come either directly from the CSI or from the VDIC. Scaled output
  is limited to 1024x1024 resolution. Output frames are routed to
  the prpvf capture device.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:41:24 -03:00
Steve Longerbeam 93dae31149 [media] media: imx: Add VDIC subdev driver
This is a media entity subdevice driver for the i.MX Video De-Interlacing
or Combining Block. So far this entity does not implement the Combining
function but only motion compensated deinterlacing. Video frames are
received from the CSI and are routed to the IC PRPVF entity.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:39:05 -03:00
Steve Longerbeam 4a34ec8e47 [media] media: imx: Add CSI subdev driver
This is a media entity subdevice for the i.MX Camera
Sensor Interface module.

- Added support for negotiation of frame intervals.
- Fixed cropping rectangle negotiation at input and output pads.
- Added support for /2 downscaling, if the output pad dimension(s)
  are 1/2 the crop dimension(s) at csi_setup() time.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[hans.verkuil@cisco.com: add linux/pinctrl/consumer.h include]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:37:53 -03:00
Steve Longerbeam 64b5a49df4 [media] media: imx: Add Capture Device Interface
This is the capture device interface driver that provides the v4l2
user interface. Frames can be received from various sources:

- directly from CSI for capturing unconverted images directly from
  camera sensors.

- from the IC pre-process encode task.

- from the IC pre-process viewfinder task.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:34:22 -03:00
Steve Longerbeam 543933ee34 [media] media: imx: Add a TODO file
Add a TODO file.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:31:52 -03:00
Steve Longerbeam e130291212 [media] media: Add i.MX media core driver
Add the core media driver for i.MX SOC.

Switch from the v4l2_of_ APIs to the v4l2_fwnode_ APIs.
Add the bayer formats to imx-media's list of supported pixel and bus
formats.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:30:38 -03:00