Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3703958ybd; Tue, 25 Jun 2019 07:07:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqye/j/V75a1U5sAAJcCVLkXZl50TnliT/LecJ4D17bwPy0AuxWbts4Tg6SGi6oTP2cTXY4y X-Received: by 2002:a63:78ca:: with SMTP id t193mr7951596pgc.10.1561471668889; Tue, 25 Jun 2019 07:07:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561471668; cv=none; d=google.com; s=arc-20160816; b=XgiRo+e0D/zLglYKlK9XVLEyiMHcKD7RluK//aJO17WtpliR83bEeJH6M2jAzFVvCE ZYc7FaPjB23LO/5Bp0UQgzExCrR/AXn72GN9xq1H8GFVrwTYxi942KJVZm+EBabCBFa6 IOCdTSFBWrjNg6xhDjGsc+VDd0qv7UW5Cgck5flzlmtJr2IPGV4VhHKaXuGYOnk0zBho LxHX6ZDhnEisEbXBirPmURLRaYjIwjOR4qHANP6VAknNDlm//JI1TayrWFXs4iZh0fM/ h++mRELcYRkfuLW/7c3/T61ZekQ4CDxLFwFMIBcOoB7Snop6vNieXFblmgs0gUOEr/S4 lNUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Gwp5TPT2ciji6ZbRTS8ylz/3kQtDNDOoQTxqYxzhue4=; b=UN4wYBjeYzEA7xXDGCuy88CMfEyDeREjuVCx42nbDdm5cdgJPBl547E60wNn2/RxCH ex+jrQcES8PjygX9w3o/3HVl2+9aIY1MsWHlx3kqdDepV6rmULyCPmYKfvYfzvS+VnQn 5IMOQ/vfB2e41E15ktJ+u0AE2tF2+s8ezSxRlR+UQvIWg4TRJ/AmcU+wj14QAJfTORSL lx+xGykmCYPCJGgrbP543iprYlBbcofW3mPIDbTxaaNRlZ1dDV+iejviJQ5K9zPkDiUh uPhsQkczFoqB6y0ggX8UwM9pdIYMCmzYPxIUVM95EM+jhQXkB4zUlQl52paoArYsDUlD sh6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B5UWY1gd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c23si14523202pfo.168.2019.06.25.07.07.33; Tue, 25 Jun 2019 07:07:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B5UWY1gd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728107AbfFYOGO (ORCPT + 99 others); Tue, 25 Jun 2019 10:06:14 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:35813 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726532AbfFYOGO (ORCPT ); Tue, 25 Jun 2019 10:06:14 -0400 Received: by mail-lj1-f194.google.com with SMTP id x25so16429908ljh.2; Tue, 25 Jun 2019 07:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Gwp5TPT2ciji6ZbRTS8ylz/3kQtDNDOoQTxqYxzhue4=; b=B5UWY1gddbzn9ZLIi8SZCis+WjCApR9XfktQCcFIAjw0Qdpn1tYHBslBg6Fm0bv5M9 Fihue0aKzZs/rPMWqLdluURhozdqsw46dLIgG2qxPeuLs2zBx5md0t3mp7D/ZS1FgK05 hR/B9zbdpyMY0pPE4xbbwUwQwdfQc1m7T4SKUSy71cJ8s4QOGQ6xvmP/seeu/1haYNix RWFBcSbGirNkGljtsf4Whr5xFTrL2BY+exlqkypZAYlhMmCa43IKbiGa6ggbDMkYImBH tAi7qTRfAbThUZ9xxVKCjN3J2fOGOa+7RvQB70odU2vMpPgGt9hq8IlnbbhqDUpUncef SGag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Gwp5TPT2ciji6ZbRTS8ylz/3kQtDNDOoQTxqYxzhue4=; b=kG4+dkEjZ7aIKsIZJP4/o9UnKvaxwZb81oUT8MWNYKLMUxfGcHDjqGg1xahaPo+QY6 8CdsE5U2OzKqJi9F1mmrkQhoFSWZm0NNKK32v2tTHqszh+EyZ0cJ3CVJSo/zoVEPS4OC 7gktZjNd60GsJaZsRLOl/6EHIPDLRhGdsGRDa84oBZKaPvVi4SgHEM8a2dWhfUaPJJAO OV+Rs1JpoLuzyKvrkRl30iptj5Yp8K3y04JP5ocT+74RjGRe5q4vbB9TuVygPAGbevkP Jk5HfKV0PwomNocol2c0fCEUmYdx9N1hExtGLZvkLQuF+EseBq99z7/OUUpLcb2HuVFp 16FQ== X-Gm-Message-State: APjAAAVZUs5ZZIQvph0ejLuF3TSZdfqsakqn9vpmT9lD9dZMdpfzjjQU hvJfBzHmLVvKMp/Bevc4k1t29woNPPum2uEgUQWeyxOw X-Received: by 2002:a2e:970a:: with SMTP id r10mr24948199lji.115.1561471572106; Tue, 25 Jun 2019 07:06:12 -0700 (PDT) MIME-Version: 1.0 References: <1561446674-25084-1-git-send-email-robert.chiras@nxp.com> <1561446674-25084-3-git-send-email-robert.chiras@nxp.com> In-Reply-To: <1561446674-25084-3-git-send-email-robert.chiras@nxp.com> From: Fabio Estevam Date: Tue, 25 Jun 2019 11:06:00 -0300 Message-ID: Subject: Re: [PATCH v4 2/2] drm/panel: Add support for Raydium RM67191 panel driver To: Robert Chiras Cc: Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-kernel , DRI mailing list , NXP Linux Team Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Robert, On Tue, Jun 25, 2019 at 4:28 AM Robert Chiras wrote: > +static int rad_bl_get_brightness(struct backlight_device *bl) > +{ > + struct mipi_dsi_device *dsi = bl_get_data(bl); > + struct rad_panel *rad = mipi_dsi_get_drvdata(dsi); > + struct device *dev = &dsi->dev; > + u16 brightness; > + int ret; > + > + if (!rad->prepared) > + return 0; > + > + DRM_DEV_DEBUG_DRIVER(dev, "\n"); Please remove this debug line. > + if (!rad->prepared) > + return 0; > + > + DRM_DEV_DEBUG_DRIVER(dev, "New brightness: %d\n", bl->props.brightness); Please remove it. > + ret = of_property_read_u32(np, "dsi-lanes", &dsi->lanes); > + if (ret) { > + dev_err(dev, "Failed to get dsi-lanes property (%d)\n", ret); > + return ret; > + } > + > + panel->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); Even it is optional, you still need to check for error and propagate it in the case of error. Otherwise defer probe will not work. > + ret = drm_panel_add(&panel->panel); > + if (ret) > + return ret; > + > + One blank line is enough.