From: Alexandru Lazar <alazar@startmail.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org, jic23@kernel.org, knaack.h@gmx.de,
pmeerw@pmeerw.net, robh+dt@kernel.org, mark.rutland@arm.com
Subject: Re: [PATCH 1/2] iio: adc: Add MAX1241 driver
Date: Tue, 17 Mar 2020 23:28:57 +0200 [thread overview]
Message-ID: <20200317212857.GA28983@leena.republic> (raw)
In-Reply-To: <370e807c-da03-e925-2eac-1e7e92c124e4@metafoo.de>
Hi Lars,
Thank you very much for your comments! I'll send a version with the
fixes in a day or two (ar as soon as there's no more feedback, anyways)
-- in the meantime I have a question about this one:
> > + if (!adc->shdn)
> > + dev_info(&spi->dev, "no shdn pin passed, low-power mode disabled");
> > + else
> > + dev_info(&spi->dev, "shdn pin passed, low-power mode enabled");
>
> I can see how these message above are useful during development, but I'd
> remove them or turn them into dev_dbg() for the "production" version of the
> driver. Imagine every driver printed something like this, there would be a
> lot of spam in the bootlog.
I thought this should go under info, rather than debug, because it's
(possibly) relevant runtime information. It doesn't require any action,
but it's something that a user of this driver may want to be aware
of. The timing (and power consumption, of course) in low-power mode are
different. It's akin to e.g.:
./at91_adc.c:782: dev_info(&idev->dev, "Resolution used: %u bits\n", st->res);
./at91_adc.c:842: dev_info(dev, "ADC Touch screen is disabled.\n");
./at91_adc.c:955: dev_info(&idev->dev, "not support touchscreen in the adc compatible string.\n");
or:
./ti-ads124s08.c:320: dev_info(&spi->dev, "Reset GPIO not defined\n");
which is why I figured I'd do the same in my code (what can I say, I
wear my code monkey badge with pride!).
Needless to say, since you've seen more IIO subsystem drivers than I've
seen, I totally trust your assessment of whether this is debug or info
more than I trust mine. If this was a false positive on your "looks like
a leftover debug message", let me know (and while I'm at it I might make
the message more useful/friendly...). Otherwise it'll get bumped down to
dev_dbg in my next revision.
Thanks,
Alex
next prev parent reply other threads:[~2020-03-17 21:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-17 20:17 [PATCH 0/2] Maxim MAX1241 driver Alexandru Lazar
2020-03-17 20:17 ` [PATCH 1/2] iio: adc: Add " Alexandru Lazar
2020-03-17 20:33 ` Lars-Peter Clausen
2020-03-17 20:40 ` Lars-Peter Clausen
2020-03-17 21:28 ` Alexandru Lazar [this message]
2020-03-17 21:40 ` Lars-Peter Clausen
2020-03-17 21:03 ` Lars-Peter Clausen
2020-03-18 6:50 ` Ardelean, Alexandru
2020-03-18 9:14 ` Alexandru Lazar
2020-03-18 9:31 ` Lars-Peter Clausen
2020-03-18 9:54 ` Ardelean, Alexandru
2020-03-18 16:00 ` Rohit Sarkar
2020-03-17 20:17 ` [PATCH 2/2] dt-bindings: iio: adc: Add MAX1241 device tree bindings in documentation Alexandru Lazar
2020-03-18 7:00 ` Ardelean, Alexandru
2020-03-17 20:52 ` [PATCH 0/2] Maxim MAX1241 driver Lars-Peter Clausen
-- strict thread matches above, loose matches on Subject: below --
2020-03-18 20:28 [PATCH 0/2] Maxim MAX1241 driver, v2 Alexandru Lazar
2020-03-18 20:28 ` [PATCH 1/2] iio: adc: Add MAX1241 driver Alexandru Lazar
2020-03-19 6:51 ` Ardelean, Alexandru
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=20200317212857.GA28983@leena.republic \
--to=alazar@startmail.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pmeerw@pmeerw.net \
--cc=robh+dt@kernel.org \
/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