Compare commits
9 commits
Author | SHA1 | Date | |
---|---|---|---|
43aaa36cd7 | |||
e5c2f49c1e | |||
44d15ab270 | |||
57fe2f4f40 | |||
3ef102d597 | |||
fe8d8fddb4 | |||
ff7468d749 | |||
50d9c1dc0d | |||
5c4f97cc49 |
|
@ -96,7 +96,6 @@ If you have questions or need support, please join our [Matrix Space][matrix-spa
|
||||||
This space contains
|
This space contains
|
||||||
- a [support channel][matrix-support] for general support and
|
- a [support channel][matrix-support] for general support and
|
||||||
- a [development channel][matrix-development] for all development related questions and discussions.
|
- a [development channel][matrix-development] for all development related questions and discussions.
|
||||||
If you prefer IRC, you can also join in via our channel at [`libera.chat/#linux-surface`][liberachat], to which the matrix room is bridged to.
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
This repository contains patches, which are either derivative work targeting a specific already licensed source, i.e. parts of the Linux kernel, or introduce new parts to the Linux kernel.
|
This repository contains patches, which are either derivative work targeting a specific already licensed source, i.e. parts of the Linux kernel, or introduce new parts to the Linux kernel.
|
||||||
|
@ -112,7 +111,6 @@ License texts can be obtained at https://github.com/torvalds/linux/tree/master/L
|
||||||
[matrix-space]: https://matrix.to/#/#linux-surface:matrix.org
|
[matrix-space]: https://matrix.to/#/#linux-surface:matrix.org
|
||||||
[matrix-support]: https://matrix.to/#/#linux-surface-support:matrix.org
|
[matrix-support]: https://matrix.to/#/#linux-surface-support:matrix.org
|
||||||
[matrix-development]: https://matrix.to/#/#linux-surface-development:matrix.org
|
[matrix-development]: https://matrix.to/#/#linux-surface-development:matrix.org
|
||||||
[liberachat]: https://web.libera.chat/#linux-surface
|
|
||||||
|
|
||||||
[hibernate-setup]: https://fitzcarraldoblog.wordpress.com/2018/07/14/configuring-lubuntu-18-04-to-enable-hibernation-using-a-swap-file
|
[hibernate-setup]: https://fitzcarraldoblog.wordpress.com/2018/07/14/configuring-lubuntu-18-04-to-enable-hibernation-using-a-swap-file
|
||||||
[releases]: https://github.com/linux-surface/linux-surface/releases
|
[releases]: https://github.com/linux-surface/linux-surface/releases
|
||||||
|
|
|
@ -699,84 +699,6 @@ index 000000000000..35aeb5db89c8
|
||||||
--
|
--
|
||||||
2.44.0
|
2.44.0
|
||||||
|
|
||||||
From b7e66758c1bd493c7140c17d0f00f727f8fefb32 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hidenori Kobayashi <hidenorik@chromium.org>
|
|
||||||
Date: Tue, 9 Jan 2024 17:09:09 +0900
|
|
||||||
Subject: [PATCH] media: staging: ipu3-imgu: Set fields before
|
|
||||||
media_entity_pads_init()
|
|
||||||
|
|
||||||
The imgu driver fails to probe with the following message because it
|
|
||||||
does not set the pad's flags before calling media_entity_pads_init().
|
|
||||||
|
|
||||||
[ 14.596315] ipu3-imgu 0000:00:05.0: failed initialize subdev media entity (-22)
|
|
||||||
[ 14.596322] ipu3-imgu 0000:00:05.0: failed to register subdev0 ret (-22)
|
|
||||||
[ 14.596327] ipu3-imgu 0000:00:05.0: failed to register pipes (-22)
|
|
||||||
[ 14.596331] ipu3-imgu 0000:00:05.0: failed to create V4L2 devices (-22)
|
|
||||||
|
|
||||||
Fix the initialization order so that the driver probe succeeds. The ops
|
|
||||||
initialization is also moved together for readability.
|
|
||||||
|
|
||||||
Fixes: a0ca1627b450 ("media: staging/intel-ipu3: Add v4l2 driver based on media framework")
|
|
||||||
Cc: <stable@vger.kernel.org> # 6.7
|
|
||||||
Cc: Dan Carpenter <dan.carpenter@linaro.org>
|
|
||||||
Signed-off-by: Hidenori Kobayashi <hidenorik@chromium.org>
|
|
||||||
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
|
|
||||||
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
||||||
Patchset: cameras
|
|
||||||
---
|
|
||||||
drivers/staging/media/ipu3/ipu3-v4l2.c | 16 ++++++++--------
|
|
||||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c
|
|
||||||
index a66f034380c0..3df58eb3e882 100644
|
|
||||||
--- a/drivers/staging/media/ipu3/ipu3-v4l2.c
|
|
||||||
+++ b/drivers/staging/media/ipu3/ipu3-v4l2.c
|
|
||||||
@@ -1069,6 +1069,11 @@ static int imgu_v4l2_subdev_register(struct imgu_device *imgu,
|
|
||||||
struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[pipe];
|
|
||||||
|
|
||||||
/* Initialize subdev media entity */
|
|
||||||
+ imgu_sd->subdev.entity.ops = &imgu_media_ops;
|
|
||||||
+ for (i = 0; i < IMGU_NODE_NUM; i++) {
|
|
||||||
+ imgu_sd->subdev_pads[i].flags = imgu_pipe->nodes[i].output ?
|
|
||||||
+ MEDIA_PAD_FL_SINK : MEDIA_PAD_FL_SOURCE;
|
|
||||||
+ }
|
|
||||||
r = media_entity_pads_init(&imgu_sd->subdev.entity, IMGU_NODE_NUM,
|
|
||||||
imgu_sd->subdev_pads);
|
|
||||||
if (r) {
|
|
||||||
@@ -1076,11 +1081,6 @@ static int imgu_v4l2_subdev_register(struct imgu_device *imgu,
|
|
||||||
"failed initialize subdev media entity (%d)\n", r);
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
- imgu_sd->subdev.entity.ops = &imgu_media_ops;
|
|
||||||
- for (i = 0; i < IMGU_NODE_NUM; i++) {
|
|
||||||
- imgu_sd->subdev_pads[i].flags = imgu_pipe->nodes[i].output ?
|
|
||||||
- MEDIA_PAD_FL_SINK : MEDIA_PAD_FL_SOURCE;
|
|
||||||
- }
|
|
||||||
|
|
||||||
/* Initialize subdev */
|
|
||||||
v4l2_subdev_init(&imgu_sd->subdev, &imgu_subdev_ops);
|
|
||||||
@@ -1177,15 +1177,15 @@ static int imgu_v4l2_node_setup(struct imgu_device *imgu, unsigned int pipe,
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialize media entities */
|
|
||||||
+ node->vdev_pad.flags = node->output ?
|
|
||||||
+ MEDIA_PAD_FL_SOURCE : MEDIA_PAD_FL_SINK;
|
|
||||||
+ vdev->entity.ops = NULL;
|
|
||||||
r = media_entity_pads_init(&vdev->entity, 1, &node->vdev_pad);
|
|
||||||
if (r) {
|
|
||||||
dev_err(dev, "failed initialize media entity (%d)\n", r);
|
|
||||||
mutex_destroy(&node->lock);
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
- node->vdev_pad.flags = node->output ?
|
|
||||||
- MEDIA_PAD_FL_SOURCE : MEDIA_PAD_FL_SINK;
|
|
||||||
- vdev->entity.ops = NULL;
|
|
||||||
|
|
||||||
/* Initialize vbq */
|
|
||||||
vbq->type = node->vdev_fmt.type;
|
|
||||||
--
|
|
||||||
2.44.0
|
|
||||||
|
|
||||||
From 87ebc160cb35a068acfaf59847c84656cb52b1b7 Mon Sep 17 00:00:00 2001
|
From 87ebc160cb35a068acfaf59847c84656cb52b1b7 Mon Sep 17 00:00:00 2001
|
||||||
From: Sakari Ailus <sakari.ailus@linux.intel.com>
|
From: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||||
Date: Thu, 25 May 2023 14:12:04 +0300
|
Date: Thu, 25 May 2023 14:12:04 +0300
|
||||||
|
@ -851,354 +773,6 @@ index ed08bf4178f0..83e29c56fe33 100644
|
||||||
--
|
--
|
||||||
2.44.0
|
2.44.0
|
||||||
|
|
||||||
From a9681c29588d67321733877e11f9588ed9e54861 Mon Sep 17 00:00:00 2001
|
|
||||||
From: mojyack <mojyack@gmail.com>
|
|
||||||
Date: Sat, 3 Feb 2024 12:53:33 +0900
|
|
||||||
Subject: [PATCH] media: i2c: Revert DW9719 driver
|
|
||||||
|
|
||||||
Patchset: cameras
|
|
||||||
---
|
|
||||||
drivers/media/i2c/dw9719.c | 199 +++++++++++++++++++++++++------------
|
|
||||||
1 file changed, 137 insertions(+), 62 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/media/i2c/dw9719.c b/drivers/media/i2c/dw9719.c
|
|
||||||
index c626ed845928..d5f585dabb60 100644
|
|
||||||
--- a/drivers/media/i2c/dw9719.c
|
|
||||||
+++ b/drivers/media/i2c/dw9719.c
|
|
||||||
@@ -6,13 +6,14 @@
|
|
||||||
* https://github.com/ZenfoneArea/android_kernel_asus_zenfone5
|
|
||||||
*/
|
|
||||||
|
|
||||||
+#include <asm/unaligned.h>
|
|
||||||
+
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/i2c.h>
|
|
||||||
#include <linux/pm_runtime.h>
|
|
||||||
#include <linux/regulator/consumer.h>
|
|
||||||
#include <linux/types.h>
|
|
||||||
|
|
||||||
-#include <media/v4l2-cci.h>
|
|
||||||
#include <media/v4l2-common.h>
|
|
||||||
#include <media/v4l2-ctrls.h>
|
|
||||||
#include <media/v4l2-subdev.h>
|
|
||||||
@@ -20,31 +21,29 @@
|
|
||||||
#define DW9719_MAX_FOCUS_POS 1023
|
|
||||||
#define DW9719_CTRL_STEPS 16
|
|
||||||
#define DW9719_CTRL_DELAY_US 1000
|
|
||||||
+#define DELAY_MAX_PER_STEP_NS (1000000 * 1023)
|
|
||||||
|
|
||||||
-#define DW9719_INFO CCI_REG8(0)
|
|
||||||
+#define DW9719_INFO 0
|
|
||||||
#define DW9719_ID 0xF1
|
|
||||||
+#define DW9719_CONTROL 2
|
|
||||||
+#define DW9719_VCM_CURRENT 3
|
|
||||||
|
|
||||||
-#define DW9719_CONTROL CCI_REG8(2)
|
|
||||||
-#define DW9719_ENABLE_RINGING 0x02
|
|
||||||
-
|
|
||||||
-#define DW9719_VCM_CURRENT CCI_REG16(3)
|
|
||||||
-
|
|
||||||
-#define DW9719_MODE CCI_REG8(6)
|
|
||||||
-#define DW9719_MODE_SAC_SHIFT 4
|
|
||||||
-#define DW9719_MODE_SAC3 4
|
|
||||||
+#define DW9719_MODE 6
|
|
||||||
+#define DW9719_VCM_FREQ 7
|
|
||||||
|
|
||||||
-#define DW9719_VCM_FREQ CCI_REG8(7)
|
|
||||||
+#define DW9719_MODE_SAC3 0x40
|
|
||||||
#define DW9719_DEFAULT_VCM_FREQ 0x60
|
|
||||||
+#define DW9719_ENABLE_RINGING 0x02
|
|
||||||
+
|
|
||||||
+#define NUM_REGULATORS 2
|
|
||||||
|
|
||||||
#define to_dw9719_device(x) container_of(x, struct dw9719_device, sd)
|
|
||||||
|
|
||||||
struct dw9719_device {
|
|
||||||
- struct v4l2_subdev sd;
|
|
||||||
struct device *dev;
|
|
||||||
- struct regmap *regmap;
|
|
||||||
- struct regulator *regulator;
|
|
||||||
- u32 sac_mode;
|
|
||||||
- u32 vcm_freq;
|
|
||||||
+ struct i2c_client *client;
|
|
||||||
+ struct regulator_bulk_data regulators[NUM_REGULATORS];
|
|
||||||
+ struct v4l2_subdev sd;
|
|
||||||
|
|
||||||
struct dw9719_v4l2_ctrls {
|
|
||||||
struct v4l2_ctrl_handler handler;
|
|
||||||
@@ -52,18 +51,79 @@ struct dw9719_device {
|
|
||||||
} ctrls;
|
|
||||||
};
|
|
||||||
|
|
||||||
+static int dw9719_i2c_rd8(struct i2c_client *client, u8 reg, u8 *val)
|
|
||||||
+{
|
|
||||||
+ struct i2c_msg msg[2];
|
|
||||||
+ u8 buf[2] = { reg };
|
|
||||||
+ int ret;
|
|
||||||
+
|
|
||||||
+ msg[0].addr = client->addr;
|
|
||||||
+ msg[0].flags = 0;
|
|
||||||
+ msg[0].len = 1;
|
|
||||||
+ msg[0].buf = buf;
|
|
||||||
+
|
|
||||||
+ msg[1].addr = client->addr;
|
|
||||||
+ msg[1].flags = I2C_M_RD;
|
|
||||||
+ msg[1].len = 1;
|
|
||||||
+ msg[1].buf = &buf[1];
|
|
||||||
+ *val = 0;
|
|
||||||
+
|
|
||||||
+ ret = i2c_transfer(client->adapter, msg, 2);
|
|
||||||
+ if (ret < 0)
|
|
||||||
+ return ret;
|
|
||||||
+
|
|
||||||
+ *val = buf[1];
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int dw9719_i2c_wr8(struct i2c_client *client, u8 reg, u8 val)
|
|
||||||
+{
|
|
||||||
+ struct i2c_msg msg;
|
|
||||||
+ int ret;
|
|
||||||
+
|
|
||||||
+ u8 buf[2] = { reg, val };
|
|
||||||
+
|
|
||||||
+ msg.addr = client->addr;
|
|
||||||
+ msg.flags = 0;
|
|
||||||
+ msg.len = sizeof(buf);
|
|
||||||
+ msg.buf = buf;
|
|
||||||
+
|
|
||||||
+ ret = i2c_transfer(client->adapter, &msg, 1);
|
|
||||||
+
|
|
||||||
+ return ret < 0 ? ret : 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int dw9719_i2c_wr16(struct i2c_client *client, u8 reg, u16 val)
|
|
||||||
+{
|
|
||||||
+ struct i2c_msg msg;
|
|
||||||
+ u8 buf[3] = { reg };
|
|
||||||
+ int ret;
|
|
||||||
+
|
|
||||||
+ put_unaligned_be16(val, buf + 1);
|
|
||||||
+
|
|
||||||
+ msg.addr = client->addr;
|
|
||||||
+ msg.flags = 0;
|
|
||||||
+ msg.len = sizeof(buf);
|
|
||||||
+ msg.buf = buf;
|
|
||||||
+
|
|
||||||
+ ret = i2c_transfer(client->adapter, &msg, 1);
|
|
||||||
+
|
|
||||||
+ return ret < 0 ? ret : 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static int dw9719_detect(struct dw9719_device *dw9719)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
- u64 val;
|
|
||||||
+ u8 val;
|
|
||||||
|
|
||||||
- ret = cci_read(dw9719->regmap, DW9719_INFO, &val, NULL);
|
|
||||||
+ ret = dw9719_i2c_rd8(dw9719->client, DW9719_INFO, &val);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
if (val != DW9719_ID) {
|
|
||||||
dev_err(dw9719->dev, "Failed to detect correct id\n");
|
|
||||||
- return -ENXIO;
|
|
||||||
+ ret = -ENXIO;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
@@ -71,37 +131,54 @@ static int dw9719_detect(struct dw9719_device *dw9719)
|
|
||||||
|
|
||||||
static int dw9719_power_down(struct dw9719_device *dw9719)
|
|
||||||
{
|
|
||||||
- return regulator_disable(dw9719->regulator);
|
|
||||||
+ return regulator_bulk_disable(NUM_REGULATORS, dw9719->regulators);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int dw9719_power_up(struct dw9719_device *dw9719)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
- ret = regulator_enable(dw9719->regulator);
|
|
||||||
+ ret = regulator_bulk_enable(NUM_REGULATORS, dw9719->regulators);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
/* Jiggle SCL pin to wake up device */
|
|
||||||
- cci_write(dw9719->regmap, DW9719_CONTROL, 1, &ret);
|
|
||||||
+ ret = dw9719_i2c_wr8(dw9719->client, DW9719_CONTROL, 1);
|
|
||||||
|
|
||||||
- /* Need 100us to transit from SHUTDOWN to STANDBY */
|
|
||||||
- fsleep(100);
|
|
||||||
+ /* Need 100us to transit from SHUTDOWN to STANDBY*/
|
|
||||||
+ usleep_range(100, 1000);
|
|
||||||
|
|
||||||
- cci_write(dw9719->regmap, DW9719_CONTROL, DW9719_ENABLE_RINGING, &ret);
|
|
||||||
- cci_write(dw9719->regmap, DW9719_MODE,
|
|
||||||
- dw9719->sac_mode << DW9719_MODE_SAC_SHIFT, &ret);
|
|
||||||
- cci_write(dw9719->regmap, DW9719_VCM_FREQ, dw9719->vcm_freq, &ret);
|
|
||||||
+ ret = dw9719_i2c_wr8(dw9719->client, DW9719_CONTROL,
|
|
||||||
+ DW9719_ENABLE_RINGING);
|
|
||||||
+ if (ret < 0)
|
|
||||||
+ goto fail_powerdown;
|
|
||||||
|
|
||||||
- if (ret)
|
|
||||||
- dw9719_power_down(dw9719);
|
|
||||||
+ ret = dw9719_i2c_wr8(dw9719->client, DW9719_MODE, DW9719_MODE_SAC3);
|
|
||||||
+ if (ret < 0)
|
|
||||||
+ goto fail_powerdown;
|
|
||||||
+
|
|
||||||
+ ret = dw9719_i2c_wr8(dw9719->client, DW9719_VCM_FREQ,
|
|
||||||
+ DW9719_DEFAULT_VCM_FREQ);
|
|
||||||
+ if (ret < 0)
|
|
||||||
+ goto fail_powerdown;
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
|
|
||||||
+fail_powerdown:
|
|
||||||
+ dw9719_power_down(dw9719);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int dw9719_t_focus_abs(struct dw9719_device *dw9719, s32 value)
|
|
||||||
{
|
|
||||||
- return cci_write(dw9719->regmap, DW9719_VCM_CURRENT, value, NULL);
|
|
||||||
+ int ret;
|
|
||||||
+
|
|
||||||
+ value = clamp(value, 0, DW9719_MAX_FOCUS_POS);
|
|
||||||
+ ret = dw9719_i2c_wr16(dw9719->client, DW9719_VCM_CURRENT, value);
|
|
||||||
+ if (ret < 0)
|
|
||||||
+ return ret;
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int dw9719_set_ctrl(struct v4l2_ctrl *ctrl)
|
|
||||||
@@ -132,7 +209,7 @@ static const struct v4l2_ctrl_ops dw9719_ctrl_ops = {
|
|
||||||
.s_ctrl = dw9719_set_ctrl,
|
|
||||||
};
|
|
||||||
|
|
||||||
-static int dw9719_suspend(struct device *dev)
|
|
||||||
+static int __maybe_unused dw9719_suspend(struct device *dev)
|
|
||||||
{
|
|
||||||
struct v4l2_subdev *sd = dev_get_drvdata(dev);
|
|
||||||
struct dw9719_device *dw9719 = to_dw9719_device(sd);
|
|
||||||
@@ -151,7 +228,7 @@ static int dw9719_suspend(struct device *dev)
|
|
||||||
return dw9719_power_down(dw9719);
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int dw9719_resume(struct device *dev)
|
|
||||||
+static int __maybe_unused dw9719_resume(struct device *dev)
|
|
||||||
{
|
|
||||||
struct v4l2_subdev *sd = dev_get_drvdata(dev);
|
|
||||||
struct dw9719_device *dw9719 = to_dw9719_device(sd);
|
|
||||||
@@ -201,7 +278,9 @@ static int dw9719_init_controls(struct dw9719_device *dw9719)
|
|
||||||
const struct v4l2_ctrl_ops *ops = &dw9719_ctrl_ops;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
- v4l2_ctrl_handler_init(&dw9719->ctrls.handler, 1);
|
|
||||||
+ ret = v4l2_ctrl_handler_init(&dw9719->ctrls.handler, 1);
|
|
||||||
+ if (ret)
|
|
||||||
+ return ret;
|
|
||||||
|
|
||||||
dw9719->ctrls.focus = v4l2_ctrl_new_std(&dw9719->ctrls.handler, ops,
|
|
||||||
V4L2_CID_FOCUS_ABSOLUTE, 0,
|
|
||||||
@@ -214,7 +293,8 @@ static int dw9719_init_controls(struct dw9719_device *dw9719)
|
|
||||||
}
|
|
||||||
|
|
||||||
dw9719->sd.ctrl_handler = &dw9719->ctrls.handler;
|
|
||||||
- return 0;
|
|
||||||
+
|
|
||||||
+ return ret;
|
|
||||||
|
|
||||||
err_free_handler:
|
|
||||||
v4l2_ctrl_handler_free(&dw9719->ctrls.handler);
|
|
||||||
@@ -232,26 +312,24 @@ static int dw9719_probe(struct i2c_client *client)
|
|
||||||
if (!dw9719)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
- dw9719->regmap = devm_cci_regmap_init_i2c(client, 8);
|
|
||||||
- if (IS_ERR(dw9719->regmap))
|
|
||||||
- return PTR_ERR(dw9719->regmap);
|
|
||||||
-
|
|
||||||
+ dw9719->client = client;
|
|
||||||
dw9719->dev = &client->dev;
|
|
||||||
- dw9719->sac_mode = DW9719_MODE_SAC3;
|
|
||||||
- dw9719->vcm_freq = DW9719_DEFAULT_VCM_FREQ;
|
|
||||||
|
|
||||||
- /* Optional indication of SAC mode select */
|
|
||||||
- device_property_read_u32(&client->dev, "dongwoon,sac-mode",
|
|
||||||
- &dw9719->sac_mode);
|
|
||||||
-
|
|
||||||
- /* Optional indication of VCM frequency */
|
|
||||||
- device_property_read_u32(&client->dev, "dongwoon,vcm-freq",
|
|
||||||
- &dw9719->vcm_freq);
|
|
||||||
+ dw9719->regulators[0].supply = "vdd";
|
|
||||||
+ /*
|
|
||||||
+ * The DW9719 has only the 1 VDD voltage input, but some PMICs such as
|
|
||||||
+ * the TPS68470 PMIC have I2C passthrough capability, to disconnect the
|
|
||||||
+ * sensor's I2C pins from the I2C bus when the sensors VSIO (Sensor-IO)
|
|
||||||
+ * is off, because some sensors then short these pins to ground;
|
|
||||||
+ * and the DW9719 might sit behind this passthrough, this it needs to
|
|
||||||
+ * enable VSIO as that will also enable the I2C passthrough.
|
|
||||||
+ */
|
|
||||||
+ dw9719->regulators[1].supply = "vsio";
|
|
||||||
|
|
||||||
- dw9719->regulator = devm_regulator_get(&client->dev, "vdd");
|
|
||||||
- if (IS_ERR(dw9719->regulator))
|
|
||||||
- return dev_err_probe(&client->dev, PTR_ERR(dw9719->regulator),
|
|
||||||
- "getting regulator\n");
|
|
||||||
+ ret = devm_regulator_bulk_get(&client->dev, NUM_REGULATORS,
|
|
||||||
+ dw9719->regulators);
|
|
||||||
+ if (ret)
|
|
||||||
+ return dev_err_probe(&client->dev, ret, "getting regulators\n");
|
|
||||||
|
|
||||||
v4l2_i2c_subdev_init(&dw9719->sd, client, &dw9719_ops);
|
|
||||||
dw9719->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
|
|
||||||
@@ -312,17 +390,13 @@ static int dw9719_probe(struct i2c_client *client)
|
|
||||||
static void dw9719_remove(struct i2c_client *client)
|
|
||||||
{
|
|
||||||
struct v4l2_subdev *sd = i2c_get_clientdata(client);
|
|
||||||
- struct dw9719_device *dw9719 =
|
|
||||||
- container_of(sd, struct dw9719_device, sd);
|
|
||||||
+ struct dw9719_device *dw9719 = container_of(sd, struct dw9719_device,
|
|
||||||
+ sd);
|
|
||||||
|
|
||||||
+ pm_runtime_disable(&client->dev);
|
|
||||||
v4l2_async_unregister_subdev(sd);
|
|
||||||
v4l2_ctrl_handler_free(&dw9719->ctrls.handler);
|
|
||||||
media_entity_cleanup(&dw9719->sd.entity);
|
|
||||||
-
|
|
||||||
- pm_runtime_disable(&client->dev);
|
|
||||||
- if (!pm_runtime_status_suspended(&client->dev))
|
|
||||||
- dw9719_power_down(dw9719);
|
|
||||||
- pm_runtime_set_suspended(&client->dev);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct i2c_device_id dw9719_id_table[] = {
|
|
||||||
@@ -331,13 +405,14 @@ static const struct i2c_device_id dw9719_id_table[] = {
|
|
||||||
};
|
|
||||||
MODULE_DEVICE_TABLE(i2c, dw9719_id_table);
|
|
||||||
|
|
||||||
-static DEFINE_RUNTIME_DEV_PM_OPS(dw9719_pm_ops, dw9719_suspend, dw9719_resume,
|
|
||||||
- NULL);
|
|
||||||
+static const struct dev_pm_ops dw9719_pm_ops = {
|
|
||||||
+ SET_RUNTIME_PM_OPS(dw9719_suspend, dw9719_resume, NULL)
|
|
||||||
+};
|
|
||||||
|
|
||||||
static struct i2c_driver dw9719_i2c_driver = {
|
|
||||||
.driver = {
|
|
||||||
.name = "dw9719",
|
|
||||||
- .pm = pm_sleep_ptr(&dw9719_pm_ops),
|
|
||||||
+ .pm = &dw9719_pm_ops,
|
|
||||||
},
|
|
||||||
.probe = dw9719_probe,
|
|
||||||
.remove = dw9719_remove,
|
|
||||||
--
|
|
||||||
2.44.0
|
|
||||||
|
|
||||||
From c5d6c95fd5cefbd4ba9779fc965bce0a36bdbe5e Mon Sep 17 00:00:00 2001
|
From c5d6c95fd5cefbd4ba9779fc965bce0a36bdbe5e Mon Sep 17 00:00:00 2001
|
||||||
From: mojyack <mojyack@gmail.com>
|
From: mojyack <mojyack@gmail.com>
|
||||||
Date: Sat, 3 Feb 2024 12:59:53 +0900
|
Date: Sat, 3 Feb 2024 12:59:53 +0900
|
||||||
|
@ -1246,3 +820,33 @@ index 3df58eb3e882..81aff2d5d898 100644
|
||||||
--
|
--
|
||||||
2.44.0
|
2.44.0
|
||||||
|
|
||||||
|
From 65421dfc17e3559d45345ea2aa48b44268653496 Mon Sep 17 00:00:00 2001
|
||||||
|
From: mojyack <mojyack@gmail.com>
|
||||||
|
Date: Tue, 26 Mar 2024 05:55:44 +0900
|
||||||
|
Subject: [PATCH] media: i2c: dw9719: fix probe error on surface go 2
|
||||||
|
|
||||||
|
On surface go 2, sometimes probing dw9719 fails with "dw9719: probe of i2c-INT347A:00-VCM failed with error -121".
|
||||||
|
The -121(-EREMOTEIO) is came from drivers/i2c/busses/i2c-designware-common.c:575, and indicates the initialize occurs too early.
|
||||||
|
So just add some delay.
|
||||||
|
There is no exact reason for this 10000us, but 100us failed.
|
||||||
|
---
|
||||||
|
drivers/media/i2c/dw9719.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/media/i2c/dw9719.c b/drivers/media/i2c/dw9719.c
|
||||||
|
index c626ed845928..0094cfda57ea 100644
|
||||||
|
--- a/drivers/media/i2c/dw9719.c
|
||||||
|
+++ b/drivers/media/i2c/dw9719.c
|
||||||
|
@@ -82,6 +82,9 @@ static int dw9719_power_up(struct dw9719_device *dw9719)
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
+ /* Wait for device to be acknowledged */
|
||||||
|
+ fsleep(10000);
|
||||||
|
+
|
||||||
|
/* Jiggle SCL pin to wake up device */
|
||||||
|
cci_write(dw9719->regmap, DW9719_CONTROL, 1, &ret);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.44.0
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
|
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
|
||||||
|
|
||||||
pkgbase=linux-surface
|
pkgbase=linux-surface
|
||||||
pkgver=6.8.1.arch1
|
pkgver=6.8.6.arch1
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc='Linux'
|
pkgdesc='Linux'
|
||||||
_shortver=${pkgver%.*}
|
_shortver=${pkgver%.*}
|
||||||
|
@ -56,8 +56,8 @@ validpgpkeys=(
|
||||||
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
|
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
|
||||||
'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig)
|
'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig)
|
||||||
)
|
)
|
||||||
sha256sums=('SKIP'
|
sha256sums=('2a56b8533af53cf5d3be8882a4a2da34a8d5a2d26569b098102aa072960c32e0'
|
||||||
'c2b00c84c4b543db431e06604d939a62f93107d18369f4d9860dc8062b01ab45'
|
'9a21f27cdfdb1d7b27af526b2c85632eca890e5264cd44dcb0882e9953794a2a'
|
||||||
'985cd5e0b11538f31887e451c398d226c06ca4b34c5466e93a21ebd65b7b3919'
|
'985cd5e0b11538f31887e451c398d226c06ca4b34c5466e93a21ebd65b7b3919'
|
||||||
'3cabe391cc39dbee88a79f76e9e7a68f7fbcd5518941aa2ab73a77692c87dead'
|
'3cabe391cc39dbee88a79f76e9e7a68f7fbcd5518941aa2ab73a77692c87dead'
|
||||||
'ee9857e96ee5d871aa557f6d6d142474c26187faa2c21b351bafde065b288fe0'
|
'ee9857e96ee5d871aa557f6d6d142474c26187faa2c21b351bafde065b288fe0'
|
||||||
|
@ -71,7 +71,7 @@ sha256sums=('SKIP'
|
||||||
'02d720e3fffae018fc8719a98135e63c84e8b7f39769bcdee45ddf973a567732'
|
'02d720e3fffae018fc8719a98135e63c84e8b7f39769bcdee45ddf973a567732'
|
||||||
'6225348b31112a67f5e37a9075363b36c103ba6144083cf4e2d7d83edc77513c'
|
'6225348b31112a67f5e37a9075363b36c103ba6144083cf4e2d7d83edc77513c'
|
||||||
'ea0016af33f682a0353738b00c39407b7e1a96a9ccfb04b3904b58143c1953ee'
|
'ea0016af33f682a0353738b00c39407b7e1a96a9ccfb04b3904b58143c1953ee'
|
||||||
'19fb55efe921ac95376ec2169b09add1846aa3bdf9eff368d74f2cc1f25364d5'
|
'f59a6c1a59699664eeeb5243cb961845944cbc6d1c63353ad9d2ff7d8b593ec3'
|
||||||
'1e620fa5bb90d7a8d4a57d0dc1552b096762a4da4cf1a5ce461d54c3c9b9885f'
|
'1e620fa5bb90d7a8d4a57d0dc1552b096762a4da4cf1a5ce461d54c3c9b9885f'
|
||||||
'7693cf1df35a47ec8702543d9665f9010a5c7db18a39d9506649e892fd36954f')
|
'7693cf1df35a47ec8702543d9665f9010a5c7db18a39d9506649e892fd36954f')
|
||||||
|
|
||||||
|
|
|
@ -24,3 +24,20 @@ CONFIG_ANDROID=y
|
||||||
CONFIG_ANDROID_BINDER_IPC=y
|
CONFIG_ANDROID_BINDER_IPC=y
|
||||||
CONFIG_ANDROID_BINDERFS=y
|
CONFIG_ANDROID_BINDERFS=y
|
||||||
CONFIG_ANDROID_BINDER_DEVICES=""
|
CONFIG_ANDROID_BINDER_DEVICES=""
|
||||||
|
|
||||||
|
##
|
||||||
|
## Build-in basic pinctrl/serial modules to prevent race-conditions in drivers
|
||||||
|
## relying on them (like soc-button-array, SAM)
|
||||||
|
##
|
||||||
|
|
||||||
|
CONFIG_SERIAL_8250_DW=y
|
||||||
|
CONFIG_MFD_INTEL_LPSS=y
|
||||||
|
CONFIG_MFD_INTEL_LPSS_PCI=y
|
||||||
|
|
||||||
|
CONFIG_PINCTRL_INTEL=y
|
||||||
|
CONFIG_PINCTRL_ALDERLAKE=y
|
||||||
|
CONFIG_PINCTRL_CANNONLAKE=y
|
||||||
|
CONFIG_PINCTRL_ICELAKE=y
|
||||||
|
CONFIG_PINCTRL_METEORLAKE=y
|
||||||
|
CONFIG_PINCTRL_SUNRISEPOINT=y
|
||||||
|
CONFIG_PINCTRL_TIGERLAKE=y
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#
|
#
|
||||||
# Automatically generated file; DO NOT EDIT.
|
# Automatically generated file; DO NOT EDIT.
|
||||||
# Linux/x86 6.8.1-arch1 Kernel Configuration
|
# Linux/x86 6.8.6-arch1 Kernel Configuration
|
||||||
#
|
#
|
||||||
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.1 20230801"
|
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.1 20230801"
|
||||||
CONFIG_CC_IS_GCC=y
|
CONFIG_CC_IS_GCC=y
|
||||||
|
@ -471,7 +471,6 @@ CONFIG_X86_DIRECT_GBPAGES=y
|
||||||
CONFIG_X86_CPA_STATISTICS=y
|
CONFIG_X86_CPA_STATISTICS=y
|
||||||
CONFIG_X86_MEM_ENCRYPT=y
|
CONFIG_X86_MEM_ENCRYPT=y
|
||||||
CONFIG_AMD_MEM_ENCRYPT=y
|
CONFIG_AMD_MEM_ENCRYPT=y
|
||||||
# CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT is not set
|
|
||||||
CONFIG_NUMA=y
|
CONFIG_NUMA=y
|
||||||
CONFIG_AMD_NUMA=y
|
CONFIG_AMD_NUMA=y
|
||||||
CONFIG_X86_64_ACPI_NUMA=y
|
CONFIG_X86_64_ACPI_NUMA=y
|
||||||
|
@ -567,6 +566,9 @@ CONFIG_CPU_SRSO=y
|
||||||
CONFIG_SLS=y
|
CONFIG_SLS=y
|
||||||
# CONFIG_GDS_FORCE_MITIGATION is not set
|
# CONFIG_GDS_FORCE_MITIGATION is not set
|
||||||
CONFIG_MITIGATION_RFDS=y
|
CONFIG_MITIGATION_RFDS=y
|
||||||
|
CONFIG_SPECTRE_BHI_ON=y
|
||||||
|
# CONFIG_SPECTRE_BHI_OFF is not set
|
||||||
|
# CONFIG_SPECTRE_BHI_AUTO is not set
|
||||||
CONFIG_ARCH_HAS_ADD_PAGES=y
|
CONFIG_ARCH_HAS_ADD_PAGES=y
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -964,6 +966,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y
|
||||||
CONFIG_MODULE_SIG=y
|
CONFIG_MODULE_SIG=y
|
||||||
# CONFIG_MODULE_SIG_FORCE is not set
|
# CONFIG_MODULE_SIG_FORCE is not set
|
||||||
CONFIG_MODULE_SIG_ALL=y
|
CONFIG_MODULE_SIG_ALL=y
|
||||||
|
# CONFIG_MODULE_SIG_SHA1 is not set
|
||||||
# CONFIG_MODULE_SIG_SHA256 is not set
|
# CONFIG_MODULE_SIG_SHA256 is not set
|
||||||
# CONFIG_MODULE_SIG_SHA384 is not set
|
# CONFIG_MODULE_SIG_SHA384 is not set
|
||||||
CONFIG_MODULE_SIG_SHA512=y
|
CONFIG_MODULE_SIG_SHA512=y
|
||||||
|
@ -1999,7 +2002,6 @@ CONFIG_BT_BNEP_MC_FILTER=y
|
||||||
CONFIG_BT_BNEP_PROTO_FILTER=y
|
CONFIG_BT_BNEP_PROTO_FILTER=y
|
||||||
CONFIG_BT_CMTP=m
|
CONFIG_BT_CMTP=m
|
||||||
CONFIG_BT_HIDP=m
|
CONFIG_BT_HIDP=m
|
||||||
# CONFIG_BT_HS is not set
|
|
||||||
CONFIG_BT_LE=y
|
CONFIG_BT_LE=y
|
||||||
CONFIG_BT_LE_L2CAP_ECRED=y
|
CONFIG_BT_LE_L2CAP_ECRED=y
|
||||||
CONFIG_BT_6LOWPAN=m
|
CONFIG_BT_6LOWPAN=m
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
KERNEL_VERSION="6.8.1"
|
KERNEL_VERSION="6.8.6"
|
||||||
KERNEL_REVISION="1"
|
KERNEL_REVISION="1"
|
||||||
KERNEL_LOCALVERSION="-surface"
|
KERNEL_LOCALVERSION="-surface"
|
||||||
|
|
|
@ -18,7 +18,7 @@ PACKAGE_NAME = "surface"
|
||||||
## Fedora tags: kernel-X.Y.Z
|
## Fedora tags: kernel-X.Y.Z
|
||||||
## Upstream tags: vX.Y.Z
|
## Upstream tags: vX.Y.Z
|
||||||
##
|
##
|
||||||
PACKAGE_TAG = "kernel-6.8.0-63"
|
PACKAGE_TAG = "kernel-6.8.6-0"
|
||||||
|
|
||||||
##
|
##
|
||||||
## The release number of the modified kernel package.
|
## The release number of the modified kernel package.
|
||||||
|
|
Loading…
Reference in a new issue