@lategoodbye
Yes its the interdependencies that made me abandon my mainlining. Alas I don't understand well enough how the kernel and device tree work to tie it down. If you take my bluetooth dts, and expand it it becomes:
$this->bbcode_second_pass_code('', ' &uart0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
uart-has-rtscts;
bluetooth {
compatible = "realtek,rtl8723bs-bt";
reset-gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
wake-gpios = <&gpio4 26 GPIO_ACTIVE_HIGH>;
wake-host-gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;
vcc-18-supply = {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc_18";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
vcc-io-supply = <&vcc_io>;
};
};')
The question is how does the kernel handle the sub tree. Now for the uart this is known from:
http://events17.linuxfoundation.org/sites/events/files/slides/serdev-elce-2017-2.pdf - serdev drivers (which we have in this case) know that this means start up a uart on the pins needed, but pass the data onto the driver required (in this case bluetooth).
Now the hci_h5 bluetooth driver that we are using doesn't know about either -gpios or -supply. But mainline would like these in the example code in documentation:
https://www.spinics.net/lists/linux-bluetooth/msg78545.html.
So have to wonder, does the kernel know about the endings -gpios and -supply; and know when it sees these that it has to start the module responsible for that (so for power, talk to the rk808 over i2c).
Alas I don't know well enough how the kernel works.
@TheSaint
I don't think I can see how the wi-fi driver would mess up the 80211 module, I'd have though that the 80211 would sit higher in the steam, e.g. wi-fi gets the data and goes via 80211.
The pinout for the realtek device makes it sound like there are control pins separate for wi-fi and bluetooth. However this isn't really documented. So yes these pins quite possibly need pulling to bring the device up. This said though we don't know for sue how the pins are wired to the rk3288 cpu, its not in the schematic, so we have to hope we can get it from the asus miniarm device tree ... actually reading the two data sheets for the device, on has the line called BT_DIS# the other BT_RST_N. Now given the miniarm dts - my guess is that its the Reset. In which case bluetooth doesn't have an additional pin that needs pulling to enable the device.