From 20ea6adbf199097c4f5f591ffee088340630dae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Mon, 16 May 2022 23:40:32 +0200 Subject: bcm27xx: add support for linux v5.15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build system: x86_64 Build-tested: bcm2708, bcm2709, bcm2710, bcm2711 Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B Signed-off-by: Marty Jones Signed-off-by: Álvaro Fernández Rojas --- ...ia-irs1125-Refactoring-and-debug-messages.patch | 123 +++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 target/linux/bcm27xx/patches-5.15/950-0241-media-irs1125-Refactoring-and-debug-messages.patch (limited to 'target/linux/bcm27xx/patches-5.15/950-0241-media-irs1125-Refactoring-and-debug-messages.patch') diff --git a/target/linux/bcm27xx/patches-5.15/950-0241-media-irs1125-Refactoring-and-debug-messages.patch b/target/linux/bcm27xx/patches-5.15/950-0241-media-irs1125-Refactoring-and-debug-messages.patch new file mode 100644 index 0000000000..b657c20b9e --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/950-0241-media-irs1125-Refactoring-and-debug-messages.patch @@ -0,0 +1,123 @@ +From 49b81417f89c97f2df2ab79ce6eba61bf6c3cc32 Mon Sep 17 00:00:00 2001 +From: Markus Proeller +Date: Tue, 16 Jun 2020 13:27:42 +0200 +Subject: [PATCH] media: irs1125: Refactoring and debug messages + +Changed some variable names to comply with checkpatch --strict mode. +Debug messages added. + +Signed-off-by: Markus Proeller +--- + drivers/media/i2c/irs1125.c | 36 ++++++++++++++++++++---------------- + 1 file changed, 20 insertions(+), 16 deletions(-) + +--- a/drivers/media/i2c/irs1125.c ++++ b/drivers/media/i2c/irs1125.c +@@ -15,6 +15,7 @@ + #include "irs1125.h" + #include + #include ++#include + #include + #include + #include +@@ -22,13 +23,13 @@ + #include + #include + #include ++#include + #include +-#include ++#include + #include + #include + #include + #include +-#include + + #define CHECK_BIT(val, pos) ((val) & BIT(pos)) + +@@ -38,18 +39,19 @@ + + #define IRS1125_ALTERNATE_FW "irs1125_af.bin" + +-#define IRS1125_REG_CSICFG 0xA882 +-#define IRS1125_REG_DESIGN_STEP 0xB0AD +-#define IRS1125_REG_EFUSEVAL2 0xB09F +-#define IRS1125_REG_EFUSEVAL3 0xB0A0 +-#define IRS1125_REG_EFUSEVAL4 0xB0A1 +-#define IRS1125_REG_DMEM_SHADOW 0xC320 ++#define IRS1125_REG_SAFE_RECONFIG 0xA850 ++#define IRS1125_REG_CSICFG 0xA882 ++#define IRS1125_REG_DESIGN_STEP 0xB0AD ++#define IRS1125_REG_EFUSEVAL2 0xB09F ++#define IRS1125_REG_EFUSEVAL3 0xB0A0 ++#define IRS1125_REG_EFUSEVAL4 0xB0A1 ++#define IRS1125_REG_DMEM_SHADOW 0xC320 + +-#define IRS1125_DESIGN_STEP_EXPECTED 0x0a12 ++#define IRS1125_DESIGN_STEP_EXPECTED 0x0a12 + + #define IRS1125_ROW_START_DEF 0 + #define IRS1125_COLUMN_START_DEF 0 +-#define IRS1125_WINDOW_HEIGHT_DEF 288 ++#define IRS1125_WINDOW_HEIGHT_DEF 288 + #define IRS1125_WINDOW_WIDTH_DEF 352 + + struct regval_list { +@@ -87,7 +89,7 @@ static inline struct irs1125 *to_state(s + return container_of(sd, struct irs1125, sd); + } + +-static struct regval_list irs1125_26MHz[] = { ++static struct regval_list irs1125_26mhz[] = { + {0xB017, 0x0413}, + {0xB086, 0x3535}, + {0xB0AE, 0xEF02}, +@@ -153,7 +155,7 @@ static struct regval_list irs1125_26MHz[ + {0xFFFF, 100} + }; + +-static struct regval_list irs1125_seq_cfg[] = { ++static struct regval_list irs1125_seq_cfg_init[] = { + {0xC3A0, 0x823D}, + {0xC3A1, 0xB13B}, + {0xC3A2, 0x0313}, +@@ -243,6 +245,7 @@ static int irs1125_write(struct v4l2_sub + dev_err(&client->dev, "%s: i2c write error, reg: %x\n", + __func__, reg); + ++ dev_dbg(&client->dev, "write addr 0x%04x, val 0x%04x\n", reg, val); + return ret; + } + +@@ -364,8 +367,8 @@ static int __sensor_init(struct v4l2_sub + cnt++; + } + +- ret = irs1125_write_array(sd, irs1125_26MHz, +- ARRAY_SIZE(irs1125_26MHz)); ++ ret = irs1125_write_array(sd, irs1125_26mhz, ++ ARRAY_SIZE(irs1125_26mhz)); + if (ret < 0) { + dev_err(&client->dev, "write sensor default regs error\n"); + return ret; +@@ -415,8 +418,8 @@ static int __sensor_init(struct v4l2_sub + } + release_firmware(fw); + +- ret = irs1125_write_array(sd, irs1125_seq_cfg, +- ARRAY_SIZE(irs1125_seq_cfg)); ++ ret = irs1125_write_array(sd, irs1125_seq_cfg_init, ++ ARRAY_SIZE(irs1125_seq_cfg_init)); + if (ret < 0) { + dev_err(&client->dev, "write default sequence failed\n"); + return ret; +@@ -1037,6 +1040,7 @@ static int irs1125_probe(struct i2c_clie + } + + gpio_num = desc_to_gpio(sensor->reset); ++ dev_dbg(&client->dev, "reset on GPIO num %d\n", gpio_num); + + mutex_init(&sensor->lock); + -- cgit v1.2.3