[PATCH 7/9] staging: rtl8723bs: Fix spelling/grammar errors in comment.
Fix the spelling/grammar errors in the comment block describing the 'Function' member of 'struct rt_firmware_hdr'. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 42f467abc6b5..8897deb963c7 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -59,8 +59,8 @@ struct rt_firmware_hdr { __le16 Signature; /* 92C0: test chip; 92C, 88C0: test chip; * 88C1: MP A-cut; 92C1: MP A-cut */ u8 Category; /* AP/NIC and USB/PCI */ - u8 Function; /* Reserved for different FW function indcation, for - * further use when driver needs to download + u8 Function; /* Reserved for different FW function indications, + * for further use when driver needs to download * different FW in different conditions. */ __le16 Version;/* FW Version */ __le16 Subversion; /* FW Subversion, default 0x00 */ -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 9/9] staging: rtl8723bs: Fix grammar error in comment.
Fix a grammatical error in the comment describing 'struct rt_firmware_hdr'. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 946236f704fe..8f00ced1c697 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -51,7 +51,7 @@ struct rt_firmware { u8 *fw_buffer_sz; }; -/* This structure must be cared byte-ordering */ +/* This structure must be carefully byte-ordered. */ struct rt_firmware_hdr { /* 8-byte alinment required */ -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/9] staging: rtl8723bs: Clean up whitespace in 'rtl8723_hal.h'.
Make alignment and whitespace more consistent within the file 'rtl8723_hal.h' and with the kernel coding style guidelines. Signed-off-by: Quytelda Kahja --- .../staging/rtl8723bs/include/rtl8723b_hal.h | 261 ++ 1 file changed, 144 insertions(+), 117 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index eedc765b6a6e..8ce4f7a9edc3 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -21,29 +21,30 @@ #include "hal_phy_cfg.h" /* */ -/* RTL8723B From file */ +/* RTL8723B From file */ /* */ - #define RTL8723B_FW_IMG "rtl8723b/FW_NIC.bin" - #define RTL8723B_FW_WW_IMG "rtl8723b/FW_WoWLAN.bin" - #define RTL8723B_PHY_REG "rtl8723b/PHY_REG.txt" - #define RTL8723B_PHY_RADIO_A "rtl8723b/RadioA.txt" - #define RTL8723B_PHY_RADIO_B "rtl8723b/RadioB.txt" - #define RTL8723B_TXPWR_TRACK "rtl8723b/TxPowerTrack.txt" - #define RTL8723B_AGC_TAB "rtl8723b/AGC_TAB.txt" - #define RTL8723B_PHY_MACREG "rtl8723b/MAC_REG.txt" - #define RTL8723B_PHY_REG_PG "rtl8723b/PHY_REG_PG.txt" - #define RTL8723B_PHY_REG_MP "rtl8723b/PHY_REG_MP.txt" - #define RTL8723B_TXPWR_LMT "rtl8723b/TXPWR_LMT.txt" +#define RTL8723B_FW_IMG "rtl8723b/FW_NIC.bin" +#define RTL8723B_FW_WW_IMG "rtl8723b/FW_WoWLAN.bin" +#define RTL8723B_PHY_REG "rtl8723b/PHY_REG.txt" +#define RTL8723B_PHY_RADIO_A "rtl8723b/RadioA.txt" +#define RTL8723B_PHY_RADIO_B "rtl8723b/RadioB.txt" +#define RTL8723B_TXPWR_TRACK "rtl8723b/TxPowerTrack.txt" +#define RTL8723B_AGC_TAB "rtl8723b/AGC_TAB.txt" +#define RTL8723B_PHY_MACREG "rtl8723b/MAC_REG.txt" +#define RTL8723B_PHY_REG_PG "rtl8723b/PHY_REG_PG.txt" +#define RTL8723B_PHY_REG_MP "rtl8723b/PHY_REG_MP.txt" +#define RTL8723B_TXPWR_LMT "rtl8723b/TXPWR_LMT.txt" /* */ -/* RTL8723B From header */ +/* RTL8723B From header */ /* */ -#define FW_8723B_SIZE 0x8000 -#define FW_8723B_START_ADDRESS 0x1000 -#define FW_8723B_END_ADDRESS 0x1FFF /* 0x5FFF */ +#define FW_8723B_SIZE 0x8000 +#define FW_8723B_START_ADDRESS 0x1000 +#define FW_8723B_END_ADDRESS 0x1FFF /* 0x5FFF */ -#define IS_FW_HEADER_EXIST_8723B(_pFwHdr) ((le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x5300) +#define IS_FW_HEADER_EXIST_8723B(_pFwHdr) \ + ((le16_to_cpu(_pFwHdr->Signature) & 0xFFF0) == 0x5300) struct rt_firmware { u32 ulFwLength; @@ -55,126 +56,139 @@ struct rt_firmware_hdr { /* 8-byte alinment required */ /* LONG WORD 0 */ - __le16 Signature; /* 92C0: test chip; 92C, 88C0: test chip; 88C1: MP A-cut; 92C1: MP A-cut */ - u8 Category;/* AP/NIC and USB/PCI */ - u8 Function;/* Reserved for different FW function indcation, for further use when driver needs to download different FW in different conditions */ - __le16 Version;/* FW Version */ - __le16 Subversion; /* FW Subversion, default 0x00 */ + __le16 Signature; /* 92C0: test chip; 92C, 88C0: test chip; + * 88C1: MP A-cut; 92C1: MP A-cut */ + u8 Category; /* AP/NIC and USB/PCI */ + u8 Function; /* Reserved for different FW function indcation, for + * further use when driver needs to download + * different FW in different conditions. */ + __le16 Version;/* FW Version */ + __le16 Subversion; /* FW Subversion, default 0x00 */ /* LONG WORD 1 */ - u8 Month; /* Release time Month field */ - u8 Date;/* Release time Date field */ - u8 Hour;/* Release time Hour field */ - u8 Minute; /* Release time Minute field */ - __le16 RamCodeSize;/* The size of RAM code */ - __le16 Rsvd2; + u8 Month; /* Release time Month field */ + u8 Date; /* Release time Date field */ + u8 Hour; /* Release time Hour field */ + u8 Minute; /* Release time Minute field */ + + __le16 RamCodeSize; /* The size of RAM code */ + __le16 Rsvd2; /* LONG WORD 2 */ - __le32 SvnIdx; /* The SVN entry index */ - __le32 Rsvd3; + __le32 SvnIdx; /* The SVN entry index */ + __le32 Rsvd3; /* LONG WORD 3 */ - __le32 Rsvd4; - __le32 Rsvd5; + __le32 Rsvd4; + __le32 Rsvd5; }; -#define DRIVER_EARLY_INT_TIME_8723B0x
[PATCH 5/9] staging: rtl8723bs: Fix camel-case in IS_FW_HEADER_EXIST_8723B().
Change the parameter of the macro to the snake case 'fw_hdr' instead of '_pFwHdr'. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 8ce4f7a9edc3..b4b54e3e6a43 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -43,8 +43,8 @@ #define FW_8723B_START_ADDRESS 0x1000 #define FW_8723B_END_ADDRESS 0x1FFF /* 0x5FFF */ -#define IS_FW_HEADER_EXIST_8723B(_pFwHdr) \ - ((le16_to_cpu(_pFwHdr->Signature) & 0xFFF0) == 0x5300) +#define IS_FW_HEADER_EXIST_8723B(fw_hdr) \ + ((le16_to_cpu(fw_hdr->Signature) & 0xFFF0) == 0x5300) struct rt_firmware { u32 ulFwLength; -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 8/9] staging: rtl8723bs: Fix camel-case in 'struct rt_firmware_hdr'.
Replace camel-case member names with snake-case names per the linux kernel coding style guidelines. Signed-off-by: Quytelda Kahja --- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 14 .../staging/rtl8723bs/include/rtl8723b_hal.h | 32 +-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c index 984c8b181fd4..592917fc00aa 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c @@ -445,9 +445,9 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw) /* To Check Fw header. Added by tynli. 2009.12.04. */ pFwHdr = (struct rt_firmware_hdr *)pFirmwareBuf; - pHalData->FirmwareVersion = le16_to_cpu(pFwHdr->Version); - pHalData->FirmwareSubVersion = le16_to_cpu(pFwHdr->Subversion); - pHalData->FirmwareSignature = le16_to_cpu(pFwHdr->Signature); + pHalData->FirmwareVersion = le16_to_cpu(pFwHdr->version); + pHalData->FirmwareSubVersion = le16_to_cpu(pFwHdr->subversion); + pHalData->FirmwareSignature = le16_to_cpu(pFwHdr->signature); DBG_871X( "%s: fw_ver =%x fw_subver =%04x sig = 0x%x, Month =%02x, Date =%02x, Hour =%02x, Minute =%02x\n", @@ -455,10 +455,10 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw) pHalData->FirmwareVersion, pHalData->FirmwareSubVersion, pHalData->FirmwareSignature, - pFwHdr->Month, - pFwHdr->Date, - pFwHdr->Hour, - pFwHdr->Minute + pFwHdr->month, + pFwHdr->date, + pFwHdr->hour, + pFwHdr->minute ); if (IS_FW_HEADER_EXIST_8723B(pFwHdr)) { diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 8897deb963c7..946236f704fe 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -44,7 +44,7 @@ #define FW_8723B_END_ADDRESS 0x1FFF /* 0x5FFF */ #define IS_FW_HEADER_EXIST_8723B(fw_hdr) \ - ((le16_to_cpu(fw_hdr->Signature) & 0xFFF0) == 0x5300) + ((le16_to_cpu(fw_hdr->signature) & 0xFFF0) == 0x5300) struct rt_firmware { u32 fw_length; @@ -56,31 +56,31 @@ struct rt_firmware_hdr { /* 8-byte alinment required */ /* LONG WORD 0 */ - __le16 Signature; /* 92C0: test chip; 92C, 88C0: test chip; + __le16 signature; /* 92C0: test chip; 92C, 88C0: test chip; * 88C1: MP A-cut; 92C1: MP A-cut */ - u8 Category; /* AP/NIC and USB/PCI */ - u8 Function; /* Reserved for different FW function indications, + u8 category; /* AP/NIC and USB/PCI */ + u8 function; /* Reserved for different FW function indications, * for further use when driver needs to download * different FW in different conditions. */ - __le16 Version;/* FW Version */ - __le16 Subversion; /* FW Subversion, default 0x00 */ + __le16 version;/* FW Version */ + __le16 subversion; /* FW Subversion, default 0x00 */ /* LONG WORD 1 */ - u8 Month; /* Release time Month field */ - u8 Date; /* Release time Date field */ - u8 Hour; /* Release time Hour field */ - u8 Minute; /* Release time Minute field */ + u8 month; /* Release time Month field */ + u8 date; /* Release time Date field */ + u8 hour; /* Release time Hour field */ + u8 minute; /* Release time Minute field */ - __le16 RamCodeSize; /* The size of RAM code */ - __le16 Rsvd2; + __le16 ram_code_size; /* The size of RAM code */ + __le16 rsvd2; /* LONG WORD 2 */ - __le32 SvnIdx; /* The SVN entry index */ - __le32 Rsvd3; + __le32 svn_idx; /* The SVN entry index */ + __le32 rsvd3; /* LONG WORD 3 */ - __le32 Rsvd4; - __le32 Rsvd5; + __le32 rsvd4; + __le32 rsvd5; }; #define DRIVER_EARLY_INT_TIME_8723B 0x05 -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/9] staging: rtl8723bs: Fix camel-case in 'struct rt_firmware'.
Change the members of 'struct rt_firmware' to be snake case instead of camel-case, per the kernel coding style guide. Signed-off-by: Quytelda Kahja --- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c| 16 drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c index c877408cde50..984c8b181fd4 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c @@ -425,22 +425,22 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw) goto exit; } - pFirmware->szFwBuffer = kmemdup(fw->data, fw->size, GFP_KERNEL); - if (!pFirmware->szFwBuffer) { + pFirmware->fw_buffer_sz = kmemdup(fw->data, fw->size, GFP_KERNEL); + if (!pFirmware->fw_buffer_sz) { rtStatus = _FAIL; goto exit; } - pFirmware->ulFwLength = fw->size; + pFirmware->fw_length = fw->size; release_firmware(fw); - if (pFirmware->ulFwLength > FW_8723B_SIZE) { + if (pFirmware->fw_length > FW_8723B_SIZE) { rtStatus = _FAIL; - DBG_871X_LEVEL(_drv_emerg_, "Firmware size:%u exceed %u\n", pFirmware->ulFwLength, FW_8723B_SIZE); + DBG_871X_LEVEL(_drv_emerg_, "Firmware size:%u exceed %u\n", pFirmware->fw_length, FW_8723B_SIZE); goto release_fw1; } - pFirmwareBuf = pFirmware->szFwBuffer; - FirmwareLen = pFirmware->ulFwLength; + pFirmwareBuf = pFirmware->fw_buffer_sz; + FirmwareLen = pFirmware->fw_length; /* To Check Fw header. Added by tynli. 2009.12.04. */ pFwHdr = (struct rt_firmware_hdr *)pFirmwareBuf; @@ -510,7 +510,7 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw) ); exit: - kfree(pFirmware->szFwBuffer); + kfree(pFirmware->fw_buffer_sz); kfree(pFirmware); release_fw1: kfree(pBTFirmware); diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index b4b54e3e6a43..42f467abc6b5 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -47,8 +47,8 @@ ((le16_to_cpu(fw_hdr->Signature) & 0xFFF0) == 0x5300) struct rt_firmware { - u32 ulFwLength; - u8 *szFwBuffer; + u32 fw_length; + u8 *fw_buffer_sz; }; /* This structure must be cared byte-ordering */ -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/9] staging: rtl8723bs: Rename 'Hal8723bPhyReg.h' using snake case.
Camel-case is discouraged in the linux kernel coding style. Rename this header using snake case instead. Signed-off-by: Quytelda Kahja --- .../rtl8723bs/include/{Hal8723BPhyReg.h => hal_phy_reg_8723b.h} | 0 drivers/staging/rtl8723bs/include/rtl8723b_hal.h| 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename drivers/staging/rtl8723bs/include/{Hal8723BPhyReg.h => hal_phy_reg_8723b.h} (100%) diff --git a/drivers/staging/rtl8723bs/include/Hal8723BPhyReg.h b/drivers/staging/rtl8723bs/include/hal_phy_reg_8723b.h similarity index 100% rename from drivers/staging/rtl8723bs/include/Hal8723BPhyReg.h rename to drivers/staging/rtl8723bs/include/hal_phy_reg_8723b.h diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 46ac61b058c8..c2b71b4e4982 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -17,7 +17,7 @@ #include "rtl8723b_cmd.h" #include "rtw_mp.h" #include "hal_pwr_seq.h" -#include "Hal8723BPhyReg.h" +#include "hal_phy_reg_8723b.h" #include "Hal8723BPhyCfg.h" /* */ -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/9] staging: rtl8723bs: Rename 'Hal8723BPhyCfg.h' using snake case.
Camel-case is discouraged in the linux kernel coding style. Rename this header file using snake case instead. Signed-off-by: Quytelda Kahja --- .../rtl8723bs/include/{Hal8723BPhyCfg.h => hal_phy_cfg.h} | 0 drivers/staging/rtl8723bs/include/rtl8723b_hal.h| 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename drivers/staging/rtl8723bs/include/{Hal8723BPhyCfg.h => hal_phy_cfg.h} (100%) diff --git a/drivers/staging/rtl8723bs/include/Hal8723BPhyCfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h similarity index 100% rename from drivers/staging/rtl8723bs/include/Hal8723BPhyCfg.h rename to drivers/staging/rtl8723bs/include/hal_phy_cfg.h diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index c2b71b4e4982..eedc765b6a6e 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -18,7 +18,7 @@ #include "rtw_mp.h" #include "hal_pwr_seq.h" #include "hal_phy_reg_8723b.h" -#include "Hal8723BPhyCfg.h" +#include "hal_phy_cfg.h" /* */ /* RTL8723B From file */ -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/9] staging: rtl8723bs: Rename 'Hal8723BPwrSeq.{c, h}' to 'hal_pwr_seq.*'.
Camel-case naming is discouraged int the linux kernel coding style. Rename these files using snake case, and update the makefile to use the new names. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/Makefile | 2 +- .../staging/rtl8723bs/hal/{Hal8723BPwrSeq.c => hal_pwr_seq.c} | 2 +- .../rtl8723bs/include/{Hal8723BPwrSeq.h => hal_pwr_seq.h} | 0 drivers/staging/rtl8723bs/include/rtl8723b_hal.h| 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename drivers/staging/rtl8723bs/hal/{Hal8723BPwrSeq.c => hal_pwr_seq.c} (99%) rename drivers/staging/rtl8723bs/include/{Hal8723BPwrSeq.h => hal_pwr_seq.h} (100%) diff --git a/drivers/staging/rtl8723bs/Makefile b/drivers/staging/rtl8723bs/Makefile index f236acfd3afa..a12cf8dd8ed9 100644 --- a/drivers/staging/rtl8723bs/Makefile +++ b/drivers/staging/rtl8723bs/Makefile @@ -23,7 +23,7 @@ r8723bs-y = \ hal/hal_com_phycfg.o \ hal/hal_btcoex.o \ hal/hal_sdio.o \ - hal/Hal8723BPwrSeq.o \ + hal/hal_pwr_seq.o \ hal/HalPhyRf.o \ hal/HalPwrSeqCmd.o \ hal/odm.o \ diff --git a/drivers/staging/rtl8723bs/hal/Hal8723BPwrSeq.c b/drivers/staging/rtl8723bs/hal/hal_pwr_seq.c similarity index 99% rename from drivers/staging/rtl8723bs/hal/Hal8723BPwrSeq.c rename to drivers/staging/rtl8723bs/hal/hal_pwr_seq.c index 57f7f09b3ab9..589e7aae7bbd 100644 --- a/drivers/staging/rtl8723bs/hal/Hal8723BPwrSeq.c +++ b/drivers/staging/rtl8723bs/hal/hal_pwr_seq.c @@ -17,7 +17,7 @@ Major Change History: */ -#include "Hal8723BPwrSeq.h" +#include "hal_pwr_seq.h" /* drivers should parse below arrays and do the corresponding actions */ /* 3 Power on Array */ diff --git a/drivers/staging/rtl8723bs/include/Hal8723BPwrSeq.h b/drivers/staging/rtl8723bs/include/hal_pwr_seq.h similarity index 100% rename from drivers/staging/rtl8723bs/include/Hal8723BPwrSeq.h rename to drivers/staging/rtl8723bs/include/hal_pwr_seq.h diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 98408e8e33f2..46ac61b058c8 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -16,7 +16,7 @@ #include "rtl8723b_xmit.h" #include "rtl8723b_cmd.h" #include "rtw_mp.h" -#include "Hal8723BPwrSeq.h" +#include "hal_pwr_seq.h" #include "Hal8723BPhyReg.h" #include "Hal8723BPhyCfg.h" -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v1] tools: hv: update lsvmbus to be compatible with python3
From: Olaf Hering Python3 changed the way how 'print' works. Adjust the code to a syntax that is understood by python2 and python3. Signed-off-by: Olaf Hering --- tools/hv/lsvmbus | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/hv/lsvmbus b/tools/hv/lsvmbus index 353e56768df8..55e7374bade0 100644 --- a/tools/hv/lsvmbus +++ b/tools/hv/lsvmbus @@ -17,7 +17,7 @@ if options.verbose is not None: vmbus_sys_path = '/sys/bus/vmbus/devices' if not os.path.isdir(vmbus_sys_path): - print "%s doesn't exist: exiting..." % vmbus_sys_path + print("%s doesn't exist: exiting..." % vmbus_sys_path) exit(-1) vmbus_dev_dict = { @@ -93,11 +93,11 @@ format2 = '%2s: Class_ID = %s - %s\n\tDevice_ID = %s\n\tSysfs path: %s\n%s' for d in vmbus_dev_list: if verbose == 0: - print ('VMBUS ID ' + format0) % (d.vmbus_id, d.dev_desc) + print(('VMBUS ID ' + format0) % (d.vmbus_id, d.dev_desc)) elif verbose == 1: - print ('VMBUS ID ' + format1) % \ - (d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping) + print (('VMBUS ID ' + format1) %\ + (d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping)) else: - print ('VMBUS ID ' + format2) % \ + print (('VMBUS ID ' + format2) % \ (d.vmbus_id, d.class_id, d.dev_desc, \ - d.device_id, d.sysfs_path, d.chn_vp_mapping) + d.device_id, d.sysfs_path, d.chn_vp_mapping)) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] tools: hv: update lsvmbus to be compatible with python3
Python3 changed the way how 'print' works. Adjust the code to a syntax that is understood by python2 and python3. Signed-off-by: Olaf Hering --- v2: correct author tools/hv/lsvmbus | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/hv/lsvmbus b/tools/hv/lsvmbus index 353e56768df8..55e7374bade0 100644 --- a/tools/hv/lsvmbus +++ b/tools/hv/lsvmbus @@ -17,7 +17,7 @@ if options.verbose is not None: vmbus_sys_path = '/sys/bus/vmbus/devices' if not os.path.isdir(vmbus_sys_path): - print "%s doesn't exist: exiting..." % vmbus_sys_path + print("%s doesn't exist: exiting..." % vmbus_sys_path) exit(-1) vmbus_dev_dict = { @@ -93,11 +93,11 @@ format2 = '%2s: Class_ID = %s - %s\n\tDevice_ID = %s\n\tSysfs path: %s\n%s' for d in vmbus_dev_list: if verbose == 0: - print ('VMBUS ID ' + format0) % (d.vmbus_id, d.dev_desc) + print(('VMBUS ID ' + format0) % (d.vmbus_id, d.dev_desc)) elif verbose == 1: - print ('VMBUS ID ' + format1) % \ - (d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping) + print (('VMBUS ID ' + format1) %\ + (d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping)) else: - print ('VMBUS ID ' + format2) % \ + print (('VMBUS ID ' + format2) % \ (d.vmbus_id, d.class_id, d.dev_desc, \ - d.device_id, d.sysfs_path, d.chn_vp_mapping) + d.device_id, d.sysfs_path, d.chn_vp_mapping)) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: mt7621-mmc: fix spelling mistake: "Illgal" -> "Illegal"
From: Colin Ian King Trivial fix to another spelling mistake in N_MSG message text Signed-off-by: Colin Ian King --- drivers/staging/mt7621-mmc/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c index 11bf4b4c3403..648a2dd1436e 100644 --- a/drivers/staging/mt7621-mmc/sd.c +++ b/drivers/staging/mt7621-mmc/sd.c @@ -388,7 +388,7 @@ static void msdc_dump_io_resp(struct msdc_host *host, u32 resp) if (flags & (1 << 7)) N_MSG(RSP, "[IO] COM_CRC_ERR"); if (flags & (1 << 6)) - N_MSG(RSP, "[IO] Illgal command"); + N_MSG(RSP, "[IO] Illegal command"); if (flags & (1 << 3)) N_MSG(RSP, "[IO] Error"); if (flags & (1 << 2)) -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: greybus: fix spelling mistake: "Inavlid" -> "Invalid"
From: Colin Ian King Trivial fix to spelling mistake in dev_err error message Signed-off-by: Colin Ian King --- drivers/staging/greybus/audio_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c index de4b1b2b12f3..15e57f701630 100644 --- a/drivers/staging/greybus/audio_topology.c +++ b/drivers/staging/greybus/audio_topology.c @@ -996,7 +996,7 @@ static int gbaudio_tplg_create_widget(struct gbaudio_module_info *module, ret = gbaudio_validate_kcontrol_count(w); if (ret) { - dev_err(module->dev, "Inavlid kcontrol count=%d for %s\n", + dev_err(module->dev, "Invalid kcontrol count=%d for %s\n", w->ncontrols, w->name); return ret; } -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [greybus-dev] [PATCH] staging: greybus: fix spelling mistake: "Inavlid" -> "Invalid"
On 22-05-18, 09:33, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake in dev_err error message > > Signed-off-by: Colin Ian King > --- > drivers/staging/greybus/audio_topology.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/greybus/audio_topology.c > b/drivers/staging/greybus/audio_topology.c > index de4b1b2b12f3..15e57f701630 100644 > --- a/drivers/staging/greybus/audio_topology.c > +++ b/drivers/staging/greybus/audio_topology.c > @@ -996,7 +996,7 @@ static int gbaudio_tplg_create_widget(struct > gbaudio_module_info *module, > > ret = gbaudio_validate_kcontrol_count(w); > if (ret) { > - dev_err(module->dev, "Inavlid kcontrol count=%d for %s\n", > + dev_err(module->dev, "Invalid kcontrol count=%d for %s\n", > w->ncontrols, w->name); > return ret; > } Acked-by: Viresh Kumar -- viresh ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] tools: hv: lsvmbus: convert to Python3
Use '2to3' tool to make lsvmbus work with both Python2 and Python3. Signed-off-by: Vitaly Kuznetsov --- tools/hv/lsvmbus | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/hv/lsvmbus b/tools/hv/lsvmbus index 353e56768df8..c184aac33d5c 100644 --- a/tools/hv/lsvmbus +++ b/tools/hv/lsvmbus @@ -17,7 +17,7 @@ if options.verbose is not None: vmbus_sys_path = '/sys/bus/vmbus/devices' if not os.path.isdir(vmbus_sys_path): - print "%s doesn't exist: exiting..." % vmbus_sys_path + print("%s doesn't exist: exiting..." % vmbus_sys_path) exit(-1) vmbus_dev_dict = { @@ -93,11 +93,11 @@ format2 = '%2s: Class_ID = %s - %s\n\tDevice_ID = %s\n\tSysfs path: %s\n%s' for d in vmbus_dev_list: if verbose == 0: - print ('VMBUS ID ' + format0) % (d.vmbus_id, d.dev_desc) + print(('VMBUS ID ' + format0) % (d.vmbus_id, d.dev_desc)) elif verbose == 1: - print ('VMBUS ID ' + format1) % \ - (d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping) + print(('VMBUS ID ' + format1) % \ + (d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping)) else: - print ('VMBUS ID ' + format2) % \ + print(('VMBUS ID ' + format2) % \ (d.vmbus_id, d.class_id, d.dev_desc, \ - d.device_id, d.sysfs_path, d.chn_vp_mapping) + d.device_id, d.sysfs_path, d.chn_vp_mapping)) -- 2.14.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Tools: hv: vss: fix loop device detection
Commit ea81fdf0981d ("Tools: hv: vss: Skip freezing filesystems backed by loop") added skip for filesystems backed by loop device. However, it seems the detection of such cases is incomplete. It was found that with 'devicemapper' storage driver docker creates the following chain: NAMEMAJ:MIN loop0 7:0 └─docker-8:4-8473394-pool 253:0 └─docker-8:4-8473394-eac... 253:1 so when we're looking at the mounted device we see major '253' and not '7'. Solve the issue by walking /sys/dev/block/*/slaves chain and checking if there's a loop device somewhere. Other than that, don't skip mountpoints silently when stat() fails. In case e.g. SELinux is failing stat we don't want to skip freezing everything without letting user know about the failure. Fixes: ea81fdf0981d ("Tools: hv: vss: Skip freezing filesystems backed by loop") Signed-off-by: Vitaly Kuznetsov --- tools/hv/hv_vss_daemon.c | 65 +--- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c index 34031a297f02..b13300172762 100644 --- a/tools/hv/hv_vss_daemon.c +++ b/tools/hv/hv_vss_daemon.c @@ -36,6 +36,8 @@ #include #include #include +#include +#include /* Don't use syslog() in the function since that can cause write to disk */ static int vss_do_freeze(char *dir, unsigned int cmd) @@ -68,6 +70,55 @@ static int vss_do_freeze(char *dir, unsigned int cmd) return !!ret; } +static bool is_dev_loop(const char *blkname) +{ + char *buffer; + DIR *dir; + struct dirent *entry; + bool ret = false; + + buffer = malloc(PATH_MAX); + if (!buffer) { + syslog(LOG_ERR, "Can't allocate memory!"); + exit(1); + } + + snprintf(buffer, PATH_MAX, "%s/loop", blkname); + if (!access(buffer, R_OK | X_OK)) { + ret = true; + goto free_buffer; + } else if (errno != ENOENT) { + syslog(LOG_ERR, "Can't access: %s; error:%d %s!", + buffer, errno, strerror(errno)); + } + + snprintf(buffer, PATH_MAX, "%s/slaves", blkname); + dir = opendir(buffer); + if (!dir) { + if (errno != ENOENT) + syslog(LOG_ERR, "Can't opendir: %s; error:%d %s!", + buffer, errno, strerror(errno)); + goto free_buffer; + } + + while ((entry = readdir(dir)) != NULL) { + if (strcmp(entry->d_name, ".") == 0 || + strcmp(entry->d_name, "..") == 0) + continue; + + snprintf(buffer, PATH_MAX, "%s/slaves/%s", blkname, +entry->d_name); + if (is_dev_loop(buffer)) { + ret = true; + break; + } + } + closedir(dir); +free_buffer: + free(buffer); + return ret; +} + static int vss_operate(int operation) { char match[] = "/dev/"; @@ -75,6 +126,7 @@ static int vss_operate(int operation) struct mntent *ent; struct stat sb; char errdir[1024] = {0}; + char blkdir[23]; /* /sys/dev/block/XXX:XXX */ unsigned int cmd; int error = 0, root_seen = 0, save_errno = 0; @@ -96,10 +148,15 @@ static int vss_operate(int operation) while ((ent = getmntent(mounts))) { if (strncmp(ent->mnt_fsname, match, strlen(match))) continue; - if (stat(ent->mnt_fsname, &sb) == -1) - continue; - if (S_ISBLK(sb.st_mode) && major(sb.st_rdev) == LOOP_MAJOR) - continue; + if (stat(ent->mnt_fsname, &sb)) { + syslog(LOG_ERR, "Can't stat: %s; error:%d %s!", + ent->mnt_fsname, errno, strerror(errno)); + } else { + sprintf(blkdir, "/sys/dev/block/%d:%d", + major(sb.st_rdev), minor(sb.st_rdev)); + if (is_dev_loop(blkdir)) + continue; + } if (hasmntopt(ent, MNTOPT_RO) != NULL) continue; if (strcmp(ent->mnt_type, "vfat") == 0) -- 2.14.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4 06/12] media: dt-bindings: add bindings for i.MX7 media driver
Hi Sakari, On Fri 18 May 2018 at 22:13, Sakari Ailus wrote: On Fri, May 18, 2018 at 09:27:58AM +0100, Rui Miguel Silva wrote: > > +endpoint node > > +- > > + > > +- data-lanes: (required) an array specifying active > > physical > > MIPI-CSI2 > > + data input lanes and their mapping to > > logical lanes; the > > + array's content is unused, only its > > length is meaningful; Btw. do note that you may get a warning due to this from the CSI-2 bus property parsing code if the lane numbers are wrong. > > + > > +- fsl,csis-hs-settle : (optional) differential receiver > > (HS-RX) > > settle time; > > Could you calculate this, as other drivers do? It probably > changes > depending on the device runtime configuration. The only reference to possible values to this parameter is given by table in [0], can you point me out the formula for imx7 in the documentation? I don't know imx7 but the other CSI-2 drivers need no such system specific configuration. Hum, I think there is at least one more (which this is compliant) that also use this configuration parameter. [0] --- Cheers, Rui [0]: https://github.com/torvalds/linux/blob/a048a07d7f4535baa4cbad6bc024f175317ab938/Documentation/devicetree/bindings/media/samsung-mipi-csis.txt#L46 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: libcfs: add parens around macros args
One may call 'CFS_FAIL_TIMEOUT(id, secs + 5);' and get unexpected result after macro substitution, viz., 'secs + 5' will turn into 'secs + 5 * 1000' Signed-off-by: Ivan Bornyakov --- drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h index d6fc3164e7e7..f96b9a51554d 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h @@ -140,7 +140,7 @@ static inline int cfs_fail_timeout_set(u32 id, u32 value, int ms, int set) /* If id hit cfs_fail_loc, sleep for seconds or milliseconds */ #define CFS_FAIL_TIMEOUT(id, secs) \ - cfs_fail_timeout_set(id, 0, secs * 1000, CFS_FAIL_LOC_NOSET) + cfs_fail_timeout_set(id, 0, (secs) * 1000, CFS_FAIL_LOC_NOSET) #define CFS_FAIL_TIMEOUT_MS(id, ms) \ cfs_fail_timeout_set(id, 0, ms, CFS_FAIL_LOC_NOSET) @@ -150,10 +150,10 @@ static inline int cfs_fail_timeout_set(u32 id, u32 value, int ms, int set) * sleep seconds or milliseconds */ #define CFS_FAIL_TIMEOUT_ORSET(id, value, secs) \ - cfs_fail_timeout_set(id, value, secs * 1000, CFS_FAIL_LOC_ORSET) + cfs_fail_timeout_set(id, value, (secs) * 1000, CFS_FAIL_LOC_ORSET) #define CFS_FAIL_TIMEOUT_RESET(id, value, secs) \ - cfs_fail_timeout_set(id, value, secs * 1000, CFS_FAIL_LOC_RESET) + cfs_fail_timeout_set(id, value, (secs) * 1000, CFS_FAIL_LOC_RESET) #define CFS_FAIL_TIMEOUT_MS_ORSET(id, value, ms) \ cfs_fail_timeout_set(id, value, ms, CFS_FAIL_LOC_ORSET) -- 2.16.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4 06/12] media: dt-bindings: add bindings for i.MX7 media driver
On Tue, May 22, 2018 at 02:19:21PM +0100, Rui Miguel Silva wrote: > Hi Sakari, > On Fri 18 May 2018 at 22:13, Sakari Ailus wrote: > > On Fri, May 18, 2018 at 09:27:58AM +0100, Rui Miguel Silva wrote: > > > > > +endpoint node > > > > > +- > > > > > + > > > > > +- data-lanes: (required) an array specifying active > > > > > physical > > > > > MIPI-CSI2 > > > > > + data input lanes and their mapping to > > logical > > > > > lanes; > > > the > > > > > + array's content is unused, only its > > length is > > > meaningful; > > > > Btw. do note that you may get a warning due to this from the CSI-2 bus > > property parsing code if the lane numbers are wrong. > > > > > > > + > > > > > +- fsl,csis-hs-settle : (optional) differential receiver > > > > > (HS-RX) > > > > > settle time; > > > > > Could you calculate this, as other drivers do? It probably > > > > changes > > > > depending on the device runtime configuration. > > > > > > The only reference to possible values to this parameter is given by > > > table in [0], can you point me out the formula for imx7 in the > > > documentation? > > > > I don't know imx7 but the other CSI-2 drivers need no such system > > specific > > configuration. > > Hum, I think there is at least one more (which this is compliant) that > also use this configuration parameter. [0] Ah, that's where it then probably comes from, if the two hardware blocks share some bits. I guess it's fine to keep it if you think it's really necessary. -- Sakari Ailus sakari.ai...@linux.intel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: greybus: fix spelling mistake: "Inavlid" -> "Invalid"
On Tue, May 22, 2018 at 09:33:42AM +0100, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake in dev_err error message > > Signed-off-by: Colin Ian King > --- > drivers/staging/greybus/audio_topology.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/greybus/audio_topology.c > b/drivers/staging/greybus/audio_topology.c > index de4b1b2b12f3..15e57f701630 100644 > --- a/drivers/staging/greybus/audio_topology.c > +++ b/drivers/staging/greybus/audio_topology.c > @@ -996,7 +996,7 @@ static int gbaudio_tplg_create_widget(struct > gbaudio_module_info *module, > > ret = gbaudio_validate_kcontrol_count(w); > if (ret) { > - dev_err(module->dev, "Inavlid kcontrol count=%d for %s\n", > + dev_err(module->dev, "Invalid kcontrol count=%d for %s\n", > w->ncontrols, w->name); > return ret; > } Acked-by: Mark Greer ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v6 01/13] media: staging/imx: refactor imx media device probe
Refactor and move media device initialization code to a new common module, so it can be used by other devices, this will allow for example a near to introduce imx7 CSI driver, to use this media device. Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/Makefile| 1 + .../staging/media/imx/imx-media-dev-common.c | 100 ++ drivers/staging/media/imx/imx-media-dev.c | 86 --- drivers/staging/media/imx/imx-media-of.c | 6 +- drivers/staging/media/imx/imx-media.h | 15 +++ 5 files changed, 139 insertions(+), 69 deletions(-) create mode 100644 drivers/staging/media/imx/imx-media-dev-common.c diff --git a/drivers/staging/media/imx/Makefile b/drivers/staging/media/imx/Makefile index 698a4210316e..a30b3033f9a3 100644 --- a/drivers/staging/media/imx/Makefile +++ b/drivers/staging/media/imx/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 imx-media-objs := imx-media-dev.o imx-media-internal-sd.o imx-media-of.o +imx-media-objs += imx-media-dev-common.o imx-media-common-objs := imx-media-utils.o imx-media-fim.o imx-media-ic-objs := imx-ic-common.o imx-ic-prp.o imx-ic-prpencvf.o diff --git a/drivers/staging/media/imx/imx-media-dev-common.c b/drivers/staging/media/imx/imx-media-dev-common.c new file mode 100644 index ..98aea5f94174 --- /dev/null +++ b/drivers/staging/media/imx/imx-media-dev-common.c @@ -0,0 +1,100 @@ +// SPDX-License-Identifier: GPL +/* + * V4L2 Media Controller Driver for Freescale common i.MX5/6/7 SOC + * + * Copyright (c) 2018 Linaro Ltd + * Copyright (c) 2016 Mentor Graphics Inc. + */ + +#include +#include +#include "imx-media.h" + +static const struct v4l2_async_notifier_operations imx_media_subdev_ops = { + .bound = imx_media_subdev_bound, + .complete = imx_media_probe_complete, +}; + +static const struct media_device_ops imx_media_md_ops = { + .link_notify = imx_media_link_notify, +}; + +struct imx_media_dev *imx_media_dev_init(struct device *dev) +{ + struct imx_media_dev *imxmd; + int ret; + + imxmd = devm_kzalloc(dev, sizeof(*imxmd), GFP_KERNEL); + if (!imxmd) + return ERR_PTR(-ENOMEM); + + dev_set_drvdata(dev, imxmd); + + strlcpy(imxmd->md.model, "imx-media", sizeof(imxmd->md.model)); + imxmd->md.ops = &imx_media_md_ops; + imxmd->md.dev = dev; + + mutex_init(&imxmd->mutex); + + imxmd->v4l2_dev.mdev = &imxmd->md; + strlcpy(imxmd->v4l2_dev.name, "imx-media", + sizeof(imxmd->v4l2_dev.name)); + + media_device_init(&imxmd->md); + + ret = v4l2_device_register(dev, &imxmd->v4l2_dev); + if (ret < 0) { + v4l2_err(&imxmd->v4l2_dev, +"Failed to register v4l2_device: %d\n", ret); + goto cleanup; + } + + dev_set_drvdata(imxmd->v4l2_dev.dev, imxmd); + + INIT_LIST_HEAD(&imxmd->vdev_list); + + return imxmd; + +cleanup: + media_device_cleanup(&imxmd->md); + + return ERR_PTR(ret); +} +EXPORT_SYMBOL_GPL(imx_media_dev_init); + +int imx_media_dev_notifier_register(struct imx_media_dev *imxmd) +{ + int ret; + + /* no subdevs? just bail */ + if (imxmd->notifier.num_subdevs == 0) { + v4l2_err(&imxmd->v4l2_dev, "no subdevs\n"); + return -ENODEV; + } + + /* prepare the async subdev notifier and register it */ + imxmd->notifier.ops = &imx_media_subdev_ops; + ret = v4l2_async_notifier_register(&imxmd->v4l2_dev, + &imxmd->notifier); + if (ret) { + v4l2_err(&imxmd->v4l2_dev, +"v4l2_async_notifier_register failed with %d\n", ret); + return ret; + } + + return 0; +} +EXPORT_SYMBOL_GPL(imx_media_dev_notifier_register); + +void imx_media_dev_cleanup(struct imx_media_dev *imxmd) +{ + v4l2_device_unregister(&imxmd->v4l2_dev); + media_device_cleanup(&imxmd->md); +} +EXPORT_SYMBOL_GPL(imx_media_dev_cleanup); + +void imx_media_dev_notifier_unregister(struct imx_media_dev *imxmd) +{ + v4l2_async_notifier_cleanup(&imxmd->notifier); +} +EXPORT_SYMBOL_GPL(imx_media_dev_notifier_unregister); diff --git a/drivers/staging/media/imx/imx-media-dev.c b/drivers/staging/media/imx/imx-media-dev.c index 7e7bd1c6c81b..70fcaf2d358a 100644 --- a/drivers/staging/media/imx/imx-media-dev.c +++ b/drivers/staging/media/imx/imx-media-dev.c @@ -107,9 +107,9 @@ static int imx_media_get_ipu(struct imx_media_dev *imxmd, } /* async subdev bound notifier */ -static int imx_media_subdev_bound(struct v4l2_async_notifier *notifier, - struct v4l2_subdev *sd, - struct v4l2_async_subdev *asd) +int imx_media_subdev_bound(struct v4l2_async_notifier *notifier, + struct v4l2_subdev *sd, + struct v4l2_async_subdev *asd) { stru
[PATCH v6 04/13] clk: imx7d: fix mipi dphy div parent
Fix the mipi dphy root divider to mipi_dphy_pre_div, this would remove a orphan clock and set the correct parent. before: cat clk_orphan_summary enable prepare protect clock countcountcountrate accuracy phase mipi_dphy_post_div 110 0 0 0 mipi_dphy_root_clk110 0 0 0 cat clk_dump | grep mipi_dphy mipi_dphy_post_div110 0 0 0 mipi_dphy_root_clk110 0 0 0 after: cat clk_dump | grep mipi_dphy mipi_dphy_src 1102400 0 0 mipi_dphy_cg 1102400 0 0 mipi_dphy_pre_div 1102400 0 0 mipi_dphy_post_div 1102400 0 0 mipi_dphy_root_clk 1102400 0 0 Fixes: 8f6d8094b215 ("ARM: imx: add imx7d clk tree support") Acked-by: Dong Aisheng Signed-off-by: Rui Miguel Silva --- drivers/clk/imx/clk-imx7d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c index 975a20d3cc94..f7f4db2e6fa6 100644 --- a/drivers/clk/imx/clk-imx7d.c +++ b/drivers/clk/imx/clk-imx7d.c @@ -729,7 +729,7 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node) clks[IMX7D_LCDIF_PIXEL_ROOT_DIV] = imx_clk_divider2("lcdif_pixel_post_div", "lcdif_pixel_pre_div", base + 0xa300, 0, 6); clks[IMX7D_MIPI_DSI_ROOT_DIV] = imx_clk_divider2("mipi_dsi_post_div", "mipi_dsi_pre_div", base + 0xa380, 0, 6); clks[IMX7D_MIPI_CSI_ROOT_DIV] = imx_clk_divider2("mipi_csi_post_div", "mipi_csi_pre_div", base + 0xa400, 0, 6); - clks[IMX7D_MIPI_DPHY_ROOT_DIV] = imx_clk_divider2("mipi_dphy_post_div", "mipi_csi_dphy_div", base + 0xa480, 0, 6); + clks[IMX7D_MIPI_DPHY_ROOT_DIV] = imx_clk_divider2("mipi_dphy_post_div", "mipi_dphy_pre_div", base + 0xa480, 0, 6); clks[IMX7D_SAI1_ROOT_DIV] = imx_clk_divider2("sai1_post_div", "sai1_pre_div", base + 0xa500, 0, 6); clks[IMX7D_SAI2_ROOT_DIV] = imx_clk_divider2("sai2_post_div", "sai2_pre_div", base + 0xa580, 0, 6); clks[IMX7D_SAI3_ROOT_DIV] = imx_clk_divider2("sai3_post_div", "sai3_pre_div", base + 0xa600, 0, 6); -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v6 00/13] media: staging/imx7: add i.MX7 media driver
Hi, This series introduces the Media driver to work with the i.MX7 SoC. it uses the already existing imx media core drivers but since the i.MX7, contrary to i.MX5/6, do not have an IPU and because of that some changes in the imx media core are made along this series to make it support that case. This patches adds CSI and MIPI-CSI2 drivers for i.MX7, along with several configurations changes for this to work as a capture subsystem. Some bugs are also fixed along the line. And necessary documentation. For a more detailed view of the capture paths, pads links in the i.MX7 please take a look at the documentation in PATCH 14. The system used to test and develop this was the Warp7 board with an OV2680 sensor, which output format is 10-bit bayer. So, only MIPI interface was tested, a scenario with an parallel input would nice to have. *Important note*, this code depends on Steve Longerbeam series [0]: [PATCH v4 00/13] media: imx: Switch to subdev notifiers which the merging status is not clear to me, but the changes in there make senses to this series Bellow goes an example of the output of the pads and links and the output of v4l2-compliance testing. The v4l-utils version used is: v4l2-compliance SHA : 47d43b130dc6e9e0edc900759fb37649208371e4 from Apr 4th. The Media Driver fail some tests but this failures are coming from code out of scope of this series (video-mux, imx-capture), and some from the sensor OV2680 but that I think not related with the sensor driver but with the testing and core. The csi and mipi-csi entities pass all compliance tests. Cheers, Rui [0]: https://www.mail-archive.com/linux-media@vger.kernel.org/msg131186.html v5->v6: Rob Herring: - rename power-domain node name from: pgc-power-domain to power-domain - change mux-control-cells to 0 - remove bus-width from mipi bindings and dts - remove err... regarding clock names line - remove clk-settle from example - split mipi-csi2 and csi bindings per file - add OF graph description to CSI Philipp Zabel: - rework group IDs and rename them with an _IPU_ prefix, this allowed to remove the ipu_present flag need. v4->v5: Sakari Ailus: - fix remove of the capture entries in dts bindings in the right patch Stephen Boyd: - Send all series to clk list v3->v4: Philipp Zabel: - refactor initialization code from media device probe to be possible to used from other modules - Remove index of csi from all accurrencs (dts, code, documentation) - Remove need for capture node for imx7 - fix pinctrl for ov2680 - add reviewed tag to add multiplexer controls patch Fabio Estevam: - remove always on from new regulator Randy Dunlap: - several text editing fixes in documentation Myself: - rebase on top of v4 of Steve series - change CSI probe to initialize imx media device - remove csi mux parallel endpoint from mux to avoid warning message v2->v3: Philipp Zabel: - use of_match_device in imx-media-dev instead of of_device_match - fix number of data lanes from 4 to 2 - change the clock definitions and use of mipi - move hs-settle from endpoint Rob Herring: - fix phy-supply description - add vendor properties - fix examples indentations Stephen Boyd: patch 3/14 - fix double sign-off - add fixes tag Dong Aisheng: patch 3/14 - fix double sign-off - add Acked-by tag Shawn Guo: patch 4/14 - remove line breakage in parent redifiniton - added Acked-by tag - dropped CMA area increase and add more verbose information in case of dma allocation failure patch 9/14 - remove extra line between cells and reg masks Myself: - rework on frame end in csi - add rxcount in csi driver - add power supplies to ov2680 node and fix gpio polarity v1->v2: Dan Carpenter: - fix return paths and codes; - fix clk_frequency validation and return code; - handle the csi remove (release resources that was missing) - revert the logic arround the ipu_present flag Philipp Zabel: - drop patch that changed the rgb formats and address the pixel/bus format in mipi_csis code. MySelf: - add patch that add ov2680 node to the warp7 dts, so the all data path is complete. - add linux-clk mailing list to the clock patches cc: media-ctl -p Media controller API version 4.17.0 Media device information driver imx-media model imx-media serial bus info hw revision 0x0 driver version 4.17.0 Device topology - entity 1: csi (2 pads, 2 links) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev0 pad0: Sink [fmt:SBGGR10_1X10/800x600 field:none] <- "csi_mux":2 [ENABLED] pad1: Source [fmt:SBGGR10_1X10/800x600 field:none] -> "csi capture":0 [ENABLED] - entity 4: csi capture (1 pad, 1 link) type Node subtype V4L flags 0 device node name /dev/video0 pad0: Sink <- "csi":1 [ENABLED] - entity 10: csi_mux (3 pads, 2 links)
[PATCH v6 03/13] media: staging/imx7: add imx7 CSI subdev driver
This add the media entity subdevice and control driver for the i.MX7 CMOS Sensor Interface. Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/Kconfig |9 +- drivers/staging/media/imx/Makefile |2 + drivers/staging/media/imx/imx7-media-csi.c | 1352 3 files changed, 1362 insertions(+), 1 deletion(-) create mode 100644 drivers/staging/media/imx/imx7-media-csi.c diff --git a/drivers/staging/media/imx/Kconfig b/drivers/staging/media/imx/Kconfig index bfc17de56b17..40a11f988fc6 100644 --- a/drivers/staging/media/imx/Kconfig +++ b/drivers/staging/media/imx/Kconfig @@ -11,7 +11,7 @@ config VIDEO_IMX_MEDIA driver for the i.MX5/6 SOC. if VIDEO_IMX_MEDIA -menu "i.MX5/6 Media Sub devices" +menu "i.MX5/6/7 Media Sub devices" config VIDEO_IMX_CSI tristate "i.MX5/6 Camera Sensor Interface driver" @@ -20,5 +20,12 @@ config VIDEO_IMX_CSI ---help--- A video4linux camera sensor interface driver for i.MX5/6. +config VIDEO_IMX7_CSI + tristate "i.MX7 Camera Sensor Interface driver" + depends on VIDEO_IMX_MEDIA && VIDEO_DEV && I2C + default y + ---help--- + A video4linux camera sensor interface driver for i.MX7. + endmenu endif diff --git a/drivers/staging/media/imx/Makefile b/drivers/staging/media/imx/Makefile index a30b3033f9a3..074f016d3519 100644 --- a/drivers/staging/media/imx/Makefile +++ b/drivers/staging/media/imx/Makefile @@ -12,3 +12,5 @@ obj-$(CONFIG_VIDEO_IMX_MEDIA) += imx-media-ic.o obj-$(CONFIG_VIDEO_IMX_CSI) += imx-media-csi.o obj-$(CONFIG_VIDEO_IMX_CSI) += imx6-mipi-csi2.o + +obj-$(CONFIG_VIDEO_IMX7_CSI) += imx7-media-csi.o diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c new file mode 100644 index ..7facb7fcbc67 --- /dev/null +++ b/drivers/staging/media/imx/imx7-media-csi.c @@ -0,0 +1,1352 @@ +// SPDX-License-Identifier: GPL +/* + * V4L2 Capture CSI Subdev for Freescale i.MX7 SOC + * + * Copyright (c) 2018 Linaro Ltd + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include "imx-media.h" + +#define IMX7_CSI_PAD_SINK 0 +#define IMX7_CSI_PAD_SRC 1 +#define IMX7_CSI_PADS_NUM 2 + +/* reset values */ +#define CSICR1_RESET_VAL 0x4800 +#define CSICR2_RESET_VAL 0x0 +#define CSICR3_RESET_VAL 0x0 + +/* csi control reg 1 */ +#define BIT_SWAP16_EN BIT(31) +#define BIT_EXT_VSYNC BIT(30) +#define BIT_EOF_INT_EN BIT(29) +#define BIT_PRP_IF_EN BIT(28) +#define BIT_CCIR_MODE BIT(27) +#define BIT_COF_INT_EN BIT(26) +#define BIT_SF_OR_INTENBIT(25) +#define BIT_RF_OR_INTENBIT(24) +#define BIT_SFF_DMA_DONE_INTEN BIT(22) +#define BIT_STATFF_INTEN BIT(21) +#define BIT_FB2_DMA_DONE_INTEN BIT(20) +#define BIT_FB1_DMA_DONE_INTEN BIT(19) +#define BIT_RXFF_INTEN BIT(18) +#define BIT_SOF_POLBIT(17) +#define BIT_SOF_INTEN BIT(16) +#define BIT_MCLKDIV(0xF << 12) +#define BIT_HSYNC_POL BIT(11) +#define BIT_CCIR_ENBIT(10) +#define BIT_MCLKEN BIT(9) +#define BIT_FCCBIT(8) +#define BIT_PACK_DIR BIT(7) +#define BIT_CLR_STATFIFO BIT(6) +#define BIT_CLR_RXFIFO BIT(5) +#define BIT_GCLK_MODE BIT(4) +#define BIT_INV_DATA BIT(3) +#define BIT_INV_PCLK BIT(2) +#define BIT_REDGE BIT(1) +#define BIT_PIXEL_BIT BIT(0) + +#define SHIFT_MCLKDIV 12 + +/* control reg 3 */ +#define BIT_FRMCNT (0x << 16) +#define BIT_FRMCNT_RST BIT(15) +#define BIT_DMA_REFLASH_RFFBIT(14) +#define BIT_DMA_REFLASH_SFFBIT(13) +#define BIT_DMA_REQ_EN_RFF BIT(12) +#define BIT_DMA_REQ_EN_SFF BIT(11) +#define BIT_STATFF_LEVEL (0x7 << 8) +#define BIT_HRESP_ERR_EN BIT(7) +#define BIT_RXFF_LEVEL (0x7 << 4) +#define BIT_TWO_8BIT_SENSORBIT(3) +#define BIT_ZERO_PACK_EN BIT(2) +#define BIT_ECC_INT_EN BIT(1) +#define BIT_ECC_AUTO_ENBIT(0) + +#define SHIFT_FRMCNT 16 +#define SHIFT_RXFIFO_LEVEL 4 + +/* csi status reg */ +#define BIT_ADDR_CH_ERR_INTBIT(28) +#define BIT_FIELD0_INT BIT(27) +#define BIT_FIELD1_INT BIT(26) +#define BIT_SFF_OR_INT BIT(25) +#define BIT_RFF_OR_INT BIT(24) +#define BIT_DMA_TSF_DONE_SFF BIT(22) +#define BIT_STATFF_INT BIT(21) +#define BIT_DMA_TSF_DONE_FB2 BIT(20) +#define BIT_DMA_TSF_DONE_FB1 BIT(19) +#define BIT_RXFF_INT BIT(18) +#define BIT_EOF_INTBIT(17) +#define BIT_SOF_INTBIT(16) +#define BIT_F2_INT BIT(15) +#define BIT_F1_INT BIT(14) +#define BIT_COF_INTBIT
[PATCH v6 02/13] media: staging/imx: rearrange group id to take in account IPU
Some imx system do not have IPU, so prepare the imx media drivers to support this kind of devices. Rename the group ids to include an _IPU_ prefix, add a new group id to support systems with only a CSI without IPU, and also rename the create internal links to make it clear that only systems with IPU have internal subdevices. Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/imx-ic-common.c | 6 ++--- drivers/staging/media/imx/imx-ic-prp.c| 14 +-- drivers/staging/media/imx/imx-media-csi.c | 6 ++--- drivers/staging/media/imx/imx-media-dev.c | 22 ++ .../staging/media/imx/imx-media-internal-sd.c | 20 drivers/staging/media/imx/imx-media-utils.c | 12 +- drivers/staging/media/imx/imx-media.h | 23 ++- 7 files changed, 54 insertions(+), 49 deletions(-) diff --git a/drivers/staging/media/imx/imx-ic-common.c b/drivers/staging/media/imx/imx-ic-common.c index cfdd4900a3be..765919487a73 100644 --- a/drivers/staging/media/imx/imx-ic-common.c +++ b/drivers/staging/media/imx/imx-ic-common.c @@ -41,13 +41,13 @@ static int imx_ic_probe(struct platform_device *pdev) pdata = priv->dev->platform_data; priv->ipu_id = pdata->ipu_id; switch (pdata->grp_id) { - case IMX_MEDIA_GRP_ID_IC_PRP: + case IMX_MEDIA_GRP_ID_IPU_IC_PRP: priv->task_id = IC_TASK_PRP; break; - case IMX_MEDIA_GRP_ID_IC_PRPENC: + case IMX_MEDIA_GRP_ID_IPU_IC_PRPENC: priv->task_id = IC_TASK_ENCODER; break; - case IMX_MEDIA_GRP_ID_IC_PRPVF: + case IMX_MEDIA_GRP_ID_IPU_IC_PRPVF: priv->task_id = IC_TASK_VIEWFINDER; break; default: diff --git a/drivers/staging/media/imx/imx-ic-prp.c b/drivers/staging/media/imx/imx-ic-prp.c index 98923fc844ce..795ca61f7cea 100644 --- a/drivers/staging/media/imx/imx-ic-prp.c +++ b/drivers/staging/media/imx/imx-ic-prp.c @@ -77,7 +77,7 @@ static int prp_start(struct prp_priv *priv) priv->ipu = priv->md->ipu[ic_priv->ipu_id]; /* set IC to receive from CSI or VDI depending on source */ - src_is_vdic = !!(priv->src_sd->grp_id & IMX_MEDIA_GRP_ID_VDIC); + src_is_vdic = !!(priv->src_sd->grp_id & IMX_MEDIA_GRP_ID_IPU_VDIC); ipu_set_ic_src_mux(priv->ipu, priv->csi_id, src_is_vdic); @@ -238,7 +238,7 @@ static int prp_link_setup(struct media_entity *entity, goto out; } if (priv->sink_sd_prpenc && (remote_sd->grp_id & -IMX_MEDIA_GRP_ID_VDIC)) { + IMX_MEDIA_GRP_ID_IPU_VDIC)) { ret = -EINVAL; goto out; } @@ -259,7 +259,7 @@ static int prp_link_setup(struct media_entity *entity, goto out; } if (priv->src_sd && (priv->src_sd->grp_id & -IMX_MEDIA_GRP_ID_VDIC)) { +IMX_MEDIA_GRP_ID_IPU_VDIC)) { ret = -EINVAL; goto out; } @@ -309,13 +309,13 @@ static int prp_link_validate(struct v4l2_subdev *sd, return ret; csi = imx_media_find_upstream_subdev(priv->md, &ic_priv->sd.entity, -IMX_MEDIA_GRP_ID_CSI); +IMX_MEDIA_GRP_ID_IPU_CSI); if (IS_ERR(csi)) csi = NULL; mutex_lock(&priv->lock); - if (priv->src_sd->grp_id & IMX_MEDIA_GRP_ID_VDIC) { + if (priv->src_sd->grp_id & IMX_MEDIA_GRP_ID_IPU_VDIC) { /* * the ->PRPENC link cannot be enabled if the source * is the VDIC @@ -334,10 +334,10 @@ static int prp_link_validate(struct v4l2_subdev *sd, if (csi) { switch (csi->grp_id) { - case IMX_MEDIA_GRP_ID_CSI0: + case IMX_MEDIA_GRP_ID_IPU_CSI0: priv->csi_id = 0; break; - case IMX_MEDIA_GRP_ID_CSI1: + case IMX_MEDIA_GRP_ID_IPU_CSI1: priv->csi_id = 1; break; default: diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index 436f3b8a141b..8a86d111e935 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -981,10 +981,10 @@ static int csi_link_setup(struct media_entity *entity, remote_sd = media_entity_to_v4l2_subdev(remote->entity); switch (remote_sd->grp_id) { - case IMX_MEDIA_GRP_ID_VDIC: +
[PATCH v6 07/13] media: dt-bindings: add bindings for i.MX7 media driver
Add bindings documentation for i.MX7 media drivers. The imx7 MIPI CSI2 and imx7 CMOS Sensor Interface. Signed-off-by: Rui Miguel Silva --- .../devicetree/bindings/media/imx7-csi.txt| 44 ++ .../bindings/media/imx7-mipi-csi2.txt | 82 +++ 2 files changed, 126 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/imx7-csi.txt create mode 100644 Documentation/devicetree/bindings/media/imx7-mipi-csi2.txt diff --git a/Documentation/devicetree/bindings/media/imx7-csi.txt b/Documentation/devicetree/bindings/media/imx7-csi.txt new file mode 100644 index ..aab4f5d72390 --- /dev/null +++ b/Documentation/devicetree/bindings/media/imx7-csi.txt @@ -0,0 +1,44 @@ +Freescale i.MX7 CMOS Sensor Interface += + +csi node + + +This is device node for the CMOS Sensor Interface (CSI) which enables the chip +to connect directly to external CMOS image sensors. + +Required properties: + +- compatible: "fsl,imx7-csi"; +- reg : base address and length of the register set for the device; +- interrupts: should contain CSI interrupt; +- clocks: list of clock specifiers, see +Documentation/devicetree/bindings/clock/clock-bindings.txt for details; +- clock-names : must contain "axi", "mclk" and "dcic" entries, matching + entries in the clock property; + +The device node should contain one 'port' child node with one child 'endpoint' +node, according to the bindings defined in Documentation/devicetree/bindings/ +media/video-interfaces.txt. In the following example a remote endpoint is a +video multiplexer. + +example: + +csi: csi@3071 { +#address-cells = <1>; +#size-cells = <0>; + +compatible = "fsl,imx7-csi"; +reg = <0x3071 0x1>; +interrupts = ; +clocks = <&clks IMX7D_CLK_DUMMY>, +<&clks IMX7D_CSI_MCLK_ROOT_CLK>, +<&clks IMX7D_CLK_DUMMY>; +clock-names = "axi", "mclk", "dcic"; + +port { +csi_from_csi_mux: endpoint { +remote-endpoint = <&csi_mux_to_csi>; +}; +}; +}; diff --git a/Documentation/devicetree/bindings/media/imx7-mipi-csi2.txt b/Documentation/devicetree/bindings/media/imx7-mipi-csi2.txt new file mode 100644 index ..7c5f20863724 --- /dev/null +++ b/Documentation/devicetree/bindings/media/imx7-mipi-csi2.txt @@ -0,0 +1,82 @@ +Freescale i.MX7 Mipi CSI2 += + +mipi_csi2 node +-- + +This is the device node for the MIPI CSI-2 receiver core in i.MX7 SoC. It is +compatible with previous version of Samsung D-phy. + +Required properties: + +- compatible: "fsl,imx7-mipi-csi2"; +- reg : base address and length of the register set for the device; +- interrupts: should contain MIPI CSIS interrupt; +- clocks: list of clock specifiers, see +Documentation/devicetree/bindings/clock/clock-bindings.txt for details; +- clock-names : must contain "pclk", "wrap" and "phy" entries, matching + entries in the clock property; +- power-domains : a phandle to the power domain, see + Documentation/devicetree/bindings/power/power_domain.txt for details. +- reset-names : should include following entry "mrst"; +- resets: a list of phandle, should contain reset entry of + reset-names; +- phy-supply: from the generic phy bindings, a phandle to a regulator that + provides power to MIPI CSIS core; + +Optional properties: + +- clock-frequency : The IP's main (system bus) clock frequency in Hz, default + value when this property is not specified is 166 MHz; +- fsl,csis-hs-settle : differential receiver (HS-RX) settle time; + +port node +- + +- reg: (required) can take the values 0 or 1, where 0 is the + related sink port and port 1 should be the source one; + +endpoint node +- + +- data-lanes: (required) an array specifying active physical MIPI-CSI2 + data input lanes and their mapping to logical lanes; the + array's content is unused, only its length is meaningful; + +example: + +mipi_csi: mipi-csi@3075 { +#address-cells = <1>; +#size-cells = <0>; + +compatible = "fsl,imx7-mipi-csi2"; +reg = <0x3075 0x1>; +interrupts = ; +clocks = <&clks IMX7D_IPG_ROOT_CLK>, +<&clks IMX7D_MIPI_CSI_ROOT_CLK>, +<&clks IMX7D_MIPI_DPHY_ROOT_CLK>; +
[PATCH v6 06/13] media: staging/imx7: add MIPI CSI-2 receiver subdev for i.MX7
Adds MIPI CSI-2 subdev for i.MX7 to connect with sensors with a MIPI CSI-2 interface. Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/Makefile |1 + drivers/staging/media/imx/imx7-mipi-csis.c | 1134 2 files changed, 1135 insertions(+) create mode 100644 drivers/staging/media/imx/imx7-mipi-csis.c diff --git a/drivers/staging/media/imx/Makefile b/drivers/staging/media/imx/Makefile index 074f016d3519..d2d909a36239 100644 --- a/drivers/staging/media/imx/Makefile +++ b/drivers/staging/media/imx/Makefile @@ -14,3 +14,4 @@ obj-$(CONFIG_VIDEO_IMX_CSI) += imx-media-csi.o obj-$(CONFIG_VIDEO_IMX_CSI) += imx6-mipi-csi2.o obj-$(CONFIG_VIDEO_IMX7_CSI) += imx7-media-csi.o +obj-$(CONFIG_VIDEO_IMX7_CSI) += imx7-mipi-csis.o diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c new file mode 100644 index ..79cc413b4bbe --- /dev/null +++ b/drivers/staging/media/imx/imx7-mipi-csis.c @@ -0,0 +1,1134 @@ +// SPDX-License-Identifier: GPL +/* + * Freescale i.MX7 SoC series MIPI-CSI V3.3 receiver driver + * + * Copyright (C) 2018 Linaro Ltd + * Copyright (C) 2015-2016 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "imx-media.h" + +static int debug; +module_param(debug, int, 0644); +MODULE_PARM_DESC(debug, "Debug level (0-2)"); + +#define CSIS_DRIVER_NAME "imx7-mipi-csis" +#define CSIS_SUBDEV_NAME CSIS_DRIVER_NAME + +#define CSIS_PAD_SINK 0 +#define CSIS_PAD_SOURCE1 +#define CSIS_PADS_NUM 2 + +#define MIPI_CSIS_DEF_PIX_WIDTH640 +#define MIPI_CSIS_DEF_PIX_HEIGHT 480 + +/* Register map definition */ + +/* CSIS common control */ +#define MIPI_CSIS_CMN_CTRL 0x04 +#define MIPI_CSIS_CMN_CTRL_UPDATE_SHADOW BIT(16) +#define MIPI_CSIS_CMN_CTRL_INTER_MODE BIT(10) +#define MIPI_CSIS_CMN_CTRL_UPDATE_SHADOW_CTRL BIT(2) +#define MIPI_CSIS_CMN_CTRL_RESET BIT(1) +#define MIPI_CSIS_CMN_CTRL_ENABLE BIT(0) + +#define MIPI_CSIS_CMN_CTRL_LANE_NR_OFFSET 8 +#define MIPI_CSIS_CMN_CTRL_LANE_NR_MASK(3 << 8) + +/* CSIS clock control */ +#define MIPI_CSIS_CLK_CTRL 0x08 +#define MIPI_CSIS_CLK_CTRL_CLKGATE_TRAIL_CH3(x)(x << 28) +#define MIPI_CSIS_CLK_CTRL_CLKGATE_TRAIL_CH2(x)(x << 24) +#define MIPI_CSIS_CLK_CTRL_CLKGATE_TRAIL_CH1(x)(x << 20) +#define MIPI_CSIS_CLK_CTRL_CLKGATE_TRAIL_CH0(x)(x << 16) +#define MIPI_CSIS_CLK_CTRL_CLKGATE_EN_MSK (0xf << 4) +#define MIPI_CSIS_CLK_CTRL_WCLK_SRCBIT(0) + +/* CSIS Interrupt mask */ +#define MIPI_CSIS_INTMSK 0x10 +#define MIPI_CSIS_INTMSK_EVEN_BEFORE BIT(31) +#define MIPI_CSIS_INTMSK_EVEN_AFTERBIT(30) +#define MIPI_CSIS_INTMSK_ODD_BEFOREBIT(29) +#define MIPI_CSIS_INTMSK_ODD_AFTER BIT(28) +#define MIPI_CSIS_INTMSK_FRAME_START BIT(24) +#define MIPI_CSIS_INTMSK_FRAME_END BIT(20) +#define MIPI_CSIS_INTMSK_ERR_SOT_HSBIT(16) +#define MIPI_CSIS_INTMSK_ERR_LOST_FS BIT(12) +#define MIPI_CSIS_INTMSK_ERR_LOST_FE BIT(8) +#define MIPI_CSIS_INTMSK_ERR_OVER BIT(4) +#define MIPI_CSIS_INTMSK_ERR_WRONG_CFG BIT(3) +#define MIPI_CSIS_INTMSK_ERR_ECC BIT(2) +#define MIPI_CSIS_INTMSK_ERR_CRC BIT(1) +#define MIPI_CSIS_INTMSK_ERR_UNKNOWN BIT(0) + +/* CSIS Interrupt source */ +#define MIPI_CSIS_INTSRC 0x14 +#define MIPI_CSIS_INTSRC_EVEN_BEFORE BIT(31) +#define MIPI_CSIS_INTSRC_EVEN_AFTERBIT(30) +#define MIPI_CSIS_INTSRC_EVEN BIT(30) +#define MIPI_CSIS_INTSRC_ODD_BEFOREBIT(29) +#define MIPI_CSIS_INTSRC_ODD_AFTER BIT(28) +#define MIPI_CSIS_INTSRC_ODD (0x3 << 28) +#define MIPI_CSIS_INTSRC_NON_IMAGE_DATA(0xf << 28) +#define MIPI_CSIS_INTSRC_FRAME_START BIT(24) +#define MIPI_CSIS_INTSRC_FRAME_END BIT(20) +#define MIPI_CSIS_INTSRC_ERR_SOT_HSBIT(16) +#define MIPI_CSIS_INTSRC_ERR_LOST_FS BIT(12) +#define MIPI_CSIS_INTSRC_ERR_LOST_FE BIT(8) +#define MIPI_CSIS_INTSRC_ERR_OVER BIT(4) +#define MIPI_CSIS_INTSRC_ERR_WRONG_CFG BIT(3) +#define MIPI_CSIS_INTSRC_ERR_ECC BIT(2) +#define MIPI_CSIS_INTSRC_ERR_CRC BIT(1) +#define MIPI_CSIS_INTSRC_ERR_UNKNOWN BIT(0) +#define MIPI_CSIS_INTSRC_ERRORS0xf + +/* D-PHY status control */ +#define MIPI_CSIS_DPHYSTATUS 0x20 +#define MIPI_CSIS_DPHYSTATUS_ULPS_DAT BIT(8) +#define MIPI_CSIS_DPHYSTATUS_STOPSTATE_DAT BIT(4) +#define MIPI_CSIS_DPHYSTATUS_ULPS_CLK BIT(1) +#define MIPI_CSIS_DPHYSTATUS_STOPSTATE_CLK BIT(0) + +/* D-PHY common control */ +#define MIPI_CSIS_DPHYCTRL 0x24 +#define MIP
[PATCH v6 08/13] ARM: dts: imx7s: add mipi phy power domain
Add power domain index 0 related with mipi-phy to imx7s. While at it rename pcie power-domain node to remove pgc prefix. Signed-off-by: Rui Miguel Silva --- arch/arm/boot/dts/imx7s.dtsi | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7s.dtsi b/arch/arm/boot/dts/imx7s.dtsi index 4d42335c0dee..5e6d2063b143 100644 --- a/arch/arm/boot/dts/imx7s.dtsi +++ b/arch/arm/boot/dts/imx7s.dtsi @@ -636,7 +636,13 @@ #address-cells = <1>; #size-cells = <0>; - pgc_pcie_phy: pgc-power-domain@1 { + pgc_mipi_phy: power-domain@0 { + #power-domain-cells = <0>; + reg = <0>; + power-supply = <®_1p0d>; + }; + + pgc_pcie_phy: power-domain@1 { #power-domain-cells = <0>; reg = <1>; power-supply = <®_1p0d>; -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v6 05/13] clk: imx7d: reset parent for mipi csi root
To guarantee that we do not get Overflow in image FIFO the outer bandwidth has to be faster than inputer bandwidth. For that it must be possible to set a faster frequency clock. So set new parent to sys_pfd3 clock for the mipi csi block. Acked-by: Shawn Guo Signed-off-by: Rui Miguel Silva --- drivers/clk/imx/clk-imx7d.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c index f7f4db2e6fa6..27877d05faa2 100644 --- a/drivers/clk/imx/clk-imx7d.c +++ b/drivers/clk/imx/clk-imx7d.c @@ -891,6 +891,8 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node) clk_set_parent(clks[IMX7D_PLL_AUDIO_MAIN_BYPASS], clks[IMX7D_PLL_AUDIO_MAIN]); clk_set_parent(clks[IMX7D_PLL_VIDEO_MAIN_BYPASS], clks[IMX7D_PLL_VIDEO_MAIN]); + clk_set_parent(clks[IMX7D_MIPI_CSI_ROOT_SRC], clks[IMX7D_PLL_SYS_PFD3_CLK]); + /* use old gpt clk setting, gpt1 root clk must be twice as gpt counter freq */ clk_set_parent(clks[IMX7D_GPT1_ROOT_SRC], clks[IMX7D_OSC_24M_CLK]); -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v6 11/13] ARM: dts: imx7s-warp: add ov2680 sensor node
Warp7 comes with a Omnivision OV2680 sensor, add the node here to make complete the camera data path for this system. Add the needed regulator to the analog voltage supply, the port and endpoints in mipi_csi node and the pinctrl for the reset gpio. Signed-off-by: Rui Miguel Silva --- arch/arm/boot/dts/imx7s-warp.dts | 44 1 file changed, 44 insertions(+) diff --git a/arch/arm/boot/dts/imx7s-warp.dts b/arch/arm/boot/dts/imx7s-warp.dts index cb175ee2fc9d..bf04e13afd02 100644 --- a/arch/arm/boot/dts/imx7s-warp.dts +++ b/arch/arm/boot/dts/imx7s-warp.dts @@ -91,6 +91,14 @@ regulator-always-on; }; + reg_peri_3p15v: regulator-peri-3p15v { + compatible = "regulator-fixed"; + regulator-name = "peri_3p15v_reg"; + regulator-min-microvolt = <315>; + regulator-max-microvolt = <315>; + regulator-always-on; + }; + sound { compatible = "simple-audio-card"; simple-audio-card,name = "imx7-sgtl5000"; @@ -218,6 +226,27 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c2>; status = "okay"; + + ov2680: camera@36 { + compatible = "ovti,ov2680"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ov2680>; + reg = <0x36>; + clocks = <&osc>; + clock-names = "xvclk"; + reset-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; + DOVDD-supply = <&sw2_reg>; + DVDD-supply = <&sw2_reg>; + AVDD-supply = <®_peri_3p15v>; + + port { + ov2680_to_mipi: endpoint { + remote-endpoint = <&mipi_from_sensor>; + clock-lanes = <0>; + data-lanes = <1>; + }; + }; + }; }; &i2c4 { @@ -352,6 +381,15 @@ #size-cells = <0>; fsl,csis-hs-settle = <3>; + port@0 { + reg = <0>; + + mipi_from_sensor: endpoint { + remote-endpoint = <&ov2680_to_mipi>; + data-lanes = <1>; + }; + }; + port@1 { reg = <1>; @@ -408,6 +446,12 @@ >; }; + pinctrl_ov2680: ov2660grp { + fsl,pins = < + MX7D_PAD_LPSR_GPIO1_IO03__GPIO1_IO3 0x14 + >; + }; + pinctrl_sai1: sai1grp { fsl,pins = < MX7D_PAD_SAI1_RX_DATA__SAI1_RX_DATA00x1f -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v6 09/13] ARM: dts: imx7s: add multiplexer controls
The IOMUXC General Purpose Register has bitfield to control video bus multiplexer to control the CSI input between the MIPI-CSI2 and parallel interface. Add that register and mask. Signed-off-by: Rui Miguel Silva Reviewed-by: Philipp Zabel --- arch/arm/boot/dts/imx7s.dtsi | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7s.dtsi b/arch/arm/boot/dts/imx7s.dtsi index 5e6d2063b143..0b0b85438869 100644 --- a/arch/arm/boot/dts/imx7s.dtsi +++ b/arch/arm/boot/dts/imx7s.dtsi @@ -520,8 +520,14 @@ gpr: iomuxc-gpr@3034 { compatible = "fsl,imx7d-iomuxc-gpr", - "fsl,imx6q-iomuxc-gpr", "syscon"; + "fsl,imx6q-iomuxc-gpr", "syscon", "simple-mfd"; reg = <0x3034 0x1>; + + mux: mux-controller { + compatible = "mmio-mux"; + #mux-control-cells = <0>; + mux-reg-masks = <0x14 0x0010>; + }; }; ocotp: ocotp-ctrl@3035 { -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v6 12/13] media: imx7.rst: add documentation for i.MX7 media driver
Add rst document to describe the i.MX7 media driver and also a working example from the Warp7 board usage with a OV2680 sensor. Signed-off-by: Rui Miguel Silva --- Documentation/media/v4l-drivers/imx7.rst | 157 ++ Documentation/media/v4l-drivers/index.rst | 1 + 2 files changed, 158 insertions(+) create mode 100644 Documentation/media/v4l-drivers/imx7.rst diff --git a/Documentation/media/v4l-drivers/imx7.rst b/Documentation/media/v4l-drivers/imx7.rst new file mode 100644 index ..cd1195d391c5 --- /dev/null +++ b/Documentation/media/v4l-drivers/imx7.rst @@ -0,0 +1,157 @@ +i.MX7 Video Capture Driver +== + +Introduction + + +The i.MX7 contrary to the i.MX5/6 family does not contain an Image Processing +Unit (IPU); because of that the capabilities to perform operations or +manipulation of the capture frames are less feature rich. + +For image capture the i.MX7 has three units: +- CMOS Sensor Interface (CSI) +- Video Multiplexer +- MIPI CSI-2 Receiver + +:: + |\ + MIPI Camera Input ---> MIPI CSI-2 --- > | \ + | \ + | M | + | U | --> CSI ---> Capture + | X | + | / + Parallel Camera Input > | / + |/ + +For additional information, please refer to the latest versions of the i.MX7 +reference manual [#f1]_. + +Entities + + +imx7-mipi-csi2 +-- + +This is the MIPI CSI-2 receiver entity. It has one sink pad to receive the pixel +data from MIPI CSI-2 camera sensor. It has one source pad, corresponding to the +virtual channel 0. This module is compliant to previous version of Samsung +D-phy, and supports two D-PHY Rx Data lanes. + +csi_mux +--- + +This is the video multiplexer. It has two sink pads to select from either camera +sensor with a parallel interface or from MIPI CSI-2 virtual channel 0. It has +a single source pad that routes to the CSI. + +csi +--- + +The CSI enables the chip to connect directly to external CMOS image sensor. CSI +can interface directly with Parallel and MIPI CSI-2 buses. It has 256 x 64 FIFO +to store received image pixel data and embedded DMA controllers to transfer data +from the FIFO through AHB bus. + +This entity has one sink pad that receives from the csi_mux entity and a single +source pad that routes video frames directly to memory buffers. This pad is +routed to a capture device node. + +Usage Notes +--- + +To aid in configuration and for backward compatibility with V4L2 applications +that access controls only from video device nodes, the capture device interfaces +inherit controls from the active entities in the current pipeline, so controls +can be accessed either directly from the subdev or from the active capture +device interface. For example, the sensor controls are available either from the +sensor subdevs or from the active capture device. + +Warp7 with OV2680 +- + +On this platform an OV2680 MIPI CSI-2 module is connected to the internal MIPI +CSI-2 receiver. The following example configures a video capture pipeline with +an output of 800x600, and BGGR 10 bit bayer format: + +.. code-block:: none + # Setup links + media-ctl -l "'ov2680 1-0036':0 -> 'imx7-mipi-csis.0':0[1]" + media-ctl -l "'imx7-mipi-csis.0':1 -> 'csi_mux':1[1]" + media-ctl -l "'csi_mux':2 -> 'csi':0[1]" + media-ctl -l "'csi':1 -> 'csi capture':0[1]" + + # Configure pads for pipeline + media-ctl -V "'ov2680 1-0036':0 [fmt:SBGGR10_1X10/800x600 field:none]" + media-ctl -V "'csi_mux':1 [fmt:SBGGR10_1X10/800x600 field:none]" + media-ctl -V "'csi_mux':2 [fmt:SBGGR10_1X10/800x600 field:none]" + media-ctl -V "'imx7-mipi-csis.0':0 [fmt:SBGGR10_1X10/800x600 field:none]" + media-ctl -V "'csi':0 [fmt:SBGGR10_1X10/800x600 field:none]" + +After this streaming can start. The v4l2-ctl tool can be used to select any of +the resolutions supported by the sensor. + +.. code-block:: none +root@imx7s-warp:~# media-ctl -p +Media controller API version 4.17.0 + +Media device information + +driver imx-media +model imx-media +serial +bus info +hw revision 0x0 +driver version 4.17.0 + +Device topology +- entity 1: csi (2 pads, 2 links) + type V4L2 subdev subtype Unknown flags 0 + device node name /dev/v4l-subdev0 + pad0: Sink + [fmt:SBGGR10_1X10/800x600 field:none] + <- "csi_mux":2 [ENABLED] + pad1: Source + [fmt:SBGGR10_1X10/800x600 field:none] + -> "csi capture":0 [ENABLED] + +- entity 4: csi capture (1 pad, 1 link) + type Node subtype V4
[PATCH v6 10/13] ARM: dts: imx7: Add video mux, csi and mipi_csi and connections
This patch adds the device tree nodes for csi, video multiplexer and mipi-csi besides the graph connecting the necessary endpoints to make the media capture entities to work in imx7 Warp board. Signed-off-by: Rui Miguel Silva --- arch/arm/boot/dts/imx7s-warp.dts | 51 arch/arm/boot/dts/imx7s.dtsi | 27 + 2 files changed, 78 insertions(+) diff --git a/arch/arm/boot/dts/imx7s-warp.dts b/arch/arm/boot/dts/imx7s-warp.dts index 8a30b148534d..cb175ee2fc9d 100644 --- a/arch/arm/boot/dts/imx7s-warp.dts +++ b/arch/arm/boot/dts/imx7s-warp.dts @@ -310,6 +310,57 @@ status = "okay"; }; +&gpr { + csi_mux { + compatible = "video-mux"; + mux-controls = <&mux 0>; + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + csi_mux_from_mipi_vc0: endpoint { + remote-endpoint = <&mipi_vc0_to_csi_mux>; + }; + }; + + port@2 { + reg = <2>; + + csi_mux_to_csi: endpoint { + remote-endpoint = <&csi_from_csi_mux>; + }; + }; + }; +}; + +&csi { + status = "okay"; + + port { + csi_from_csi_mux: endpoint { + remote-endpoint = <&csi_mux_to_csi>; + }; + }; +}; + +&mipi_csi { + clock-frequency = <16600>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + fsl,csis-hs-settle = <3>; + + port@1 { + reg = <1>; + + mipi_vc0_to_csi_mux: endpoint { + remote-endpoint = <&csi_mux_from_mipi_vc0>; + }; + }; +}; + &wdog1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_wdog>; diff --git a/arch/arm/boot/dts/imx7s.dtsi b/arch/arm/boot/dts/imx7s.dtsi index 0b0b85438869..4fce2f46c766 100644 --- a/arch/arm/boot/dts/imx7s.dtsi +++ b/arch/arm/boot/dts/imx7s.dtsi @@ -46,6 +46,7 @@ #include #include #include +#include #include "imx7d-pinfunc.h" / { @@ -738,6 +739,17 @@ status = "disabled"; }; + csi: csi@3071 { + compatible = "fsl,imx7-csi"; + reg = <0x3071 0x1>; + interrupts = ; + clocks = <&clks IMX7D_CLK_DUMMY>, + <&clks IMX7D_CSI_MCLK_ROOT_CLK>, + <&clks IMX7D_CLK_DUMMY>; + clock-names = "axi", "mclk", "dcic"; + status = "disabled"; + }; + lcdif: lcdif@3073 { compatible = "fsl,imx7d-lcdif", "fsl,imx28-lcdif"; reg = <0x3073 0x1>; @@ -747,6 +759,21 @@ clock-names = "pix", "axi"; status = "disabled"; }; + + mipi_csi: mipi-csi@3075 { + compatible = "fsl,imx7-mipi-csi2"; + reg = <0x3075 0x1>; + interrupts = ; + clocks = <&clks IMX7D_IPG_ROOT_CLK>, + <&clks IMX7D_MIPI_CSI_ROOT_CLK>, + <&clks IMX7D_MIPI_DPHY_ROOT_CLK>; + clock-names = "pclk", "wrap", "phy"; + power-domains = <&pgc_mipi_phy>; + phy-supply = <®_1p0d>; + resets = <&src IMX7_RESET_MIPI_PHY_MRST>; + reset-names = "mrst"; + status = "disabled"; + }; }; aips3: aips-bus@3080 { -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v6 13/13] media: staging/imx: add i.MX7 entries to TODO file
Add some i.MX7 related entries to TODO file. Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/TODO | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/staging/media/imx/TODO b/drivers/staging/media/imx/TODO index aeeb15494a49..6f29b5ca5324 100644 --- a/drivers/staging/media/imx/TODO +++ b/drivers/staging/media/imx/TODO @@ -45,3 +45,12 @@ Which means a port must not contain mixed-use endpoints, they must all refer to media links between V4L2 subdevices. + +- i.MX7: all of the above, since it uses the imx media core + +- i.MX7: use Frame Interval Monitor + +- i.MX7: runtime testing with parallel sensor, links setup and streaming + +- i.MX7: runtime testing with different formats, for the time only 10-bit bayer + is tested -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v6 07/13] media: dt-bindings: add bindings for i.MX7 media driver
On Tue, May 22, 2018 at 03:52:39PM +0100, Rui Miguel Silva wrote: > Add bindings documentation for i.MX7 media drivers. > The imx7 MIPI CSI2 and imx7 CMOS Sensor Interface. > > Signed-off-by: Rui Miguel Silva > --- > .../devicetree/bindings/media/imx7-csi.txt| 44 ++ > .../bindings/media/imx7-mipi-csi2.txt | 82 +++ > 2 files changed, 126 insertions(+) > create mode 100644 Documentation/devicetree/bindings/media/imx7-csi.txt > create mode 100644 Documentation/devicetree/bindings/media/imx7-mipi-csi2.txt Reviewed-by: Rob Herring ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtlwifi: fix spelling mistake: "Platfoem" -> "Platform"
From: Colin Ian King Trivial fix to spelling mistake in ODM_RT_TRACE message text Signed-off-by: Colin Ian King --- drivers/staging/rtlwifi/phydm/phydm_rainfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtlwifi/phydm/phydm_rainfo.c b/drivers/staging/rtlwifi/phydm/phydm_rainfo.c index a89bc59cf63b..b46791a727c7 100644 --- a/drivers/staging/rtlwifi/phydm/phydm_rainfo.c +++ b/drivers/staging/rtlwifi/phydm/phydm_rainfo.c @@ -711,7 +711,7 @@ void phydm_update_hal_ra_mask(void *dm_void, u32 wireless_mode, u8 rf_type, phydm_BW = phydm_trans_platform_bw(dm, BW); ODM_RT_TRACE(dm, ODM_COMP_RA_MASK, -"Platfoem original RA Mask = (( 0x %x | %x ))\n", +"Platform original RA Mask = (( 0x %x | %x ))\n", ratr_bitmap_msb, ratr_bitmap); switch (wireless_mode) { -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: wilc1000: fix spelling mistake: "Preamle" -> "Preamble"
From: Colin Ian King Trivial fix to spelling mistake in netdev_err error message Signed-off-by: Colin Ian King --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index a2f82c885d63..7b613cd72d22 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -577,7 +577,7 @@ static void handle_cfg_param(struct wilc_vif *vif, struct cfg_param_attr *param) wid_list[i].size = sizeof(char); hif_drv->cfg_values.preamble_type = preamble_type; } else { - netdev_err(vif->ndev, "Preamle Range(0~2) over\n"); + netdev_err(vif->ndev, "Preamble Range(0~2) over\n"); goto unlock; } i++; -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 11/11] docs: fix broken references with multiple hints
On Wed, May 09, 2018 at 10:18:54AM -0300, Mauro Carvalho Chehab wrote: > The script: > ./scripts/documentation-file-ref-check --fix-rst > > Gives multiple hints for broken references on some files. > Manually use the one that applies for some files. > > Signed-off-by: Mauro Carvalho Chehab > --- > Documentation/ABI/obsolete/sysfs-gpio | 2 +- > .../devicetree/bindings/display/bridge/tda998x.txt| 2 +- Acked-by: Rob Herring > Documentation/trace/events.rst| 2 +- > Documentation/trace/tracepoint-analysis.rst | 2 +- > Documentation/translations/zh_CN/SubmittingDrivers| 2 +- > Documentation/translations/zh_CN/gpio.txt | 4 ++-- > MAINTAINERS | 2 +- > drivers/hid/usbhid/Kconfig| 2 +- > drivers/input/Kconfig | 4 ++-- > drivers/input/joystick/Kconfig| 4 ++-- > drivers/input/joystick/iforce/Kconfig | 2 +- > drivers/input/serio/Kconfig | 4 ++-- > drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt | 2 +- > drivers/video/fbdev/skeletonfb.c | 8 > include/linux/tracepoint.h| 2 +- > security/device_cgroup.c | 2 +- > 16 files changed, 23 insertions(+), 23 deletions(-) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next] hv_netvsc: Add handlers for ethtool get/set msg level
From: Haiyang Zhang The handlers for ethtool get/set msg level are missing from netvsc. This patch adds them. Signed-off-by: Haiyang Zhang --- drivers/net/hyperv/netvsc_drv.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index da07ccdf84bf..60a5769ef5a1 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -1618,8 +1618,24 @@ static int netvsc_set_ringparam(struct net_device *ndev, return ret; } +static u32 netvsc_get_msglevel(struct net_device *ndev) +{ + struct net_device_context *ndev_ctx = netdev_priv(ndev); + + return ndev_ctx->msg_enable; +} + +static void netvsc_set_msglevel(struct net_device *ndev, u32 val) +{ + struct net_device_context *ndev_ctx = netdev_priv(ndev); + + ndev_ctx->msg_enable = val; +} + static const struct ethtool_ops ethtool_ops = { .get_drvinfo= netvsc_get_drvinfo, + .get_msglevel = netvsc_get_msglevel, + .set_msglevel = netvsc_set_msglevel, .get_link = ethtool_op_get_link, .get_ethtool_stats = netvsc_get_ethtool_stats, .get_sset_count = netvsc_get_sset_count, -- 2.17.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH] tools: hv: lsvmbus: convert to Python3
> From: Vitaly Kuznetsov > Sent: Tuesday, May 22, 2018 01:45 > > Use '2to3' tool to make lsvmbus work with both Python2 and Python3. > > Signed-off-by: Vitaly Kuznetsov > --- > tools/hv/lsvmbus | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/tools/hv/lsvmbus b/tools/hv/lsvmbus > index 353e56768df8..c184aac33d5c 100644 > --- a/tools/hv/lsvmbus > +++ b/tools/hv/lsvmbus > @@ -17,7 +17,7 @@ if options.verbose is not None: > > vmbus_sys_path = '/sys/bus/vmbus/devices' > if not os.path.isdir(vmbus_sys_path): > - print "%s doesn't exist: exiting..." % vmbus_sys_path > + print("%s doesn't exist: exiting..." % vmbus_sys_path) > exit(-1) > > vmbus_dev_dict = { > @@ -93,11 +93,11 @@ format2 = '%2s: Class_ID = %s - %s\n\tDevice_ID > = %s\n\tSysfs path: %s\n%s' > > for d in vmbus_dev_list: > if verbose == 0: > - print ('VMBUS ID ' + format0) % (d.vmbus_id, d.dev_desc) > + print(('VMBUS ID ' + format0) % (d.vmbus_id, d.dev_desc)) > elif verbose == 1: > - print ('VMBUS ID ' + format1) % \ > - (d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping) > + print(('VMBUS ID ' + format1) % \ > + (d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping)) > else: > - print ('VMBUS ID ' + format2) % \ > + print(('VMBUS ID ' + format2) % \ > (d.vmbus_id, d.class_id, d.dev_desc, \ > - d.device_id, d.sysfs_path, d.chn_vp_mapping) > + d.device_id, d.sysfs_path, d.chn_vp_mapping)) > -- > 2.14.3 Looks good to me. Thanks! Acked-by: Dexuan Cui ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in hv_compose_msi_msg()
Commit de0aa7b2f97d ("PCI: hv: Fix 2 hang issues in hv_compose_msi_msg()") uses local_bh_disable()/enable(), because hv_pci_onchannelcallback() can also run in tasklet context as the channel event callback. With CONFIG_PROVE_LOCKING=y in the latest mainline, or old kernels that don't have commit f71b74bca637 ("irq/softirqs: Use lockdep to assert IRQs are disabled/enabled"), it turns out can we trigger a warning at the beginning of __local_bh_enable_ip(), because the upper layer irq code can call hv_compose_msi_msg() with local irqs disabled. Let's fix the warning by switching to local_irq_save()/restore(). This is not an issue because hv_pci_onchannelcallback() is not slow, and it not a hot path. Fixes: de0aa7b2f97d ("PCI: hv: Fix 2 hang issues in hv_compose_msi_msg()") Signed-off-by: Dexuan Cui Cc: Cc: Stephen Hemminger Cc: K. Y. Srinivasan --- A trimmed version of the warning is: IRQs not enabled as expected WARNING: CPU: 0 PID: 408 at kernel/softirq.c:162 __local_bh_enable_ip+0xb0/0xe0 Call Trace: hv_compose_msi_msg+0x209/0x462 [pci_hyperv] irq_chip_compose_msi_msg+0x41/0x50 msi_domain_activate+0x1a/0x40 __irq_domain_activate_irq+0x59/0x90 irq_domain_activate_irq+0x25/0x40 __setup_irq+0x3ec/0x730 request_threaded_irq+0xfa/0x1a0 mlx4_init_eq_table+0x3c3/0x5f0 [mlx4_core] mlx4_setup_hca+0x1db/0x750 [mlx4_core] mlx4_load_one+0xad2/0x13b0 [mlx4_core] mlx4_init_one+0x578/0x710 [mlx4_core] local_pci_probe+0x1e/0x50 work_for_cpu_fn+0x10/0x20 process_one_work+0x1d4/0x5a0 worker_thread+0x1cb/0x3d0 kthread+0xf5/0x130 drivers/pci/host/pci-hyperv.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c index 50cdefe..ad6a64d 100644 --- a/drivers/pci/host/pci-hyperv.c +++ b/drivers/pci/host/pci-hyperv.c @@ -1051,6 +1051,7 @@ static u32 hv_compose_msi_req_v2( */ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg) { + unsigned long flags; struct irq_cfg *cfg = irqd_cfg(data); struct hv_pcibus_device *hbus; struct hv_pci_dev *hpdev; @@ -1148,14 +1149,14 @@ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg) * the channel callback directly when channel->target_cpu is * the current CPU. When the higher level interrupt code * calls us with interrupt enabled, let's add the -* local_bh_disable()/enable() to avoid race. +* local_irq_save()/restore() to avoid race. */ - local_bh_disable(); + local_irq_save(flags); if (hbus->hdev->channel->target_cpu == smp_processor_id()) hv_pci_onchannelcallback(hbus); - local_bh_enable(); + local_irq_restore(flags); if (hpdev->state == hv_pcichild_ejecting) { dev_err_once(&hbus->hdev->device, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: greybus: fix spelling mistake: "Inavlid" -> "Invalid"
On Tue, May 22, 2018 at 2:03 PM Colin King wrote: > From: Colin Ian King > Trivial fix to spelling mistake in dev_err error message > Signed-off-by: Colin Ian King > --- > drivers/staging/greybus/audio_topology.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c > index de4b1b2b12f3..15e57f701630 100644 > --- a/drivers/staging/greybus/audio_topology.c > +++ b/drivers/staging/greybus/audio_topology.c > @@ -996,7 +996,7 @@ static int gbaudio_tplg_create_widget(struct gbaudio_module_info *module, > ret = gbaudio_validate_kcontrol_count(w); > if (ret) { > - dev_err(module->dev, "Inavlid kcontrol count=%d for %s\n", > + dev_err(module->dev, "Invalid kcontrol count=%d for %s\n", > w->ncontrols, w->name); > return ret; > } > -- > 2.17.0 Acked-by: Vaibhav Agarwal ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/6] Fix issues reported by static analysis tool.
This patch series fixes some of the issues reported by static analysis tool. Pankaj Bharadiya (6): media: staging: atomisp: remove redundent check media: staging: atomisp: Remove useless if statement media: staging: atomisp: Remove useless "ifndef ISP2401" media: staging: atomisp: Fix potential NULL pointer dereference media: staging: atomisp: Fix potential NULL pointer dereference media: staging: atomisp: Fix potential NULL pointer dereference drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 14 -- .../media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 2 -- drivers/staging/media/atomisp/pci/atomisp2/atomisp_csi2.c | 8 .../pci/atomisp2/css2400/camera/pipe/src/pipe_binarydesc.c | 3 ++- .../staging/media/atomisp/pci/atomisp2/css2400/sh_css.c| 7 +-- 5 files changed, 7 insertions(+), 27 deletions(-) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/6] media: staging: atomisp: Fix potential NULL pointer dereference
In verify_copy_out_frame_format(), "pipe" is being dereferenced before it is null checked. Fix it by moving the "pipe" pointer dereference after it has been properly null checked. Signed-off-by: Pankaj Bharadiya --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c index eb84d51..487e768 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c @@ -455,12 +455,14 @@ static enum ia_css_frame_format yuv422_copy_formats[] = { static enum ia_css_err verify_copy_out_frame_format(struct ia_css_pipe *pipe) { - enum ia_css_frame_format out_fmt = pipe->output_info[0].format; + enum ia_css_frame_format out_fmt; unsigned int i, found = 0; assert(pipe != NULL); assert(pipe->stream != NULL); + out_fmt = pipe->output_info[0].format; + switch (pipe->stream->config.input_config.format) { case ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY: case ATOMISP_INPUT_FORMAT_YUV420_8: -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/6] media: staging: atomisp: Remove useless "ifndef ISP2401"
In atomisp_csi2_set_ffmt(), there is no reason to have "#ifndef ISP2401" condition since code is identical in ifndef and else sections. Hence remove redudent checks. Signed-off-by: Pankaj Bharadiya --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_csi2.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_csi2.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_csi2.c index fa03b78..606ebdb 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_csi2.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_csi2.c @@ -90,11 +90,7 @@ int atomisp_csi2_set_ffmt(struct v4l2_subdev *sd, { struct atomisp_mipi_csi2_device *csi2 = v4l2_get_subdevdata(sd); struct v4l2_mbus_framefmt *actual_ffmt = -#ifndef ISP2401 __csi2_get_format(csi2, cfg, which, pad); -#else - __csi2_get_format(csi2, cfg, which, pad); -#endif if (pad == CSI2_PAD_SINK) { const struct atomisp_in_fmt_conv *ic; @@ -121,11 +117,7 @@ int atomisp_csi2_set_ffmt(struct v4l2_subdev *sd, /* FIXME: DPCM decompression */ *actual_ffmt = *ffmt = -#ifndef ISP2401 *__csi2_get_format(csi2, cfg, which, CSI2_PAD_SINK); -#else - *__csi2_get_format(csi2, cfg, which, CSI2_PAD_SINK); -#endif return 0; } -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/6] media: staging: atomisp: Fix potential NULL pointer dereference
In ia_css_pipe_get_primary_binarydesc(), "pipe" is being dereferenced before it is null checked. Fix it by moving the "pipe" pointer dereference after it has been properly null checked. Signed-off-by: Pankaj Bharadiya --- .../atomisp/pci/atomisp2/css2400/camera/pipe/src/pipe_binarydesc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/src/pipe_binarydesc.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/src/pipe_binarydesc.c index 98a2a3e..ca86157 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/src/pipe_binarydesc.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/src/pipe_binarydesc.c @@ -554,7 +554,7 @@ void ia_css_pipe_get_primary_binarydesc( struct ia_css_frame_info *vf_info, unsigned int stage_idx) { - enum ia_css_pipe_version pipe_version = pipe->config.isp_pipe_version; + enum ia_css_pipe_version pipe_version; int mode; unsigned int i; struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS]; @@ -567,6 +567,7 @@ void ia_css_pipe_get_primary_binarydesc( /*assert(vf_info != NULL);*/ IA_CSS_ENTER_PRIVATE(""); + pipe_version = pipe->config.isp_pipe_version; if (pipe_version == IA_CSS_PIPE_VERSION_2_6_1) mode = primary_hq_binary_modes[stage_idx]; else -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/6] media: staging: atomisp: remove redundent check
Assignment asd = &isp->asd[i] can never be null hence remove redundent check. Signed-off-by: Pankaj Bharadiya --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c index f668c68..7a9f3c9 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c @@ -4592,8 +4592,6 @@ int atomisp_css_isr_thread(struct atomisp_device *isp, * delete wdt timer. */ for (i = 0; i < isp->num_of_streams; i++) { asd = &isp->asd[i]; - if (!asd) - continue; if (asd->streaming != ATOMISP_DEVICE_STREAMING_ENABLED) continue; if (!atomisp_buffers_queued(asd)) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/6] media: staging: atomisp: Remove useless if statement
Local variable "requeue" is assigned only once to a constant "false" value so "if(requeue)" condition will never be true. Thus remove it. Signed-off-by: Pankaj Bharadiya --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c index fa6ea50..c8c4d1d 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c @@ -883,7 +883,6 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error, struct videobuf_buffer *vb = NULL; struct atomisp_video_pipe *pipe = NULL; struct atomisp_css_buffer buffer; - bool requeue = false; int err; unsigned long irqflags; struct atomisp_css_frame *frame = NULL; @@ -1223,19 +1222,6 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error, #ifdef ISP2401 atomic_set(&pipe->wdt_count, 0); #endif - /* -* Requeue should only be done for 3a and dis buffers. -* Queue/dequeue order will change if driver recycles image buffers. -*/ - if (requeue) { - err = atomisp_css_queue_buffer(asd, - stream_id, css_pipe_id, - buf_type, &buffer); - if (err) - dev_err(isp->dev, "%s, q to css fails: %d\n", - __func__, err); - return; - } if (!error && q_buffers) atomisp_qbuffers_to_css(asd); #ifdef ISP2401 -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/6] media: staging: atomisp: Fix potential NULL pointer dereference
In sh_css_config_input_network(), "stream" is being dereferenced before it is null checked. Fix it by moving the "stream" pointer dereference after it has been properly null checked. Signed-off-by: Pankaj Bharadiya --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c index c771e4b..eb84d51 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c @@ -529,11 +529,12 @@ static enum ia_css_err sh_css_config_input_network(struct ia_css_stream *stream) { unsigned int fmt_type; - struct ia_css_pipe *pipe = stream->last_pipe; + struct ia_css_pipe *pipe; struct ia_css_binary *binary = NULL; enum ia_css_err err = IA_CSS_SUCCESS; assert(stream != NULL); + pipe = stream->last_pipe; assert(pipe != NULL); ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel