Re: [PATCH] serial: 8250: Add support for using platform_device resources
From: Andy Shevchenko
Date: Mon May 06 2019 - 17:05:27 EST
Let's start from simple things:
- I really failed to find where resources are requested in
mfd_add_device():
https://elixir.bootlin.com/linux/latest/ident/mfd_add_device
- as for 8250_dw.c (as MFD child of intel-lpss-pci.c) see below...
1. 8250_dw.c remaps resources, but doesn't request them.
2. It calls
-> serial8250_register_8250_port(), which sets UPF_BOOT_AUTOCONF
unconditionally, as you noticed
-> uart_add_one_port()
-> uart_configure_port()
-> port->ops->config_port(), if UPF_BOOT_AUTOCONF is set, see above
3. And ->config_port() is defined to serial8250_config_port() in
https://elixir.bootlin.com/linux/latest/source/drivers/tty/serial/8250/8250_port.c#L3147
So, it *does* request resources implicitly via 8250 core.
I maybe miss something obvious, though.
--
With Best Regards,
Andy Shevchenko