@@ -10,6 +10,7 @@ struct mtd_partition;
* @nr_parts: number of mtd_partitions for static partitoning
* @type: optional flash device type (e.g. m25p80 vs m25p64), for use
* with chips that can't be queried for JEDEC or other IDs
+ * @power: method called to enable or disable Vcc
*
* Board init code (in arch/.../mach-xxx/board-yyy.c files) can
* provide information about SPI flash parts (such as DataFlash) to
@@ -26,6 +27,9 @@ struct flash_platform_data {
char *type;
/* we'll likely add more ... use JEDEC IDs, etc */
+
+ /* on = 0 disable Vcc, on != 0 enable Vcc */
+ void (*power)(int on);
};
#endif
For embedded devices or devices sensible to the power consumption is reasonable to have a way to control the flash chips power. This change in flash_platform_data makes possible to control the power supply of the flash memory chip by adding a "power" method to it. The platform then could attach a callback and control power supply by it's choice. For example by other regulator driver, GPIO or do nothing. Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com> --- include/linux/spi/flash.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)