Commit d2024cdf authored by Linus Walleij's avatar Linus Walleij

drm/panel: s6e63m0: Fix up DRM_DEV* regression

Ooops the panel drivers stopped to use DRM_DEV* messages
and we predictably create errors by merging code that
still use it.
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Acked-by: default avatarDavid Airlie <airlied@linux.ie>
Link: https://patchwork.freedesktop.org/patch/msgid/20200906132903.5739-1-linus.walleij@linaro.org
parent ec219f1b
...@@ -23,11 +23,11 @@ static int s6e63m0_dsi_dcs_read(struct device *dev, const u8 cmd, u8 *data) ...@@ -23,11 +23,11 @@ static int s6e63m0_dsi_dcs_read(struct device *dev, const u8 cmd, u8 *data)
ret = mipi_dsi_dcs_read(dsi, cmd, data, 1); ret = mipi_dsi_dcs_read(dsi, cmd, data, 1);
if (ret < 0) { if (ret < 0) {
DRM_DEV_ERROR(dev, "could not read DCS CMD %02x\n", cmd); dev_err(dev, "could not read DCS CMD %02x\n", cmd);
return ret; return ret;
} }
DRM_DEV_INFO(dev, "DSI read CMD %02x = %02x\n", cmd, *data); dev_info(dev, "DSI read CMD %02x = %02x\n", cmd, *data);
return 0; return 0;
} }
...@@ -42,7 +42,7 @@ static int s6e63m0_dsi_dcs_write(struct device *dev, const u8 *data, size_t len) ...@@ -42,7 +42,7 @@ static int s6e63m0_dsi_dcs_write(struct device *dev, const u8 *data, size_t len)
int chunk; int chunk;
int ret; int ret;
DRM_DEV_INFO(dev, "DSI writing dcs seq: %*ph\n", (int)len, data); dev_info(dev, "DSI writing dcs seq: %*ph\n", (int)len, data);
/* Pick out and skip past the DCS command */ /* Pick out and skip past the DCS command */
cmd = *seqp; cmd = *seqp;
...@@ -56,9 +56,7 @@ static int s6e63m0_dsi_dcs_write(struct device *dev, const u8 *data, size_t len) ...@@ -56,9 +56,7 @@ static int s6e63m0_dsi_dcs_write(struct device *dev, const u8 *data, size_t len)
chunk = S6E63M0_DSI_MAX_CHUNK; chunk = S6E63M0_DSI_MAX_CHUNK;
ret = mipi_dsi_dcs_write(dsi, cmd, seqp, chunk); ret = mipi_dsi_dcs_write(dsi, cmd, seqp, chunk);
if (ret < 0) { if (ret < 0) {
DRM_DEV_ERROR(dev, dev_err(dev, "error sending DCS command seq cmd %02x\n", cmd);
"error sending DCS command seq cmd %02x\n",
cmd);
return ret; return ret;
} }
cmdwritten += chunk; cmdwritten += chunk;
...@@ -70,23 +68,19 @@ static int s6e63m0_dsi_dcs_write(struct device *dev, const u8 *data, size_t len) ...@@ -70,23 +68,19 @@ static int s6e63m0_dsi_dcs_write(struct device *dev, const u8 *data, size_t len)
chunk = S6E63M0_DSI_MAX_CHUNK; chunk = S6E63M0_DSI_MAX_CHUNK;
ret = mipi_dsi_dcs_write(dsi, MCS_GLOBAL_PARAM, &cmdwritten, 1); ret = mipi_dsi_dcs_write(dsi, MCS_GLOBAL_PARAM, &cmdwritten, 1);
if (ret < 0) { if (ret < 0) {
DRM_DEV_ERROR(dev, dev_err(dev, "error sending CMD %02x global param %02x\n",
"error sending CMD %02x global param %02x\n", cmd, cmdwritten);
cmd, cmdwritten);
return ret; return ret;
} }
ret = mipi_dsi_dcs_write(dsi, cmd, seqp, chunk); ret = mipi_dsi_dcs_write(dsi, cmd, seqp, chunk);
if (ret < 0) { if (ret < 0) {
DRM_DEV_ERROR(dev, dev_err(dev, "error sending CMD %02x chunk\n", cmd);
"error sending CMD %02x chunk\n",
cmd);
return ret; return ret;
} }
cmdwritten += chunk; cmdwritten += chunk;
seqp += chunk; seqp += chunk;
} }
DRM_DEV_INFO(dev, "sent command %02x %02x bytes\n", dev_info(dev, "sent command %02x %02x bytes\n", cmd, cmdwritten);
cmd, cmdwritten);
usleep_range(8000, 9000); usleep_range(8000, 9000);
......
...@@ -41,7 +41,7 @@ static int s6e63m0_spi_dcs_write(struct device *dev, const u8 *data, size_t len) ...@@ -41,7 +41,7 @@ static int s6e63m0_spi_dcs_write(struct device *dev, const u8 *data, size_t len)
{ {
int ret = 0; int ret = 0;
DRM_DEV_DEBUG(dev, "SPI writing dcs seq: %*ph\n", (int)len, data); dev_dbg(dev, "SPI writing dcs seq: %*ph\n", (int)len, data);
ret = s6e63m0_spi_write_word(dev, *data); ret = s6e63m0_spi_write_word(dev, *data);
while (!ret && --len) { while (!ret && --len) {
...@@ -50,8 +50,8 @@ static int s6e63m0_spi_dcs_write(struct device *dev, const u8 *data, size_t len) ...@@ -50,8 +50,8 @@ static int s6e63m0_spi_dcs_write(struct device *dev, const u8 *data, size_t len)
} }
if (ret) { if (ret) {
DRM_DEV_ERROR(dev, "SPI error %d writing dcs seq: %*ph\n", ret, dev_err(dev, "SPI error %d writing dcs seq: %*ph\n", ret,
(int)len, data); (int)len, data);
} }
usleep_range(300, 310); usleep_range(300, 310);
...@@ -68,7 +68,7 @@ static int s6e63m0_spi_probe(struct spi_device *spi) ...@@ -68,7 +68,7 @@ static int s6e63m0_spi_probe(struct spi_device *spi)
spi->mode = SPI_MODE_3; spi->mode = SPI_MODE_3;
ret = spi_setup(spi); ret = spi_setup(spi);
if (ret < 0) { if (ret < 0) {
DRM_DEV_ERROR(dev, "spi setup failed.\n"); dev_err(dev, "spi setup failed.\n");
return ret; return ret;
} }
return s6e63m0_probe(dev, s6e63m0_spi_dcs_read, s6e63m0_spi_dcs_write, return s6e63m0_probe(dev, s6e63m0_spi_dcs_read, s6e63m0_spi_dcs_write,
......
...@@ -179,28 +179,24 @@ static int s6e63m0_check_lcd_type(struct s6e63m0 *ctx) ...@@ -179,28 +179,24 @@ static int s6e63m0_check_lcd_type(struct s6e63m0 *ctx)
ret = s6e63m0_clear_error(ctx); ret = s6e63m0_clear_error(ctx);
if (ret) { if (ret) {
DRM_DEV_ERROR(ctx->dev, "error checking LCD type (%d)\n", dev_err(ctx->dev, "error checking LCD type (%d)\n", ret);
ret);
ctx->lcd_type = 0x00; ctx->lcd_type = 0x00;
return ret; return ret;
} }
DRM_DEV_INFO(ctx->dev, "MTP ID: %02x %02x %02x\n", id1, id2, id3); dev_info(ctx->dev, "MTP ID: %02x %02x %02x\n", id1, id2, id3);
/* We attempt to detect what panel is mounted on the controller */ /* We attempt to detect what panel is mounted on the controller */
switch (id2) { switch (id2) {
case S6E63M0_LCD_ID_VALUE_M2: case S6E63M0_LCD_ID_VALUE_M2:
DRM_DEV_INFO(ctx->dev, dev_info(ctx->dev, "detected LCD panel AMS397GE MIPI M2\n");
"detected LCD panel AMS397GE MIPI M2\n");
break; break;
case S6E63M0_LCD_ID_VALUE_SM2: case S6E63M0_LCD_ID_VALUE_SM2:
case S6E63M0_LCD_ID_VALUE_SM2_1: case S6E63M0_LCD_ID_VALUE_SM2_1:
DRM_DEV_INFO(ctx->dev, dev_info(ctx->dev, "detected LCD panel AMS397GE MIPI SM2\n");
"detected LCD panel AMS397GE MIPI SM2\n");
break; break;
default: default:
DRM_DEV_INFO(ctx->dev, dev_info(ctx->dev, "unknown LCD panel type %02x\n", id2);
"unknown LCD panel type %02x\n", id2);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment