Bluetooth: btnxpuart: Move vendor specific initialization to .post_init
authorNeeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Thu, 27 Feb 2025 18:26:19 +0000 (23:56 +0530)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 25 Mar 2025 16:45:05 +0000 (12:45 -0400)
commit6fca6781d19dfadbc3d96b3c10daf1f2e1239092
treebc680f6d2687f4398c441625e1eccac43ecd145f
parent07e6bddb54b48e8f187f3baa56fde7f6ddc0edd5
Bluetooth: btnxpuart: Move vendor specific initialization to .post_init

This moves change baudrate and power save vendor commands from
nxp_setup() to nxp_post_init().

This also moves the baudrate restore logic from nxp_serdev_remove() to
nxp_shutdown() which ensure baudrate is restored even when HCI dev is
down, preventing baudrate mismatch between host and controller when
device is probed again next time.

In case of removal when the hdev is up and running, we have to call the
shutdown procedure explicitly before unregistering the hdev.

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Co-developed-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btnxpuart.c