Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 4cfc51017db3e3f4eaaa2cb436a905097a4f08e2 55 lines 1.4 kB view raw
1#ifndef MFD_CORE_H 2#define MFD_CORE_H 3/* 4 * drivers/mfd/mfd-core.h 5 * 6 * core MFD support 7 * Copyright (c) 2006 Ian Molton 8 * Copyright (c) 2007 Dmitry Baryshkov 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License version 2 as 12 * published by the Free Software Foundation. 13 * 14 */ 15 16#include <linux/platform_device.h> 17 18/* 19 * This struct describes the MFD part ("cell"). 20 * After registration the copy of this structure will become the platform data 21 * of the resulting platform_device 22 */ 23struct mfd_cell { 24 const char *name; 25 26 int (*enable)(struct platform_device *dev); 27 int (*disable)(struct platform_device *dev); 28 int (*suspend)(struct platform_device *dev); 29 int (*resume)(struct platform_device *dev); 30 31 void *driver_data; /* driver-specific data */ 32 33 /* 34 * This resources can be specified relatievly to the parent device. 35 * For accessing device you should use resources from device 36 */ 37 int num_resources; 38 const struct resource *resources; 39}; 40 41static inline struct mfd_cell * 42mfd_get_cell(struct platform_device *pdev) 43{ 44 return (struct mfd_cell *)pdev->dev.platform_data; 45} 46 47extern int mfd_add_devices( 48 struct platform_device *parent, 49 const struct mfd_cell *cells, int n_devs, 50 struct resource *mem_base, 51 int irq_base); 52 53extern void mfd_remove_devices(struct platform_device *parent); 54 55#endif