Re: [PATCH v5 3/5] counter: Add character device interface

2020-10-25 Thread William Breathitt Gray
On Sun, Oct 25, 2020 at 11:34:43AM -0500, David Lechner wrote: > On 10/25/20 8:18 AM, William Breathitt Gray wrote: > > On Tue, Oct 20, 2020 at 11:06:42AM -0500, David Lechner wrote: > >> On 10/18/20 11:58 AM, William Breathitt Gray wrote: > >>> On Wed, Oct 14, 2020 at 05:40:44PM -0500, David

Re: [PATCH v5 3/5] counter: Add character device interface

2020-10-25 Thread David Lechner
diff --git a/drivers/counter/counter-sysfs.c b/drivers/counter/counter-sysfs.c index e66ed99dd5ea..cefef61f170d 100644 --- a/drivers/counter/counter-sysfs.c +++ b/drivers/counter/counter-sysfs.c Not sure why sysfs changes are in the chrdev patch. Are these changes related somehow? Sorry,

Re: [PATCH v5 3/5] counter: Add character device interface

2020-10-25 Thread David Lechner
On 10/25/20 8:18 AM, William Breathitt Gray wrote: On Tue, Oct 20, 2020 at 11:06:42AM -0500, David Lechner wrote: On 10/18/20 11:58 AM, William Breathitt Gray wrote: On Wed, Oct 14, 2020 at 05:40:44PM -0500, David Lechner wrote: On 9/26/20 9:18 PM, William Breathitt Gray wrote: +static

Re: [PATCH v5 3/5] counter: Add character device interface

2020-10-25 Thread William Breathitt Gray
On Tue, Oct 20, 2020 at 11:06:42AM -0500, David Lechner wrote: > On 10/18/20 11:58 AM, William Breathitt Gray wrote: > > On Wed, Oct 14, 2020 at 05:40:44PM -0500, David Lechner wrote: > >> On 9/26/20 9:18 PM, William Breathitt Gray wrote: > >>> +static ssize_t counter_chrdev_read(struct file

Re: [PATCH v5 3/5] counter: Add character device interface

2020-10-25 Thread William Breathitt Gray
On Tue, Oct 20, 2020 at 10:53:32AM -0500, David Lechner wrote: > >>> + > >>> +static int counter_chrdev_release(struct inode *inode, struct file *filp) > >>> +{ > >>> + struct counter_device *const counter = filp->private_data; > >>> + unsigned long flags; > >>> + > >>> + put_device(>dev); > >> >

Re: [PATCH v5 3/5] counter: Add character device interface

2020-10-20 Thread David Lechner
On 10/18/20 11:58 AM, William Breathitt Gray wrote: On Wed, Oct 14, 2020 at 05:40:44PM -0500, David Lechner wrote: On 9/26/20 9:18 PM, William Breathitt Gray wrote: +static ssize_t counter_chrdev_read(struct file *filp, char __user *buf, + size_t len, loff_t

Re: [PATCH v5 3/5] counter: Add character device interface

2020-10-20 Thread David Lechner
+static long counter_chrdev_ioctl(struct file *filp, unsigned int cmd, +unsigned long arg) +{ + struct counter_device *const counter = filp->private_data; + raw_spinlock_t *const events_lock = >events_lock; + unsigned long flags; + struct

Re: [PATCH v5 3/5] counter: Add character device interface

2020-10-18 Thread William Breathitt Gray
On Wed, Oct 14, 2020 at 05:40:44PM -0500, David Lechner wrote: > On 9/26/20 9:18 PM, William Breathitt Gray wrote: > > +static ssize_t counter_chrdev_read(struct file *filp, char __user *buf, > > + size_t len, loff_t *f_ps) > > +{ > > + struct counter_device *const

Re: [PATCH v5 3/5] counter: Add character device interface

2020-10-18 Thread William Breathitt Gray
On Tue, Oct 13, 2020 at 08:40:18PM -0500, David Lechner wrote: > On 9/26/20 9:18 PM, William Breathitt Gray wrote: > > This patch introduces a character device interface for the Counter > > subsystem. Device data is exposed through standard character device read > > operations. Device data is

Re: [PATCH v5 3/5] counter: Add character device interface

2020-10-14 Thread David Lechner
On 9/26/20 9:18 PM, William Breathitt Gray wrote: +static ssize_t counter_chrdev_read(struct file *filp, char __user *buf, + size_t len, loff_t *f_ps) +{ + struct counter_device *const counter = filp->private_data; + int err; + unsigned long

Re: [PATCH v5 3/5] counter: Add character device interface

2020-10-14 Thread David Lechner
On 10/14/20 2:05 PM, William Breathitt Gray wrote: On Wed, Oct 14, 2020 at 12:43:08PM -0500, David Lechner wrote: On 9/26/20 9:18 PM, William Breathitt Gray wrote: diff --git a/drivers/counter/counter-chrdev.c b/drivers/counter/counter-chrdev.c new file mode 100644 index

Re: [PATCH v5 3/5] counter: Add character device interface

2020-10-14 Thread William Breathitt Gray
On Wed, Oct 14, 2020 at 12:43:08PM -0500, David Lechner wrote: > On 9/26/20 9:18 PM, William Breathitt Gray wrote: > > diff --git a/drivers/counter/counter-chrdev.c > > b/drivers/counter/counter-chrdev.c > > new file mode 100644 > > index ..2be3846e4105 > > --- /dev/null > > +++

Re: [PATCH v5 3/5] counter: Add character device interface

2020-10-14 Thread David Lechner
On 9/26/20 9:18 PM, William Breathitt Gray wrote: diff --git a/drivers/counter/counter-chrdev.c b/drivers/counter/counter-chrdev.c new file mode 100644 index ..2be3846e4105 --- /dev/null +++ b/drivers/counter/counter-chrdev.c +/** + * counter_push_event - queue event for

Re: [PATCH v5 3/5] counter: Add character device interface

2020-10-13 Thread David Lechner
On 9/26/20 9:18 PM, William Breathitt Gray wrote: This patch introduces a character device interface for the Counter subsystem. Device data is exposed through standard character device read operations. Device data is gathered when a Counter event is pushed by the respective Counter device

[PATCH v5 3/5] counter: Add character device interface

2020-09-26 Thread William Breathitt Gray
This patch introduces a character device interface for the Counter subsystem. Device data is exposed through standard character device read operations. Device data is gathered when a Counter event is pushed by the respective Counter device driver. Configuration is handled via ioctl operations on