Commit cf4a3ab5 authored by Ettore Chimenti's avatar Ettore Chimenti Committed by Mauro Carvalho Chehab

media: cec: seco: add newlines in debug messages

Newlines were missing in almost all regular and debug printk.
Signed-off-by: default avatarEttore Chimenti <ek5.chimenti@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent fde18c3b
...@@ -129,7 +129,7 @@ static int secocec_adap_enable(struct cec_adapter *adap, bool enable) ...@@ -129,7 +129,7 @@ static int secocec_adap_enable(struct cec_adapter *adap, bool enable)
if (status) if (status)
goto err; goto err;
dev_dbg(dev, "Device enabled"); dev_dbg(dev, "Device enabled\n");
} else { } else {
/* Clear the status register */ /* Clear the status register */
status = smb_rd16(SECOCEC_STATUS_REG_1, &val); status = smb_rd16(SECOCEC_STATUS_REG_1, &val);
...@@ -141,7 +141,7 @@ static int secocec_adap_enable(struct cec_adapter *adap, bool enable) ...@@ -141,7 +141,7 @@ static int secocec_adap_enable(struct cec_adapter *adap, bool enable)
~SECOCEC_ENABLE_REG_1_CEC & ~SECOCEC_ENABLE_REG_1_CEC &
~SECOCEC_ENABLE_REG_1_IR); ~SECOCEC_ENABLE_REG_1_IR);
dev_dbg(dev, "Device disabled"); dev_dbg(dev, "Device disabled\n");
} }
return 0; return 0;
...@@ -264,12 +264,12 @@ static void secocec_rx_done(struct cec_adapter *adap, u16 status_val) ...@@ -264,12 +264,12 @@ static void secocec_rx_done(struct cec_adapter *adap, u16 status_val)
if (status_val & SECOCEC_STATUS_RX_OVERFLOW_MASK) { if (status_val & SECOCEC_STATUS_RX_OVERFLOW_MASK) {
/* NOTE: Untested, it also might not be necessary */ /* NOTE: Untested, it also might not be necessary */
dev_warn(dev, "Received more than 16 bytes. Discarding"); dev_warn(dev, "Received more than 16 bytes. Discarding\n");
flag_overflow = true; flag_overflow = true;
} }
if (status_val & SECOCEC_STATUS_RX_ERROR_MASK) { if (status_val & SECOCEC_STATUS_RX_ERROR_MASK) {
dev_warn(dev, "Message received with errors. Discarding"); dev_warn(dev, "Message received with errors. Discarding\n");
status = -EIO; status = -EIO;
goto rxerr; goto rxerr;
} }
...@@ -390,12 +390,12 @@ static int secocec_ir_probe(void *priv) ...@@ -390,12 +390,12 @@ static int secocec_ir_probe(void *priv)
if (status != 0) if (status != 0)
goto err; goto err;
dev_dbg(dev, "IR enabled"); dev_dbg(dev, "IR enabled\n");
status = devm_rc_register_device(dev, cec->ir); status = devm_rc_register_device(dev, cec->ir);
if (status) { if (status) {
dev_err(dev, "Failed to prepare input device"); dev_err(dev, "Failed to prepare input device\n");
cec->ir = NULL; cec->ir = NULL;
goto err; goto err;
} }
...@@ -408,7 +408,7 @@ static int secocec_ir_probe(void *priv) ...@@ -408,7 +408,7 @@ static int secocec_ir_probe(void *priv)
smb_wr16(SECOCEC_ENABLE_REG_1, smb_wr16(SECOCEC_ENABLE_REG_1,
val & ~SECOCEC_ENABLE_REG_1_IR); val & ~SECOCEC_ENABLE_REG_1_IR);
dev_dbg(dev, "IR disabled"); dev_dbg(dev, "IR disabled\n");
return status; return status;
} }
...@@ -431,13 +431,13 @@ static int secocec_ir_rx(struct secocec_data *priv) ...@@ -431,13 +431,13 @@ static int secocec_ir_rx(struct secocec_data *priv)
rc_keydown(cec->ir, RC_PROTO_RC5, RC_SCANCODE_RC5(addr, key), toggle); rc_keydown(cec->ir, RC_PROTO_RC5, RC_SCANCODE_RC5(addr, key), toggle);
dev_dbg(dev, "IR key pressed: 0x%02x addr 0x%02x toggle 0x%02x", key, dev_dbg(dev, "IR key pressed: 0x%02x addr 0x%02x toggle 0x%02x\n", key,
addr, toggle); addr, toggle);
return 0; return 0;
err: err:
dev_err(dev, "IR Receive message failed (%d)", status); dev_err(dev, "IR Receive message failed (%d)\n", status);
return -EIO; return -EIO;
} }
#else #else
...@@ -497,7 +497,7 @@ static irqreturn_t secocec_irq_handler(int irq, void *priv) ...@@ -497,7 +497,7 @@ static irqreturn_t secocec_irq_handler(int irq, void *priv)
return IRQ_HANDLED; return IRQ_HANDLED;
err: err:
dev_err_once(dev, "IRQ: R/W SMBus operation failed (%d)", status); dev_err_once(dev, "IRQ: R/W SMBus operation failed %d\n", status);
/* Reset status register */ /* Reset status register */
val = SECOCEC_STATUS_REG_1_CEC | SECOCEC_STATUS_REG_1_IR; val = SECOCEC_STATUS_REG_1_CEC | SECOCEC_STATUS_REG_1_IR;
...@@ -553,16 +553,16 @@ static int secocec_acpi_probe(struct secocec_data *sdev) ...@@ -553,16 +553,16 @@ static int secocec_acpi_probe(struct secocec_data *sdev)
gpio = devm_gpiod_get(dev, NULL, GPIOF_IN); gpio = devm_gpiod_get(dev, NULL, GPIOF_IN);
if (IS_ERR(gpio)) { if (IS_ERR(gpio)) {
dev_err(dev, "Cannot request interrupt gpio"); dev_err(dev, "Cannot request interrupt gpio\n");
return PTR_ERR(gpio); return PTR_ERR(gpio);
} }
irq = gpiod_to_irq(gpio); irq = gpiod_to_irq(gpio);
if (irq < 0) { if (irq < 0) {
dev_err(dev, "Cannot find valid irq"); dev_err(dev, "Cannot find valid irq\n");
return -ENODEV; return -ENODEV;
} }
dev_dbg(dev, "irq-gpio is bound to IRQ %d", irq); dev_dbg(dev, "irq-gpio is bound to IRQ %d\n", irq);
sdev->irq = irq; sdev->irq = irq;
...@@ -590,7 +590,7 @@ static int secocec_probe(struct platform_device *pdev) ...@@ -590,7 +590,7 @@ static int secocec_probe(struct platform_device *pdev)
/* Request SMBus regions */ /* Request SMBus regions */
if (!request_muxed_region(BRA_SMB_BASE_ADDR, 7, "CEC00001")) { if (!request_muxed_region(BRA_SMB_BASE_ADDR, 7, "CEC00001")) {
dev_err(dev, "Request memory region failed"); dev_err(dev, "Request memory region failed\n");
return -ENXIO; return -ENXIO;
} }
...@@ -598,14 +598,14 @@ static int secocec_probe(struct platform_device *pdev) ...@@ -598,14 +598,14 @@ static int secocec_probe(struct platform_device *pdev)
secocec->dev = dev; secocec->dev = dev;
if (!has_acpi_companion(dev)) { if (!has_acpi_companion(dev)) {
dev_dbg(dev, "Cannot find any ACPI companion"); dev_dbg(dev, "Cannot find any ACPI companion\n");
ret = -ENODEV; ret = -ENODEV;
goto err; goto err;
} }
ret = secocec_acpi_probe(secocec); ret = secocec_acpi_probe(secocec);
if (ret) { if (ret) {
dev_err(dev, "Cannot assign gpio to IRQ"); dev_err(dev, "Cannot assign gpio to IRQ\n");
ret = -ENODEV; ret = -ENODEV;
goto err; goto err;
} }
...@@ -613,11 +613,11 @@ static int secocec_probe(struct platform_device *pdev) ...@@ -613,11 +613,11 @@ static int secocec_probe(struct platform_device *pdev)
/* Firmware version check */ /* Firmware version check */
ret = smb_rd16(SECOCEC_VERSION, &val); ret = smb_rd16(SECOCEC_VERSION, &val);
if (ret) { if (ret) {
dev_err(dev, "Cannot check fw version"); dev_err(dev, "Cannot check fw version\n");
goto err; goto err;
} }
if (val < SECOCEC_LATEST_FW) { if (val < SECOCEC_LATEST_FW) {
dev_err(dev, "CEC Firmware not supported (v.%04x). Use ver > v.%04x", dev_err(dev, "CEC Firmware not supported (v.%04x). Use ver > v.%04x\n",
val, SECOCEC_LATEST_FW); val, SECOCEC_LATEST_FW);
ret = -EINVAL; ret = -EINVAL;
goto err; goto err;
...@@ -631,7 +631,7 @@ static int secocec_probe(struct platform_device *pdev) ...@@ -631,7 +631,7 @@ static int secocec_probe(struct platform_device *pdev)
dev_name(&pdev->dev), secocec); dev_name(&pdev->dev), secocec);
if (ret) { if (ret) {
dev_err(dev, "Cannot request IRQ %d", secocec->irq); dev_err(dev, "Cannot request IRQ %d\n", secocec->irq);
ret = -EIO; ret = -EIO;
goto err; goto err;
} }
...@@ -666,7 +666,7 @@ static int secocec_probe(struct platform_device *pdev) ...@@ -666,7 +666,7 @@ static int secocec_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, secocec); platform_set_drvdata(pdev, secocec);
dev_dbg(dev, "Device registered"); dev_dbg(dev, "Device registered\n");
return ret; return ret;
...@@ -691,14 +691,14 @@ static int secocec_remove(struct platform_device *pdev) ...@@ -691,14 +691,14 @@ static int secocec_remove(struct platform_device *pdev)
smb_wr16(SECOCEC_ENABLE_REG_1, val & ~SECOCEC_ENABLE_REG_1_IR); smb_wr16(SECOCEC_ENABLE_REG_1, val & ~SECOCEC_ENABLE_REG_1_IR);
dev_dbg(&pdev->dev, "IR disabled"); dev_dbg(&pdev->dev, "IR disabled\n");
} }
cec_notifier_cec_adap_unregister(secocec->notifier, secocec->cec_adap); cec_notifier_cec_adap_unregister(secocec->notifier, secocec->cec_adap);
cec_unregister_adapter(secocec->cec_adap); cec_unregister_adapter(secocec->cec_adap);
release_region(BRA_SMB_BASE_ADDR, 7); release_region(BRA_SMB_BASE_ADDR, 7);
dev_dbg(&pdev->dev, "CEC device removed"); dev_dbg(&pdev->dev, "CEC device removed\n");
return 0; return 0;
} }
...@@ -709,7 +709,7 @@ static int secocec_suspend(struct device *dev) ...@@ -709,7 +709,7 @@ static int secocec_suspend(struct device *dev)
int status; int status;
u16 val; u16 val;
dev_dbg(dev, "Device going to suspend, disabling"); dev_dbg(dev, "Device going to suspend, disabling\n");
/* Clear the status register */ /* Clear the status register */
status = smb_rd16(SECOCEC_STATUS_REG_1, &val); status = smb_rd16(SECOCEC_STATUS_REG_1, &val);
...@@ -733,7 +733,7 @@ static int secocec_suspend(struct device *dev) ...@@ -733,7 +733,7 @@ static int secocec_suspend(struct device *dev)
return 0; return 0;
err: err:
dev_err(dev, "Suspend failed (err: %d)", status); dev_err(dev, "Suspend failed: %d\n", status);
return status; return status;
} }
...@@ -742,7 +742,7 @@ static int secocec_resume(struct device *dev) ...@@ -742,7 +742,7 @@ static int secocec_resume(struct device *dev)
int status; int status;
u16 val; u16 val;
dev_dbg(dev, "Resuming device from suspend"); dev_dbg(dev, "Resuming device from suspend\n");
/* Clear the status register */ /* Clear the status register */
status = smb_rd16(SECOCEC_STATUS_REG_1, &val); status = smb_rd16(SECOCEC_STATUS_REG_1, &val);
...@@ -762,12 +762,12 @@ static int secocec_resume(struct device *dev) ...@@ -762,12 +762,12 @@ static int secocec_resume(struct device *dev)
if (status) if (status)
goto err; goto err;
dev_dbg(dev, "Device resumed from suspend"); dev_dbg(dev, "Device resumed from suspend\n");
return 0; return 0;
err: err:
dev_err(dev, "Resume failed (err: %d)", status); dev_err(dev, "Resume failed: %d\n", status);
return status; return status;
} }
......
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