From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Rxw7a-0002d2-0B for barebox@lists.infradead.org; Thu, 16 Feb 2012 07:51:22 +0000 Date: Thu, 16 Feb 2012 08:51:03 +0100 From: Sascha Hauer Message-ID: <20120216075103.GJ3852@pengutronix.de> References: <1329229881-26751-1-git-send-email-plagnioj@jcrosoft.com> <20120215093108.GA3852@pengutronix.de> <20120215161426.GJ1214@game.jcrosoft.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20120215161426.GJ1214@game.jcrosoft.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH 1/4] add gpio keyboard support To: Jean-Christophe PLAGNIOL-VILLARD Cc: barebox@lists.infradead.org On Wed, Feb 15, 2012 at 05:14:26PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > > > > This information would be far more informative if you printed the > > button that is pressed/released here. > ok > > > > > + } > > > + gb->previous_state = val; > > > + } > > > > You do nothing for debouncing the keys. > yes my hardware manage directly (gpio IP) > > we can add it later > > > + return ret; > > > + } > > > + gpio_direction_input(gpio); > > > + } > > > + > > > + pdata->poller.func = gpio_key_poller; > > > + > > > + cdev = &pdata->cdev; > > > + dev->type_data = cdev; > > > + cdev->dev = dev; > > > + cdev->f_caps = CONSOLE_STDIN; > > > + cdev->tstc = gpio_keys_tstc; > > > + cdev->getc = gpio_keys_getc; > > > + > > > + console_register(&pdata->cdev); > > > > As I tried to explain yesterday I'm not sure that directly registering > > the gpio keys as a console is the right thing to do. A keyboard has > > more attributes than what we have in the console. For example a keyboard > > has a button press / button release event which we don't have on the > > console. > agreed but today we do not have a input framework yet > > I'm planning to add such framework but as a second step > I'll add the usb keyboard too Ok, we can to it like this. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox