From patchwork Thu Jan 31 19:26:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 10791301 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5726413B5 for ; Thu, 31 Jan 2019 19:27:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F1B731670 for ; Thu, 31 Jan 2019 19:27:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 406CF31793; Thu, 31 Jan 2019 19:27:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DE7D031670 for ; Thu, 31 Jan 2019 19:27:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CB31F6ED54; Thu, 31 Jan 2019 19:27:04 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 56EB06ED48 for ; Thu, 31 Jan 2019 19:26:51 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id v1-v6so3734161ljd.0 for ; Thu, 31 Jan 2019 11:26:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=Ge1hrHkar9sk1UI7FF3x9mKF9IHtV/Tb/hl7NzBj2q0=; b=iWdPw8YNazxThc6lmNQi5bKZlaJ0r6cb463G4MNzJtoRVyygLx4vhsWfSRItyLunlc gM6wXjKAkNEC/wxtNCdpRVUD6LzPMe56/PoIwszh2OeI9rydk5V+xw3oZpgypkddW1cm t0K2UrYmezSMWxXWnIoEvvxJ1iA3dC+by/5+b1d+mRPDOlojQn/Dj9XUtBCwEgzGgBIw HMfkzKF74EbO1jtvk3A8WCdi/ScliRwLtL3BAj4mgWMCu5ALz3y8ZiEOzdADy8VlbLb6 Dy7g0Qulp4hDWJMBXReOPeZHIW6M42fiZ9W9A6rOO4LL/X7ZneDTfp96+ph4FVi3nW7P 0orQ== X-Gm-Message-State: AJcUukdKqNpGtPpR0cUwiUUM6yplKd2HhXu7/o96K474OOT8vGdC1ZQW zeI+30O21E/0qgojdGo5SwZfjS0E X-Google-Smtp-Source: ALg8bN5XrRyGCJpVJt28Xm0RSMd77BycmVj5d/w/EJpOenOBU6GG38ZqAW0F3saXf5CvcOu8IvxxAw== X-Received: by 2002:a2e:917:: with SMTP id 23-v6mr29045541ljj.1.1548962809311; Thu, 31 Jan 2019 11:26:49 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id f1sm987363lfm.22.2019.01.31.11.26.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 11:26:48 -0800 (PST) From: Sam Ravnborg To: Thierry Reding , dri-devel@lists.freedesktop.org Subject: [PATCH v1 15/19] drm/panel: raspberrypi: use DRM_DEV* Date: Thu, 31 Jan 2019 20:26:15 +0100 Message-Id: <20190131192619.9763-16-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190131192619.9763-1-sam@ravnborg.org> References: <20190131192619.9763-1-sam@ravnborg.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Mavrodiev , David Airlie , linux-kernel@vger.kernel.org, Sam Ravnborg MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Introduce use of DRM_DEV* for logging. This makes logging in the drm subsystem more consistent. Signed-off-by: Sam Ravnborg Cc: Thierry Reding Cc: David Airlie Cc: Daniel Vetter --- .../gpu/drm/panel/panel-raspberrypi-touchscreen.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c index 28c0620dfe0f..c9013faff9ed 100644 --- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c @@ -57,6 +57,7 @@ #include #include #include +#include #define RPI_DSI_DRIVER_NAME "rpi-ts-dsi" @@ -232,7 +233,7 @@ static void rpi_touchscreen_i2c_write(struct rpi_touchscreen *ts, ret = i2c_smbus_write_byte_data(ts->i2c, reg, val); if (ret) - dev_err(&ts->dsi->dev, "I2C write failed: %d\n", ret); + DRM_DEV_ERROR(&ts->dsi->dev, "I2C write failed: %d\n", ret); } static int rpi_touchscreen_write(struct rpi_touchscreen *ts, u16 reg, u32 val) @@ -324,8 +325,9 @@ static int rpi_touchscreen_get_modes(struct drm_panel *panel) mode = drm_mode_duplicate(drm, m); if (!mode) { - dev_err(drm->dev, "failed to add mode %ux%u@%u\n", - m->hdisplay, m->vdisplay, m->vrefresh); + DRM_DEV_ERROR(drm->dev, + "failed to add mode %ux%u@%u\n", + m->hdisplay, m->vdisplay, m->vrefresh); continue; } @@ -381,7 +383,7 @@ static int rpi_touchscreen_probe(struct i2c_client *i2c, ver = rpi_touchscreen_i2c_read(ts, REG_ID); if (ver < 0) { - dev_err(dev, "Atmel I2C read failed: %d\n", ver); + DRM_DEV_ERROR(dev, "Atmel I2C read failed: %d\n", ver); return -ENODEV; } @@ -390,7 +392,9 @@ static int rpi_touchscreen_probe(struct i2c_client *i2c, case 0xc3: /* ver 2 */ break; default: - dev_err(dev, "Unknown Atmel firmware revision: 0x%02x\n", ver); + DRM_DEV_ERROR(dev, + "Unknown Atmel firmware revision: 0x%02x\n", + ver); return -ENODEV; } @@ -412,8 +416,9 @@ static int rpi_touchscreen_probe(struct i2c_client *i2c, ts->dsi = mipi_dsi_device_register_full(host, &info); if (IS_ERR(ts->dsi)) { - dev_err(dev, "DSI device registration failed: %ld\n", - PTR_ERR(ts->dsi)); + DRM_DEV_ERROR(dev, + "DSI device registration failed: %ld\n", + PTR_ERR(ts->dsi)); return PTR_ERR(ts->dsi); } @@ -457,7 +462,8 @@ static int rpi_touchscreen_dsi_probe(struct mipi_dsi_device *dsi) ret = mipi_dsi_attach(dsi); if (ret) - dev_err(&dsi->dev, "failed to attach dsi to host: %d\n", ret); + DRM_DEV_ERROR(&dsi->dev, + "failed to attach dsi to host: %d\n", ret); return ret; }