From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752590AbbDAIom (ORCPT ); Wed, 1 Apr 2015 04:44:42 -0400 Received: from mail1.hce-engineering.com ([162.248.9.206]:43319 "EHLO mail1.hce-engineering.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752373AbbDAIoj (ORCPT ); Wed, 1 Apr 2015 04:44:39 -0400 X-Greylist: delayed 1965 seconds by postgrey-1.27 at vger.kernel.org; Wed, 01 Apr 2015 04:44:39 EDT Date: Wed, 1 Apr 2015 10:11:41 +0200 From: Rodolfo Giometti To: Christian Riesch Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] pps: Add support for read operations and return a useful value in poll Message-ID: <20150401081133.GA4384@enneenne.com> Mail-Followup-To: Christian Riesch , linux-kernel@vger.kernel.org References: <1427837482-2841-1-git-send-email-christian.riesch@omicron.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1427837482-2841-1-git-send-email-christian.riesch@omicron.at> Organization: GNU/Linux Device Drivers, Embedded Systems and Courses X-PGP-Key: gpg --keyserver keyserver.linux.it --recv-keys D25A5633 User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2.35.139.184 X-SA-Exim-Mail-From: giometti@enneenne.com X-SA-Exim-Scanned: No (on hce1.hce-engineering.com); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 31, 2015 at 11:31:22PM +0200, Christian Riesch wrote: > The PPS_FETCH ioctl in drivers/pps/pps.c blocks until a new PPS event > occurs, then returns the time stamp data. While this is fine for > lots of applications, sometimes it would be nice if the poll system > call and a subsequent read could be used to obtain the pps data. Nak. The read syscall can't be forced to return fix amount of data. Use a dedicated ioctl instead. Ciao, Rodolfo -- HCE Engineering e-mail: giometti@hce-engineering.com GNU/Linux Solutions giometti@enneenne.com Linux Device Driver giometti@linux.it Embedded Systems phone: +39 349 2432127 UNIX programming skype: rodolfo.giometti Cosino Project - the quick prototyping embedded system - www.cosino.io Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it