From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felipe Balbi Subject: Re: [RFC/PATCH 4/4] gpio: smscece: Add support for gpio IO expander feature Date: Tue, 21 Aug 2012 15:00:54 +0300 Message-ID: <20120821120052.GD10347@arwen.pp.htv.fi> References: <1345545940-2232-1-git-send-email-sourav.poddar@ti.com> <1345545940-2232-5-git-send-email-sourav.poddar@ti.com> <20120821105333.GW10347@arwen.pp.htv.fi> Reply-To: balbi@ti.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="e3HNah56eoWqGn2Q" Return-path: Received: from na3sys009aob106.obsmtp.com ([74.125.149.76]:36011 "EHLO na3sys009aog106.obsmtp.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757121Ab2HUMEx (ORCPT ); Tue, 21 Aug 2012 08:04:53 -0400 Received: by lagr15 with SMTP id r15so4755715lag.21 for ; Tue, 21 Aug 2012 05:04:50 -0700 (PDT) Content-Disposition: inline In-Reply-To: Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: "Poddar, Sourav" Cc: balbi@ti.com, devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org --e3HNah56eoWqGn2Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Tue, Aug 21, 2012 at 05:17:37PM +0530, Poddar, Sourav wrote: > >> + if (type & IRQ_TYPE_LEVEL_HIGH) > >> + sg->int_lvl[bank] |=3D bit; > >> + else if (type & IRQ_TYPE_LEVEL_LOW) > >> + sg->int_lvl[bank] &=3D ~bit; > >> + else > >> + return -EINVAL; > > > > this looks wrong. You could have a user who wants to trigger on both > > HIGH and LOW levels, no ? > > > Yes, I think there can be a scenario where gpio_keys are attached > to this driver and signals a "key press" at low and "key release" at > high. ? > Will figure out a way to add support to check for case where > both High and low levels are used. could probably be done on a separate patch, maybe... Just now I saw that HIGH and LOW levels use the same bit. --=20 balbi --e3HNah56eoWqGn2Q Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJQM3h0AAoJEIaOsuA1yqREVsEP/128t7kFxIyPtzzivHuOliqu fiBqNyB7VSAbkOxpsAeG7QNxjAhWdvWeIwBLRk+4PdTra5f6XRIxCDJVTvXaPaqC /m5TH0ELfzVSTFhilboOFmppazg036Nb+rlfHiEz+DOVJOmTokMFwWOptBVg6KRQ ClGhXL4E7PzSAGxxq3XhFFe3uQ09RT6ZliAuwMH6LsnFg01HnYS1vC83Q+zaC8dg kgmRIupGeuANI596RTrn6W9qqBDl2ee728MuwFhg2uY9CVpIqQQT4w3NeVIh4eVl /DvQpFuN3nl+FchZn6EXIRzSRliuJKXegnD08Geh2J61l62u3Dry3unE5C/sRkmR QUPcXfyL/omMoww/Sir2ztmbqvK7st/bEMXEdFnHDNI4SQpnauRT0I5QelV2N+NW YV9yxn3D7W9kIprKtGoTCgD1vYQUMxgCfQdqdq5Qb/MDMqd3qdrS5HNyXtuCb0PG P/e5wPH3BKY41OaF/kBwBr7fesoMKFvajPxlWob8xH2tdVhrTnxXGm1omapdMfpM AH77XTRUR+R54FLb4rzbFWO3pHU6V5oe5+qQuOsD+CzcK+XgLFQObAcuCs1UaJ93 8Ri/BNolwB54iU9SUAW51qUkZjFqnjQ4/zZnxFJl4noBNoCILUy92WN8BoNCScQv o237Yirp2EgphuxxnF46 =Jvvq -----END PGP SIGNATURE----- --e3HNah56eoWqGn2Q-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: balbi@ti.com (Felipe Balbi) Date: Tue, 21 Aug 2012 15:00:54 +0300 Subject: [RFC/PATCH 4/4] gpio: smscece: Add support for gpio IO expander feature In-Reply-To: References: <1345545940-2232-1-git-send-email-sourav.poddar@ti.com> <1345545940-2232-5-git-send-email-sourav.poddar@ti.com> <20120821105333.GW10347@arwen.pp.htv.fi> Message-ID: <20120821120052.GD10347@arwen.pp.htv.fi> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, On Tue, Aug 21, 2012 at 05:17:37PM +0530, Poddar, Sourav wrote: > >> + if (type & IRQ_TYPE_LEVEL_HIGH) > >> + sg->int_lvl[bank] |= bit; > >> + else if (type & IRQ_TYPE_LEVEL_LOW) > >> + sg->int_lvl[bank] &= ~bit; > >> + else > >> + return -EINVAL; > > > > this looks wrong. You could have a user who wants to trigger on both > > HIGH and LOW levels, no ? > > > Yes, I think there can be a scenario where gpio_keys are attached > to this driver and signals a "key press" at low and "key release" at > high. ? > Will figure out a way to add support to check for case where > both High and low levels are used. could probably be done on a separate patch, maybe... Just now I saw that HIGH and LOW levels use the same bit. -- balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: