ahci-platform: "Library-ise" ahci_probe functionality
authorHans de Goede <hdegoede@redhat.com>
Sat, 22 Feb 2014 15:53:34 +0000 (16:53 +0100)
committerTejun Heo <tj@kernel.org>
Sat, 22 Feb 2014 20:35:42 +0000 (15:35 -0500)
commit23b07d4cb3c0c850055cf968af44019b8da185fb
tree0af2a4e9dfdaa99a566ca51198369b09704c14b7
parent96a01ba52c60fdd74dd6e8cf06645d06515b1396
ahci-platform: "Library-ise" ahci_probe functionality

ahci_probe consists of 3 steps:
1) Get resources (get mmio, clks, regulator)
2) Enable resources, handled by ahci_platform_enable_resouces
3) The more or less standard ahci-host controller init sequence

This commit refactors step 1 and 3 into separate functions, so the platform
drivers for AHCI implementations which need a specific order in step 2,
and / or need to do some custom register poking at some time, can re-use
ahci-platform.c code without needing to copy and paste it.

Note that ahci_platform_init_host's prototype takes the 3 non function
members of ahci_platform_data as arguments, the idea is that drivers using
the new exported utility functions will not use ahci_platform_data at all,
and hopefully in the future ahci_platform_data can go away entirely.

tj: Minor comment formatting updates.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/ahci_platform.c
include/linux/ahci_platform.h
This page took 0.026939 seconds and 5 git commands to generate.