William Breathitt Gray
d428487471
counter: i8254: Introduce the Intel 8254 interface library module
...
Exposes consumer library functions providing support for interfaces
compatible with the venerable Intel 8254 Programmable Interval Timer
(PIT).
The Intel 8254 PIT first appeared in the early 1980s and was used
initially in IBM PC compatibles. The popularity of the original Intel
825x family of chips led to many subsequent variants and clones of the
interface in various chips and integrated circuits. Although still
popular, interfaces compatible with the Intel 8254 PIT are nowdays
typically found embedded in larger VLSI processing chips and FPGA
components rather than as discrete ICs.
A CONFIG_I8254 Kconfig option is introduced by this patch. Modules
wanting access to these i8254 library functions should select this
Kconfig option, and import the I8254 symbol namespace.
Link: https://lore.kernel.org/r/f6fe32c2db9525d816ab1a01f45abad56c081652.1681665189.git.william.gray@linaro.org/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org >
2023-06-08 10:11:17 -04:00
Biju Das
7bb985ac03
Documentation: ABI: sysfs-bus-counter: add cascade_counts_enable and external_input_phase_clock_select
...
This commit adds cascade_counts_enable and external_input_phase_
clock_select items to counter ABI file.
(e.g. for Renesas MTU3 hardware used for phase counting).
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com >
Reviewed-by: William Breathitt Gray <william.gray@linaro.org >
Signed-off-by: Lee Jones <lee@kernel.org >
Link: https://lore.kernel.org/r/20230330111632.169434-4-biju.das.jz@bp.renesas.com
2023-04-26 11:40:35 +01:00
Julien Panis
5a47aed0d6
Documentation: ABI: sysfs-bus-counter: add frequency & num_overflows items
...
This commit adds frequency and num_overflows items to counter ABI file
(e.g. for TI ECAP hardware used in capture operating mode).
Signed-off-by: Julien Panis <jpanis@baylibre.com >
Link: https://lore.kernel.org/r/20220923142437.271328-3-jpanis@baylibre.com/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org >
Link: https://lore.kernel.org/r/467ae80e97c586c6bc9c453c6156ffcb5d4853d6.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-30 14:32:35 +02:00
William Breathitt Gray
45d2918520
counter: Introduce the Count capture component
...
Some devices provide a latch function to save historic Count values.
This patch standardizes exposure of such functionality as Count capture
components. A COUNTER_COMP_CAPTURE macro is provided for driver authors
to define a capture component. A new event COUNTER_EVENT_CAPTURE is
introduced to represent Count value capture events.
Cc: Julien Panis <jpanis@baylibre.com >
Link: https://lore.kernel.org/r/c239572ab4208d0d6728136e82a88ad464369a7a.1664204990.git.william.gray@linaro.org/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org >
Link: https://lore.kernel.org/r/3cebaa0b807a225eb277d771504fe6dba7269ffd.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-30 14:32:35 +02:00
William Breathitt Gray
650ae67bbf
counter: Introduce the Signal polarity component
...
The Signal polarity component represents the active level of a
respective Signal. There are two possible states: positive (rising edge)
and negative (falling edge); enum counter_signal_polarity represents
these states. A convenience macro COUNTER_COMP_POLARITY() is provided
for driver authors to declare a Signal polarity component.
Cc: Julien Panis <jpanis@baylibre.com >
Link: https://lore.kernel.org/r/8f47d6e1db71a11bb1e2666f8e2a6e9d256d4131.1664204990.git.william.gray@linaro.org/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org >
Link: https://lore.kernel.org/r/b6e53438badcb6318997d13dd2fc052f97d808ac.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-30 14:32:35 +02:00
William Breathitt Gray
feff17a550
counter: Implement events_queue_size sysfs attribute
...
The events_queue_size sysfs attribute provides a way for users to
dynamically configure the Counter events queue size for the Counter
character device interface. The size is in number of struct
counter_event data structures. The number of elements will be rounded-up
to a power of 2 due to a requirement of the kfifo_alloc function called
during reallocation of the queue.
Cc: Oleksij Rempel <o.rempel@pengutronix.de >
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com >
Link: https://lore.kernel.org/r/c914b2db2ea0a2637633bcc3e86ded3c94783f2e.1632884256.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 10:55:01 +01:00
William Breathitt Gray
4bdec61d92
counter: Implement *_component_id sysfs attributes
...
The Generic Counter chrdev interface expects users to supply component
IDs in order to select extensions for requests. In order for users to
know what component ID belongs to which extension this information must
be exposed. The *_component_id attribute provides a way for users to
discover what component ID belongs to which respective extension.
Cc: David Lechner <david@lechnology.com >
Cc: Gwendal Grignou <gwendal@chromium.org >
Cc: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com >
Link: https://lore.kernel.org/r/8961a11edbb882fc689e468194f5be75f572443e.1632884256.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 10:54:48 +01:00
William Breathitt Gray
bb6264a61d
counter: Implement signalZ_action_component_id sysfs attribute
...
The Generic Counter chrdev interface expects users to supply component
IDs in order to select Synapses for requests. In order for users to know
what component ID belongs to which Synapse this information must be
exposed. The signalZ_action_component_id attribute provides a way for
users to discover what component ID belongs to the respective Synapse.
Cc: Gwendal Grignou <gwendal@chromium.org >
Cc: Dan Carpenter <dan.carpenter@oracle.com >
Reviewed-by: David Lechner <david@lechnology.com >
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com >
Link: https://lore.kernel.org/r/a6c81b2f1f5d0b8d59b1ebe4f0fed04914b07547.1632884256.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 10:54:36 +01:00
William Breathitt Gray
de8daf30af
docs: counter: Update to reflect sysfs internalization
...
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.
Reviewed-by: David Lechner <david@lechnology.com >
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com >
Link: https://lore.kernel.org/r/91cded13c0145c0d3d0acfe765a2ccb6c9af7c3b.1630031207.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 10:53:23 +01:00
William Breathitt Gray
769841c966
docs: counter: Consolidate Counter sysfs attributes documentation
...
Duplicate ABIs are not valid, so let's consolidate these sysfs
attributes into the main sysfs-bus-counter documentation file.
Cc: Patrick Havelange <patrick.havelange@essensium.com >
Reviewed-by: David Lechner <david@lechnology.com >
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com >
Link: https://lore.kernel.org/r/c651ec1c541754ad108160839e2b8425ad089819.1623201081.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-06-09 15:55:15 +01:00
Jarkko Nikula
b711f687a1
counter: Add support for Intel Quadrature Encoder Peripheral
...
Add support for Intel Quadrature Encoder Peripheral found on Intel
Elkhart Lake platform.
Initial implementation was done by Felipe Balbi while he was working at
Intel with later changes from Raymond Tan and me.
Co-developed-by: Felipe Balbi (Intel) <balbi@kernel.org >
Signed-off-by: Felipe Balbi (Intel) <balbi@kernel.org >
Co-developed-by: Raymond Tan <raymond.tan@intel.com >
Signed-off-by: Raymond Tan <raymond.tan@intel.com >
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com >
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com >
Link: https://lore.kernel.org/r/20210602113259.158674-1-jarkko.nikula@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-06-03 18:24:14 +01:00
William Breathitt Gray
ea2b23b895
counter: Documentation: Add Generic Counter sysfs documentation
...
This patch adds standard documentation for the userspace sysfs
attributes of the Generic Counter interface.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-04-25 21:33:38 +02:00