sunxi-6.13: re-export megous patches to v6.13.5

This commit is contained in:
The-going
2025-03-08 13:14:03 +03:00
committed by Igor
parent f86ebbf8a8
commit ad9c7c9d43
33 changed files with 137 additions and 274 deletions

View File

@@ -1,4 +1,4 @@
From fc5cab2babedce153402fa7f966e1545d95f3844 Mon Sep 17 00:00:00 2001
From 044714a215847e65c49d987f13cf738313c72979 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Fri, 29 Jul 2022 01:08:29 +0200
Subject: ASoC: codec: es8316: "DAC Soft Ramp Rate" is just a 2 bit control
@@ -12,10 +12,10 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c
index 61729e5b50a8..71aad3e4c83f 100644
index f508df01145b..e7bd561a8f40 100644
--- a/sound/soc/codecs/es8316.c
+++ b/sound/soc/codecs/es8316.c
@@ -99,7 +99,7 @@ static const struct snd_kcontrol_new es8316_snd_controls[] = {
@@ -101,7 +101,7 @@ static const struct snd_kcontrol_new es8316_snd_controls[] = {
SOC_DOUBLE_R_TLV("DAC Playback Volume", ES8316_DAC_VOLL,
ES8316_DAC_VOLR, 0, 0xc0, 1, dac_vol_tlv),
SOC_SINGLE("DAC Soft Ramp Switch", ES8316_DAC_SET1, 4, 1, 1),

View File

@@ -1,4 +1,4 @@
From 2081190b693f101ee41ee4d477c3358217671f7a Mon Sep 17 00:00:00 2001
From e7474607aa3a5d318d3eb055384fc950452484a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sat, 30 Sep 2017 21:31:35 +0200
Subject: MAINTAINERS: Add entry for Himax HM5065
@@ -9,10 +9,10 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 6 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index a87ddad78e26..5392698fcb1f 100644
index 0fa7c5728f1e..1cea87000b1d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10267,6 +10267,12 @@ L: linux-kernel@vger.kernel.org
@@ -10268,6 +10268,12 @@ L: linux-kernel@vger.kernel.org
S: Maintained
F: drivers/misc/hisi_hikey_usb.c

View File

@@ -1,44 +0,0 @@
From 17c5e1ba5c6419ee4ff8bfa3f0c9452e617af548 Mon Sep 17 00:00:00 2001
From: Andre Przywara <andre.przywara@arm.com>
Date: Tue, 31 Dec 2024 16:51:03 +0000
Subject: Revert "mfd: axp20x: Allow multiple regulators"
As Chris and Vasily reported, the attempt to support multiple AXP PMICs
in one system [1] breaks some of the battery and charging functionality
on devices with AXP PMICs. The reason is that the drivers now fail to get
the correct IIO channel for the ADC component, as the current code seems
to rely on the zero-based enumeration of the regulator devices.
A fix is possible, but not trivial, as it requires some rework in the AXP
MFD driver, which cannot be fully reviewed or tested in time for the
6.13 release.
So revert this patch for now, to avoid regressions on battery powered
devices. This patch was really only necessary for devices with two
PMICs, support for which is not mainline yet anyway, so we don't lose
any functionality.
This reverts commit e37ec32188701efa01455b9be42a392adab06ce4.
[1] https://lore.kernel.org/linux-sunxi/20241007001408.27249-4-andre.przywara@arm.com/
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
drivers/mfd/axp20x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
index d41c3019123d..94fa7b7100de 100644
--- a/drivers/mfd/axp20x.c
+++ b/drivers/mfd/axp20x.c
@@ -1448,7 +1448,7 @@ int axp20x_device_probe(struct axp20x_dev *axp20x)
}
}
- ret = mfd_add_devices(axp20x->dev, PLATFORM_DEVID_AUTO, axp20x->cells,
+ ret = mfd_add_devices(axp20x->dev, PLATFORM_DEVID_NONE, axp20x->cells,
axp20x->nr_cells, NULL, 0, NULL);
if (ret) {
--
2.35.3

View File

@@ -1,4 +1,4 @@
From 0341d9e244a1945dbf6ce7e5ba4d4060ebc22f72 Mon Sep 17 00:00:00 2001
From 4d2ec3f0405e509245dcfaad426796b371af8bd3 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Tue, 7 May 2024 18:39:12 +0200
Subject: Revert "usb: typec: tcpm: unregister existing source caps before
@@ -10,10 +10,10 @@ This reverts commit 230ecdf71a644c9c73e0e6735b33173074ae3f94.
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index 6021eeb903fe..f6cc5e1ad854 100644
index 061c04efffa7..9256ec2b5065 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -3020,7 +3020,7 @@ static int tcpm_register_source_caps(struct tcpm_port *port)
@@ -3022,7 +3022,7 @@ static int tcpm_register_source_caps(struct tcpm_port *port)
{
struct usb_power_delivery_desc desc = { port->negotiated_rev };
struct usb_power_delivery_capabilities_desc caps = { };
@@ -22,7 +22,7 @@ index 6021eeb903fe..f6cc5e1ad854 100644
if (!port->partner_pd)
port->partner_pd = usb_power_delivery_register(NULL, &desc);
@@ -3030,11 +3030,6 @@ static int tcpm_register_source_caps(struct tcpm_port *port)
@@ -3032,11 +3032,6 @@ static int tcpm_register_source_caps(struct tcpm_port *port)
memcpy(caps.pdo, port->source_caps, sizeof(u32) * port->nr_source_caps);
caps.role = TYPEC_SOURCE;

View File

@@ -1,4 +1,4 @@
From 7e3b85f841535e887b0a0a2c7abdc3ac2c5173d6 Mon Sep 17 00:00:00 2001
From 9448344e45c8df22db00c14491d18728b6e43bbd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Mon, 14 Aug 2023 07:28:11 +0200
Subject: clk: sunxi-ng: sun50i-a64: Switch parent of MIPI-DSI to periph0(1x)
@@ -9,11 +9,11 @@ and HDMI output at once.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
index e6d4a0ee9bc3..872e0ffaccd9 100644
index c8cdb342b1a0..db25b63ca273 100644
--- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
+++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
@@ -962,6 +962,8 @@ static struct ccu_mux_nb sun50i_a64_cpu_nb = {
@@ -25,7 +25,7 @@ index e6d4a0ee9bc3..872e0ffaccd9 100644
static int sun50i_a64_ccu_probe(struct platform_device *pdev)
{
void __iomem *reg;
@@ -981,9 +983,15 @@ static int sun50i_a64_ccu_probe(struct platform_device *pdev)
@@ -981,9 +983,16 @@ static int sun50i_a64_ccu_probe(struct platform_device *pdev)
writel(0x10040000, reg + SUN50I_A64_PLL_AUDIO_BIAS_REG);
ret = of_property_read_u32_index(of_chosen, "p-boot,framebuffer-start", 0, &val);
@@ -33,15 +33,16 @@ index e6d4a0ee9bc3..872e0ffaccd9 100644
+ if (ret) {
writel(0x515, reg + SUN50I_A64_PLL_MIPI_REG);
+ /* Set MIPI-DSI clock parent to periph0(1x), so that video0(1x) is free to change. */
+ /* Set MIPI-DSI clock parent to periph0(1x), so that video0(1x) is free to change. */
+ val = readl(reg + CCU_MIPI_DSI_CLK);
+ val &= 0x30f;
+ val |= (2 << 8) | ((4 - 1) << 0); /* M-1 */
+ writel(val, reg + CCU_MIPI_DSI_CLK);
+ }
/* Set PLL MIPI as parent for TCON0 */
val = readl(reg + SUN50I_A64_TCON0_CLK_REG);
val &= ~GENMASK(26, 24);
+
ret = devm_sunxi_ccu_probe(&pdev->dev, reg, &sun50i_a64_ccu_desc);
if (ret)
return ret;
--
2.35.3

View File

@@ -1,4 +1,4 @@
From 073c4052183884bcc4e1a2466babd4c194337f21 Mon Sep 17 00:00:00 2001
From a36e7f8c91b01cf302dd92408438b284597f89a9 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sun, 30 Apr 2023 18:19:16 +0200
Subject: drm/sun4i: Support taking over display pipeline state from p-boot
@@ -21,7 +21,7 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
11 files changed, 167 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
index 1d93d3780fb8..e6d4a0ee9bc3 100644
index 4b3068bdfdf2..c8cdb342b1a0 100644
--- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
+++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
@@ -980,7 +980,9 @@ static int sun50i_a64_ccu_probe(struct platform_device *pdev)
@@ -33,8 +33,8 @@ index 1d93d3780fb8..e6d4a0ee9bc3 100644
+ if (ret)
+ writel(0x515, reg + SUN50I_A64_PLL_MIPI_REG);
/* Set PLL MIPI as parent for TCON0 */
val = readl(reg + SUN50I_A64_TCON0_CLK_REG);
ret = devm_sunxi_ccu_probe(&pdev->dev, reg, &sun50i_a64_ccu_desc);
if (ret)
diff --git a/drivers/gpu/drm/drm_fbdev_ttm.c b/drivers/gpu/drm/drm_fbdev_ttm.c
index 73d35d59590c..f9d71d285e2f 100644
--- a/drivers/gpu/drm/drm_fbdev_ttm.c

View File

@@ -1,4 +1,4 @@
From 7931f239ed1813bb0f7610c4ac40ae2e3c7527ce Mon Sep 17 00:00:00 2001
From 5acf5ae365cfe14d18cf23915202d52ff7c3c30c Mon Sep 17 00:00:00 2001
From: Adam Pigg <adam@piggz.co.uk>
Date: Thu, 29 Dec 2022 11:10:41 +0000
Subject: media: ov5640: Add read-only property for vblank
@@ -8,10 +8,10 @@ Subject: media: ov5640: Add read-only property for vblank
1 file changed, 1 insertion(+)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 2023ee5182c8..5a911046966e 100644
index 07e5af3073ec..5d69b74a5cd7 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -3845,6 +3845,7 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
@@ -3846,6 +3846,7 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
ctrls->pixel_rate->flags |= V4L2_CTRL_FLAG_READ_ONLY;
ctrls->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
ctrls->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;

View File

@@ -1,4 +1,4 @@
From 427242f49a50599dc8dac59444a602b9548529b0 Mon Sep 17 00:00:00 2001
From 1ee2a5a89a89e1b8508b031f6461151ae84f2007 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Wed, 8 Nov 2023 19:13:37 +0100
Subject: media: ov5640: Don't powerup the sensor during driver probe
@@ -13,10 +13,10 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 12 insertions(+), 43 deletions(-)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 8eadb1e1d473..f9108b6120b6 100644
index 78a24f58888c..0e98ed8b3e08 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -2496,6 +2496,7 @@ static void ov5640_powerup_sequence(struct ov5640_dev *sensor)
@@ -2497,6 +2497,7 @@ static void ov5640_powerup_sequence(struct ov5640_dev *sensor)
static int ov5640_set_power_on(struct ov5640_dev *sensor)
{
struct i2c_client *client = sensor->i2c_client;
@@ -24,7 +24,7 @@ index 8eadb1e1d473..f9108b6120b6 100644
int ret;
ret = clk_prepare_enable(sensor->xclk);
@@ -2519,6 +2520,13 @@ static int ov5640_set_power_on(struct ov5640_dev *sensor)
@@ -2520,6 +2521,13 @@ static int ov5640_set_power_on(struct ov5640_dev *sensor)
if (ret)
goto power_off;
@@ -38,7 +38,7 @@ index 8eadb1e1d473..f9108b6120b6 100644
return 0;
power_off:
@@ -3840,28 +3848,6 @@ static int ov5640_get_regulators(struct ov5640_dev *sensor)
@@ -3841,28 +3849,6 @@ static int ov5640_get_regulators(struct ov5640_dev *sensor)
sensor->supplies);
}
@@ -67,7 +67,7 @@ index 8eadb1e1d473..f9108b6120b6 100644
static int ov5640_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
@@ -3962,35 +3948,16 @@ static int ov5640_probe(struct i2c_client *client)
@@ -3963,35 +3949,16 @@ static int ov5640_probe(struct i2c_client *client)
if (ret)
goto entity_cleanup;
@@ -105,7 +105,7 @@ index 8eadb1e1d473..f9108b6120b6 100644
free_ctrls:
v4l2_ctrl_handler_free(&sensor->ctrls.handler);
entity_cleanup:
@@ -4005,6 +3972,8 @@ static void ov5640_remove(struct i2c_client *client)
@@ -4006,6 +3973,8 @@ static void ov5640_remove(struct i2c_client *client)
struct ov5640_dev *sensor = to_ov5640_dev(sd);
struct device *dev = &client->dev;

View File

@@ -1,4 +1,4 @@
From c6bc30dbce7b62ee17396ae24838ac657ad498fa Mon Sep 17 00:00:00 2001
From d44ded909dabf527ed7ae35dcb40112b75f022b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Fri, 24 Jan 2020 18:25:59 +0100
Subject: media: ov5640: [Experiment] Try to disable denoising/sharpening
@@ -11,10 +11,10 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 17 insertions(+)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index da5cb5f45a4f..c8903405c2b8 100644
index 0dae0438aa80..e408946782c6 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -2326,6 +2326,7 @@ static int ov5640_set_mode(struct ov5640_dev *sensor)
@@ -2327,6 +2327,7 @@ static int ov5640_set_mode(struct ov5640_dev *sensor)
bool auto_gain = sensor->ctrls.auto_gain->val == 1;
bool auto_exp = sensor->ctrls.auto_exp->val == V4L2_EXPOSURE_AUTO;
int ret;
@@ -22,7 +22,7 @@ index da5cb5f45a4f..c8903405c2b8 100644
dn_mode = mode->dn_mode;
orig_dn_mode = orig_mode->dn_mode;
@@ -2389,6 +2390,22 @@ static int ov5640_set_mode(struct ov5640_dev *sensor)
@@ -2390,6 +2391,22 @@ static int ov5640_set_mode(struct ov5640_dev *sensor)
if (ret < 0)
return ret;

View File

@@ -1,4 +1,4 @@
From ba26d7d001d6697390f1ce6b09104297abffac3c Mon Sep 17 00:00:00 2001
From a050f7c1c333f9c28393cdf4e1080c22c3ada56e Mon Sep 17 00:00:00 2001
From: Benjamin Schaaf <ben.schaaf@gmail.com>
Date: Mon, 22 Nov 2021 23:38:26 +1100
Subject: media: ov5640: Fix focus commands blocking until complete
@@ -10,10 +10,10 @@ completed the focus routine.
1 file changed, 18 insertions(+), 49 deletions(-)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index ff6460fe0073..2023ee5182c8 100644
index 93cfd1b51713..07e5af3073ec 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -2642,6 +2642,19 @@ static int ov5640_copy_fw_to_device(struct ov5640_dev *sensor,
@@ -2643,6 +2643,19 @@ static int ov5640_copy_fw_to_device(struct ov5640_dev *sensor,
return -ETIMEDOUT;
}
@@ -33,7 +33,7 @@ index ff6460fe0073..2023ee5182c8 100644
static int ov5640_af_init(struct ov5640_dev *sensor)
{
struct i2c_client *client = sensor->i2c_client;
@@ -2679,6 +2692,11 @@ static int ov5640_af_init(struct ov5640_dev *sensor)
@@ -2680,6 +2693,11 @@ static int ov5640_af_init(struct ov5640_dev *sensor)
// Set lens focus driver on
ret = ov5640_write_reg(sensor, OV5640_REG_VCM_CONTROL4, 0x3f);
@@ -45,7 +45,7 @@ index ff6460fe0073..2023ee5182c8 100644
if (ret)
return ret;
return ret;
@@ -3303,35 +3321,6 @@ static int ov5640_set_framefmt(struct ov5640_dev *sensor,
@@ -3304,35 +3322,6 @@ static int ov5640_set_framefmt(struct ov5640_dev *sensor,
is_jpeg ? (BIT(5) | BIT(3)) : 0);
}
@@ -81,7 +81,7 @@ index ff6460fe0073..2023ee5182c8 100644
/*
* Sensor Controls.
*/
@@ -3467,26 +3456,6 @@ static int ov5640_set_ctrl_focus(struct ov5640_dev *sensor, int command)
@@ -3468,26 +3457,6 @@ static int ov5640_set_ctrl_focus(struct ov5640_dev *sensor, int command)
return 0;
}

View File

@@ -1,4 +1,4 @@
From 0d98f8dc0d2a403a09032c2d370c1b239d172a50 Mon Sep 17 00:00:00 2001
From dc064874edcabbaa351272379f0b0cfa8b97b495 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sun, 7 Aug 2022 15:17:09 +0200
Subject: media: ov5640: Implement autofocus
@@ -15,7 +15,7 @@ Signed-off-by: Martijn Braam <martijn@brixit.nl>
1 file changed, 279 insertions(+)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index ec0916b89532..48ebb685347b 100644
index 0ff3a2c51d4d..83206c5b649a 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -9,6 +9,7 @@
@@ -87,7 +87,7 @@ index ec0916b89532..48ebb685347b 100644
};
static inline struct ov5640_dev *to_ov5640_dev(struct v4l2_subdev *sd)
@@ -2493,6 +2534,118 @@ static void ov5640_powerup_sequence(struct ov5640_dev *sensor)
@@ -2494,6 +2535,118 @@ static void ov5640_powerup_sequence(struct ov5640_dev *sensor)
OV5640_REG_SYS_CTRL0_SW_PWDN);
}
@@ -206,7 +206,7 @@ index ec0916b89532..48ebb685347b 100644
static int ov5640_set_power_on(struct ov5640_dev *sensor)
{
struct i2c_client *client = sensor->i2c_client;
@@ -2514,8 +2667,11 @@ static int ov5640_set_power_on(struct ov5640_dev *sensor)
@@ -2515,8 +2668,11 @@ static int ov5640_set_power_on(struct ov5640_dev *sensor)
goto xclk_off;
}
@@ -218,7 +218,7 @@ index ec0916b89532..48ebb685347b 100644
ret = ov5640_init_slave_id(sensor);
if (ret)
goto power_off;
@@ -3109,6 +3265,35 @@ static int ov5640_set_framefmt(struct ov5640_dev *sensor,
@@ -3110,6 +3266,35 @@ static int ov5640_set_framefmt(struct ov5640_dev *sensor,
is_jpeg ? (BIT(5) | BIT(3)) : 0);
}
@@ -254,7 +254,7 @@ index ec0916b89532..48ebb685347b 100644
/*
* Sensor Controls.
*/
@@ -3225,6 +3410,41 @@ static int ov5640_set_ctrl_exposure(struct ov5640_dev *sensor,
@@ -3226,6 +3411,41 @@ static int ov5640_set_ctrl_exposure(struct ov5640_dev *sensor,
return ret;
}
@@ -296,7 +296,7 @@ index ec0916b89532..48ebb685347b 100644
static int ov5640_set_ctrl_gain(struct ov5640_dev *sensor, bool auto_gain)
{
struct ov5640_ctrls *ctrls = &sensor->ctrls;
@@ -3340,6 +3560,32 @@ static int ov5640_set_ctrl_vblank(struct ov5640_dev *sensor, int value)
@@ -3341,6 +3561,32 @@ static int ov5640_set_ctrl_vblank(struct ov5640_dev *sensor, int value)
mode->height + value);
}
@@ -329,7 +329,7 @@ index ec0916b89532..48ebb685347b 100644
static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
{
struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
@@ -3364,6 +3610,12 @@ static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
@@ -3365,6 +3611,12 @@ static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
return val;
sensor->ctrls.exposure->val = val;
break;
@@ -342,7 +342,7 @@ index ec0916b89532..48ebb685347b 100644
}
pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
@@ -3413,6 +3665,18 @@ static int ov5640_s_ctrl(struct v4l2_ctrl *ctrl)
@@ -3414,6 +3666,18 @@ static int ov5640_s_ctrl(struct v4l2_ctrl *ctrl)
case V4L2_CID_AUTO_WHITE_BALANCE:
ret = ov5640_set_ctrl_white_balance(sensor, ctrl->val);
break;
@@ -361,7 +361,7 @@ index ec0916b89532..48ebb685347b 100644
case V4L2_CID_HUE:
ret = ov5640_set_ctrl_hue(sensor, ctrl->val);
break;
@@ -3513,6 +3777,20 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
@@ -3514,6 +3778,20 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
ctrls->gain = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_ANALOGUE_GAIN,
0, 1023, 1, 0);
@@ -382,7 +382,7 @@ index ec0916b89532..48ebb685347b 100644
ctrls->saturation = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_SATURATION,
0, 255, 1, 64);
ctrls->hue = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_HUE,
@@ -3559,6 +3837,7 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
@@ -3560,6 +3838,7 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
v4l2_ctrl_auto_cluster(3, &ctrls->auto_wb, 0, false);
v4l2_ctrl_auto_cluster(2, &ctrls->auto_gain, 0, true);
v4l2_ctrl_auto_cluster(2, &ctrls->auto_exp, 1, true);

View File

@@ -1,4 +1,4 @@
From 348710df10872e0d10ac18db7b51d724d9e317bb Mon Sep 17 00:00:00 2001
From c0bb980bb44c95e7f5f4d26ab3b23f7538af9e73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Fri, 22 Oct 2021 19:52:49 +0200
Subject: media: ov5640: Improve error reporting
@@ -11,10 +11,10 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 8dc83519b628..ec0916b89532 100644
index 4e0803484fd4..0ff3a2c51d4d 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -3939,8 +3939,10 @@ static int ov5640_probe(struct i2c_client *client)
@@ -3940,8 +3940,10 @@ static int ov5640_probe(struct i2c_client *client)
return ret;
ret = ov5640_get_regulators(sensor);
@@ -26,7 +26,7 @@ index 8dc83519b628..ec0916b89532 100644
mutex_init(&sensor->lock);
@@ -3949,8 +3951,10 @@ static int ov5640_probe(struct i2c_client *client)
@@ -3950,8 +3952,10 @@ static int ov5640_probe(struct i2c_client *client)
goto entity_cleanup;
ret = v4l2_async_register_subdev_sensor(&sensor->sd);

View File

@@ -1,4 +1,4 @@
From 0957b5dcbbd5523d029b6200578697d81a080142 Mon Sep 17 00:00:00 2001
From 948e61d752445d5f10adbdefa3d223c57c450493 Mon Sep 17 00:00:00 2001
From: Benjamin Schaaf <ben.schaaf@gmail.com>
Date: Mon, 22 Nov 2021 23:38:26 +1100
Subject: media: ov5640: Improve firmware load time
@@ -13,7 +13,7 @@ don't bother trying.
1 file changed, 71 insertions(+), 26 deletions(-)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 48ebb685347b..ff6460fe0073 100644
index 83206c5b649a..93cfd1b51713 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -1232,6 +1232,8 @@ static int ov5640_write_reg(struct ov5640_dev *sensor, u16 reg, u8 val)
@@ -68,7 +68,7 @@ index 48ebb685347b..ff6460fe0073 100644
static int ov5640_read_reg(struct ov5640_dev *sensor, u16 reg, u8 *val)
{
struct i2c_client *client = sensor->i2c_client;
@@ -2542,6 +2580,7 @@ static int ov5640_copy_fw_to_device(struct ov5640_dev *sensor,
@@ -2543,6 +2581,7 @@ static int ov5640_copy_fw_to_device(struct ov5640_dev *sensor,
u8 fw_status;
int i;
int ret;
@@ -76,7 +76,7 @@ index 48ebb685347b..ff6460fe0073 100644
// Putting MCU in reset state
ret = ov5640_write_reg(sensor, OV5640_REG_SYS_RESET00, 0x20);
@@ -2549,10 +2588,24 @@ static int ov5640_copy_fw_to_device(struct ov5640_dev *sensor,
@@ -2550,10 +2589,24 @@ static int ov5640_copy_fw_to_device(struct ov5640_dev *sensor,
return ret;
// Write firmware
@@ -105,7 +105,7 @@ index 48ebb685347b..ff6460fe0073 100644
// Reset MCU state
ov5640_write_reg(sensor, OV5640_REG_FW_CMD_MAIN, 0x00);
@@ -2574,31 +2627,17 @@ static int ov5640_copy_fw_to_device(struct ov5640_dev *sensor,
@@ -2575,31 +2628,17 @@ static int ov5640_copy_fw_to_device(struct ov5640_dev *sensor,
// Wait for firmware to be ready
for (i = 0; i < 5; i++) {
ret = ov5640_read_reg(sensor, OV5640_REG_FW_STATUS, &fw_status);
@@ -142,7 +142,7 @@ index 48ebb685347b..ff6460fe0073 100644
dev_err(&client->dev, "uploaded firmware didn't start, got to 0x%x\n", fw_status);
return -ETIMEDOUT;
}
@@ -2639,10 +2678,9 @@ static int ov5640_af_init(struct ov5640_dev *sensor)
@@ -2640,10 +2679,9 @@ static int ov5640_af_init(struct ov5640_dev *sensor)
return ret;
// Set lens focus driver on
@@ -154,7 +154,7 @@ index 48ebb685347b..ff6460fe0073 100644
return ret;
}
@@ -3415,9 +3453,16 @@ static int ov5640_set_ctrl_focus(struct ov5640_dev *sensor, int command)
@@ -3416,9 +3454,16 @@ static int ov5640_set_ctrl_focus(struct ov5640_dev *sensor, int command)
struct i2c_client *client = sensor->i2c_client;
int ret;

View File

@@ -1,4 +1,4 @@
From def35559e0761f3fe451c4413558cbd14ff77e6f Mon Sep 17 00:00:00 2001
From 38da3d7ddfd827af9f04f2b627df06911ce58c46 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sun, 26 Jan 2020 00:19:40 +0100
Subject: media: ov5640: Sleep after poweroff to ensure next poweron is not too
@@ -13,10 +13,10 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 1 insertion(+)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index c8903405c2b8..8eadb1e1d473 100644
index e408946782c6..78a24f58888c 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -2534,6 +2534,7 @@ static void ov5640_set_power_off(struct ov5640_dev *sensor)
@@ -2535,6 +2535,7 @@ static void ov5640_set_power_off(struct ov5640_dev *sensor)
ov5640_power(sensor, false);
regulator_bulk_disable(OV5640_NUM_SUPPLIES, sensor->supplies);
clk_disable_unprepare(sensor->xclk);

View File

@@ -1,4 +1,4 @@
From 478deba0fd49cecb8d15f496c80971723a1cbd12 Mon Sep 17 00:00:00 2001
From ce38811011977a3d0da34606509ec9f6d5d221b0 Mon Sep 17 00:00:00 2001
From: Martijn Braam <martijn@brixit.nl>
Date: Wed, 7 Oct 2020 17:33:43 +0200
Subject: media: ov5640: set default ae target lower
@@ -10,10 +10,10 @@ the exposure target one stop lower.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index f9108b6120b6..8dc83519b628 100644
index 0e98ed8b3e08..4e0803484fd4 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -3874,7 +3874,7 @@ static int ov5640_probe(struct i2c_client *client)
@@ -3875,7 +3875,7 @@ static int ov5640_probe(struct i2c_client *client)
sensor->current_link_freq =
ov5640_csi2_link_freqs[OV5640_DEFAULT_LINK_FREQ];

View File

@@ -1,4 +1,4 @@
From 0ea5da0ffbd0ce602bdfaf1121d948979b307fa3 Mon Sep 17 00:00:00 2001
From 737a083d438dfa74f27cad786eb77c1e25566ec1 Mon Sep 17 00:00:00 2001
From: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Date: Mon, 14 Aug 2023 13:25:07 +0300
Subject: media: ov5640: use pm_runtime_force_suspend/resume for system suspend
@@ -14,10 +14,10 @@ Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
1 file changed, 2 insertions(+)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 5a911046966e..9e52ba82ccb4 100644
index 5d69b74a5cd7..50177b44ed61 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -4284,6 +4284,8 @@ static void ov5640_remove(struct i2c_client *client)
@@ -4285,6 +4285,8 @@ static void ov5640_remove(struct i2c_client *client)
}
static const struct dev_pm_ops ov5640_pm_ops = {

View File

@@ -1,4 +1,4 @@
From e6236f10b291e249f8cc99ac1e961b9abafe1530 Mon Sep 17 00:00:00 2001
From 4cdc529c4b84f113014375434f636c4da25d70e8 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 29 Oct 2022 23:16:51 +0200
Subject: opp: core: Avoid confusing error when no regulator is defined in DT
@@ -11,10 +11,10 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 5 insertions(+)
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index 0311b18319a4..d756f4474b6b 100644
index 47b1068bb989..47beddce751e 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -2185,6 +2185,11 @@ static int _opp_set_regulators(struct opp_table *opp_table, struct device *dev,
@@ -2208,6 +2208,11 @@ static int _opp_set_regulators(struct opp_table *opp_table, struct device *dev,
for (i = 0; i < count; i++) {
reg = regulator_get_optional(dev, names[i]);
if (IS_ERR(reg)) {

View File

@@ -1,4 +1,4 @@
From e9a548e7661893d5657f27295eb45534b5fadfda Mon Sep 17 00:00:00 2001
From 6ebb9493d31d171bcaca3daf655f2eefbb18b4ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Thu, 27 Feb 2020 00:53:17 +0100
Subject: power: axp20x_battery: Allow to set target voltage to 4.35V
@@ -11,10 +11,10 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 5 insertions(+)
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index fa27195f074e..3856525e37c6 100644
index 3c3158f31a48..96d2856ef318 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -630,6 +630,11 @@ static int axp20x_battery_set_max_voltage(struct axp20x_batt_ps *axp20x_batt,
@@ -629,6 +629,11 @@ static int axp20x_battery_set_max_voltage(struct axp20x_batt_ps *axp20x_batt,
val = AXP20X_CHRG_CTRL1_TGT_4_2V;
break;

View File

@@ -1,4 +1,4 @@
From 89258274ef8778a4f49a4bdb1db8437740ff96f9 Mon Sep 17 00:00:00 2001
From 142d8cb607e9bd51a29f08fd23a202265087836e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sun, 14 Mar 2021 15:49:34 +0100
Subject: power: axp803: Add interrupts for low battery power condition
@@ -26,10 +26,10 @@ index 48140483e7f5..b8c889b99f59 100644
static const struct resource axp803_pek_resources[] = {
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index 450e4f7d54c9..142033b2b05b 100644
index 3a5f77219d83..988741b7d3be 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -1099,6 +1099,8 @@ static const struct axp_irq_data axp813_irqs[] = {
@@ -1098,6 +1098,8 @@ static const struct axp_irq_data axp813_irqs[] = {
{ "BATT_HEALTH_GOOD", axp20x_battery_changed_irq },
{ "BATT_CHARGING", axp20x_battery_changed_irq },
{ "BATT_CHARGING_DONE", axp20x_battery_changed_irq },

View File

@@ -1,4 +1,4 @@
From 8daff81a04452108c67ae7a0214bc77cc1a19497 Mon Sep 17 00:00:00 2001
From 14bbc4a0e42ee819c43d4ea63cf8c829e2d45bdf Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Thu, 10 Nov 2022 20:05:58 +0100
Subject: power: supply: axp20x-battery: Add support for
@@ -12,7 +12,7 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index 1cd56e4c1239..6320ea1a71c1 100644
index ba7c45e4bf10..9b4b1b8d09b1 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -127,6 +127,7 @@ struct axp20x_batt_ps {
@@ -40,7 +40,7 @@ index 1cd56e4c1239..6320ea1a71c1 100644
default:
return -EINVAL;
}
@@ -915,6 +926,8 @@ static enum power_supply_property axp20x_battery_props[] = {
@@ -914,6 +925,8 @@ static enum power_supply_property axp20x_battery_props[] = {
POWER_SUPPLY_PROP_VOLTAGE_MIN,
POWER_SUPPLY_PROP_VOLTAGE_OCV,
POWER_SUPPLY_PROP_CAPACITY,
@@ -49,7 +49,7 @@ index 1cd56e4c1239..6320ea1a71c1 100644
};
static enum power_supply_property axp717_battery_props[] = {
@@ -1214,12 +1227,18 @@ static const struct of_device_id axp20x_battery_ps_id[] = {
@@ -1213,12 +1226,18 @@ static const struct of_device_id axp20x_battery_ps_id[] = {
};
MODULE_DEVICE_TABLE(of, axp20x_battery_ps_id);
@@ -69,7 +69,7 @@ index 1cd56e4c1239..6320ea1a71c1 100644
struct device *dev = &pdev->dev;
const struct axp_irq_data *irq_data;
int irq, ret;
@@ -1257,9 +1276,12 @@ static int axp20x_power_probe(struct platform_device *pdev)
@@ -1256,9 +1275,12 @@ static int axp20x_power_probe(struct platform_device *pdev)
axp20x_batt->health = POWER_SUPPLY_HEALTH_GOOD;

View File

@@ -1,4 +1,4 @@
From 3ae6b8271533d3cbc42e9f236518c0aa2c583265 Mon Sep 17 00:00:00 2001
From 1eb3100eefd70abe087e6f2982c363b5df9d93bd Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 27 Aug 2022 20:50:43 +0200
Subject: power: supply: axp20x-battery: Enable poweron by RTC alarm
@@ -15,10 +15,10 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 5 insertions(+)
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index abdc406a3f46..1cd56e4c1239 100644
index 1899af1810fd..ba7c45e4bf10 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -1334,6 +1334,11 @@ static int axp20x_power_probe(struct platform_device *pdev)
@@ -1333,6 +1333,11 @@ static int axp20x_power_probe(struct platform_device *pdev)
ret = regmap_update_bits(axp20x_batt->regmap, 0x84, 0x37, 0x31);
if (ret)
goto warn_bat;

View File

@@ -1,4 +1,4 @@
From 8daabf538f39a9cb97d185bc6b03daf8cf353924 Mon Sep 17 00:00:00 2001
From 5b41f35dcb19693f4a1ddb32eba19067dab6c919 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Tue, 7 Jan 2025 18:53:23 +0100
Subject: power: supply: axp20x-battery: Improve probe error reporting
@@ -11,10 +11,10 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index 6320ea1a71c1..9719c4067c00 100644
index 9b4b1b8d09b1..bab9b4a8f623 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -1263,16 +1263,15 @@ static int axp20x_power_probe(struct platform_device *pdev)
@@ -1262,16 +1262,15 @@ static int axp20x_power_probe(struct platform_device *pdev)
ret = axp20x_batt->data->cfg_iio_chan(pdev, axp20x_batt);
if (ret)
@@ -36,7 +36,7 @@ index 6320ea1a71c1..9719c4067c00 100644
axp20x_batt->health = POWER_SUPPLY_HEALTH_GOOD;
@@ -1287,20 +1286,17 @@ static int axp20x_power_probe(struct platform_device *pdev)
@@ -1286,20 +1285,17 @@ static int axp20x_power_probe(struct platform_device *pdev)
/* Request irqs after registering, as irqs may trigger immediately */
for (irq_data = axp20x_batt->data->irqs; irq_data->name; irq_data++) {
irq = platform_get_irq_byname(pdev, irq_data->name);

View File

@@ -1,4 +1,4 @@
From a253a91d2292f4eab51054c7576cfc32f5bd6b20 Mon Sep 17 00:00:00 2001
From 71e2271c26b831e4aba7a4ff0c3069efb6630dec Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 2 Apr 2022 02:50:14 +0200
Subject: power: supply: axp20x-battery: Support
@@ -12,7 +12,7 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 31 insertions(+)
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index 142033b2b05b..abdc406a3f46 100644
index 988741b7d3be..1899af1810fd 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -317,6 +317,19 @@ static int axp20x_battery_get_prop(struct power_supply *psy,
@@ -35,7 +35,7 @@ index 142033b2b05b..abdc406a3f46 100644
case POWER_SUPPLY_PROP_STATUS:
ret = regmap_read(axp20x_batt->regmap, AXP20X_PWR_OP_MODE,
&reg);
@@ -820,6 +833,21 @@ static int axp20x_battery_set_prop(struct power_supply *psy,
@@ -819,6 +832,21 @@ static int axp20x_battery_set_prop(struct power_supply *psy,
case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX:
return axp20x_set_max_constant_charge_current(axp20x_batt,
val->intval);
@@ -57,7 +57,7 @@ index 142033b2b05b..abdc406a3f46 100644
case POWER_SUPPLY_PROP_STATUS:
switch (val->intval) {
case POWER_SUPPLY_STATUS_CHARGING:
@@ -877,6 +905,7 @@ static enum power_supply_property axp20x_battery_props[] = {
@@ -876,6 +904,7 @@ static enum power_supply_property axp20x_battery_props[] = {
POWER_SUPPLY_PROP_PRESENT,
POWER_SUPPLY_PROP_ONLINE,
POWER_SUPPLY_PROP_STATUS,
@@ -65,7 +65,7 @@ index 142033b2b05b..abdc406a3f46 100644
POWER_SUPPLY_PROP_VOLTAGE_NOW,
POWER_SUPPLY_PROP_CURRENT_NOW,
POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT,
@@ -908,6 +937,7 @@ static int axp20x_battery_prop_writeable(struct power_supply *psy,
@@ -907,6 +936,7 @@ static int axp20x_battery_prop_writeable(struct power_supply *psy,
return psp == POWER_SUPPLY_PROP_STATUS ||
psp == POWER_SUPPLY_PROP_VOLTAGE_MIN ||
psp == POWER_SUPPLY_PROP_VOLTAGE_MAX ||
@@ -73,7 +73,7 @@ index 142033b2b05b..abdc406a3f46 100644
psp == POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT ||
psp == POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX;
}
@@ -929,6 +959,7 @@ static const struct power_supply_desc axp209_batt_ps_desc = {
@@ -928,6 +958,7 @@ static const struct power_supply_desc axp209_batt_ps_desc = {
.property_is_writeable = axp20x_battery_prop_writeable,
.get_property = axp20x_battery_get_prop,
.set_property = axp20x_battery_set_prop,

View File

@@ -1,4 +1,4 @@
From 0b1aa2c6d6f464985990970eb1fd0286db27412f Mon Sep 17 00:00:00 2001
From a6cbe862d0e742e29605be48bea219d22fa20ce8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Fri, 28 Feb 2020 19:16:46 +0100
Subject: power: supply: axp20x_battery: Add support for reporting OCV
@@ -11,7 +11,7 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 23 insertions(+)
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index 3856525e37c6..11b59a733b8d 100644
index 96d2856ef318..f19ab493245b 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -270,6 +270,25 @@ static int axp717_get_constant_charge_current(struct axp20x_batt_ps *axp,
@@ -50,7 +50,7 @@ index 3856525e37c6..11b59a733b8d 100644
case POWER_SUPPLY_PROP_CAPACITY:
/* When no battery is present, return capacity is 100% */
ret = regmap_read(axp20x_batt->regmap, AXP20X_PWR_OP_MODE,
@@ -852,6 +874,7 @@ static enum power_supply_property axp20x_battery_props[] = {
@@ -851,6 +873,7 @@ static enum power_supply_property axp20x_battery_props[] = {
POWER_SUPPLY_PROP_HEALTH,
POWER_SUPPLY_PROP_VOLTAGE_MAX,
POWER_SUPPLY_PROP_VOLTAGE_MIN,

View File

@@ -1,4 +1,4 @@
From 14ae1f69f9bf60a8da7333bac23291947bf35c0a Mon Sep 17 00:00:00 2001
From e8161a0e34e34a659060640fb34fd8017943073d Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 29 Feb 2020 01:04:33 -0600
Subject: power: supply: axp20x_battery: Monitor battery health
@@ -9,7 +9,7 @@ Signed-off-by: Samuel Holland <samuel@sholland.org>
1 file changed, 56 insertions(+), 2 deletions(-)
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index 67c6f351670e..450e4f7d54c9 100644
index 1c4d5f2eac62..3a5f77219d83 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -123,6 +123,7 @@ struct axp20x_batt_ps {
@@ -29,7 +29,7 @@ index 67c6f351670e..450e4f7d54c9 100644
break;
case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT:
@@ -1048,6 +1049,39 @@ static irqreturn_t axp20x_battery_changed_irq(int irq, void *devid)
@@ -1047,6 +1048,39 @@ static irqreturn_t axp20x_battery_changed_irq(int irq, void *devid)
return IRQ_HANDLED;
}
@@ -69,7 +69,7 @@ index 67c6f351670e..450e4f7d54c9 100644
static const struct axp_irq_data axp20x_irqs[] = {
{ "BATT_PLUGIN", axp20x_battery_changed_irq },
{ "BATT_REMOVAL", axp20x_battery_changed_irq },
@@ -1058,6 +1092,24 @@ static const struct axp_irq_data axp20x_irqs[] = {
@@ -1057,6 +1091,24 @@ static const struct axp_irq_data axp20x_irqs[] = {
{}
};
@@ -94,7 +94,7 @@ index 67c6f351670e..450e4f7d54c9 100644
static const struct axp_data axp209_data = {
.ccc_scale = 100000,
.ccc_offset = 300000,
@@ -1109,7 +1161,7 @@ static const struct axp_data axp813_data = {
@@ -1108,7 +1160,7 @@ static const struct axp_data axp813_data = {
.set_max_voltage = axp20x_battery_set_max_voltage,
.cfg_iio_chan = axp209_bat_cfg_iio_channels,
.set_bat_info = axp209_set_battery_info,
@@ -103,7 +103,7 @@ index 67c6f351670e..450e4f7d54c9 100644
};
static const struct of_device_id axp20x_battery_ps_id[] = {
@@ -1170,6 +1222,8 @@ static int axp20x_power_probe(struct platform_device *pdev)
@@ -1169,6 +1221,8 @@ static int axp20x_power_probe(struct platform_device *pdev)
return PTR_ERR(axp20x_batt->batt);
}

View File

@@ -1,4 +1,4 @@
From 6c0c01e6adc800ed28d4a1ef655871e0e5e11e76 Mon Sep 17 00:00:00 2001
From cc10c789c1f77bc0a1593e6d7b3bd23c9de567cf Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 29 Feb 2020 01:04:17 -0600
Subject: power: supply: axp20x_battery: Send uevents for status changes
@@ -9,7 +9,7 @@ Signed-off-by: Samuel Holland <samuel@sholland.org>
1 file changed, 54 insertions(+), 2 deletions(-)
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index 8c69e7dc55c9..67c6f351670e 100644
index 74a5d53d7cf2..1c4d5f2eac62 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -90,8 +90,15 @@
@@ -36,7 +36,7 @@ index 8c69e7dc55c9..67c6f351670e 100644
};
struct axp20x_batt_ps {
@@ -1031,6 +1039,25 @@ static void axp717_set_battery_info(struct platform_device *pdev,
@@ -1030,6 +1038,25 @@ static void axp717_set_battery_info(struct platform_device *pdev,
}
}
@@ -62,7 +62,7 @@ index 8c69e7dc55c9..67c6f351670e 100644
static const struct axp_data axp209_data = {
.ccc_scale = 100000,
.ccc_offset = 300000,
@@ -1041,6 +1068,7 @@ static const struct axp_data axp209_data = {
@@ -1040,6 +1067,7 @@ static const struct axp_data axp209_data = {
.set_max_voltage = axp20x_battery_set_max_voltage,
.cfg_iio_chan = axp209_bat_cfg_iio_channels,
.set_bat_info = axp209_set_battery_info,
@@ -70,7 +70,7 @@ index 8c69e7dc55c9..67c6f351670e 100644
};
static const struct axp_data axp221_data = {
@@ -1054,6 +1082,7 @@ static const struct axp_data axp221_data = {
@@ -1053,6 +1081,7 @@ static const struct axp_data axp221_data = {
.set_max_voltage = axp22x_battery_set_max_voltage,
.cfg_iio_chan = axp209_bat_cfg_iio_channels,
.set_bat_info = axp209_set_battery_info,
@@ -78,7 +78,7 @@ index 8c69e7dc55c9..67c6f351670e 100644
};
static const struct axp_data axp717_data = {
@@ -1066,6 +1095,7 @@ static const struct axp_data axp717_data = {
@@ -1065,6 +1094,7 @@ static const struct axp_data axp717_data = {
.set_max_voltage = axp717_battery_set_max_voltage,
.cfg_iio_chan = axp717_bat_cfg_iio_channels,
.set_bat_info = axp717_set_battery_info,
@@ -86,7 +86,7 @@ index 8c69e7dc55c9..67c6f351670e 100644
};
static const struct axp_data axp813_data = {
@@ -1079,6 +1109,7 @@ static const struct axp_data axp813_data = {
@@ -1078,6 +1108,7 @@ static const struct axp_data axp813_data = {
.set_max_voltage = axp20x_battery_set_max_voltage,
.cfg_iio_chan = axp209_bat_cfg_iio_channels,
.set_bat_info = axp209_set_battery_info,
@@ -94,7 +94,7 @@ index 8c69e7dc55c9..67c6f351670e 100644
};
static const struct of_device_id axp20x_battery_ps_id[] = {
@@ -1100,11 +1131,13 @@ MODULE_DEVICE_TABLE(of, axp20x_battery_ps_id);
@@ -1099,11 +1130,13 @@ MODULE_DEVICE_TABLE(of, axp20x_battery_ps_id);
static int axp20x_power_probe(struct platform_device *pdev)
{
@@ -109,7 +109,7 @@ index 8c69e7dc55c9..67c6f351670e 100644
if (!of_device_is_available(pdev->dev.of_node))
return -ENODEV;
@@ -1142,6 +1175,25 @@ static int axp20x_power_probe(struct platform_device *pdev)
@@ -1141,6 +1174,25 @@ static int axp20x_power_probe(struct platform_device *pdev)
power_supply_put_battery_info(axp20x_batt->batt, info);
}
@@ -135,7 +135,7 @@ index 8c69e7dc55c9..67c6f351670e 100644
/*
* Update max CCC to a valid value if battery info is present or set it
* to current register value by default.
@@ -1207,7 +1259,7 @@ static int axp20x_power_probe(struct platform_device *pdev)
@@ -1206,7 +1258,7 @@ static int axp20x_power_probe(struct platform_device *pdev)
static struct platform_driver axp20x_batt_driver = {
.probe = axp20x_power_probe,
.driver = {

View File

@@ -1,4 +1,4 @@
From 193955fa93447a013758a896ff1f02cbcd3eaeea Mon Sep 17 00:00:00 2001
From b960819f71a9af2fc9fcfc64be52af25394a9a54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Wed, 23 Sep 2020 14:59:41 +0200
Subject: power: supply: axp20x_battery: Setup thermal regulation
@@ -14,10 +14,10 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 53 insertions(+)
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index 11b59a733b8d..e83252291d4a 100644
index f19ab493245b..1bac1a934614 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -1147,6 +1147,59 @@ static int axp20x_power_probe(struct platform_device *pdev)
@@ -1146,6 +1146,59 @@ static int axp20x_power_probe(struct platform_device *pdev)
*/
axp20x_get_constant_charge_current(axp20x_batt, &axp20x_batt->max_ccc);

View File

@@ -1,4 +1,4 @@
From 167e188013f52ea69ec66f39e8ea881d796a6b2d Mon Sep 17 00:00:00 2001
From a0484e86baba6a57768a5161bcf85c1b8f916cae Mon Sep 17 00:00:00 2001
From: Thomas Thorne <Thomas.Thorne@Net2Edge.com>
Date: Tue, 20 Sep 2022 20:34:57 -0400
Subject: usb: serial: option: add 'reset_resume' callback for WWAN devices
@@ -17,10 +17,10 @@ However the rest of the patch is not needed/already upstreamed.
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 1e2ae0c6c41c..8ab87dfae501 100644
index 58bd54e8c483..09b9c19a5178 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -2446,6 +2446,7 @@ static struct usb_serial_driver option_1port_device = {
@@ -2455,6 +2455,7 @@ static struct usb_serial_driver option_1port_device = {
#ifdef CONFIG_PM
.suspend = usb_wwan_suspend,
.resume = usb_wwan_resume,

View File

@@ -1,4 +1,4 @@
From 169826869d71c9944b55e2c291b3a60cdeda8b14 Mon Sep 17 00:00:00 2001
From 6795da182e7a5ca3ca7a991a296e87c621136632 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 18 Feb 2023 00:38:44 +0100
Subject: usb: typec: tcpm: Fix PD devices/capabilities registration
@@ -15,10 +15,10 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 29 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index 4debfac444e4..aa3c47e845e1 100644
index 35cf3c29f86e..897dde1e64ca 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -3024,15 +3024,22 @@ static int tcpm_register_source_caps(struct tcpm_port *port)
@@ -3026,15 +3026,22 @@ static int tcpm_register_source_caps(struct tcpm_port *port)
struct usb_power_delivery_desc desc = { port->negotiated_rev };
struct usb_power_delivery_capabilities_desc caps = { };
struct usb_power_delivery_capabilities *cap;
@@ -45,7 +45,7 @@ index 4debfac444e4..aa3c47e845e1 100644
cap = usb_power_delivery_register_capabilities(port->partner_pd, &caps);
if (IS_ERR(cap))
return PTR_ERR(cap);
@@ -3047,15 +3054,22 @@ static int tcpm_register_sink_caps(struct tcpm_port *port)
@@ -3049,15 +3056,22 @@ static int tcpm_register_sink_caps(struct tcpm_port *port)
struct usb_power_delivery_desc desc = { port->negotiated_rev };
struct usb_power_delivery_capabilities_desc caps = { };
struct usb_power_delivery_capabilities *cap;
@@ -72,7 +72,7 @@ index 4debfac444e4..aa3c47e845e1 100644
cap = usb_power_delivery_register_capabilities(port->partner_pd, &caps);
if (IS_ERR(cap))
return PTR_ERR(cap);
@@ -7045,10 +7059,17 @@ static int tcpm_port_register_pd(struct tcpm_port *port)
@@ -7046,10 +7060,17 @@ static int tcpm_port_register_pd(struct tcpm_port *port)
port->pds[i] = usb_power_delivery_register(port->dev, &desc);
if (IS_ERR(port->pds[i])) {
ret = PTR_ERR(port->pds[i]);

View File

@@ -1,4 +1,4 @@
From dbb4278eb1ec08a29b31585a87e91c5d973b9d06 Mon Sep 17 00:00:00 2001
From bddec2de5356d9a93167f6d746fa3dae26c84ff7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Tue, 23 Nov 2021 17:58:05 +0100
Subject: usb: typec: tcpm: Improve logs
@@ -11,7 +11,7 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index aa3c47e845e1..20572abba364 100644
index 897dde1e64ca..1b1eaeb9f271 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -973,10 +973,13 @@ static int tcpm_pd_transmit(struct tcpm_port *port,
@@ -30,7 +30,7 @@ index aa3c47e845e1..20572abba364 100644
reinit_completion(&port->tx_complete);
ret = port->tcpc->pd_transmit(port->tcpc, tx_sop_type, msg, negotiated_rev);
@@ -3696,6 +3699,10 @@ void tcpm_pd_receive(struct tcpm_port *port, const struct pd_message *msg,
@@ -3698,6 +3701,10 @@ void tcpm_pd_receive(struct tcpm_port *port, const struct pd_message *msg,
enum tcpm_transmit_type rx_sop_type)
{
struct pd_rx_event *event;
@@ -41,7 +41,7 @@ index aa3c47e845e1..20572abba364 100644
event = kzalloc(sizeof(*event), GFP_ATOMIC);
if (!event)
@@ -5992,7 +5999,7 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1,
@@ -5993,7 +6000,7 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1,
static void _tcpm_pd_vbus_on(struct tcpm_port *port)
{
@@ -50,7 +50,7 @@ index aa3c47e845e1..20572abba364 100644
port->vbus_present = true;
/*
* When vbus_present is true i.e. Voltage at VBUS is greater than VSAFE5V implicitly
@@ -6082,7 +6089,7 @@ static void _tcpm_pd_vbus_on(struct tcpm_port *port)
@@ -6083,7 +6090,7 @@ static void _tcpm_pd_vbus_on(struct tcpm_port *port)
static void _tcpm_pd_vbus_off(struct tcpm_port *port)
{

View File

@@ -1,59 +0,0 @@
From 5b32c8535068aa8b6ab3582215e69adc2dbea0e9 Mon Sep 17 00:00:00 2001
From: Vasily Khoruzhick <anarsoul@gmail.com>
Date: Thu, 2 Jan 2025 23:50:53 -0800
Subject: wifi: rtw88: 8703b: Fix RX/TX issues
Fix 3 typos in 8703b driver. 2 typos in calibration routines are not
fatal and do not seem to have any impact, just fix them to match vendor
driver.
However the last one in rtw8703b_set_channel_bb() clears too many bits
in REG_OFDM0_TX_PSD_NOISE, causing TX and RX issues (neither rate goes
above MCS0-MCS1). Vendor driver clears only 2 most significant bits.
With the last typo fixed, the driver is able to reach MCS7 on Pinebook
Cc: stable@vger.kernel.org
Fixes: 9bb762b3a957 ("wifi: rtw88: Add definitions for 8703b chip")
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
drivers/net/wireless/realtek/rtw88/rtw8703b.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8703b.c b/drivers/net/wireless/realtek/rtw88/rtw8703b.c
index a19b94d022ee..1d232adbdd7e 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c
@@ -903,7 +903,7 @@ static void rtw8703b_set_channel_bb(struct rtw_dev *rtwdev, u8 channel, u8 bw,
rtw_write32_mask(rtwdev, REG_FPGA0_RFMOD, BIT_MASK_RFMOD, 0x0);
rtw_write32_mask(rtwdev, REG_FPGA1_RFMOD, BIT_MASK_RFMOD, 0x0);
rtw_write32_mask(rtwdev, REG_OFDM0_TX_PSD_NOISE,
- GENMASK(31, 20), 0x0);
+ GENMASK(31, 30), 0x0);
rtw_write32(rtwdev, REG_BBRX_DFIR, 0x4A880000);
rtw_write32(rtwdev, REG_OFDM0_A_TX_AFE, 0x19F60000);
break;
@@ -1198,9 +1198,9 @@ static u8 rtw8703b_iqk_rx_path(struct rtw_dev *rtwdev,
rtw_write32(rtwdev, REG_RXIQK_TONE_A_11N, 0x38008c1c);
rtw_write32(rtwdev, REG_TX_IQK_TONE_B, 0x38008c1c);
rtw_write32(rtwdev, REG_RX_IQK_TONE_B, 0x38008c1c);
- rtw_write32(rtwdev, REG_TXIQK_PI_A_11N, 0x8216000f);
+ rtw_write32(rtwdev, REG_TXIQK_PI_A_11N, 0x8214030f);
rtw_write32(rtwdev, REG_RXIQK_PI_A_11N, 0x28110000);
- rtw_write32(rtwdev, REG_TXIQK_PI_B, 0x28110000);
+ rtw_write32(rtwdev, REG_TXIQK_PI_B, 0x82110000);
rtw_write32(rtwdev, REG_RXIQK_PI_B, 0x28110000);
/* LOK setting */
@@ -1372,7 +1372,7 @@ void rtw8703b_iqk_fill_a_matrix(struct rtw_dev *rtwdev, const s32 result[])
return;
tmp_rx_iqi |= FIELD_PREP(BIT_MASK_RXIQ_S1_X, result[IQK_S1_RX_X]);
- tmp_rx_iqi |= FIELD_PREP(BIT_MASK_RXIQ_S1_Y1, result[IQK_S1_RX_X]);
+ tmp_rx_iqi |= FIELD_PREP(BIT_MASK_RXIQ_S1_Y1, result[IQK_S1_RX_Y]);
rtw_write32(rtwdev, REG_A_RXIQI, tmp_rx_iqi);
rtw_write32_mask(rtwdev, REG_RXIQK_MATRIX_LSB_11N, BIT_MASK_RXIQ_S1_Y2,
BIT_SET_RXIQ_S1_Y2(result[IQK_S1_RX_Y]));
--
2.35.3

View File

@@ -1,32 +0,0 @@
From 4450dda9f4e274b1b885ce43989defc4db6b257f Mon Sep 17 00:00:00 2001
From: Fiona Klute <fiona.klute@gmx.de>
Date: Mon, 6 Jan 2025 15:54:34 +0200
Subject: wifi: rtw88: sdio: Fix disconnection after beacon loss
This is the equivalent of 28818b4d871bc93cc4f5c7c7d7c526a6a096c09c
"wifi: rtw88: usb: Fix disconnection after beacon loss" for SDIO
chips. Tested on Pinephone (RTL8723CS), random disconnections became
rare, instead of a frequent nuisance.
Cc: stable@vger.kernel.org
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
---
drivers/net/wireless/realtek/rtw88/sdio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw88/sdio.c b/drivers/net/wireless/realtek/rtw88/sdio.c
index 799230eb5f16..e024061bdbf7 100644
--- a/drivers/net/wireless/realtek/rtw88/sdio.c
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c
@@ -1192,6 +1192,8 @@ static void rtw_sdio_indicate_tx_status(struct rtw_dev *rtwdev,
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_hw *hw = rtwdev->hw;
+ skb_pull(skb, rtwdev->chip->tx_pkt_desc_sz);
+
/* enqueue to wait for tx report */
if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS) {
rtw_tx_report_enqueue(rtwdev, skb, tx_data->sn);
--
2.35.3

View File

@@ -181,9 +181,6 @@
patches.megous/drm-rockchip-dw-mipi-dsi-rockchip-Fix-ISP1-PHY-initialization.patch
patches.megous/arm64-dts-rk3399-Add-dmc_opp_table.patch
patches.megous/arm64-dts-rockchip-rk3399-s-Add-DMC-table.patch
patches.megous/Revert-mfd-axp20x-Allow-multiple-regulators.patch
patches.megous/wifi-rtw88-8703b-Fix-RX-TX-issues.patch
patches.megous/wifi-rtw88-sdio-Fix-disconnection-after-beacon-loss.patch
patches.megous/bluetooth-h5-Don-t-re-initialize-rtl8723cs-on-resume.patch
patches.megous/drm-sun4i-Mark-one-of-the-UI-planes-as-a-cursor-one.patch
patches.megous/drm-sun4i-Implement-gamma-correction.patch