devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
To: Dmitry Torokhov
	<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] input: cpcap-pwrbutton: new driver
Date: Mon, 27 Feb 2017 18:32:13 -0800	[thread overview]
Message-ID: <20170228023213.GR21809@atomide.com> (raw)
In-Reply-To: <20170225192100.GK21809-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>

* Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> [170225 11:21]:
> * Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> [170225 11:00]:
> > On Fri, Feb 24, 2017 at 09:59:09AM +0100, Sebastian Reichel wrote:
> > > +#include <linux/mfd/motorola-cpcap.h>
> > > +
> > > +#define CPCAP_IRQ_ON 23
> > > +#define CPCAP_IRQ_ON_BITMASK (1 << (CPCAP_IRQ_ON % 16))
> > 
> > Is this truly static or it could depend= on IRQ returned by
> > platform_get_irq()?
> 
> I suggest we add it to include/linux/mfd/motorola-cpcap.h:
> 
> static inline int cpcap_get_irq_status(struct device *dev,
> 				       struct regmap *regmap,
> 				       int irq,
> 				       u16 *status);
> 
> Or do you guys have better ideas?

Actually after thinking about it, a macro like Sebastian has
is probably better. Otherwise the interface will be confusing
unless we limit it to getting just one bit instead of the whole
bank. So I now suggest let's just keep it in Sebastian's driver,
then we can move it later as it's just a one line.

Regards,

Tony
--
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

  parent reply	other threads:[~2017-02-28  2:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-24  8:59 [PATCH] input: cpcap-pwrbutton: new driver Sebastian Reichel
2017-02-25 18:58 ` Dmitry Torokhov
2017-02-25 19:21   ` Tony Lindgren
     [not found]     ` <20170225192100.GK21809-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2017-02-28  2:32       ` Tony Lindgren [this message]
2017-02-28  0:18 ` Rob Herring
2017-03-02  0:22 ` [PATCHv2 1/2] mfd: cpcap: implement irq sense helper Sebastian Reichel
     [not found]   ` <20170302002242.21819-1-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-03-02  0:22     ` [PATCHv2 2/2] input: cpcap-pwrbutton: new driver Sebastian Reichel
2017-03-02  1:20       ` Dmitry Torokhov
2017-03-02 18:01         ` Tony Lindgren
     [not found]       ` <20170302002242.21819-2-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-03-04 16:22         ` kbuild test robot
2017-03-02 15:17   ` [PATCHv2 1/2] mfd: cpcap: implement irq sense helper Tony Lindgren
2017-03-02 16:09   ` Tony Lindgren

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=20170228023213.GR21809@atomide.com \
    --to=tony-4v6ys6ai5vpbdgjk7y7tuq@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sre-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).