linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: "Guido Günther" <agx@sigxcpu.org>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Rob Herring <robh+dt@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	Heiko Stuebner <heiko.stuebner@theobroma-systems.com>,
	Daniel Palmer <daniel@0x0f.com>, Lubomir Rintel <lkundrak@v3.sk>,
	Mark Brown <broonie@kernel.org>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	allen <allen.chen@ite.com.tw>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] drm/panel: Add panel driver for the Mantix MLAF057WE51-X DSI panel
Date: Sat, 15 Aug 2020 12:46:51 +0200	[thread overview]
Message-ID: <20200815104651.GA1005928@ravnborg.org> (raw)
In-Reply-To: <20200815104022.GA5641@bogon.m.sigxcpu.org>

On Sat, Aug 15, 2020 at 12:40:22PM +0200, Guido Günther wrote:
> Hi Sam,
> On Sat, Aug 15, 2020 at 12:02:30PM +0200, Sam Ravnborg wrote:
> > Hi Guido.
> > 
> > > +static int mantix_probe(struct mipi_dsi_device *dsi)
> > > +{
> > > +	struct device *dev = &dsi->dev;
> > > +	struct mantix *ctx;
> > > +	int ret;
> > > +
> > > +	ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
> > > +	if (!ctx)
> > > +		return -ENOMEM;
> > > +
> > > +	ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
> > > +	if (IS_ERR(ctx->reset_gpio)) {
> > > +		DRM_DEV_ERROR(dev, "cannot get reset gpio\n");
> > > +		return PTR_ERR(ctx->reset_gpio);
> > > +	}
> > > +
> > > +	mipi_dsi_set_drvdata(dsi, ctx);
> > > +	ctx->dev = dev;
> > > +
> > > +	dsi->lanes = 4;
> > > +	dsi->format = MIPI_DSI_FMT_RGB888;
> > > +	dsi->mode_flags = MIPI_DSI_MODE_VIDEO |
> > > +		MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
> > > +
> > > +	ctx->avdd = devm_regulator_get(dev, "avdd");
> > > +	if (IS_ERR(ctx->avdd)) {
> > > +		ret = PTR_ERR(ctx->avdd);
> > > +		if (ret != -EPROBE_DEFER)
> > > +			DRM_DEV_ERROR(dev,
> > > +				      "Failed to request avdd regulator: %d\n",
> > > +				      ret);
> > > +		return ret;
> > > +	}
> > 
> > Consider to use the recently added dev_err_probe() here and below.
> > Note: Not part of drm-misc-next yet - but hopefully after -rc1
> > when a backmerge is done.
> 
> In fact I did decided against it since i was told that missing dev_* and
> DRM_* logging shouldn't be done. So is that o.k. nowadays?
s/missing/mixing/

I often request that logging is consistent - so I recognize the
argument.

For panel/* I have not made up my mind what I think is the best
approach. The DRM_DEV_* and DRM_* logging do not add much value.
So I have been tempted several times to convert all logging in
panel/ to dev_* and pr_* (when no struct device * is available).
That would also avoid that we mix up logging.

We have drm_* logging - but they require a valid drm_device * which we
do not have in the the panel drivers. So they are ruled out here.

Do you have any opinions/comments on this?

	Sam

  reply	other threads:[~2020-08-15 22:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14 13:36 [PATCH 0/3] drm/panel: Add panel driver for the Mantix MLAF057WE51-X DSI panel Guido Günther
2020-08-14 13:36 ` [PATCH 1/3] dt-bindings: vendor-prefixes: Add mantix vendor prefix Guido Günther
2020-08-14 13:36 ` [PATCH 2/3] dt-bindings: Add Mantix MLAF057WE51-X panel bindings Guido Günther
2020-08-15  8:39   ` Sam Ravnborg
2020-08-15 16:47     ` Guido Günther
2020-08-15 21:08       ` Sam Ravnborg
2020-08-14 13:36 ` [PATCH 3/3] drm/panel: Add panel driver for the Mantix MLAF057WE51-X DSI panel Guido Günther
2020-08-15  9:32   ` Sam Ravnborg
2020-08-15 21:28     ` Guido Günther
2020-08-15 10:02   ` Sam Ravnborg
2020-08-15 10:40     ` Guido Günther
2020-08-15 10:46       ` Sam Ravnborg [this message]
2020-08-15 12:55         ` Sam Ravnborg
2020-08-15 16:25         ` Guido Günther

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200815104651.GA1005928@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=agx@sigxcpu.org \
    --cc=airlied@linux.ie \
    --cc=allen.chen@ite.com.tw \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=daniel@0x0f.com \
    --cc=daniel@ffwll.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko.stuebner@theobroma-systems.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkundrak@v3.sk \
    --cc=mchehab+huawei@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).