9
0
Fork 0

mc13xxx: Hide private struct mc13xxx from other units

Board support units must use only the provided functions.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Alexander Shiyan 2012-08-04 13:15:54 +04:00 committed by Sascha Hauer
parent 2bbde03d0f
commit fe0545bbb0
2 changed files with 16 additions and 12 deletions

View File

@ -32,6 +32,21 @@
#define DRIVERNAME "mc13xxx"
enum mc13xxx_mode {
MC13XXX_MODE_I2C,
MC13XXX_MODE_SPI,
};
struct mc13xxx {
struct cdev cdev;
union {
struct i2c_client *client;
struct spi_device *spi;
};
enum mc13xxx_mode mode;
int revision;
};
#define to_mc13xxx(a) container_of(a, struct mc13xxx, cdev)
static struct mc13xxx *mc_dev;

View File

@ -150,18 +150,7 @@
#define MC13783_SW1B_SOFTSTART (1 << 17)
#define MC13783_SW_PLL_FACTOR(x) (((x) - 28) << 19)
enum mc13xxx_mode {
MC13XXX_MODE_I2C,
MC13XXX_MODE_SPI,
};
struct mc13xxx {
struct cdev cdev;
struct i2c_client *client;
struct spi_device *spi;
enum mc13xxx_mode mode;
int revision;
};
struct mc13xxx;
#ifdef CONFIG_MFD_MC13XXX
extern struct mc13xxx *mc13xxx_get(void);