From: Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
Evgeniy Dushistov <dushistov-JGs/UdohzUI@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 3/3] max7359_keypad: implement DT bindings
Date: Mon, 18 May 2015 10:02:03 -0700 [thread overview]
Message-ID: <20150518170203.GD19708@dtor-ws> (raw)
In-Reply-To: <20150517165502.GA781@fifteen>
On Sun, May 17, 2015 at 07:55:02PM +0300, Evgeniy Dushistov wrote:
> On Fri, May 15, 2015 at 11:00:02PM +0200, Dmitry Torokhov wrote:
> > On Thu, May 14, 2015 at 05:38:03AM +0300, Evgeniy Dushistov wrote:
> > > + maxim,debounce_reg = /bits/ 8 <0x5F>;
> > > + maxim,ports_reg = /bits/ 8 <0xFF>;
> >
> > Specifying exact size for properties is quite uncommon; I think the
> > usual recommendation is is to use the "standard" u32 and validate the
> > range in parser function.
> >
>
> Using of u8 has advantages, it is possible on compilation stage
> (dts->dtb) check that you enter right value, but
> because of DT validation tools are not part of mainline,
> I replace u8 with u32 as you suggest, see patch bellow.
If you get DT folks to OK using /bits/ - that's fine. Grant, Rob, any
guidance here?
>
> > > + MATRIX_KEY(0, 7, KEY_RESERVED)
> > > + ...
> >
> >
> > Indent one more level? Also, maybe fill with something other than
> > KEY_RESERVED?
> >
>
> Fixed, see patch bellow.
>
> >
> >
>
> > > dev_dbg(&client->dev, "keys FIFO is 0x%02x\n", ret);
> > > + if (!keymap_data) {
> > > + error = max7359_parse_dt(&client->dev, &init_state);
> > > + if (error) {
> > > + dev_err(&client->dev, "platform data null, and no DT data\n");
> > > + return error;
> >
> > Both debounce and ports values are optional and we'll fail building
> > keymap if there are no platform data nor device tree data, so I would
> > drop this check and the stub for max7359_parse_dt() as well - we have
> > stubs for property parsing anyway.
> >
>
> Because of u32/u8 check at now max7359_parse_dt can return not 0.
>
> > --
> > Dmitry
> >
>
> Thanks, for review.
>
> Please add me to CC, because of I'm not the part
> of any mailing list (too huge traffic for me).
Umm, if you want to be replied (or CCed) to, why do you make sure that
replies do not go to you by default??? Why do you set "Mail-Followup-To"
to exclude yourself?
> Mail-Followup-To: Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
> devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
> linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Thanks.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-05-18 17:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ppRxn-3aD-5@gated-at.bofh.it>
[not found] ` <pquS6-2DV-9@gated-at.bofh.it>
2015-05-17 16:55 ` [PATCH 3/3] max7359_keypad: implement DT bindings Evgeniy Dushistov
2015-05-18 16:53 ` Dmitry Torokhov
2015-05-18 17:02 ` Dmitry Torokhov [this message]
2015-05-14 2:38 Evgeniy Dushistov
2015-05-15 20:57 ` Dmitry Torokhov
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=20150518170203.GD19708@dtor-ws \
--to=dmitry.torokhov-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dushistov-JGs/UdohzUI@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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).