linux/drivers/counter
William Breathitt Gray b11eed1554 counter: Return error code on invalid modes
Only a select set of modes (function, action, etc.) are valid for a
given device configuration. This patch ensures that invalid modes result
in a return -EINVAL. Such a situation should never occur in reality, but
it's good to define a default switch case for the sake of making the
intent of the code clear.

Cc: Kamel Bouhara <kamel.bouhara@bootlin.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Acked-by: David Lechner <david@lechnology.com>
Acked-by: Syed Nayyar Waris <syednwaris@gmail.com>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Link: https://lore.kernel.org/r/7af82d4e39610da11edce0ee370285fe1cb1eac8.1627990337.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-08-09 20:17:36 +01:00
..
104-quad-8.c counter: Return error code on invalid modes 2021-08-09 20:17:36 +01:00
counter.c counter: Simplify the count_read and count_write callbacks 2019-10-18 19:47:27 +01:00
ftm-quaddec.c counter: ftm-quaddec: Add const qualifier for actions_list array 2021-06-09 16:27:58 +01:00
intel-qep.c counter: intel-qep: Remove linux/bitops.h include 2021-07-13 19:07:10 +01:00
interrupt-cnt.c counter: interrupt-cnt: Add const qualifier for actions_list array 2021-06-13 17:00:18 +01:00
Kconfig counter: Add support for Intel Quadrature Encoder Peripheral 2021-06-03 18:24:14 +01:00
Makefile counter: Add support for Intel Quadrature Encoder Peripheral 2021-06-03 18:24:14 +01:00
microchip-tcb-capture.c counter: Return error code on invalid modes 2021-08-09 20:17:36 +01:00
stm32-lptimer-cnt.c counter: Return error code on invalid modes 2021-08-09 20:17:36 +01:00
stm32-timer-cnt.c counter: stm32-timer-cnt: Add const qualifier for actions_list array 2021-06-09 16:32:47 +01:00
ti-eqep.c counter: Return error code on invalid modes 2021-08-09 20:17:36 +01:00