ramips: use gpio-export for Mikrotik RouterBOARD 750Gr3 beeper
authorJohn Thomson <git@johnthomson.fastmail.com.au>
Mon, 10 Aug 2020 09:40:55 +0000 (19:40 +1000)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Thu, 13 Aug 2020 00:12:12 +0000 (02:12 +0200)
This beeper hardware requires a PWM driver for frequency selection.
Since the GPIO driver does not provide that, revert the beeper
support to a simple gpio-export.

This effectively reverts the corresponding changes from
6ba58b7b020c ("ramips: cleanup the RB750Gr3 support")

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
[commit title/message facelift]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts
target/linux/ramips/image/mt7621.mk

index a516f337ccc1209ed5e7716dd3c922c81d7f1251..f767599e98c3f7f6c918433d19c7f45e267a327a 100644 (file)
                };
        };
 
-       beeper {
-               compatible = "gpio-beeper";
-               gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
-       };
-
        gpio_export {
                compatible = "gpio-export";
                #size-cells = <0>;
 
+               buzzer {
+                       /* Beeper requires PWM for frequency selection */
+                       gpio-export,name = "buzzer";
+                       gpio-export,output = <0>;
+                       gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+               };
+
                usb_power {
                        gpio-export,name = "usb_power";
                        gpio-export,output = <1>;
index c922303c54dbf3de3ad9fbdef17dc3c0f7e35850..16b74c7b3e658db2844d1cca019d9ae8013e758c 100644 (file)
@@ -703,7 +703,7 @@ endef
 define Device/mikrotik_routerboard-750gr3
   $(Device/MikroTik)
   DEVICE_MODEL := RouterBOARD 750Gr3
-  DEVICE_PACKAGES += kmod-gpio-beeper -wpad-basic
+  DEVICE_PACKAGES += -wpad-basic
   SUPPORTED_DEVICES += mikrotik,rb750gr3
 endef
 TARGET_DEVICES += mikrotik_routerboard-750gr3