summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/atomisp/i2c/ov8858.c
Commit message (Collapse)AuthorAgeFilesLines
* media: staging: media: remove remains of VIDEO_ATOMISP_OV8858Corentin Labbe2018-03-211-2169/+0
| | | | | | | | | | | OV8858 files are left unusable since commit 3a81c7660f80 ("media: staging: atomisp: Remove IMX sensor support") They are uncompilable since they depends on dw9718.c and vcm.c which was removed. Remove the OV8858 kconfig and files. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: staging: atomisp: Remove non-ACPI leftoversAndy Shevchenko2017-12-291-22/+21
| | | | | | | | | | | Since all drivers are solely requiring ACPI enumeration, there is no need to additionally check for legacy platform data or ACPI handle. Remove leftovers from the sensors and platform code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: staging: atomisp: Remove FSF snail addressAndy Shevchenko2017-10-311-4/+0
| | | | | | | | | | | | | | | Snail address is subject to change, remove it completely from the code. This has been done using the following script: sed -i '/You should/,/02110-1301/d' \ $(git grep -n -w Franklin -- drivers/staging/media/atomisp/ | cut -f1 -d:) No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: staging: atomisp: Remove unused members of camera_sensor_platform_dataAndy Shevchenko2017-10-311-13/+0
| | | | | | | | | | Remove unused members along with dead code. Mostly done with help of coccinelle. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: staging: atomisp: Remove ->power_ctrl() callbackAndy Shevchenko2017-10-311-4/+0
| | | | | | | | | | | | | There is redundant callback which does nothing in upstreamed version of the driver. Remove it along with user call places. Mostly done with help of coccinelle. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: staging: atomisp: Remove ->gpio_ctrl() callbackAndy Shevchenko2017-10-311-4/+0
| | | | | | | | | | | | | There is redundant callback which does nothing in upstreamed version of the driver. Remove it along with user call places. Mostly done with help of coccinelle. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: staging: atomisp: Switch i2c drivers to use ->probe_new()Andy Shevchenko2017-10-311-15/+5
| | | | | | | | | | Since most of the drivers are being used on ACPI enabled platforms there is no need to keep legacy API support for them. Thus, switch to ->probe_new() callback and remove orphaned code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: staging: atomisp: Use module_i2c_driver() macroAndy Shevchenko2017-10-311-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done using coccinelle semantic patch: //<smpl> @a@ identifier f, x; @@ -static f(...) { return i2c_add_driver(&x); } @b depends on a@ identifier e, a.x; @@ -static e(...) { i2c_del_driver(&x); } @c depends on a && b@ identifier a.f; declarer name module_init; @@ -module_init(f); @d depends on a && b && c@ identifier b.e, a.x; declarer name module_exit; declarer name module_i2c_driver; @@ -module_exit(e); +module_i2c_driver(x); //</smpl> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: staging: atomisp: cleanup out of memory messagesAishwarya Pant2017-10-311-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logging of explicit out of memory messages is redundant since memory allocation failures produce a backtrace. Done with the help of the following cocci script: @@ expression ex, ret; statement s; constant char[] c; constant err; identifier f, l; @@ ex = \(kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...) ... when != ex if ( ( !ex | unlikely(!ex) ) ) - { - f(..., c, ...); ( return ex; | return; | return err; | goto l; ) - } else s Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: staging: atomisp: ov8858: constify acpi_device_idArvind Yadav2017-07-191-1/+1
| | | | | | | | | | | | | | | | | | | acpi_device_id are not supposed to change at runtime. All functions working with acpi_device_id provided by <acpi/acpi_bus.h> work with const acpi_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 23804 8448 0 32252 7dfc drivers/staging/media/atomisp/i2c/ov8858.o File size After adding 'const': text data bss dec hex filename 23868 8384 0 32252 7dfc drivers/staging/media/atomisp/i2c/ov8858.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* staging: media: atomisp: Compress return logic into one line.Varsha Rao2017-03-141-3/+1
| | | | | | | | | | | | | | | | | | | Simplify function return by merging assignment and return into a single line. The following coccinelle script is used to fix this issue. @@ expression e; local idexpression ret; @@ -ret = e; -return ret; +return e; This patch also removes unnecessary declarations. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: atomisp: fix include Makefile messGreg Kroah-Hartman2017-03-071-1/+1
| | | | | | | | | | | | | Using LINUXINCLUDE is a very old hack, and doesn't play well with building objects in a different directory than the kernel source is in. So fix up the include file references to be relative to make it obvious we are pulling in local include files, which need to get fixed up. Reported-by: kbuild test robot <fengguang.wu@intel.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: media: atomisp: Removed unnecessary parentheses.Varsha Rao2017-03-061-1/+1
| | | | | | | | | | | | | | | | | | | Removed parentheses on the right hand side of assignment, as they are not required. The following coccinelle script is used to fix this issue: @@ binary operator op = {<<,>>,+,/}; local idexpression id; expression e1, e2; @@ id = -( e1 op e2 -) Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/atomisp: fix platform_no_drv_owner.cocci warningskbuild test robot2017-03-061-1/+0
| | | | | | | | | | | | drivers/staging/media/atomisp/i2c/imx/../ov8858.c:2199:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/atomisp: Add support for the Intel IPU v2Alan Cox2017-03-061-0/+2224
This patch adds support for the Intel IPU v2 as found on Android and IoT Baytrail-T and Baytrail-CR platforms (those with the IPU PCI mapped). You will also need the firmware files from your device (Android usually puts them into /etc) - or you can find them in the downloadable restore/upgrade kits if you blew them away for some reason. It may be possible to extend the driver to handle the BYT/T windows platforms such as the ASUS T100TA. These platforms don't expose the IPU via the PCI interface but via ACPI buried in the GPU description and with the camera information somewhere unknown so would need a platform driver interface adding to the codebase *IFF* the firmware works on such devices. To get good results you also need a suitable support library such as libxcam. The camera is intended to be driven from Android so it has a lot of features that many desktop apps don't fully spport. In theory all the pieces are there to build it with -DISP2401 and some differing files to get CherryTrail/T support, but unifying the drivers properlly is a work in progress. The IPU driver represents the work of a lot of people within Intel over many years. It's historical goal was portability rather than Linux upstream. Any queries about the upstream aimed driver should be sent to me not to the original authors. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud