| Age | Commit message (Collapse) | Author | Files | Lines |
|
This commit fixes the following checkpatch.pl warnings:
WARNING: do not add new typedefs
#130: FILE: include/wlan_bssdef.h:130:
+typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION {
WARNING: do not add new typedefs
#148: FILE: include/wlan_bssdef.h:148:
+typedef struct _NDIS_802_11_KEY {
WARNING: do not add new typedefs
#157: FILE: include/wlan_bssdef.h:157:
+typedef struct _NDIS_802_11_REMOVE_KEY {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-16-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This commit fixes the following checkpatch.pl warning:
WARNING: do not add new typedefs
#13: FILE: include/rtw_ioctl_set.h:13:
+typedef struct _BSSIDInfo {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-15-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This commit fixes the following checkpatch.pl warnings:
WARNING: do not add new typedefs
#40: FILE: include/rtw_ht.h:40:
+typedef enum AGGRE_SIZE {
WARNING: do not add new typedefs
#51: FILE: include/rtw_ht.h:51:
+typedef enum _RT_HT_INF0_CAP {
WARNING: do not add new typedefs
#62: FILE: include/rtw_ht.h:62:
+typedef enum _RT_HT_INF1_CAP {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-14-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This commit fixes the following checkpatch.pl warning:
WARNING: do not add new typedefs
#374: FILE: include/drv_types.h:374:
+typedef enum _DRIVER_STATE {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-13-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This commit fixes the following checkpatch.pl warning:
WARNING: do not add new typedefs
#168: FILE: include/hal_com.h:168:
+typedef enum _RT_MEDIA_STATUS {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-12-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This commit fixes the following checkpatch.pl warning:
WARNING: do not add new typedefs
#45: FILE: include/rtw_eeprom.h:45:
+typedef enum _RT_CUSTOMER_ID {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-11-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This commit fixes the following checkpatch.pl warnings:
WARNING: do not add new typedefs
#18: FILE: hal/odm_types.h:18:
+typedef enum _HAL_STATUS {
WARNING: do not add new typedefs
#33: FILE: hal/odm_types.h:33:
+typedef enum _RT_SPINLOCK_TYPE {
WARNING: do not add new typedefs
#77: FILE: hal/odm_types.h:77:
+ typedef struct timer_list RT_TIMER, *PRT_TIMER;
WARNING: do not add new typedefs
#78: FILE: hal/odm_types.h:78:
+ typedef void *RT_TIMER_CALL_BACK;
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-10-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This commit fixes the following checkpatch.pl warnings:
WARNING: do not add new typedefs
#33: FILE: hal/odm_HWConfig.h:33:
+typedef struct _Phy_Rx_AGC_Info {
WARNING: do not add new typedefs
#41: FILE: hal/odm_HWConfig.h:41:
+typedef struct _Phy_Status_Rpt_8192cd {
WARNING: do not add new typedefs
#80: FILE: hal/odm_HWConfig.h:80:
+typedef struct _Phy_Status_Rpt_8812 {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-9-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This commit fixes the following checkpatch.pl warning:
WARNING: do not add new typedefs
#11: FILE: hal/odm_EdcaTurboCheck.h:11:
+typedef struct _EDCA_TURBO_ {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-8-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This commit fixes the following checkpatch.pl warning:
WARNING: do not add new typedefs
#42: FILE: hal/odm_interface.h:42:
+typedef enum _ODM_H2C_CMD {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-7-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This commit fixes the following checkpatch.pl warning:
WARNING: do not add new typedefs
#27: FILE: hal/odm_NoiseMonitor.h:27:
+typedef struct _ODM_NOISE_MONITOR_ {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-6-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This commit fixes the following checkpatch.pl warning:
WARNING: do not add new typedefs
#15: FILE: hal/odm_CfoTracking.h:15:
+typedef struct _CFO_TRACKING_ {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-5-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This commit fixes the following checkpatch.pl warnings:
WARNING: do not add new typedefs
#95: FILE: hal/odm.h:95:
+typedef struct _Rate_Adaptive_Table_ {
WARNING: do not add new typedefs
#99: FILE: hal/odm.h:99:
+typedef struct _RX_High_Power_ {
WARNING: do not add new typedefs
#129: FILE: hal/odm.h:129:
+typedef struct _SW_Antenna_Switch_ {
WARNING: do not add new typedefs
#181: FILE: hal/odm.h:181:
+typedef struct _ODM_RATE_ADAPTIVE {
WARNING: do not add new typedefs
#280: FILE: hal/odm.h:280:
+typedef enum tag_Dynamic_ODM_Support_Ability_Type {
WARNING: do not add new typedefs
#300: FILE: hal/odm.h:300:
+typedef struct _ODM_STA_INFO {
WARNING: do not add new typedefs
#328: FILE: hal/odm.h:328:
+typedef enum _ODM_Common_Info_Definition {
WARNING: do not add new typedefs
#418: FILE: hal/odm.h:418:
+typedef enum _ODM_Support_Ability_Definition {
WARNING: do not add new typedefs
#449: FILE: hal/odm.h:449:
+typedef enum tag_ODM_Support_Interface_Definition {
WARNING: do not add new typedefs
#455: FILE: hal/odm.h:455:
+typedef enum tag_ODM_Support_IC_Type_Definition {
WARNING: do not add new typedefs
#460: FILE: hal/odm.h:460:
+typedef enum tag_ODM_Cut_Version_Definition {
WARNING: do not add new typedefs
#475: FILE: hal/odm.h:475:
+typedef enum tag_ODM_Fab_Version_Definition {
WARNING: do not add new typedefs
#484: FILE: hal/odm.h:484:
+typedef enum tag_ODM_RF_Path_Bit_Definition {
WARNING: do not add new typedefs
#495: FILE: hal/odm.h:495:
+typedef enum tag_ODM_RF_Type_Definition {
WARNING: do not add new typedefs
#516: FILE: hal/odm.h:516:
+typedef enum tag_ODM_MAC_PHY_Mode_Definition {
WARNING: do not add new typedefs
#522: FILE: hal/odm.h:522:
+typedef enum tag_BT_Coexist_Definition {
WARNING: do not add new typedefs
#530: FILE: hal/odm.h:530:
+typedef enum tag_Operation_Mode_Definition {
WARNING: do not add new typedefs
#543: FILE: hal/odm.h:543:
+typedef enum tag_Wireless_Mode_Definition {
WARNING: do not add new typedefs
#555: FILE: hal/odm.h:555:
+typedef enum tag_Band_Type_Definition {
WARNING: do not add new typedefs
#563: FILE: hal/odm.h:563:
+typedef enum tag_Secondary_Channel_Offset_Definition {
WARNING: do not add new typedefs
#570: FILE: hal/odm.h:570:
+typedef enum tag_Security_Definition {
WARNING: do not add new typedefs
#582: FILE: hal/odm.h:582:
+typedef enum tag_Bandwidth_Definition {
WARNING: do not add new typedefs
#593: FILE: hal/odm.h:593:
+typedef enum tag_Board_Definition {
WARNING: do not add new typedefs
#605: FILE: hal/odm.h:605:
+typedef enum tag_ODM_Package_Definition {
WARNING: do not add new typedefs
#612: FILE: hal/odm.h:612:
+typedef enum tag_ODM_TYPE_GPA_Definition {
WARNING: do not add new typedefs
#617: FILE: hal/odm.h:617:
+typedef enum tag_ODM_TYPE_APA_Definition {
WARNING: do not add new typedefs
#622: FILE: hal/odm.h:622:
+typedef enum tag_ODM_TYPE_GLNA_Definition {
WARNING: do not add new typedefs
#629: FILE: hal/odm.h:629:
+typedef enum tag_ODM_TYPE_ALNA_Definition {
WARNING: do not add new typedefs
#637: FILE: hal/odm.h:637:
+typedef enum tag_CCA_Path {
WARNING: do not add new typedefs
#643: FILE: hal/odm.h:643:
+typedef struct _ODM_RA_Info_ {
WARNING: do not add new typedefs
#675: FILE: hal/odm.h:675:
+typedef struct _IQK_MATRIX_REGS_SETTING {
WARNING: do not add new typedefs
#683: FILE: hal/odm.h:683:
+typedef struct ODM_RF_Calibration_Structure {
WARNING: do not add new typedefs
#788: FILE: hal/odm.h:788:
+typedef struct _FAST_ANTENNA_TRAINNING_ {
WARNING: do not add new typedefs
#828: FILE: hal/odm.h:828:
+typedef enum _FAT_STATE {
WARNING: do not add new typedefs
#833: FILE: hal/odm.h:833:
+typedef enum _ANT_DIV_TYPE {
WARNING: do not add new typedefs
#843: FILE: hal/odm.h:843:
+typedef struct _ODM_PATH_DIVERSITY_ {
WARNING: do not add new typedefs
#852: FILE: hal/odm.h:852:
+typedef enum _BASEBAND_CONFIG_PHY_REG_PG_VALUE_TYPE {
WARNING: do not add new typedefs
#860: FILE: hal/odm.h:860:
+typedef struct _ANT_DETECTED_INFO {
WARNING: do not add new typedefs
#870: FILE: hal/odm.h:870:
+typedef struct DM_Out_Source_Dynamic_Mechanism_Structure {
WARNING: do not add new typedefs
#1229: FILE: hal/odm.h:1229:
+ typedef enum _ODM_RF_CONTENT {
WARNING: do not add new typedefs
#1236: FILE: hal/odm.h:1236:
+typedef enum _ODM_BB_Config_Type {
WARNING: do not add new typedefs
#1246: FILE: hal/odm.h:1246:
+typedef enum _ODM_RF_Config_Type {
WARNING: do not add new typedefs
#1251: FILE: hal/odm.h:1251:
+typedef enum _ODM_FW_Config_Type {
WARNING: do not add new typedefs
#1262: FILE: hal/odm.h:1262:
+typedef enum _RT_STATUS {
WARNING: do not add new typedefs
#1319: FILE: hal/odm.h:1319:
+typedef enum tag_1R_CCA_Type_Definition {
WARNING: do not add new typedefs
#1325: FILE: hal/odm.h:1325:
+typedef enum tag_RF_Type_Definition {
WARNING: do not add new typedefs
#1334: FILE: hal/odm.h:1334:
+typedef enum tag_SW_Antenna_Switch_Definition {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-4-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This commit fixes the following checkpatch.pl warnings:
WARNING: do not add new typedefs
#84: FILE: include/rtw_mlme.h:84:
+typedef enum _RT_SCAN_TYPE {
WARNING: do not add new typedefs
#137: FILE: include/rtw_mlme.h:137:
+typedef struct _RT_LINK_DETECT_T {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-3-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This commit fixes the following checkpatch.pl warnings:
WARNING: do not add new typedefs
#47: FILE: hal/HalBtcOutSrc.h:47:
+typedef enum _BTC_POWERSAVE_TYPE {
WARNING: do not add new typedefs
#54: FILE: hal/HalBtcOutSrc.h:54:
+typedef enum _BTC_BT_REG_TYPE {
WARNING: do not add new typedefs
#63: FILE: hal/HalBtcOutSrc.h:63:
+typedef enum _BTC_CHIP_INTERFACE {
WARNING: do not add new typedefs
#71: FILE: hal/HalBtcOutSrc.h:71:
+typedef enum _BTC_CHIP_TYPE {
WARNING: do not add new typedefs
#81: FILE: hal/HalBtcOutSrc.h:81:
+typedef enum _BTC_MSG_TYPE {
WARNING: do not add new typedefs
#167: FILE: hal/HalBtcOutSrc.h:167:
+typedef struct _BTC_BOARD_INFO {
WARNING: do not add new typedefs
#177: FILE: hal/HalBtcOutSrc.h:177:
+typedef enum _BTC_DBG_OPCODE {
WARNING: do not add new typedefs
#187: FILE: hal/HalBtcOutSrc.h:187:
+typedef enum _BTC_RSSI_STATE {
WARNING: do not add new typedefs
#200: FILE: hal/HalBtcOutSrc.h:200:
+typedef enum _BTC_WIFI_ROLE {
WARNING: do not add new typedefs
#208: FILE: hal/HalBtcOutSrc.h:208:
+typedef enum _BTC_WIFI_BW_MODE {
WARNING: do not add new typedefs
#215: FILE: hal/HalBtcOutSrc.h:215:
+typedef enum _BTC_WIFI_TRAFFIC_DIR {
WARNING: do not add new typedefs
#221: FILE: hal/HalBtcOutSrc.h:221:
+typedef enum _BTC_WIFI_PNP {
WARNING: do not add new typedefs
#228: FILE: hal/HalBtcOutSrc.h:228:
+typedef enum _BT_WIFI_COEX_STATE {
WARNING: do not add new typedefs
#239: FILE: hal/HalBtcOutSrc.h:239:
+typedef enum _BTC_GET_TYPE {
WARNING: do not add new typedefs
#281: FILE: hal/HalBtcOutSrc.h:281:
+typedef enum _BTC_SET_TYPE {
WARNING: do not add new typedefs
#321: FILE: hal/HalBtcOutSrc.h:321:
+typedef enum _BTC_DBG_DISP_TYPE {
WARNING: do not add new typedefs
#328: FILE: hal/HalBtcOutSrc.h:328:
+typedef enum _BTC_NOTIFY_TYPE_IPS {
WARNING: do not add new typedefs
#334: FILE: hal/HalBtcOutSrc.h:334:
+typedef enum _BTC_NOTIFY_TYPE_LPS {
WARNING: do not add new typedefs
#340: FILE: hal/HalBtcOutSrc.h:340:
+typedef enum _BTC_NOTIFY_TYPE_SCAN {
WARNING: do not add new typedefs
#346: FILE: hal/HalBtcOutSrc.h:346:
+typedef enum _BTC_NOTIFY_TYPE_ASSOCIATE {
WARNING: do not add new typedefs
#352: FILE: hal/HalBtcOutSrc.h:352:
+typedef enum _BTC_NOTIFY_TYPE_MEDIA_STATUS {
WARNING: do not add new typedefs
#358: FILE: hal/HalBtcOutSrc.h:358:
+typedef enum _BTC_NOTIFY_TYPE_SPECIAL_PACKET {
WARNING: do not add new typedefs
#366: FILE: hal/HalBtcOutSrc.h:366:
+typedef enum _BTC_NOTIFY_TYPE_STACK_OPERATION {
WARNING: do not add new typedefs
#374: FILE: hal/HalBtcOutSrc.h:374:
+typedef enum _BTC_ANTENNA_POS {
WARNING: do not add new typedefs
#412: FILE: hal/HalBtcOutSrc.h:412:
+typedef struct _BTC_BT_INFO {
WARNING: do not add new typedefs
#440: FILE: hal/HalBtcOutSrc.h:440:
+typedef struct _BTC_STACK_INFO {
WARNING: do not add new typedefs
#455: FILE: hal/HalBtcOutSrc.h:455:
+typedef struct _BTC_BT_LINK_INFO {
WARNING: do not add new typedefs
#468: FILE: hal/HalBtcOutSrc.h:468:
+typedef struct _BTC_STATISTICS {
WARNING: do not add new typedefs
#487: FILE: hal/HalBtcOutSrc.h:487:
+typedef struct _BTC_COEXIST {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-2-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The intent is the removal of the 'delay_usecs' field from the
spi_transfer struct, as there is a 'delay' field that does the same
thing.
The spi_delay_to_ns() can be used to get the transfer delay. It works by
using the 'delay_usecs' field first (if it is non-zero), and finally
uses the 'delay' field.
Since the 'delay_usecs' field is going away, this change makes use of the
spi_delay_to_ns() function. This also means dividing the return value of
the function by 1000, to convert it to microseconds.
To prevent any potential faults when converting to microseconds and since
the result of spi_delay_to_ns() is int, the delay is being computed in 32
bits and then clamped between 0 & U16_MAX.
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20210308145502.1075689-7-aardelean@deviqon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
In practice, IA_CSS_PIPE_ID_NUM should never be used when
calling atomisp_q_video_buffers_to_css(), as the driver should
discover the right pipe before calling it.
Yet, if some pipe parsing issue happens, it could end using
it.
So, add a WARN_ON() to prevent such case.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
All drivers that already call devm_iio_kfifo_allocate() &
iio_device_attach_buffer() are simple to convert to
iio_device_attach_kfifo_buffer() in a single go.
This change does that; the unwind order is preserved.
What is important, is that the devm_iio_kfifo_buffer_setup() be called
after the indio_dev->modes is assigned, to make sure that
INDIO_BUFFER_SOFTWARE flag is set and not overridden by the assignment to
indio_dev->modes.
Also, the INDIO_BUFFER_SOFTWARE has been removed from the assignments of
'indio_dev->modes' because it is set by devm_iio_kfifo_buffer_setup().
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com>x
Link: https://lore.kernel.org/r/20210215104043.91251-4-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Print the value of the ISP shadow registers in mipi_csis_dump_regs() as
this can help debugging.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Replace hardcoded register addresses in the MIPI_CSIS_DBG_CTRL()
function with macros. While at it, update the printed name of the
registers to match the datasheet, and short them by address.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Rename several register macros to match the names from the
documentation.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Replace the per-channel ISP registers macros with a single one that take
the channel as a parameter. Only channel 0 is supported for now, but
this will make support for multiple channels easier.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Define macros for the fields of the MIPI_CSIS_DPHY_BCTRL_L register,
based on the i.MX8MM datasheet. The numerical value written to the
register, taken from the i.MX7D code, is unchanged, and corresponds to a
20.0MHz Tx escape clock frequency according to the documentation of the
register from the i.MX8MM. Whether the other fields are applicable to
the i.MX7D is unknown.
While at it, rename the DPHY[BS]CTRL register names to DPHY_[BS]CTRL to
match the datasheet.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
When setting the CSIS parameters, write the MIPI_CSIS_DPHYCTRL register
fully instead of modifying selected fields, as the register doesn't
contain any reserved fields that need to be preserved. This simplifies
initialization slightly, and ensures that the register value doesn't
depend on its previous state (before a warm reboot for instance).
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Make it easier to instrument register access (for instance with
printk-based logging) by turning the macros into inline functions.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The Ths_settle timing parameter depends solely on the lane data rate of
the source. Calculate it at runtime instead of requiring it to be
specified in the device tree.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Checking if the link setup operation is called for the sink or source
pad doesn't require any locking. Move it out of the section protected by
the mutex.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The mipi_csis_set_hsync_settle() is small, called from a single place,
and misnamed (HS stands for high speed, not horizontal sync). Inline it
in its only caller, and refactor the HSSETTLE register field macros
while at it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
CSI-2 uses, as a convention, 1Xn media bus formats. Replace
MEDIA_BUS_FMT_UYVY8_2X8 with MEDIA_BUS_FMT_UYVY8_1X16, and set the width
value accordingly.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The data type specified for 10-bit YUV is the same as 8-bit YUV. This is
wrong, and has thus clearly not been tested. Instead of fixing data type
without being able to test it, drop it. It can be added back later when
someone will have access to a 10-bit YUV source to this it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The wrap clock is retrieved with the other clocks using
devm_clk_bulk_get(), and retrieved independently with a specific
devm_clk_get() call. The latter isn't needed, replace it with usage of
the wrap clock from the bulk array.
As the wrap clock is mandatory, simplify its usage further by removing
conditionals.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The .s_power() subdev operation is optional, don't error out when the
source doesn't implement it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The alignments given to the v4l_bound_align_image() are expressed in
bytes, while the function expects them to be expressed as a power of
two. Fix it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The device has a single reset line, there's thus no need to name it
explicitly when calling devm_reset_control_get_exclusive(). Drop the
name in preparation for the removal of the reset-names property in the
DT binding.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The CSI subdev has a single source, the input video mux. There's thus a
single link between the source and the CSI, which can be made immutable
and enabled to simplify configuration.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Add a flags argument to the v4l2_create_fwnode_links_to_pad() function
to specify the link flags. This allows drivers to create immutable links
for instance.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The CSI driver only supports the BGGR Bayer patterns currently. The
hardware supports all patterns (the only pattern-dependent hardware
operation is statistics calculation, as de-bayering isn't supported),
enable them in the driver too.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The SOF and EOF interrupts are not used. Don't enable them.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The DMA controller needs to be reflashed after being configured. There
is however no need to do it twice, once in imx7_csi_configure() and once
in imx7_csi_sw_reset(), called from imx7_csi_enable(). Remove the
former.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The RxFIFO is enabled by imx7_csi_dmareq_rff_enable() in both
imx7_csi_init() and imx7_csi_enable(). Enabling it once is enough,
remove the former.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The CSI is enabled at the end of imx7_csi_sw_reset(), called from
imx7_csi_enable(), as well as at the end of imx7_csi_enable(). The
latter is enough, remove the former.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
There's no need to read the CSICR1 register before each write in
imx7_csi_rx_fifo_clear(). Simplify the function.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The RFF burst type is set in imx7_csi_dmareq_rff_enable(), which doesn't
match the function name. Move it to imx7_csi_configure().
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
When configuring the CSI in imx7_csi_configure(), the CSICR18 is set
through a read-modify-write cycle to avoid affecting fields whose usage
isn't clear. The function then sets fields depending on whether the
input is interlaced or progressive, and from the parallel input or the
CSI-2 receiver.
Those bits are only set and never cleared. For instance, when switching
from a CSI-2 source to the parallel input, the BIT_DATA_FROM_MIPI will
stay set. Fix this issue by first clearing all the fields we need to
configure.
Add BIT_CSI_HW_ENABLE to the set of fields being cleared, as the CSI
needs to start in the disabled state. This allows dropping the call to
imx7_csi_hw_disable() in imx7_csi_sw_reset().
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Merge all the configuration steps (imx7_csi_buf_stride_set(),
imx7_csi_deinterlace_enable(), imx7_csi_set_imagpara() and
imx7_csi_init_default()) in the imx7_csi_configure() function. This
simplifies the configuration procedure by removing most
read-update-write cycles, and makes the code generally more readable.
imx7_csi_init_default() is kept as it is also called from
imx7_csi_deinit(). This will be addressed separately.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
There's no need to set the buffer stride to 0 when disabling the CSI.
Remove the extraneous register write.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The MIPI CSI-2 data type depends solely on the media bus code on the
sink pad. Deriving it from the pixel format is confusing. Simplify the
code.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The imx7_csi_hw_reset() and imx7_csi_init_interface() functions are
always called together. Merge them. This allows simplifying the code by
avoiding duplicated register writes.
As the imx7_csi_hw_reset() function didn't perform a hardware reset by
initialized the registers to reset defaults (in addition to resetting
the frame counter), name the resulting function imx7_csi_init_default()
as it sets default values.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The imx7_csi_streaming_start() function just wraps imx7_csi_enable().
Call the latter directly.
Similarly, merge imx7_csi_streaming_stop() and imx7_csi_disable() as
they're both called from a single location only.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
There's no reason to delay the CSI configuration and the DMA setup after
starting the source. Move it before, simplifying error handling at
stream start.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|