- 24 4月, 2022 9 次提交
-
-
由 Jacopo Mondi 提交于
The mipi_csis_dump_regs() function accesses the interface registers in order to printout their values for debug purposes. As the function access the registers, it requires the interface to be powered up. Currently this is only enforced in one of the function's callers (mipi_csis_log_status)() but not when the function is called by the debugfs attribute handler. Make sure to access registers only if the interface is powered up and remove the same check from the caller. Signed-off-by: NJacopo Mondi <jacopo@jmondi.org> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
-
由 Jacopo Mondi 提交于
The mipi_csis_device.powered flag only serves for the purpose of not accessing registers in mipi_csis_log_status() when the interface is not powered up. Instead of manually tracking the power state, rely on pm_runtime_get_if_in_use() to remove the 'powered' flag. Also remove the locking in the function as runtime_pm() is refcounted and there's no risk of the interface being powered down behind our backs. Signed-off-by: NJacopo Mondi <jacopo@jmondi.org> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
-
由 Jacopo Mondi 提交于
Simplify the mipi_csis_s_stream() function. This actually fixes a bug, as if calling the subdev's s_stream(1) fails, mipi_csis_stop_stream() was not called. Signed-off-by: NJacopo Mondi <jacopo@jmondi.org> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
-
由 Laurent Pinchart 提交于
The runtime PM resume handler is guaranteed to be called on a suspended device, and the suspend handler on a resumed device. The implementation can thus be simplified. While at it, rename the mipi_csis_device state field to powered, as the now state contains a single flag only. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: NJacopo Mondi <jacopo@jmondi.org> Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
-
由 Laurent Pinchart 提交于
Streaming is guaranteed to have been stopped by the time the device gets runtime suspended, as pm_runtime_put() is called from .s_stream(0) only. Drop the manual stop. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: NJacopo Mondi <jacopo@jmondi.org> Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
-
由 Laurent Pinchart 提交于
There's no need to implement system suspend/resume manually, as video pipelines are supposed to be suspended in a controlled and ordered manner by the data sink driver at system suspend time (and similarly at resume time). Drop the system suspend/resume handlers. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: NJacopo Mondi <jacopo@jmondi.org> Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
-
由 Laurent Pinchart 提交于
The subdev .s_power() operation is deprecated. Drop it, requiring sensor drivers to correctly use runtime PM instead of relying on .s_power(). As this driver has just been moved out of staging, and necessary drivers to implement a full camera pipeline are still in staging, no platform depends yet on this API being called. There is thus no risk of regression. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: NJacopo Mondi <jacopo@jmondi.org> Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
-
由 Laurent Pinchart 提交于
Usage of "state" for the device-specific data structure is confusing, as it can also refer to the subdev state. Rename the structure to mipi_csis_device, and the corresponding state variables to csis. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: NJacopo Mondi <jacopo@jmondi.org> Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
-
由 Jacopo Mondi 提交于
Add support for MEDIA_BUS_FMT_JPEG_1X8 media bus code to the CSIS driver. The MEDIA_BUS_FMT_JPEG_1X8 code is mapped to the RAW8 CSI-2 Data Type, while the CSI-2 specification suggests to use User Defined Data Type 1. As reported in the comment, the CSIS interface captures arbitrary Data Types by using a pixel sampling mode not supported by the IP core connected to it on i.MX SoCs. As some sensors, such as OV5640, support sending JPEG data on the RAW8 Data Type and capture operations work correcty with such configuration, map MEDIA_BUS_FMT_JPEG_1X8 to Data Type 0x2a. Signed-off-by: NJacopo Mondi <jacopo@jmondi.org> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
-
- 14 3月, 2022 1 次提交
-
-
由 Mauro Carvalho Chehab 提交于
In order to cleanup the main platform media directory, move NXP drivers to their own directory. Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
-
- 23 2月, 2022 6 次提交
-
-
由 Jacopo Mondi 提交于
As the formats on the sink and source pad might be different store them separately. The pad format is used to configure the image width and height in mipi_csis_system_enable(). As the csis cannot downscale, using the sink or the source one isn't relevant. Signed-off-by: NJacopo Mondi <jacopo@jmondi.org> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
-
由 Jacopo Mondi 提交于
Due to how pixel components are transmitted on the CSI-2 serial bus and how they are deserialized by the CSI-2 receiver, the component ordering might change and the image formats on the sink and source pads of the receiver should reflect it. For RGB24, in example, the component ordering on the wire as described by the CSI-2 specification matches the BGR888 format, while once deserialized by the CSIS receiver it matches the RGB888 format. Add an additional .output field to struct csis_pix_format to allow propagating the correct format to the source pad after a format configuration on the sink. The change is only relevant for RGB24 but paves the way for further format translations in future. Signed-off-by: NJacopo Mondi <jacopo@jmondi.org> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
-
由 Jacopo Mondi 提交于
Add support for the BGR888_1X24 image format. No existing media bus codes describe exactly the way data is transferred on the CSI-2 bus. This is not a new issue, the CSI-2 YUV422 8-bit format is described by MEDIA_BUS_FMT_UYVY8_1X16 which is an arbitrary convention and not an exact match. Use the MEDIA_BUS_FMT_BGR888_1X24 to follow the same convention, based on the order in which bits are transmitted over the CSI-2 bus. Signed-off-by: NJacopo Mondi <jacopo@jmondi.org> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
-
由 Jacopo Mondi 提交于
Add RGB565_1X16 to the enumeration of supported image formats. Signed-off-by: NJacopo Mondi <jacopo@jmondi.org> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
-
由 Jacopo Mondi 提交于
Bits 13 and 12 of the ISP_CONFIGn register configure the PIXEL_MODE which specifies the sampling size, in pixel component units, on the CSI-2 output data interface when data are transferred to memory. The register description in the chip manual specifies that DUAL mode should be used for YUV422 data. Signed-off-by: NJacopo Mondi <jacopo@jmondi.org> Signed-off-by: NXavier Roumegue <xavier.roumegue@oss.nxp.com> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
-
由 Jacopo Mondi 提交于
Rename the imx7-mipi-csis.c driver to remove the reference to i.MX7. The driver is for an IP core found on i.MX7 and i.MX8 SoC, so do not specify a SoC version number in the driver name. Remove the references to the i.MX7 SoC in the driver symbols and expand the driver's header with more information about the IP core the driver controls. Also rename the associated bindings documentation. Signed-off-by: NJacopo Mondi <jacopo@jmondi.org> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
-
- 22 2月, 2022 1 次提交
-
-
由 Jacopo Mondi 提交于
The imx7-mipi-csis driver is in a good state and can be destaged. Move the imx7-mipi-csis.c driver to the newly created drivers/media/platform/imx directory and plumb the related options in Kconfig and in Makefile. Signed-off-by: NJacopo Mondi <jacopo@jmondi.org> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
-
- 17 2月, 2022 1 次提交
-
-
由 Alexander Stein 提交于
Without this the default (SMPTE 170M) from init_cfg stays unchanged. Even after configuring 'srgb' colorspace (or 'raw') $ media-ctl -V "'csis-32e30000.mipi-csi':0 [colorspace:srgb]" the colorspace does not change at all: $ media-ctl --get-v4l2 "'csis-32e30000.mipi-csi':0" [fmt:SRGGB10_1X10/1920x1080 field:none colorspace:smpte170m xfer:709 ycbcr:601 quantization:lim-range] Signed-off-by: NAlexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
-
- 28 1月, 2022 1 次提交
-
-
由 Laurent Pinchart 提交于
To prepare for usage of the v4l2_fwnode_bus_* data structures to describe bus configuration in the subdev .get_mbus_config() operation, rename the structures with a v4l2_mbus_config_ prefix instead of v4l2_fwnode_bus_, and move them to v4l2_mediabus.h. Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
-
- 24 1月, 2022 3 次提交
-
-
由 Laurent Pinchart 提交于
When multiple CSIS instances are present in a single graph, they are currently all named "imx7-mipi-csis.0", which breaks the entity name uniqueness requirement. Fix it by using the device name to create the subdev name. Fixes: 7807063b ("media: staging/imx7: add MIPI CSI-2 receiver subdev for i.MX7") Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: NRui Miguel Silva <rmfrfs@gmail.com> Reviewed-by: NSakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: NJerome Brunet <jbrunet@baylibre.com> Tested-by: Jerome Brunet <jbrunet@baylibre.com> # On i.MX8MP Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
-
由 Laurent Pinchart 提交于
Add two debugfs files, ths_settle and tclk_settle, to allow overriding the corresponding timing parameters for test purpose. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: NRui Miguel Silva <rmfrfs@gmail.com> Reviewed-by: NJerome Brunet <jbrunet@baylibre.com> Tested-by: Jerome Brunet <jbrunet@baylibre.com> # On i.MX8MP Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
-
由 Laurent Pinchart 提交于
The frame counter is useful debugging information, add it to the register dump printed by mipi_csis_dump_regs(). Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: NRui Miguel Silva <rmfrfs@gmail.com> Reviewed-by: NJerome Brunet <jbrunet@baylibre.com> Tested-by: Jerome Brunet <jbrunet@baylibre.com> # On i.MX8MP Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
-
- 30 9月, 2021 1 次提交
-
-
由 Sakari Ailus 提交于
Rename V4L2 async notifier functions, replacing "notifier" with "nf" and removing "_subdev" at the end of the function names adding subdevs as you can only add subdevs to a notifier. Also wrap and otherwise clean up long lines. Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: NJacopo Mondi <jacopo@jmondi.org> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> (imx7) Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
- 04 8月, 2021 1 次提交
-
-
由 Tom Rix 提交于
Static analysis reports this false positive imx7-mipi-csis.c:1027:2: warning: 4th function call argument is an uninitialized value The variable 'align' is falsely reported as uninitialized. Even though all the cases are covered in the switch (csis_fmt->width % 8) { Because there is no default case, it is reported as uninialized. Improve the switch by converting the most numerous set of cases to the default and silence the false positive. Signed-off-by: NTom Rix <trix@redhat.com> Reviewed-by: NRui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
- 17 6月, 2021 1 次提交
-
-
由 Tomi Valkeinen 提交于
We have 'struct v4l2_subdev_pad_config' which contains configuration for a single pad used for the TRY functionality, and an array of those structs is passed to various v4l2_subdev_pad_ops. I was working on subdev internal routing between pads, and realized that there's no way to add TRY functionality for routes, which is not pad specific configuration. Adding a separate struct for try-route config wouldn't work either, as e.g. set-fmt needs to know the try-route configuration to propagate the settings. This patch adds a new struct, 'struct v4l2_subdev_state' (which at the moment only contains the v4l2_subdev_pad_config array) and the new struct is used in most of the places where v4l2_subdev_pad_config was used. All v4l2_subdev_pad_ops functions taking v4l2_subdev_pad_config are changed to instead take v4l2_subdev_state. The changes to drivers/media/v4l2-core/v4l2-subdev.c and include/media/v4l2-subdev.h were written by hand, and all the driver changes were done with the semantic patch below. The spatch needs to be applied to a select list of directories. I used the following shell commands to apply the spatch: dirs="drivers/media/i2c drivers/media/platform drivers/media/usb drivers/media/test-drivers/vimc drivers/media/pci drivers/staging/media" for dir in $dirs; do spatch -j8 --dir --include-headers --no-show-diff --in-place --sp-file v4l2-subdev-state.cocci $dir; done Note that Coccinelle chokes on a few drivers (gcc extensions?). With minor changes we can make Coccinelle run fine, and these changes can be reverted after spatch. The diff for these changes is: For drivers/media/i2c/s5k5baf.c: @@ -1481,7 +1481,7 @@ static int s5k5baf_set_selection(struct v4l2_subdev *sd, &s5k5baf_cis_rect, v4l2_subdev_get_try_crop(sd, cfg, PAD_CIS), v4l2_subdev_get_try_compose(sd, cfg, PAD_CIS), - v4l2_subdev_get_try_crop(sd, cfg, PAD_OUT) + v4l2_subdev_get_try_crop(sd, cfg, PAD_OUT), }; s5k5baf_set_rect_and_adjust(rects, rtype, &sel->r); return 0; For drivers/media/platform/s3c-camif/camif-capture.c: @@ -1230,7 +1230,7 @@ static int s3c_camif_subdev_get_fmt(struct v4l2_subdev *sd, *mf = camif->mbus_fmt; break; - case CAMIF_SD_PAD_SOURCE_C...CAMIF_SD_PAD_SOURCE_P: + case CAMIF_SD_PAD_SOURCE_C: /* crop rectangle at camera interface input */ mf->width = camif->camif_crop.width; mf->height = camif->camif_crop.height; @@ -1332,7 +1332,7 @@ static int s3c_camif_subdev_set_fmt(struct v4l2_subdev *sd, } break; - case CAMIF_SD_PAD_SOURCE_C...CAMIF_SD_PAD_SOURCE_P: + case CAMIF_SD_PAD_SOURCE_C: /* Pixel format can be only changed on the sink pad. */ mf->code = camif->mbus_fmt.code; mf->width = crop->width; The semantic patch is: // <smpl> // Change function parameter @@ identifier func; identifier cfg; @@ func(..., - struct v4l2_subdev_pad_config *cfg + struct v4l2_subdev_state *sd_state , ...) { <... - cfg + sd_state ...> } // Change function declaration parameter @@ identifier func; identifier cfg; type T; @@ T func(..., - struct v4l2_subdev_pad_config *cfg + struct v4l2_subdev_state *sd_state , ...); // Change function return value @@ identifier func; @@ - struct v4l2_subdev_pad_config + struct v4l2_subdev_state *func(...) { ... } // Change function declaration return value @@ identifier func; @@ - struct v4l2_subdev_pad_config + struct v4l2_subdev_state *func(...); // Some drivers pass a local pad_cfg for a single pad to a called function. Wrap it // inside a pad_state. @@ identifier func; identifier pad_cfg; @@ func(...) { ... struct v4l2_subdev_pad_config pad_cfg; + struct v4l2_subdev_state pad_state = { .pads = &pad_cfg }; <+... ( v4l2_subdev_call | sensor_call | isi_try_fse | isc_try_fse | saa_call_all ) (..., - &pad_cfg + &pad_state ,...) ...+> } // If the function uses fields from pad_config, access via state->pads @@ identifier func; identifier state; @@ func(..., struct v4l2_subdev_state *state , ...) { <... ( - state->try_fmt + state->pads->try_fmt | - state->try_crop + state->pads->try_crop | - state->try_compose + state->pads->try_compose ) ...> } // If the function accesses the filehandle, use fh->state instead @@ struct v4l2_subdev_fh *fh; @@ - fh->pad + fh->state @@ struct v4l2_subdev_fh fh; @@ - fh.pad + fh.state // Start of vsp1 specific @@ @@ struct vsp1_entity { ... - struct v4l2_subdev_pad_config *config; + struct v4l2_subdev_state *config; ... }; @@ symbol entity; @@ vsp1_entity_init(...) { ... entity->config = - v4l2_subdev_alloc_pad_config + v4l2_subdev_alloc_state (&entity->subdev); ... } @@ symbol entity; @@ vsp1_entity_destroy(...) { ... - v4l2_subdev_free_pad_config + v4l2_subdev_free_state (entity->config); ... } @exists@ identifier func =~ "(^vsp1.*)|(hsit_set_format)|(sru_enum_frame_size)|(sru_set_format)|(uif_get_selection)|(uif_set_selection)|(uds_enum_frame_size)|(uds_set_format)|(brx_set_format)|(brx_get_selection)|(histo_get_selection)|(histo_set_selection)|(brx_set_selection)"; symbol config; @@ func(...) { ... - struct v4l2_subdev_pad_config *config; + struct v4l2_subdev_state *config; ... } // End of vsp1 specific // Start of rcar specific @@ identifier sd; identifier pad_cfg; @@ rvin_try_format(...) { ... - struct v4l2_subdev_pad_config *pad_cfg; + struct v4l2_subdev_state *sd_state; ... - pad_cfg = v4l2_subdev_alloc_pad_config(sd); + sd_state = v4l2_subdev_alloc_state(sd); <... - pad_cfg + sd_state ...> - v4l2_subdev_free_pad_config(pad_cfg); + v4l2_subdev_free_state(sd_state); ... } // End of rcar specific // Start of rockchip specific @@ identifier func =~ "(rkisp1_rsz_get_pad_fmt)|(rkisp1_rsz_get_pad_crop)|(rkisp1_rsz_register)"; symbol rsz; symbol pad_cfg; @@ func(...) { + struct v4l2_subdev_state state = { .pads = rsz->pad_cfg }; ... - rsz->pad_cfg + &state ... } @@ identifier func =~ "(rkisp1_isp_get_pad_fmt)|(rkisp1_isp_get_pad_crop)"; symbol isp; symbol pad_cfg; @@ func(...) { + struct v4l2_subdev_state state = { .pads = isp->pad_cfg }; ... - isp->pad_cfg + &state ... } @@ symbol rkisp1; symbol isp; symbol pad_cfg; @@ rkisp1_isp_register(...) { + struct v4l2_subdev_state state = { .pads = rkisp1->isp.pad_cfg }; ... - rkisp1->isp.pad_cfg + &state ... } // End of rockchip specific // Start of tegra-video specific @@ identifier sd; identifier pad_cfg; @@ __tegra_channel_try_format(...) { ... - struct v4l2_subdev_pad_config *pad_cfg; + struct v4l2_subdev_state *sd_state; ... - pad_cfg = v4l2_subdev_alloc_pad_config(sd); + sd_state = v4l2_subdev_alloc_state(sd); <... - pad_cfg + sd_state ...> - v4l2_subdev_free_pad_config(pad_cfg); + v4l2_subdev_free_state(sd_state); ... } @@ identifier sd_state; @@ __tegra_channel_try_format(...) { ... struct v4l2_subdev_state *sd_state; <... - sd_state->try_crop + sd_state->pads->try_crop ...> } // End of tegra-video specific // </smpl> Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ideasonboard.com> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
- 02 6月, 2021 1 次提交
-
-
由 Wei Yongjun 提交于
Fix to return negative error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: 88fc8138 ("media: imx: imx7_mipi_csis: Reject invalid data-lanes settings") Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
- 24 5月, 2021 14 次提交
-
-
由 Laurent Pinchart 提交于
The CSI-2 receiver in the i.MX8MM is a newer version of the one found in the i.MX7. Differences are minimal, support it in the imx7_mipi_csis driver. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Tested-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
由 Laurent Pinchart 提交于
Move the PHY regulator and reset handling to dedicated functions. This groups all related code together, and prepares for i.MX8 support that doesn't require control of the PHY regulator and reset. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Tested-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
由 Laurent Pinchart 提交于
The CSIS doesn't support data lanes reordering. Reject invalid settings. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Tested-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
由 Laurent Pinchart 提交于
Group the operations performed in mipi_csis_probe() logically to improve readability. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Tested-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
由 Laurent Pinchart 提交于
Group the fiels of the csi_state structure logically to improve readability. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Tested-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
由 Laurent Pinchart 提交于
The num_clocks field of the csi_state only stores positive values, make it unsigned. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Tested-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
由 Laurent Pinchart 提交于
The pdev field of the csi_state structure is only used to access the device pointer, which is stored in a separate field. Drop the pdev field, as well as a few local dev variables. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Tested-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
由 Laurent Pinchart 提交于
Pass the csi_state pointer to the mipi_csis_subdev_init() function, instead of miscellaneous information scattered in different arguments. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Tested-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
由 Laurent Pinchart 提交于
The mipi_csis_parse_dt() function is called with a pointer to the csi_state, which contains all the information necessary. Don't pass the platform device pointer as well. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Tested-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
由 Laurent Pinchart 提交于
The irq field of the csi_state structure is only used in mipi_csis_probe(). Turn it into a local variable. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Tested-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
由 Laurent Pinchart 提交于
The flag field of the csi_state structure contains the device state. Rename it accordingly. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Tested-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
由 Laurent Pinchart 提交于
The CSIS is modelled as a single subdev, there's thus no ambiguity regarding which subdev the code refers to. Rename mipi_sd to sd. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Tested-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
由 Laurent Pinchart 提交于
The phy field of the csi_state structure is unused. Drop it. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Tested-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
由 Laurent Pinchart 提交于
Replace the register value stored in the csis_pix_format structure with the CSI-2 data type. The register value is simply computed from the data type using a shift. This prepares for i.MX8MP support that needs the same data type in a different hardware register. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NRui Miguel Silva <rmfrfs@gmail.com> Tested-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
-