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 <[email protected]> --- include/linux/spi/flash.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/linux/spi/flash.h b/include/linux/spi/flash.h index 3f22932..045a6fc 100644 --- a/include/linux/spi/flash.h +++ b/include/linux/spi/flash.h @@ -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 -- 1.7.4.1 ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ spi-devel-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spi-devel-general
