aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/mchp23k256.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-12-17mtd: mchp23k256: propagate return value of spi_sync()Antonio Borneo1-4/+14
The call to spi_sync() can fail. Check the return value and propagate it. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
2017-06-08mtd: mchp23k256: Add support for mchp23lcv1024Chris Packham1-10/+56
The mchp23lcv1024 is similar to the mchp23k256, the differences (from a software point of view) are the capacity of the chip and the size of the addresses used. There is no way to detect the specific chip so we must be told via a Device Tree or default to mchp23k256 when device tree is not used. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2017-06-08mtd: mchp23k256: add partitioning supportChris Packham1-0/+1
Setting the of_node for the mtd device allows the generic mtd code to setup the partitions. [Editorial note (Brian): patch still pending on fixing up the "aligned to eraseblock" partition sanity check, given that this SRAM has no eraseblocks.] Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2017-06-01mtd: mchp23k256: switch to mtd_device_register()Chris Packham1-3/+2
Use mtd_device_register() instead of mtd_device_parse_register() to eliminate two unused parameters. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2017-06-01mtd: mchp23k256: Add OF device ID tableChris Packham1-0/+8
This allows registering of this device via a Device Tree. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2017-05-11mtd: mchp23k256: Add driver for this SPI SRAM deviceAndrew Lunn1-0/+182
The Microchip 23k256 is a 32K Byte SRAM connected via SPI. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> [Brian: fixed copyright to be in this millenium] Signed-off-by: Brian Norris <computersforpeace@gmail.com>