1
0
Fork 0
Commit Graph

9 Commits (69585dd69e663a40729492c7b52eb82477a2027a)

Author SHA1 Message Date
Mark Brown 3bed6e415f mfd: Allow multiple MFD cells with the same name
Provide basic support for MFDs having multiple cells of a given
type with different IDs by adding an id to the mfd_cell structure
and then adding that to the id passed in to mfd_add_devices().

As it stands this approach requires that MFDs using this feature
deal with ensuring that there aren't any ID collisions resulting
from multiple MFDs of the same type being instantiated. This needs
to happen with the existing code too, but with this approach there
is a knock on effect on the IDs for non-duplicated devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17 09:46:56 +02:00
Mark Brown 44faac3155 mfd: Pass driver_data onto child devices
The MFD cell structure provides a driver_data field but doesn't pass it
on to the child devices when instantiating them - do that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:41 +01:00
Ian Molton a87903f3b4 mfd: reduce stack usage in mfd-core.c
This patch moves the allocation of the resources off the stack in
mfd_add_device().

Signed-off-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2008-10-19 22:54:09 +02:00
Dmitry Baryshkov 424f525a12 mfd: accept pure device as a parent, not only platform_device
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2008-07-29 01:30:26 +02:00
Mike Rapoport 56edb58be1 mfd: add platform_data to mfd_cell
Adding platform_data to mfd_cell allows passing of platform data directly
to the platform_device created for each cell and thus reuse of existing
drivers.
On the other side it can be used as a hook to mfd_cell itself
removing the need in mfd_get_cell method.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2008-07-29 01:23:32 +02:00
Ben Dooks 7f71ac9374 mfd: Coding style fixes
Fix some coding style fixes in the mfd core driver.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2008-07-28 18:29:09 +02:00
Ben Dooks 96ee41993b mfd: Use to_platform_device instead of container_of
Convert mfd_remove_devices_fn() to use to_platform_device()
instead of doing container_of().

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2008-07-28 18:26:42 +02:00
Andrew Morton c82dd5321c mfd: don't use memzero
For it doesn't exist on i386.

Cc: Ian Molton <spyro@f2s.com>
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-25 10:53:26 -07:00
Dmitry Baryshkov aa613de676 [ARM] 5127/1: Core MFD support
This patch provides a common subdevice registration system for MFD type
chips, using platfrom device.

Signed-off-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-07-07 13:22:06 +01:00