WIP: adding some fixes in the drivers (#248)

* input: touchscreen: focaltech touch: Removing invalid function calls

* Implement missing things on drivers

* drm: panel: radxa 8hd display: Fix some wrong definitions

* Rename reference for enable both modules
This commit is contained in:
SuperKali
2024-09-26 15:01:07 +02:00
committed by boogie
parent 59afe40b65
commit f5f5466f80
8 changed files with 11 additions and 22 deletions

View File

@@ -616,7 +616,7 @@ static int jadard_dsi_probe(struct mipi_dsi_device *dsi)
desc = of_device_get_match_data(dev);
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
MIPI_DSI_MODE_EOT_PACKET;
MIPI_DSI_MODE_NO_EOT_PACKET;
dsi->format = desc->format;
dsi->lanes = desc->lanes;
@@ -658,14 +658,12 @@ static int jadard_dsi_probe(struct mipi_dsi_device *dsi)
return ret;
}
static int jadard_dsi_remove(struct mipi_dsi_device *dsi)
static void jadard_dsi_remove(struct mipi_dsi_device *dsi)
{
struct jadard *jadard = mipi_dsi_get_drvdata(dsi);
mipi_dsi_detach(dsi);
drm_panel_remove(&jadard->panel);
return 0;
}
static const struct of_device_id jadard_of_match[] = {
@@ -688,4 +686,4 @@ module_mipi_dsi_driver(jadard_driver);
MODULE_AUTHOR("Jagan Teki <jagan@edgeble.ai>");
MODULE_AUTHOR("Stephen Chen <stephen@radxa.com>");
MODULE_DESCRIPTION("Jadard JD9365DA-H3 WXGA DSI panel");
MODULE_LICENSE("GPL");
MODULE_LICENSE("GPL");

View File

@@ -368,7 +368,7 @@ static int radxa_display_8hd_probe(struct mipi_dsi_device *dsi)
desc = of_device_get_match_data(dev);
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
MIPI_DSI_MODE_EOT_PACKET;
MIPI_DSI_MODE_NO_EOT_PACKET;
dsi->format = desc->format;
dsi->lanes = desc->lanes;
@@ -410,14 +410,13 @@ static int radxa_display_8hd_probe(struct mipi_dsi_device *dsi)
return ret;
}
static int radxa_display_8hd_remove(struct mipi_dsi_device *dsi)
static void radxa_display_8hd_remove(struct mipi_dsi_device *dsi)
{
struct jadard_jd9365da *jadard_jd9365da = mipi_dsi_get_drvdata(dsi);
mipi_dsi_detach(dsi);
drm_panel_remove(&jadard_jd9365da->panel);
return 0;
}
static const struct of_device_id radxa_display_8hd_of_match[] = {

View File

@@ -5,7 +5,7 @@
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_AK8974) += ak8974.o
obj-$(CONFIG_AK8975) += ak8975.o
obj-$(CONFIG_AK8975) += ak8975_magn.o
obj-$(CONFIG_BMC150_MAGN) += bmc150_magn.o
obj-$(CONFIG_BMC150_MAGN_I2C) += bmc150_magn_i2c.o
obj-$(CONFIG_BMC150_MAGN_SPI) += bmc150_magn_spi.o

View File

@@ -1088,7 +1088,7 @@ MODULE_DEVICE_TABLE(of, ak8975_of_match);
static struct i2c_driver ak8975_driver = {
.driver = {
.name = "ak8975",
.name = "ak8975_magn",
.pm = pm_ptr(&ak8975_dev_pm_ops),
.of_match_table = ak8975_of_match,
.acpi_match_table = ak_acpi_match,

View File

@@ -2,7 +2,7 @@
#
# Makefile for industrial I/O Magnetometer sensors
#
obj-$(CONFIG_COMPASS_AK8975) += ak8975.o
obj-$(CONFIG_COMPASS_AK8975) += ak8975_comp.o
obj-$(CONFIG_COMPASS_AK8963) += ak8963.o
obj-$(CONFIG_COMPASS_AK09911) += ak09911.o
obj-$(CONFIG_COMPASS_AK09918) += ak09918.o

View File

@@ -244,7 +244,7 @@ static int sensor_report_value(struct i2c_client *client)
return -3;
}
/* 互斥地缓存数据. */
/* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ػ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. */
mutex_lock(&sensor->data_mutex);
memcpy(sensor->sensor_data, buffer, sensor->ops->read_len);
mutex_unlock(&sensor->data_mutex);
@@ -593,7 +593,7 @@ static struct miscdevice compass_dev_device =
};
static struct sensor_operate compass_akm8975_ops = {
.name = "akm8975",
.name = "akm8975_comp",
.type = SENSOR_TYPE_COMPASS, //it is important
.id_i2c = COMPASS_ID_AK8975,
.read_reg = AK8975_REG_ST1, //read data
@@ -624,7 +624,7 @@ static void compass_akm8975_remove(struct i2c_client *client)
}
static const struct i2c_device_id compass_akm8975_id[] = {
{"ak8975", COMPASS_ID_AK8975},
{"ak8975_comp", COMPASS_ID_AK8975},
{}
};

View File

@@ -1073,7 +1073,6 @@ static int fts_read_file(char *file_name, u8 **file_buf)
char file_path[FILE_NAME_LENGTH] = { 0 };
struct file *filp = NULL;
struct inode *inode;
mm_segment_t old_fs;
loff_t pos;
loff_t file_len = 0;
@@ -1103,15 +1102,12 @@ static int fts_read_file(char *file_name, u8 **file_buf)
filp_close(filp, NULL);
return -ENOMEM;
}
old_fs = get_fs();
set_fs(KERNEL_DS);
pos = 0;
ret = vfs_read(filp, *file_buf, file_len , &pos);
if (ret < 0)
FTS_ERROR("read file fail");
FTS_INFO("file len:%d read len:%d pos:%d", (u32)file_len, ret, (u32)pos);
filp_close(filp, NULL);
set_fs(old_fs);
return ret;
}

View File

@@ -1181,7 +1181,6 @@ static int fts_test_save_test_data(char *file_name, char *data_buf, int len)
struct file *pfile = NULL;
char filepath[128];
loff_t pos;
mm_segment_t old_fs;
FTS_TEST_FUNC_ENTER();
memset(filepath, 0, sizeof(filepath));
@@ -1194,12 +1193,9 @@ static int fts_test_save_test_data(char *file_name, char *data_buf, int len)
return -EIO;
}
old_fs = get_fs();
set_fs(KERNEL_DS);
pos = 0;
vfs_write(pfile, data_buf, len, &pos);
filp_close(pfile, NULL);
set_fs(old_fs);
FTS_TEST_FUNC_EXIT();
return 0;