From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752026AbdB1Ccc (ORCPT ); Mon, 27 Feb 2017 21:32:32 -0500 Received: from muru.com ([72.249.23.125]:36682 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751644AbdB1Cca (ORCPT ); Mon, 27 Feb 2017 21:32:30 -0500 Date: Mon, 27 Feb 2017 18:32:13 -0800 From: Tony Lindgren To: Dmitry Torokhov Cc: Sebastian Reichel , Rob Herring , Mark Rutland , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] input: cpcap-pwrbutton: new driver Message-ID: <20170228023213.GR21809@atomide.com> References: <20170224085909.30559-1-sre@kernel.org> <20170225185852.GB31929@dtor-ws> <20170225192100.GK21809@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170225192100.GK21809@atomide.com> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Tony Lindgren [170225 11:21]: > * Dmitry Torokhov [170225 11:00]: > > On Fri, Feb 24, 2017 at 09:59:09AM +0100, Sebastian Reichel wrote: > > > +#include > > > + > > > +#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