From: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Keerthy <j-keerthy-l0cyMroinI0@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
Alexandre Courbot
<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Linux-OMAP <linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH v6 3/4] gpio: lp873x: Add support for General Purpose Outputs
Date: Thu, 11 Aug 2016 15:30:54 +0200 [thread overview]
Message-ID: <CACRpkdbFHbxcKHC827A1v8q1JPFk8jZsbJEHFpXi1Ddz054Xdw@mail.gmail.com> (raw)
In-Reply-To: <1470635218-15951-4-git-send-email-j-keerthy-l0cyMroinI0@public.gmane.org>
On Mon, Aug 8, 2016 at 7:46 AM, Keerthy <j-keerthy-l0cyMroinI0@public.gmane.org> wrote:
> Add driver for lp873x PMIC family GPOs. Two GPOs are supported
> and can be configured in Open-drain output or Push-pull output.
>
> Acked-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Signed-off-by: Keerthy <j-keerthy-l0cyMroinI0@public.gmane.org>
Still looks pretty nice, just thought of some things if
you're anyway working on the code:
> + return regmap_update_bits(gpio->lp873->regmap, LP873X_REG_GPO_CTRL,
> + BIT(offset * 4), value ? BIT(offset * 4) : 0);
(...)
(...)
> + return val & BIT(offset * 4);
(...)
> + regmap_update_bits(gpio->lp873->regmap, LP873X_REG_GPO_CTRL,
> + BIT(offset * 4), value ? BIT(offset * 4) : 0);
(...)
> + return regmap_update_bits(gpio->lp873->regmap,
> + LP873X_REG_GPO_CTRL,
> + BIT(offset * 4 + 2),
> + BIT(offset * 4 + 2));
> + case LINE_MODE_PUSH_PULL:
> + return regmap_update_bits(gpio->lp873->regmap,
> + LP873X_REG_GPO_CTRL,
> + BIT(offset * 4 + 2), 0);
This 4 +2 etc business is a bit hard to understand, could you create
a macro with a clever name that makes it more understandable?
Yours,
Linus Walleij
--
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:[~2016-08-11 13:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-08 5:46 [PATCH v6 0/4] mfd: lp873x: Add lp873x PMIC support Keerthy
2016-08-08 5:46 ` [PATCH v6 1/4] Documentation: mfd: LP873X: Add information for the mfd driver Keerthy
[not found] ` <1470635218-15951-2-git-send-email-j-keerthy-l0cyMroinI0@public.gmane.org>
2016-08-09 12:50 ` Lee Jones
2016-08-10 2:56 ` Keerthy
2016-08-08 5:46 ` [PATCH v6 2/4] mfd: lp873x: Add lp873x PMIC support Keerthy
[not found] ` <1470635218-15951-3-git-send-email-j-keerthy-l0cyMroinI0@public.gmane.org>
2016-08-08 6:26 ` kbuild test robot
2016-08-08 6:49 ` Keerthy
2016-08-09 12:53 ` Lee Jones
2016-08-10 2:57 ` Keerthy
[not found] ` <57AA9826.4060308-l0cyMroinI0@public.gmane.org>
2016-08-10 8:18 ` Lee Jones
2016-08-08 8:41 ` kbuild test robot
2016-08-08 5:46 ` [PATCH v6 3/4] gpio: lp873x: Add support for General Purpose Outputs Keerthy
[not found] ` <1470635218-15951-4-git-send-email-j-keerthy-l0cyMroinI0@public.gmane.org>
2016-08-11 13:30 ` Linus Walleij [this message]
2016-08-08 5:46 ` [PATCH v6 4/4] regulator: lp873x: Change the MFD config option as per latest naming Keerthy
2016-08-12 10:57 ` Mark Brown
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=CACRpkdbFHbxcKHC827A1v8q1JPFk8jZsbJEHFpXi1Ddz054Xdw@mail.gmail.com \
--to=linus.walleij-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=j-keerthy-l0cyMroinI0@public.gmane.org \
--cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@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).