[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2387af0d60d15dda03153a8802905196eeb6ad8f.1321442150.git.viresh.kumar@st.com>
Date: Wed, 16 Nov 2011 16:56:07 +0530
From: Viresh Kumar <viresh.kumar@...com>
To: <rabin.vincent@...ricsson.com>, <linus.walleij@...ricsson.com>,
<srinidhi.kasagar@...ricsson.com>
Cc: <sameo@...ux.intel.com>, <linux-kernel@...r.kernel.org>,
<armando.visconti@...com>, <shiraz.hashim@...com>,
<vipin.kumar@...com>, <rajeev-dlh.kumar@...com>,
<deepak.sikri@...com>, <vipulkumar.samar@...com>,
<amit.virdi@...com>, <viresh.kumar@...com>,
<pratyush.anand@...com>, <bhupesh.sharma@...com>,
<viresh.linux@...il.com>, <bhavna.yadav@...com>,
<vincenzo.frascino@...com>, <mirko.gardi@...com>,
<grant.likely@...retlab.ca>
Subject: [PATCH 2/5] mfd/stmpe: Move struct stmpe_variant_info to linux/mfd/stmpe.h
From: Pratyush Anand <pratyush.anand@...com>
Some variants like GPIO of STMPE801 have different register definition. So,
variant ID will be needed by stmpe-gpio.c to distinguish between STMPE801. Move
this struct definition from drivers/mfd/stmpe.h to include/linux/stmpe.h
Signed-off-by: Pratyush Anand <pratyush.anand@...com>
---
drivers/mfd/stmpe.h | 32 --------------------------------
include/linux/mfd/stmpe.h | 33 +++++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 32 deletions(-)
diff --git a/drivers/mfd/stmpe.h b/drivers/mfd/stmpe.h
index a73f4c1..7df0bda 100644
--- a/drivers/mfd/stmpe.h
+++ b/drivers/mfd/stmpe.h
@@ -44,38 +44,6 @@ struct stmpe_variant_block {
};
/**
- * struct stmpe_variant_info - variant-specific information
- * @name: part name
- * @id_val: content of CHIPID register
- * @id_mask: bits valid in CHIPID register for comparison with id_val
- * @num_gpios: number of GPIOS
- * @af_bits: number of bits used to specify the alternate function
- * @regs: variant specific registers.
- * @blocks: list of blocks present on this device
- * @num_blocks: number of blocks present on this device
- * @num_irqs: number of internal IRQs available on this device
- * @enable: callback to enable the specified blocks.
- * Called with the I/O lock held.
- * @get_altfunc: callback to get the alternate function number for the
- * specific block
- * @enable_autosleep: callback to configure autosleep with specified timeout
- */
-struct stmpe_variant_info {
- const char *name;
- u16 id_val;
- u16 id_mask;
- int num_gpios;
- int af_bits;
- const u8 *regs;
- struct stmpe_variant_block *blocks;
- int num_blocks;
- int num_irqs;
- int (*enable)(struct stmpe *stmpe, unsigned int blocks, bool enable);
- int (*get_altfunc)(struct stmpe *stmpe, enum stmpe_block block);
- int (*enable_autosleep)(struct stmpe *stmpe, int autosleep_timeout);
-};
-
-/**
* struct stmpe_client_info - i2c or spi specific routines/info
* @data: client specific data
* @read_byte: read single byte
diff --git a/include/linux/mfd/stmpe.h b/include/linux/mfd/stmpe.h
index 5afaf89..102c06d 100644
--- a/include/linux/mfd/stmpe.h
+++ b/include/linux/mfd/stmpe.h
@@ -51,6 +51,7 @@ enum {
struct stmpe_variant_info;
struct stmpe_client_info;
+struct stmpe_variant_block;
/**
* struct stmpe - STMPE MFD structure
@@ -86,6 +87,38 @@ struct stmpe {
struct stmpe_platform_data *pdata;
};
+/**
+ * struct stmpe_variant_info - variant-specific information
+ * @name: part name
+ * @id_val: content of CHIPID register
+ * @id_mask: bits valid in CHIPID register for comparison with id_val
+ * @num_gpios: number of GPIOS
+ * @af_bits: number of bits used to specify the alternate function
+ * @regs: variant specific registers.
+ * @blocks: list of blocks present on this device
+ * @num_blocks: number of blocks present on this device
+ * @num_irqs: number of internal IRQs available on this device
+ * @enable: callback to enable the specified blocks.
+ * Called with the I/O lock held.
+ * @get_altfunc: callback to get the alternate function number for the
+ * specific block
+ * @enable_autosleep: callback to configure autosleep with specified timeout
+ */
+struct stmpe_variant_info {
+ const char *name;
+ u16 id_val;
+ u16 id_mask;
+ int num_gpios;
+ int af_bits;
+ const u8 *regs;
+ struct stmpe_variant_block *blocks;
+ int num_blocks;
+ int num_irqs;
+ int (*enable)(struct stmpe *stmpe, unsigned int blocks, bool enable);
+ int (*get_altfunc)(struct stmpe *stmpe, enum stmpe_block block);
+ int (*enable_autosleep)(struct stmpe *stmpe, int autosleep_timeout);
+};
+
extern int stmpe_reg_write(struct stmpe *stmpe, u8 reg, u8 data);
extern int stmpe_reg_read(struct stmpe *stmpe, u8 reg);
extern int stmpe_block_read(struct stmpe *stmpe, u8 reg, u8 length,
--
1.7.2.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists