linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: "Kevin P. Fleming" <kevin+linux@km6g.us>
Cc: Alessandro Zummo <a.zummo@towertech.it>, linux-rtc@vger.kernel.org
Subject: Re: [PATCH] rtc: abx80x: Provide feedback for invalid dt properties
Date: Fri, 29 May 2020 15:16:00 +0200	[thread overview]
Message-ID: <20200529131600.GC3972@piout.net> (raw)
In-Reply-To: <CAE+UdophyZJtQsj2UahE481u1Yrj_qy1j9Fjx1V_feNy0RW5GQ@mail.gmail.com>

On 29/05/2020 06:28:56-0400, Kevin P. Fleming wrote:
> On Fri, May 29, 2020 at 4:54 AM Alexandre Belloni
> <alexandre.belloni@bootlin.com> wrote:
> > > -static int abx80x_dt_trickle_cfg(struct device_node *np)
> > > +static int abx80x_dt_trickle_cfg(struct i2c_client *client,
> > > +                              struct device_node *np)
> >
> > I would remove np from the parameters and use
> > struct device_node *np = client->dev.of_node;
> > in the function.
> 
> Will do.
> 
> > > +             dev_err(&client->dev, "Invalid tc-diode value: %s\n", diode);
> >
> > Can you make that dev_dbg? This is only ever needed at board bring up/
> > development time, so it is not necessary to bloat the kernel with more
> > strings.
> 
> I'm using this driver via the Raspberry Pi device tree 'overlay'
> mechanism, so I'm setting these parameters in a configuration file and
> they are applied by the board's firmware before the kernel is booted.
> As a result this is essentially 'runtime' configuration, it's not a
> static device tree for the board, so end users like me could run into
> this problem.
> 

This is still board bringup, once it is correct, you will never need the
message anymore. If the issue is device tree validation (i.e. typo in
the string), then maybe you should convert the doc to yaml so you device
tree and overlay could be checked.


> I'd be fine with changing it to dev_info though, and indicating that
> the trickle charger won't be enabled in addition.

dev_info is worse, it is still bloating the kernel and also always
printing in the kernel logs.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

      reply	other threads:[~2020-05-29 13:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29  0:12 [PATCH] rtc: abx80x: Provide feedback for invalid dt properties Kevin P. Fleming
2020-05-29  8:54 ` Alexandre Belloni
2020-05-29 10:28   ` Kevin P. Fleming
2020-05-29 13:16     ` Alexandre Belloni [this message]

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=20200529131600.GC3972@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=a.zummo@towertech.it \
    --cc=kevin+linux@km6g.us \
    --cc=linux-rtc@vger.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;
as well as URLs for NNTP newsgroup(s).