Repository navigation
Generic Rotary Encoder overlay for multiple instances - #2388
Conversation
|
I think what you are doing is great, but I'm not so happy that it may stop working for existing users unless they rename their parameters to match. Can you keep rotary0_pin_a and _b as aliases, and make sure the README matches (I prefer the shorter pin_a and _b)? |
|
Sure! I don't like to break compatibility for previous users either. I'm quite new to dts overlay format so I don't know the best way to achieve this. My first simple attemp has been using the aliases section, but compiling fails sind I can think of duplicating the parameters inside the Is there a better alternative to this? |
|
No, there is no clever way, just duplicate the parameter definition with a different name like your second example. |
|
Ok. Commited this way |
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
kernel: Add support for SuperAudioBoard sound card (#2386) See: raspberrypi/linux#2386 kernel: Revert downstream wm8804 changes See: raspberrypi/linux#2364 kernel: Generic Rotary Encoder overlay for multiple instances (#2388) See: raspberrypi/linux#2388 kernel: dwc_otg: Fix a regression when dequeueing isochronous transfers See: raspberrypi/linux#2380 kernel: dwc_otg: add smp_mb() to prevent driver state corruption on boot See: raspberrypi/linux#2382 kernel: overlays: Allow multiple instances of gpio-ir[-tx] kernel: overlay: Add missing pinctrl reference to gpio-ir kernel: properly fix S24_LE mode with pcm512x codec See: raspberrypi/linux#2365
kernel: Add support for SuperAudioBoard sound card (#2386) See: raspberrypi/linux#2386 kernel: Revert downstream wm8804 changes See: raspberrypi/linux#2364 kernel: Generic Rotary Encoder overlay for multiple instances (#2388) See: raspberrypi/linux#2388 kernel: dwc_otg: Fix a regression when dequeueing isochronous transfers See: raspberrypi/linux#2380 kernel: dwc_otg: add smp_mb() to prevent driver state corruption on boot See: raspberrypi/linux#2382 kernel: overlays: Allow multiple instances of gpio-ir[-tx] kernel: overlay: Add missing pinctrl reference to gpio-ir kernel: properly fix S24_LE mode with pcm512x codec See: raspberrypi/linux#2365
|
The updated overlay is in the current rpi-update release. |
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
Modify the rotary-encoder overlay to support multiple instances.
A slightly modified
rotary-encoder-overlayto allow multiple instances.It make use of the
<reg>property, similar to thegpio-keys-overlay, bounded to thepin_aparameter.Then, it is possible to attach multiple rotary encoders to different pins, like the following example:
Parameters
rotary0_pin_aandrotary0_pin_bare renamed to justpin_aandpin_bsince they do not only refer to one rotary node only.