summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/max2175.c
Commit message (Collapse)AuthorAgeFilesLines
* media: i2c: max2175: convert to SPDX identifiersKuninori Morimoto2018-09-121-9/+1
| | | | | | | | | This patch updates license to use SPDX-License-Identifier instead of verbose license text. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Ramesh Shanmugasundaram <Ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: use strscpy() instead of strlcpy()Mauro Carvalho Chehab2018-09-111-1/+1
| | | | | | | | | | | The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: max2175: fix location of driver's companion documentationMauro Carvalho Chehab2018-06-151-3/+3
| | | | | | | | There's a missing ".rst" at the doc's file name. Acked-by: Ramesh Shanmugasundaram <Ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Acked-by: Jonathan Corbet <corbet@lwn.net>
* media: i2c: max2175: use 64-bit arithmetic instead of 32-bitGustavo A. R. Silva2018-02-261-1/+1
| | | | | | | | | | | | | | | | Add suffix LL to constant 2 in order to give the compiler complete information about the proper arithmetic to use. Notice that this constant is used in a context that expects an expression of type s64 (64 bits, signed). The expression 2 * (clock_rate - abs_nco_freq) is currently being evaluated using 32-bit arithmetic. Addresses-Coverity-ID: 1446589 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: max2175: don't clear V4L2_SUBDEV_FL_IS_I2CAkinobu Mita2017-10-311-1/+1
| | | | | | | | | | | | | | | | | | | The v4l2_i2c_subdev_init() sets V4L2_SUBDEV_FL_IS_I2C flag in the subdev->flags. But this driver overwrites subdev->flags immediately after calling v4l2_i2c_subdev_init(). So V4L2_SUBDEV_FL_IS_I2C is not set after all. This stops breaking subdev->flags and preserves V4L2_SUBDEV_FL_IS_I2C. Side note: According to the comment in v4l2_device_unregister(), this is problematic only if the device is platform bus device. Device tree or ACPI based devices are not affected. Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: max2175: Propagate the real error on devm_clk_get() failureFabio Estevam2017-08-271-1/+1
| | | | | | | | | | | When devm_clk_get() fails we should return the real error code instead of always returning -ENODEV. This allows defer probe to happen in the case the clock provider has not been enabled by the time max2175 driver gets probed. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] max2175: remove an useless comparisionMauro Carvalho Chehab2017-06-201-1/+1
| | | | | | | | | | | | load is an unsigned integer. So, it is always bigger or equal to zero, as reported by gcc: drivers/media/i2c/max2175.c: In function 'max2175_refout_load_to_bits': drivers/media/i2c/max2175.c:1272:11: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] if (load >= 0 && load <= 40) ^~ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: i2c: max2175: Add MAX2175 supportRamesh Shanmugasundaram2017-06-201-0/+1453
This patch adds driver support for the MAX2175 chip. This is Maxim Integrated's RF to Bits tuner front end chip designed for software-defined radio solutions. This driver exposes the tuner as a sub-device instance with standard and custom controls to configure the device. Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>