From: Alexander Shiyan <shc_work@mail.ru>
To: barebox@lists.infradead.org
Subject: [PATCH 2/3] mc13xxx: Hide struct mc13xxx from board support code
Date: Sat, 21 Jul 2012 08:50:08 +0400 [thread overview]
Message-ID: <1342846209-10461-2-git-send-email-shc_work@mail.ru> (raw)
In-Reply-To: <1342846209-10461-1-git-send-email-shc_work@mail.ru>
Board support units should use only provided functions.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
drivers/mfd/mc13xxx.c | 13 +++++++++++++
include/mfd/mc13xxx.h | 13 +------------
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/drivers/mfd/mc13xxx.c b/drivers/mfd/mc13xxx.c
index 2934e9d..b1417c8 100644
--- a/drivers/mfd/mc13xxx.c
+++ b/drivers/mfd/mc13xxx.c
@@ -32,6 +32,19 @@
#define DRIVERNAME "mc13xxx"
+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;
+};
+
#define to_mc13xxx(a) container_of(a, struct mc13xxx, cdev)
static struct mc13xxx *mc_dev;
diff --git a/include/mfd/mc13xxx.h b/include/mfd/mc13xxx.h
index 632c9fb..f4e3302 100644
--- a/include/mfd/mc13xxx.h
+++ b/include/mfd/mc13xxx.h
@@ -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);
--
1.7.3.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-07-21 4:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-21 4:50 [PATCH 1/3] mc13xxx: Added dummy definitions if CONFIG_MFD_MC13XXX is not set Alexander Shiyan
2012-07-21 4:50 ` Alexander Shiyan [this message]
2012-07-21 5:11 ` [PATCH 2/3] mc13xxx: Hide struct mc13xxx from board support code Alexander Shiyan
2012-07-21 4:50 ` [PATCH 3/3] PCM038: Added setup for OTG host pins Alexander Shiyan
2012-07-23 20:13 ` [PATCH 1/3] mc13xxx: Added dummy definitions if CONFIG_MFD_MC13XXX is not set Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1342846209-10461-2-git-send-email-shc_work@mail.ru \
--to=shc_work@mail.ru \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox