Commit ae3392c
counter: microchip-tcb-capture: Add watch validation support
The Timer Counter Block (TCB) exposes several kinds of events to the
Counter framework, but not every event is meaningful on every hardware
channel. Add a `watch_validate()` callback so userspace may register only
the combinations actually supported:
* Channel 0 (COUNTER_MCHP_EVCHN_CV, COUNTER_MCHP_EVCHN_RA)
- COUNTER_EVENT_CAPTURE
- COUNTER_EVENT_CHANGE_OF_STATE
- COUNTER_EVENT_OVERFLOW
* Channel 1 (COUNTER_MCHP_EVCHN_RB)
- COUNTER_EVENT_CAPTURE
* Channel 2 (COUNTER_MCHP_EVCHN_RC)
- COUNTER_EVENT_THRESHOLD
Any other request is rejected with `-EINVAL`.
Signed-off-by: Dharma Balasubiramani <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: William Breathitt Gray <[email protected]>1 parent ace2cd1 commit ae3392c
1 file changed
+24
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
340 | 362 | | |
341 | 363 | | |
342 | 364 | | |
| |||
356 | 378 | | |
357 | 379 | | |
358 | 380 | | |
359 | | - | |
| 381 | + | |
| 382 | + | |
360 | 383 | | |
361 | 384 | | |
362 | 385 | | |
| |||
0 commit comments