diff options
author | Davide Ciminaghi <ciminaghi@gnudd.com> | 2012-11-09 15:19:52 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-11-20 12:21:14 +0100 |
commit | 1950c7164646bfeeb82c34bc299d82119706afb5 (patch) | |
tree | ac16a4732afccfb73bc29cce5c3aee4c4d622ec5 /include/sound/wm5100.h | |
parent | 014483932b3f0dbecbb01da38de45b2c7a53cdfd (diff) |
mfd: sta2x11-mfd: Add apb-soc regs driver and factor out common code
A driver for the apb-soc registers is needed by the clock
infrastructure code to configure and control clocks on the sta2x11
chip.
Since some of the functions in sta2x11-mfd.c were almost identical
for the two existing platform devices, the following changes
have been performed to avoid further code duplication while
adding the apb-soc-regs driver:
* The sctl_regs and apbreg_regs fields in struct sta2x11_mfd
have been turned into just one array of pointers accessed by
device index.
* Platform probe methods have become one-liners invoking a
common probe with the device's index as second parameter.
* For loops have been inserted where the same operations
were performed for each of the two bars of a pci device.
* The apbreg_mask and sctl_mask functions were almost identical,
so they were turned into inline functions invoking a common
__sta2x11_mfd_mask() with the platform device's index as last
parameter. To do this, enum sta2x11_mfd_plat_dev has been declared in
sta2x11-mfd.h and more device types have been added to it.
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/sound/wm5100.h')
0 files changed, 0 insertions, 0 deletions