gt; - unsigned long flags;
> - unsigned control;
> + const unsigned int control_addr = dio48egpio->base + 3 + control_port *
> 4;
> +
This empty line is not necessary and can be removed.
> + unsigned int long flags;
This is "unsigned long"
p_set_value() we are also specifying the offset (or start)
> > position too. so that the remainder of the array remains unaffected. I
> > think it would not be feasible to use bitmap_from/to_arr32() here.
>
>
> You have hard coded start and nbits parameters to 32. How is it not t
On Mon, Mar 22, 2021 at 05:44:01PM +0100, Fabrice Gasnier wrote:
> On 3/19/21 12:00 PM, William Breathitt Gray wrote:
> > static const struct atmel_tcb_config tcb_rm9200_config = {
> > diff --git a/drivers/counter/stm32-lptimer-cnt.c
> > b/drivers/counter/stm32-lp
for the devices may be configured via the irq array module
parameter.
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c | 167 +--
drivers/counter/Kconfig | 6 +-
2 files changed, 164 insertions(+), 9 deletions
This patch replaces the mutex I/O lock with a spinlock. This is in
preparation for a subsequent patch adding IRQ support for 104-QUAD-8
devices; we can't sleep in an interrupt context, so we'll need to use a
spinlock instead.
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
to discover what component ID belongs to the respective Synapse.
Cc: David Lechner
Cc: Gwendal Grignou
Cc: Dan Carpenter
Signed-off-by: William Breathitt Gray
---
Documentation/ABI/testing/sysfs-bus-counter | 7
drivers/counter/counter-sysfs.c | 45 +
2 files
to a requirement of the kfifo_alloc function called
during reallocation of the queue.
Cc: Oleksij Rempel
Signed-off-by: William Breathitt Gray
---
Documentation/ABI/testing/sysfs-bus-counter | 8
drivers/counter/counter-chrdev.c| 4 ++
drivers/counter/counter-sysfs.c | 44
component ID belongs to which respective extension.
Cc: David Lechner
Cc: Gwendal Grignou
Cc: Dan Carpenter
Signed-off-by: William Breathitt Gray
---
Documentation/ABI/testing/sysfs-bus-counter | 16 ++-
drivers/counter/counter-sysfs.c | 30 -
2 files
This creates an example Counter program under tools/counter/*
to exemplify the Counter character device interface.
Cc: Pavel Machek
Signed-off-by: William Breathitt Gray
---
MAINTAINERS | 1 +
tools/Makefile | 13 ++---
tools/counter/Build | 1
This is in preparation for a subsequent patch implementing a character
device interface for the Counter subsystem.
Reviewed-by: David Lechner
Signed-off-by: William Breathitt Gray
---
MAINTAINERS | 1 +
include/linux/counter.h | 42 +--
include
The Counter subsystem architecture and driver implementations have
changed in order to handle Counter sysfs interactions in a more
consistent way. This patch updates the Generic Counter interface
documentation to reflect the changes.
Signed-off-by: William Breathitt Gray
---
Documentation/ABI
This patch adds high-level documentation about the Counter subsystem
character device interface.
Signed-off-by: William Breathitt Gray
---
Documentation/driver-api/generic-counter.rst | 185 ++
.../userspace-api/ioctl/ioctl-number.rst | 1 +
2 files changed, 145
on the respective Counter character device node.
Cc: David Lechner
Cc: Gwendal Grignou
Cc: Dan Carpenter
Cc: Oleksij Rempel
Signed-off-by: William Breathitt Gray
---
drivers/counter/Makefile | 2 +-
drivers/counter/counter-chrdev.c | 482 +++
drivers/counter
The Counter subsystem architecture and driver implementations have
changed in order to handle Counter sysfs interactions in a more
consistent way. This patch updates the Generic Counter interface
header file comments to reflect the changes.
Signed-off-by: William Breathitt Gray
---
drivers
atrick Havelange
Cc: Oleksij Rempel
Cc: Kamel Bouhara
Cc: Fabrice Gasnier
Cc: Maxime Coquelin
Cc: Alexandre Torgue
Cc: David Lechner
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c| 10 +++
drivers/counter/counter.c | 38 --
Signal values will always be levels so let's be explicit it about it to
make the intent of the code clear.
Cc: Syed Nayyar Waris
Cc: Oleksij Rempel
Cc: Kamel Bouhara
Reviewed-by: David Lechner
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c| 5
The struct counter_synapse actions_list member expects a const enum
counter_synapse_action array. This patch adds the const qualifier to the
stm32_lptim_cnt_synapse_actions to match actions_list.
Cc: Fabrice Gasnier
Signed-off-by: William Breathitt Gray
---
drivers/counter/stm32-lptimer-cnt.c
The struct counter_synapse actions_list member expects a const enum
counter_synapse_action array. This patch adds the const qualifier to the
stm32_synapse_actions to match actions_list.
Cc: Fabrice Gasnier
Cc: Benjamin Gaignard
Signed-off-by: William Breathitt Gray
---
drivers/counter/stm32
ERANGE is a semantically better error code to return when an argument
value falls outside the supported limit range of a device.
Cc: Syed Nayyar Waris
Cc: Oleksij Rempel
Cc: Fabrice Gasnier
Cc: Maxime Coquelin
Cc: Alexandre Torgue
Reviewed-by: David Lechner
Signed-off-by: William Breathitt
of the code clear.
Cc: Syed Nayyar Waris
Cc: Kamel Bouhara
Cc: Fabrice Gasnier
Cc: Maxime Coquelin
Cc: Alexandre Torgue
Cc: David Lechner
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c| 20 +++
drivers/counter/microchip-tcb-capture.c | 6
drivers
The struct counter_synapse actions_list member expects a const enum
counter_synapse_action array. This patch adds the const qualifier to the
mchp_tc_synapse_actions to match actions_list.
Cc: Kamel Bouhara
Signed-off-by: William Breathitt Gray
---
drivers/counter/microchip-tcb-capture.c | 2
The struct counter_synapse actions_list member expects a const enum
counter_synapse_action array. This patch adds the const qualifier to the
interrupt_cnt_synapse_actionss to match actions_list.
Cc: Oleksij Rempel
Signed-off-by: William Breathitt Gray
---
drivers/counter/interrupt-cnt.c | 2
The struct counter_synapse actions_list member expects a const enum
counter_synapse_action array. This patch adds the const qualifier to the
quad8_index_actions_list and quad8_synapse_actions_list to match
actions_list.
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
---
drivers
The struct counter_synapse actions_list member expects a const enum
counter_synapse_action array. This patch adds the const qualifier to the
ftm_quaddec_synapse_actions to match actions_list.
Cc: Patrick Havelange
Signed-off-by: William Breathitt Gray
---
drivers/counter/ftm-quaddec.c | 2
The struct counter_count functions_list member expects a const enum
counter_count_function array. This patch adds the const qualifier to the
stm32_lptim_cnt_functions to match functions_list.
Cc: Fabrice Gasnier
Signed-off-by: William Breathitt Gray
---
drivers/counter/stm32-lptimer-cnt.c | 2
The struct counter_count functions_list member expects a const enum
counter_count_function array. This patch adds the const qualifier to the
stm32_count_functions to match functions_list.
Cc: Fabrice Gasnier
Cc: Benjamin Gaignard
Signed-off-by: William Breathitt Gray
---
drivers/counter/stm32
The struct counter_count functions_list member expects a const enum
counter_count_function array. This patch adds the const qualifier to the
mchp_tc_count_functions to match functions_list.
Cc: Kamel Bouhara
Signed-off-by: William Breathitt Gray
---
drivers/counter/microchip-tcb-capture.c | 2
"Miscellaneous" is the correct spelling.
Reviewed-by: David Lechner
Signed-off-by: William Breathitt Gray
---
Documentation/driver-api/generic-counter.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/driver-api/generic-counter.rst
b/Documentat
neric interface")
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/counter/104-quad-8.c b/drivers/counter/104-quad-8.c
index 4bb9abffae48..233a3acc1377 100644
---
The struct counter_count functions_list member expects a const enum
counter_count_function array. This patch adds the const qualifier to the
quad8_count_functions_list to match functions_list.
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c | 2
The struct counter_count functions_list member expects a const enum
counter_count_function array. This patch adds the const qualifier to the
interrupt__cnt_functions to match functions_list.
Cc: Oleksij Rempel
Signed-off-by: William Breathitt Gray
---
drivers/counter/interrupt-cnt.c | 2 +-
1
It is obvious that devm_counter_register() is used to register a Counter
device, so a comment stating such is pointless here.
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/counter/104-quad
drivers support automatic configuration (e.g. PNP or PCI) in addition
to manually coded parameters.
This patch annotates the 104-QUAD-8 driver.
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
Add some safety by qualifying the quad8_preset_register_set() function
parameters as const.
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/counter/104-quad-8.c b
Duplicate ABIs are not valid, so let's consolidate these sysfs
attributes into the main sysfs-bus-counter documentation file.
Cc: Patrick Havelange
Reviewed-by: David Lechner
Signed-off-by: William Breathitt Gray
---
Documentation/ABI/testing/sysfs-bus-counter | 76
will provide the return status (system error number) of an event
operation.
William Breathitt Gray (33):
docs: counter: Consolidate Counter sysfs attributes documentation
docs: counter: Fix spelling
counter: 104-quad-8: Remove pointless comment
counter: 104-quad-8: Return error when invalid
On Thu, Mar 18, 2021 at 11:10:29AM +0100, Fabrice Gasnier wrote:
> On 3/18/21 10:21 AM, Fabrice Gasnier wrote:
> > On 3/14/21 10:08 AM, William Breathitt Gray wrote:
> >> On Sun, Mar 14, 2021 at 04:56:44PM +0900, William Breathitt Gray wrote:
> >>> On Fri, Mar 12, 202
On Sun, Mar 14, 2021 at 04:56:44PM +0900, William Breathitt Gray wrote:
> On Fri, Mar 12, 2021 at 04:02:42PM +0100, Fabrice Gasnier wrote:
> > On 3/9/21 2:19 PM, William Breathitt Gray wrote:
> > > +static ssize_t enums_available_show(cons
On Fri, Mar 12, 2021 at 04:02:42PM +0100, Fabrice Gasnier wrote:
> On 3/9/21 2:19 PM, William Breathitt Gray wrote:
> > +static ssize_t enums_available_show(const u32 *const enums,
> > + const size_t num_enums,
> > +
for the devices may be configured via the irq array module
parameter.
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c | 167 +--
drivers/counter/Kconfig | 6 +-
2 files changed, 164 insertions(+), 9 deletions
This patch replaces the mutex I/O lock with a spinlock. This is in
preparation for a subsequent patch adding IRQ support for 104-QUAD-8
devices; we can't sleep in an interrupt context, so we'll need to use a
spinlock instead.
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
to a requirement of the kfifo_alloc function called
during reallocation of the queue.
Cc: Oleksij Rempel
Signed-off-by: William Breathitt Gray
---
Documentation/ABI/testing/sysfs-bus-counter | 8
drivers/counter/counter-chrdev.c| 4 ++
drivers/counter/counter-sysfs.c | 44
component ID belongs to which respective extension.
Cc: David Lechner
Cc: Gwendal Grignou
Cc: Dan Carpenter
Signed-off-by: William Breathitt Gray
---
Documentation/ABI/testing/sysfs-bus-counter | 16 ++-
drivers/counter/counter-sysfs.c | 30 -
2 files
This creates an example Counter program under tools/counter/*
to exemplify the Counter character device interface.
Cc: Pavel Machek
Signed-off-by: William Breathitt Gray
---
MAINTAINERS | 1 +
tools/Makefile | 13 ++---
tools/counter/Build | 1
to discover what component ID belongs to the respective Synapse.
Cc: David Lechner
Cc: Gwendal Grignou
Cc: Dan Carpenter
Signed-off-by: William Breathitt Gray
---
Documentation/ABI/testing/sysfs-bus-counter | 7
drivers/counter/counter-sysfs.c | 45 +
2 files
This patch adds high-level documentation about the Counter subsystem
character device interface.
Signed-off-by: William Breathitt Gray
---
Documentation/driver-api/generic-counter.rst | 185 ++
.../userspace-api/ioctl/ioctl-number.rst | 1 +
2 files changed, 145
on the respective Counter character device node.
Cc: David Lechner
Cc: Gwendal Grignou
Cc: Dan Carpenter
Cc: Oleksij Rempel
Signed-off-by: William Breathitt Gray
---
drivers/counter/Makefile | 2 +-
drivers/counter/counter-chrdev.c | 482 +++
drivers/counter
This is in preparation for a subsequent patch implementing a character
device interface for the Counter subsystem.
Reviewed-by: David Lechner
Signed-off-by: William Breathitt Gray
---
MAINTAINERS | 1 +
include/linux/counter.h | 42 +--
include
The Counter subsystem architecture and driver implementations have
changed in order to handle Counter sysfs interactions in a more
consistent way. This patch updates the Generic Counter interface
documentation to reflect the changes.
Signed-off-by: William Breathitt Gray
---
Documentation/ABI
The Counter subsystem architecture and driver implementations have
changed in order to handle Counter sysfs interactions in a more
consistent way. This patch updates the Generic Counter interface
header file comments to reflect the changes.
Signed-off-by: William Breathitt Gray
---
drivers
atrick Havelange
Cc: Oleksij Rempel
Cc: Kamel Bouhara
Cc: Fabrice Gasnier
Cc: Maxime Coquelin
Cc: Alexandre Torgue
Cc: David Lechner
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c| 10 +++
drivers/counter/counter.c | 38 --
Signal values will always be levels so let's be explicit it about it to
make the intent of the code clear.
Cc: Syed Nayyar Waris
Cc: Oleksij Rempel
Cc: Kamel Bouhara
Reviewed-by: David Lechner
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c| 5
of the code clear.
Cc: Syed Nayyar Waris
Cc: Kamel Bouhara
Cc: Fabrice Gasnier
Cc: Maxime Coquelin
Cc: Alexandre Torgue
Cc: David Lechner
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c| 20 +++
drivers/counter/microchip-tcb-capture.c | 6
drivers
ERANGE is a semantically better error code to return when an argument
value falls outside the supported limit range of a device.
Cc: Syed Nayyar Waris
Cc: Oleksij Rempel
Cc: Fabrice Gasnier
Cc: Maxime Coquelin
Cc: Alexandre Torgue
Reviewed-by: David Lechner
Signed-off-by: William Breathitt
The struct counter_synapse actions_list member expects a const enum
counter_synapse_action array. This patch adds the const qualifier to the
stm32_lptim_cnt_synapse_actions to match actions_list.
Cc: Fabrice Gasnier
Signed-off-by: William Breathitt Gray
---
drivers/counter/stm32-lptimer-cnt.c
The struct counter_synapse actions_list member expects a const enum
counter_synapse_action array. This patch adds the const qualifier to the
stm32_synapse_actions to match actions_list.
Cc: Fabrice Gasnier
Cc: Benjamin Gaignard
Signed-off-by: William Breathitt Gray
---
drivers/counter/stm32
The struct counter_synapse actions_list member expects a const enum
counter_synapse_action array. This patch adds the const qualifier to the
mchp_tc_synapse_actions to match actions_list.
Cc: Kamel Bouhara
Signed-off-by: William Breathitt Gray
---
drivers/counter/microchip-tcb-capture.c | 2
The struct counter_synapse actions_list member expects a const enum
counter_synapse_action array. This patch adds the const qualifier to the
interrupt_cnt_synapse_actionss to match actions_list.
Cc: Oleksij Rempel
Signed-off-by: William Breathitt Gray
---
drivers/counter/interrupt-cnt.c | 2
The struct counter_count functions_list member expects a const enum
counter_count_function array. This patch adds the const qualifier to the
mchp_tc_count_functions to match functions_list.
Cc: Kamel Bouhara
Signed-off-by: William Breathitt Gray
---
drivers/counter/microchip-tcb-capture.c | 2
The struct counter_count functions_list member expects a const enum
counter_count_function array. This patch adds the const qualifier to the
stm32_lptim_cnt_functions to match functions_list.
Cc: Fabrice Gasnier
Signed-off-by: William Breathitt Gray
---
drivers/counter/stm32-lptimer-cnt.c | 2
The struct counter_synapse actions_list member expects a const enum
counter_synapse_action array. This patch adds the const qualifier to the
ftm_quaddec_synapse_actions to match actions_list.
Cc: Patrick Havelange
Signed-off-by: William Breathitt Gray
---
drivers/counter/ftm-quaddec.c | 2
The struct counter_count functions_list member expects a const enum
counter_count_function array. This patch adds the const qualifier to the
stm32_count_functions to match functions_list.
Cc: Fabrice Gasnier
Cc: Benjamin Gaignard
Signed-off-by: William Breathitt Gray
---
drivers/counter/stm32
The struct counter_synapse actions_list member expects a const enum
counter_synapse_action array. This patch adds the const qualifier to the
quad8_index_actions_list and quad8_synapse_actions_list to match
actions_list.
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
---
drivers
The struct counter_count functions_list member expects a const enum
counter_count_function array. This patch adds the const qualifier to the
interrupt__cnt_functions to match functions_list.
Cc: Oleksij Rempel
Signed-off-by: William Breathitt Gray
---
drivers/counter/interrupt-cnt.c | 2 +-
1
Add some safety by qualifying the quad8_preset_register_set() function
parameters as const.
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/counter/104-quad-8.c b
The struct counter_count functions_list member expects a const enum
counter_count_function array. This patch adds the const qualifier to the
quad8_count_functions_list to match functions_list.
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c | 2
"Miscellaneous" is the correct spelling.
Reviewed-by: David Lechner
Signed-off-by: William Breathitt Gray
---
Documentation/driver-api/generic-counter.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/driver-api/generic-counter.rst
b/Documentat
drivers support automatic configuration (e.g. PNP or PCI) in addition
to manually coded parameters.
This patch annotates the 104-QUAD-8 driver.
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
neric interface")
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/counter/104-quad-8.c b/drivers/counter/104-quad-8.c
index 4bb9abffae48..233a3acc1377 100644
---
It is obvious that devm_counter_register() is used to register a Counter
device, so a comment stating such is pointless here.
Cc: Syed Nayyar Waris
Signed-off-by: William Breathitt Gray
---
drivers/counter/104-quad-8.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/counter/104-quad
Duplicate ABIs are not valid, so let's consolidate these sysfs
attributes into the main sysfs-bus-counter documentation file.
Cc: Patrick Havelange
Reviewed-by: David Lechner
Signed-off-by: William Breathitt Gray
---
Documentation/ABI/testing/sysfs-bus-counter | 76
rving as an
example of how to support the new Counter events functionality.
Something that should still be discussed: should the struct
counter_event "status" member be 8 bits or 32 bits wide? This member
will provide the return status (system error number) of an event
operation.
W
it, and restore it then, instead of clearing its value.
> It also fixes the initial condition seen by the counter driver.
>
> Fixes: d0f949e220fd ("mfd: Add STM32 Timers driver")
>
> Signed-off-by: Fabrice Gasnier
Acked-by: William Breathitt Gray
> ---
> driver
gt;
> Fixes: ad29937e206f ("counter: Add STM32 Timer quadrature encoder")
>
> Suggested-by: William Breathitt Gray
> Signed-off-by: Fabrice Gasnier
Acked-by: William Breathitt Gray
> ---
> Note: this applies on top of:
> - "counter: stm32-timer-cnt: fix ceiling w
On Tue, Mar 02, 2021 at 06:03:25PM +0100, Fabrice Gasnier wrote:
> On 3/2/21 3:56 PM, William Breathitt Gray wrote:
> > Side question: if priv->ceiling is tracking the current ceiling
> > configuration, would it make sense to change stm32_count_ceiling_read()
> > to
truncated.
> Fix it by checking the max_arr to report a range error [1] to the user.
>
> Fixes: ad29937e206f ("counter: Add STM32 Timer quadrature encoder")
>
> [1] https://lkml.org/lkml/2021/2/12/358
>
> Signed-off-by: Fabrice Gasnier
Acked-by: William Breathit
ends on the CPU and system load. On
> the idle iMX6S I was able to measure up to 20kHz without count drops.
>
> Signed-off-by: Oleksij Rempel
> Reviewed-by: Ahmad Fatoum
This version looks acceptable for the Counter subsystem.
Thanks,
Reviewed-by: William Breathitt
On Mon, Mar 01, 2021 at 09:04:00AM +0100, Oleksij Rempel wrote:
> Add binding for the interrupt counter node
>
> Signed-off-by: Oleksij Rempel
> Reviewed-by: Linus Walleij
Acked-by: William Breathitt Gray
> ---
> .../bindings/counter/interrupt-counter.yaml | 62 ++
On Sat, Feb 27, 2021 at 03:18:47PM +, Jonathan Cameron wrote:
> On Fri, 26 Feb 2021 09:03:48 +0900
> William Breathitt Gray wrote:
>
> > On Sun, Feb 21, 2021 at 03:51:40PM +, Jonathan Cameron wrote:
> > > On Thu, 18 Feb 2021 19:32:16 +0900
> > &
On Fri, Feb 26, 2021 at 06:14:12PM -0600, David Lechner wrote:
> On 2/25/21 6:03 PM, William Breathitt Gray wrote:
> > On Sun, Feb 21, 2021 at 03:51:40PM +, Jonathan Cameron wrote:
> >> On Thu, 18 Feb 2021 19:32:16 +0900
> >> William Breathitt Gray wrote:
> >&
On Fri, Feb 26, 2021 at 01:14:55PM +0100, Oleksij Rempel wrote:
> On Fri, Feb 26, 2021 at 06:45:20PM +0900, William Breathitt Gray wrote:
> > On Fri, Feb 26, 2021 at 10:08:30AM +0100, Oleksij Rempel wrote:
> > > +static int interrupt_cnt_signal_read(struct count
gt;irq == -ENXIO)
> + priv->irq = 0;
> + else if (priv->irq < 0)
> + return dev_err_probe(dev, priv->irq, "failed to get IRQ\n");
> +
> + priv->gpio = devm_gpiod_get_optional(dev, NULL, GPIOD_IN);
> + if (IS_ERR(priv->
On Fri, Feb 26, 2021 at 07:46:01AM +0100, Oleksij Rempel wrote:
> On Wed, Feb 24, 2021 at 05:20:21PM +0900, William Breathitt Gray wrote:
> > On Wed, Feb 24, 2021 at 05:11:03PM +0900, William Breathitt Gray wrote:
> > > On Wed, Feb 24, 2021 at 08:35:06AM +0100, Oleksij Rempel wro
Timer quadrature encoder")
Cc: Fabrice Gasnier
Cc: Maxime Coquelin
Cc: Alexandre Torgue
Signed-off-by: William Breathitt Gray
---
Changes in v2:
- Support an explicit 0 case for function_get()/function_set()
drivers/counter/stm32-timer-cnt.c | 39 ---
1 file c
);
>
> > > + for (;;) {
> > > +read(fd, event_data, sizeof(event_data));
>
> If this goes to tools it really should have error handling and
> handling of short read.
>
> Best regards,
> Pavel
>
> --
> http://www.livejournal.com/~pavelmachek
Ack. I'll improve the error handling for this.
William Breathitt Gray
signature.asc
Description: PGP signature
On Sun, Feb 14, 2021 at 05:48:19PM +, Jonathan Cameron wrote:
> On Fri, 12 Feb 2021 21:13:42 +0900
> William Breathitt Gray wrote:
>
> > This patch adds high-level documentation about the Counter subsystem
> > character device interface.
> >
> > Sign
On Sun, Feb 21, 2021 at 03:51:40PM +, Jonathan Cameron wrote:
> On Thu, 18 Feb 2021 19:32:16 +0900
> William Breathitt Gray wrote:
>
> > On Sun, Feb 14, 2021 at 06:11:46PM +, Jonathan Cameron wrote:
> > > On Fri, 12 Feb 2021 21:13:44 +0900
> > &
On Sun, Feb 21, 2021 at 02:05:07PM +, Jonathan Cameron wrote:
> On Fri, 19 Feb 2021 17:51:37 +0900
> William Breathitt Gray wrote:
>
> > On Sun, Feb 14, 2021 at 06:09:13PM +, Jonathan Cameron wrote:
> > > On Fri, 12 Feb 2021 21:13:43 +0900
> > &
On Thu, Feb 25, 2021 at 12:19:18PM +0100, Fabrice Gasnier wrote:
> On 2/19/21 10:59 AM, William Breathitt Gray wrote:
> > When in SLAVE_MODE_DISABLED mode, the count still increases if the
> > counter is enabled because an internal clock is used. This patch fixes
> > the stm
On Wed, Feb 24, 2021 at 05:11:03PM +0900, William Breathitt Gray wrote:
> On Wed, Feb 24, 2021 at 08:35:06AM +0100, Oleksij Rempel wrote:
> > On Wed, Feb 24, 2021 at 11:34:06AM +0900, William Breathitt Gray wrote:
> > > Alternatively, we can take a more generic approac
On Wed, Feb 24, 2021 at 08:35:06AM +0100, Oleksij Rempel wrote:
> On Wed, Feb 24, 2021 at 11:34:06AM +0900, William Breathitt Gray wrote:
> > On Tue, Feb 23, 2021 at 06:45:16PM +0100, Oleksij Rempel wrote:
> > > On Tue, Feb 23, 2021 at 11:06:56AM +0100, Oleksij Rempel wrote:
>
On Sun, Feb 14, 2021 at 06:06:12PM +, Jonathan Cameron wrote:
> On Fri, 12 Feb 2021 21:13:41 +0900
> William Breathitt Gray wrote:
>
> > This patch introduces a character device interface for the Counter
> > subsystem. Device data is exposed through standard
Mon, Feb 22, 2021 at 10:43:00AM +0900, William Breathitt Gray wrote:
> > > On Mon, Feb 15, 2021 at 10:17:37AM +0100, Oleksij Rempel wrote:
> > > > > > +static irqreturn_t event_cnt_isr(int irq, void *dev_id)
> > > > > > +{
> > > > > > +
On Tue, Feb 23, 2021 at 08:16:30AM +0100, Oleksij Rempel wrote:
> Hi William,
>
> On Mon, Feb 22, 2021 at 10:48:56AM +0900, William Breathitt Gray wrote:
> > On Tue, Feb 16, 2021 at 09:13:54AM +0100, Oleksij Rempel wrote:
> > > changes v6:
> > > - rename it
On Sat, Feb 20, 2021 at 10:56:13AM -0600, David Lechner wrote:
> On 2/14/21 11:13 AM, Jonathan Cameron wrote:
> > On Fri, 12 Feb 2021 21:13:36 +0900
> > William Breathitt Gray wrote:
> >
> >> The phrase "Counter Count function" is verbose and unintentional
On Sat, Feb 20, 2021 at 10:43:06AM -0600, David Lechner wrote:
> On 2/12/21 6:13 AM, William Breathitt Gray wrote:
> > Only a select set of modes (function, action, etc.) are valid for a
> > given device configuration. This patch ensures that invalid modes result
> >
On Sat, Feb 20, 2021 at 10:30:03AM -0600, David Lechner wrote:
> On 2/12/21 6:13 AM, William Breathitt Gray wrote:
> > The 104-QUAD-8 only has two count modes where a ceiling value makes
> > sense: Range Limit and Modulo-N. Outside of these two modes, setting a
> > ceilin
is driver to use that name instead?
Sincerely,
William Breathitt Gray
> - driver fixes
> - device tree fixes
>
> changes v5:
> - rename it to event counter, since it support different event sources
> - make it work with gpio-only or irq-only configuration
> - update
le. How about "Channel 0, GPIO line state"?
Ideally, this would match the GPIO name (or I suppose the IRQ number if
not a GPIO line). So in your probe() function you can do something like
this I believe:
cnt_signals[0].name = priv->gpio->name;
Of course, you should first check whether this is a GPIO line or IRQ
line and set the name accordingly.
William Breathitt Gray
signature.asc
Description: PGP signature
c: Fabrice Gasnier
Cc: Maxime Coquelin
Cc: Alexandre Torgue
Signed-off-by: William Breathitt Gray
---
drivers/counter/stm32-timer-cnt.c | 31 +++
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/drivers/counter/stm32-timer-cnt.c
b/drivers/counter/stm32-t
1 - 100 of 1620 matches
Mail list logo