All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Richardson <jonathar@broadcom.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
	Scott Branden <sbranden@broadcom.com>,
	Darren Edamura <dedamura@broadcom.com>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	"Kumar Gala" <galak@codeaurora.org>, Ray Jui <rjui@broadcom.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	<devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<bcm-kernel-feedback-list@broadcom.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] misc: Add initial Digital Timing Engine (DTE) driver for cygnus
Date: Tue, 12 May 2015 18:03:40 -0700	[thread overview]
Message-ID: <5552A2EC.2060804@broadcom.com> (raw)
In-Reply-To: <554D1649.2030106@broadcom.com>

A bit more info is required here.

> Get timestamp: This is a bit more complicated. Currently the PTP driver
> does list management for timestamps from external timestamp channels.
> Timestamps from all channels go into the same list. In our driver we
> have a s/w FIFO for each client and it closely matches the h/w FIFO and
> handles any overflow. We would like to keep it this way because it also
> allows multiple user space processes to only fetch timestamps for the
> client it's handling. We could add a new ioctl to get a timestamp from
> the driver instead of doing it through ptp_read() but it would be nice
> if we could let ptp_read() allow the driver to do timestamp management
> instead of PTP. Maybe provide an option to obtain the timestamps from a
> container in the driver instead of the one managed by PTP. I like being
> able to use read/poll to obtain data instead of polling the kernel with
> ioctls as we are currently doing. Also, avoiding the kmalloc in ptp_read
> would be nice because this of the frequency it would be called at. Do
> you have any preference on how to handle this?
> 
> I've tried to minimize the changes to PTP.

Using read() we can't specify a channel to get the timestamp for. It
would imply that one user space process would have to read timestamps
for all channels/clients and then leave it up to user space IPC to get
them to other processes, which isn't great. That means either we
introduce an ioctl such as the DTE_GET_TIMESTAMP we had before which
allows us to specify a channel, or we need to look at creating one dev
node per external timestamping channel.

The ioctl limitation is that it pounds the kernel polling for timestamps
and the multiple dev nodes per channel is a big change to PTP. I will
have to look further into this to really have a good idea of what the
implications would be. Advice/ideas?

Thanks.


WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Richardson <jonathar-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: One Thousand Gnomes
	<gnomes-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>,
	Scott Branden <sbranden-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	Darren Edamura <dedamura-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Ray Jui <rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] misc: Add initial Digital Timing Engine (DTE) driver for cygnus
Date: Tue, 12 May 2015 18:03:40 -0700	[thread overview]
Message-ID: <5552A2EC.2060804@broadcom.com> (raw)
In-Reply-To: <554D1649.2030106-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>

A bit more info is required here.

> Get timestamp: This is a bit more complicated. Currently the PTP driver
> does list management for timestamps from external timestamp channels.
> Timestamps from all channels go into the same list. In our driver we
> have a s/w FIFO for each client and it closely matches the h/w FIFO and
> handles any overflow. We would like to keep it this way because it also
> allows multiple user space processes to only fetch timestamps for the
> client it's handling. We could add a new ioctl to get a timestamp from
> the driver instead of doing it through ptp_read() but it would be nice
> if we could let ptp_read() allow the driver to do timestamp management
> instead of PTP. Maybe provide an option to obtain the timestamps from a
> container in the driver instead of the one managed by PTP. I like being
> able to use read/poll to obtain data instead of polling the kernel with
> ioctls as we are currently doing. Also, avoiding the kmalloc in ptp_read
> would be nice because this of the frequency it would be called at. Do
> you have any preference on how to handle this?
> 
> I've tried to minimize the changes to PTP.

Using read() we can't specify a channel to get the timestamp for. It
would imply that one user space process would have to read timestamps
for all channels/clients and then leave it up to user space IPC to get
them to other processes, which isn't great. That means either we
introduce an ioctl such as the DTE_GET_TIMESTAMP we had before which
allows us to specify a channel, or we need to look at creating one dev
node per external timestamping channel.

The ioctl limitation is that it pounds the kernel polling for timestamps
and the multiple dev nodes per channel is a big change to PTP. I will
have to look further into this to really have a good idea of what the
implications would be. Advice/ideas?

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: jonathar@broadcom.com (Jonathan Richardson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] misc: Add initial Digital Timing Engine (DTE) driver for cygnus
Date: Tue, 12 May 2015 18:03:40 -0700	[thread overview]
Message-ID: <5552A2EC.2060804@broadcom.com> (raw)
In-Reply-To: <554D1649.2030106@broadcom.com>

A bit more info is required here.

> Get timestamp: This is a bit more complicated. Currently the PTP driver
> does list management for timestamps from external timestamp channels.
> Timestamps from all channels go into the same list. In our driver we
> have a s/w FIFO for each client and it closely matches the h/w FIFO and
> handles any overflow. We would like to keep it this way because it also
> allows multiple user space processes to only fetch timestamps for the
> client it's handling. We could add a new ioctl to get a timestamp from
> the driver instead of doing it through ptp_read() but it would be nice
> if we could let ptp_read() allow the driver to do timestamp management
> instead of PTP. Maybe provide an option to obtain the timestamps from a
> container in the driver instead of the one managed by PTP. I like being
> able to use read/poll to obtain data instead of polling the kernel with
> ioctls as we are currently doing. Also, avoiding the kmalloc in ptp_read
> would be nice because this of the frequency it would be called at. Do
> you have any preference on how to handle this?
> 
> I've tried to minimize the changes to PTP.

Using read() we can't specify a channel to get the timestamp for. It
would imply that one user space process would have to read timestamps
for all channels/clients and then leave it up to user space IPC to get
them to other processes, which isn't great. That means either we
introduce an ioctl such as the DTE_GET_TIMESTAMP we had before which
allows us to specify a channel, or we need to look at creating one dev
node per external timestamping channel.

The ioctl limitation is that it pounds the kernel polling for timestamps
and the multiple dev nodes per channel is a big change to PTP. I will
have to look further into this to really have a good idea of what the
implications would be. Advice/ideas?

Thanks.

  reply	other threads:[~2015-05-13  1:04 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 23:22 [PATCH 0/2] Add DTE driver for Cygnus Jonathan Richardson
2015-04-22 23:22 ` Jonathan Richardson
2015-04-22 23:22 ` Jonathan Richardson
2015-04-22 23:22 ` [PATCH 1/2] misc: Add DT binding for cygnus Digital Timing Engine (DTE) driver Jonathan Richardson
2015-04-22 23:22   ` Jonathan Richardson
2015-04-22 23:22   ` Jonathan Richardson
2015-04-22 23:22 ` [PATCH 2/2] misc: Add initial Digital Timing Engine (DTE) driver for cygnus Jonathan Richardson
2015-04-22 23:22   ` Jonathan Richardson
2015-04-22 23:22   ` Jonathan Richardson
2015-04-23  8:04   ` Arnd Bergmann
2015-04-23  8:04     ` Arnd Bergmann
2015-04-23  8:04     ` Arnd Bergmann
2015-04-23 18:07     ` Jonathan Richardson
2015-04-23 18:07       ` Jonathan Richardson
2015-04-23 18:07       ` Jonathan Richardson
2015-05-01 19:01     ` Jonathan Richardson
2015-05-01 19:01       ` Jonathan Richardson
2015-05-01 19:01       ` Jonathan Richardson
2015-05-01 19:30       ` One Thousand Gnomes
2015-05-01 19:30         ` One Thousand Gnomes
2015-05-01 19:30         ` One Thousand Gnomes
2015-05-01 19:40         ` Arnd Bergmann
2015-05-01 19:40           ` Arnd Bergmann
2015-05-08 20:02           ` Jonathan Richardson
2015-05-08 20:02             ` Jonathan Richardson
2015-05-08 20:02             ` Jonathan Richardson
2015-05-13  1:03             ` Jonathan Richardson [this message]
2015-05-13  1:03               ` Jonathan Richardson
2015-05-13  1:03               ` Jonathan Richardson
2015-05-13 12:19             ` Arnd Bergmann
2015-05-13 12:19               ` Arnd Bergmann
2015-05-13 14:37               ` Richard Cochran
2015-05-13 14:37                 ` Richard Cochran
2015-05-13 14:51                 ` Richard Cochran
2015-05-13 14:51                   ` Richard Cochran
2015-05-13 15:35             ` Richard Cochran
2015-05-13 15:35               ` Richard Cochran
2015-05-13 19:50               ` Jonathan Richardson
2015-05-13 19:50                 ` Jonathan Richardson
2015-05-13 19:50                 ` Jonathan Richardson
2015-05-13 20:27                 ` Richard Cochran
2015-05-13 20:27                   ` Richard Cochran
2015-05-13 23:25                   ` Jonathan Richardson
2015-05-13 23:25                     ` Jonathan Richardson
2015-05-13 23:25                     ` Jonathan Richardson
2015-05-14 11:30                     ` Richard Cochran
2015-05-14 11:30                       ` Richard Cochran
2015-05-14 11:30                       ` Richard Cochran
2015-05-20 23:38                       ` Jonathan Richardson
2015-05-20 23:38                         ` Jonathan Richardson
2015-05-20 23:38                         ` Jonathan Richardson
2015-05-21  6:33                         ` Richard Cochran
2015-05-21  6:33                           ` Richard Cochran
2015-05-21 17:48                           ` Jonathan Richardson
2015-05-21 17:48                             ` Jonathan Richardson
2015-05-21 17:48                             ` Jonathan Richardson
2015-05-13 15:21       ` Richard Cochran
2015-05-13 15:21         ` Richard Cochran
2015-05-13 15:21         ` Richard Cochran
2015-05-13 19:38         ` Jonathan Richardson
2015-05-13 19:38           ` Jonathan Richardson
2015-05-13 19:38           ` Jonathan Richardson
2015-05-13 19:42           ` Richard Cochran
2015-05-13 19:42             ` Richard Cochran
2015-05-13 19:39         ` Jonathan Richardson
2015-05-13 19:39           ` Jonathan Richardson
2015-05-13 19:39           ` Jonathan Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5552A2EC.2060804@broadcom.com \
    --to=jonathar@broadcom.com \
    --cc=arnd@arndb.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=dedamura@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sbranden@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.