aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/smiapp-pll.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174Thomas Gleixner1-9/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation 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 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 655 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-21[media] smiapp-pll: Don't complain aloud about failing PLL calculationSakari Ailus1-1/+2
Don't complain about a failure to compute the pre_pll divisor. The function is used to determine whether a particular combination of bits per sample value and a link frequency can be used, in which case there are lots of unnecessary driver messages. During normal operation the failure generally does not happen. Use dev_dbg() instead. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2014-12-23[media] smiapp-pll: include linux/device.h in smiapp-pll.c, not in smiapp-pll.hSakari Ailus1-0/+1
struct device has a forward declaration in the header already. The header is only needed in the .c file. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-23[media] smiapp: Remove FSF's address from the license headerSakari Ailus1-6/+0
Remove FSF's address information from the license header in the smiapp driver and the smiapp-pll PLL calculator. This should no longer be needed, and would be rendered outdated in case the FSF chooses to relocate its office. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Timo Ahonen <timo.ahonen@nokia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] smiapp-pll: Add pixel rate in pixel array as output parametersSakari Ailus1-0/+1
The actual pixel array pixel rate may be something else than vt_pix_clk_freq on some implementations. Add a new field which contains the corrected value. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] smiapp: Remove validation of op_pix_clk_divSakari Ailus1-5/+0
op_pix_clk_div is directly assigned and not calculated. There's no need to verify it. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] smiapp-pll: Don't validate OP clocks if there are noneSakari Ailus1-0/+8
For profile 0 sensors (which have no OP clocks), the OP limits are in fact VT limits. Do not verify them again. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] smiapp-pll: Calculate OP clocks only for sensors that have themSakari Ailus1-30/+52
Profile 0 sensors have no OP clock branck in the clock tree. The PLL calculator still calculated them, they just weren't used for anything. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] smiapp-pll: Unify OP and VT PLL structsSakari Ailus1-30/+30
Uniform representation for VT and OP clocks. This is preparation for calculating the VT clocks using the OP clock code. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] smiapp-pll: Separate bounds checking into a separate functionSakari Ailus1-51/+59
Enough work for this function already. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] smiapp-pll: The clock tree values are unsigned --- fix debug printsSakari Ailus1-47/+47
These values are unsigned, so use %u instead of %d. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] smiapp-pll: Correct clock debug printsSakari Ailus1-2/+2
The PLL flags were not used correctly. Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2013-08-22[media] smiapp-pll: Add a few comments to PLL calculationSakari Ailus1-0/+17
The PLL calculation heuristics is rather complicated and and is often difficult to understand to its original author. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2012-11-21[media] v4l, smiapp, smiapp-pll, adp1653: Update contact informationSakari Ailus1-2/+2
Update contact information to correspond my e-mail address changes. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-29[media] smiapp-pll: Constify limits argument to smiapp_pll_calculate()Laurent Pinchart1-18/+17
The limits are input parameters and should not be modified by the smiapp_pll_calculate() function. Make them const. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-29[media] smiapp-pll: Create a structure for OP and VT limitsLaurent Pinchart1-27/+27
OP and VT limits have identical fields, create a shared structure for both. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-29[media] smiapp-pll: Parallel bus supportSakari Ailus1-4/+15
Support sensors with parallel interface. Make smiapp_pll.flags also 8-bit so it fits nicely into two 32-bit words with the other 8-bit fields. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-29[media] smiapp-pll: Try other pre-pll divisorsSakari Ailus1-58/+73
The smiapp pll calculator assumed that the minimum pre-pll divisor was perfect. That may not always be the case, so let's try the others, too. Typically there are just a few alternatives. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-29[media] smiapp-pll: Correct type for min_t()Sakari Ailus1-2/+2
Unsigned. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-29[media] smiapp-pll: Add missing trailing newlines to warning messagesLaurent Pinchart1-2/+2
Two warning messages are missing a trailing newline. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] move i2c files into drivers/media/i2cMauro Carvalho Chehab1-0/+418
Move ancillary I2C drivers into drivers/media/i2c, in order to better organize them. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>