Hi Graeme,
Are you saying :
static struct platform_driver sbsa_gwdt_driver = { .driver = { .name = "sbsa-gwdt", .pm = &sbsa_gwdt_pm_ops, .of_match_table = sbsa_gwdt_of_match, }, .probe = sbsa_gwdt_probe, .remove = sbsa_gwdt_remove, .shutdown = sbsa_gwdt_shutdown, };
.name = "sbsa-gwdt", ???
I am not sure if that can do the auto-insmod part, maybe I miss some knowledge of platform_driver , But AFAIK, the platform mechanism uses that name to match the driver and device, ONCE the driver or device is registered into system. that means when the driver is insmod'ed , then the "name" will take effect.
But MODULE_DEVICE_TABLE creates an alias string in the .ok so depmod can find device table.
please correct me , If I misunderstand this part .
On 18 May 2015 at 17:11, Hanjun Guo hanjun.guo@linaro.org wrote:
On 2015年05月18日 17:05, G Gregory wrote:
Shouldn't the standard platform_device matching kick in?
It should match the driver to the name!
Hmm, I missed this part, I'm not familiar with the mechanism, Fuwei, could you please try this direction?
Graeme
On 18 May 2015 at 10:04, Hanjun Guo hanjun.guo@linaro.org wrote:
On 2015年05月18日 16:48, Fu Wei wrote:
Hi Suravee,
Hanjun and me have figured out the problem of auto-insmod SBSA watchdog module, when boot with ACPI:
For now , we can not insmod SBSA watchdog driver automatically, because :
For booting with dtb , in the driver module, we already have :
static const struct of_device_id sbsa_gwdt_of_match[] = { { .compatible = "arm,sbsa-gwdt", }, {}, }; MODULE_DEVICE_TABLE(of, sbsa_gwdt_of_match);
For booting with acpi , we should have sometime like :
static const struct acpi_device_id sbsa_gwdt_ids[] __used = { {ACPI_GTDT_SBSA_GWDT_HID, 0}, {"", 0} }; MODULE_DEVICE_TABLE(acpi, sbsa_gwdt_ids);
Unfortunately, for now , in ACPI spec, it seems we don't have ACPI_GTDT_SBSA_GWDT_HID, and in Linux kernel, there is not a mechanism to register the Wakeup-timer and Watchdog in GTDT with ACPI_GTDT_*_HID.
Maybe, ACPI team of LEG can discuss about that and rise a request of adding ACPI_GTDT_*_HID to ACPI spec for GTDT table
@Hanjun, Al Please correct me if I misunderstand something :-) Great thanks!
You are right, more specifically, there is no mechanism to auto match/register modules for ACPI static tables (MADT/gtdt..), I think we can post a question on ACPI maillist to see if any good inputs.
Thanks Hanjun