* Tony Lindgren <t...@atomide.com> [170225 11:21]:
> * Dmitry Torokhov <dmitry.torok...@gmail.com> [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

Reply via email to