summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-linus' of ↵Linus Torvalds2014-12-1777-922/+4949
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input subsystem updates from Dmitry Torokhov: "Two new drivers for Elan hardware (for I2C touchpad and touchscreen found in several Chromebooks and other devices), a driver for Goodix touch panel, and small fixes to Cypress I2C trackpad and other input drivers. Also we switched to use __maybe_unused instead of gating suspend/ resume code with #ifdef guards to get better compile coverage" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (27 commits) Input: gpio_keys - fix warning regarding uninitialized 'button' variable Input: add support for Elan eKTH I2C touchscreens Input: gpio_keys - fix warning regarding uninitialized 'irq' variable Input: cyapa - use 'error' for error codes Input: cyapa - fix resuming the device Input: gpio_keys - add device tree support for interrupt only keys Input: amikbd - allocate temporary keymap buffer on the stack Input: amikbd - fix build if !CONFIG_HW_CONSOLE Input: lm8323 - missing error check in lm8323_set_disable() Input: initialize device counter variables with -1 Input: initialize input_no to -1 to avoid subtraction Input: i8042 - do not try to load on Intel NUC D54250WYK Input: atkbd - correct MSC_SCAN events for force_release keys Input: cyapa - switch to using managed resources Input: lifebook - use "static inline" instead of "inline" in lifebook.h Input: touchscreen - use __maybe_unused instead of ifdef around suspend/resume Input: mouse - use __maybe_unused instead of ifdef around suspend/resume Input: misc - use __maybe_unused instead of ifdef around suspend/resume Input: cap11xx - support for irq-active-high option Input: cap11xx - add support for various cap11xx devices ...
| * Merge branch 'next' into for-linusDmitry Torokhov2014-12-1677-922/+4949
| |\ | | | | | | | | | Prepare input updates for 3.19.
| | * Input: gpio_keys - fix warning regarding uninitialized 'button' variableFabio Estevam2014-12-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit af906faabcf91eb1 ("Input: gpio_keys - fix warning regarding uninitialized 'irq' variable") introduced the following build warning: drivers/input/keyboard/gpio_keys.c:625:16: warning: 'button' may be used uninitialized in this function [-Wmaybe-uninitialized] Move the 'button' initialization to a proper location to avoid such warning. Reported-by: Olof's autobuilder <build@lixom.net> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: add support for Elan eKTH I2C touchscreensScott Liu2014-12-084-0/+1317
| | | | | | | | | | | | | | | | | | | | | | | | | | | This driver supports Elan eKTH I2C touchscreen controllers. Note that these are using custom protocol, as opposed to other Elan parts that use HID-over-I2C and are supported by the standard HID-multitouch driver. Signed-off-by: Scott Liu <scott.liu@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: gpio_keys - fix warning regarding uninitialized 'irq' variableDmitry Torokhov2014-12-081-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f2d347ff70be453e ("Input: gpio_keys - add device tree support for interrupt only keys") caused the following build warning: drivers/input/keyboard/gpio_keys.c: In function 'gpio_keys_probe': drivers/input/keyboard/gpio_keys.c:647:15: warning: 'irq' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/input/keyboard/gpio_keys.c:622:7: note: 'irq' was declared here Move button->irq initialization into proper branch and get rid of the temporary. Reported-by: Olof's autobuilder <build@lixom.net> Reported-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: cyapa - use 'error' for error codesDudley Du2014-12-041-47/+47
| | | | | | | | | | | | | | | | | | | | | | | | Let's use 'error' variable instead of 'ret' when we need to store erro codes. Signed-off-by: Dudley Du <dudley.dulixin@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: cyapa - fix resuming the deviceDudley Du2014-12-041-4/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chage b1cfa7b4388285c0f0b486f152ab0cb18612c779 tried to get away form using irq in cyapa structure and use client->irq instead, but missed a couple of spots making the touchpad inoperative after resume. Reported-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Dudley Du <dudley.dulixin@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: gpio_keys - add device tree support for interrupt only keysAlexander Stein2014-12-042-15/+29
| | | | | | | | | | | | | | | | | | | | | | | | This features already exists for board config setups. Add support for device tree based systems. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: amikbd - allocate temporary keymap buffer on the stackGeert Uytterhoeven2014-12-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allocate the temporary buffer needed for initialization of the console keyboard maps (512 bytes, as NR_KEYS = 256) on the stack instead of statically, to reduce kernel size. add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-512 (-512) function old new delta temp_map 512 - -512 Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: amikbd - fix build if !CONFIG_HW_CONSOLEGeert Uytterhoeven2014-12-041-17/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CONFIG_HW_CONSOLE is not set: drivers/built-in.o: In function `amikbd_probe': amikbd.c:(.init.text+0x3e4e): undefined reference to `key_maps' amikbd.c:(.init.text+0x3dd4): undefined reference to `key_maps' To fix this, extract the initialization of the console keyboard maps into amikbd_init_console_keymaps(), protected by #ifdef CONFIG_HW_CONSOLE. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: lm8323 - missing error check in lm8323_set_disable()Dan Carpenter2014-12-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The missing error handling here is not especially harmful but static checkers complain that "i" can be used uninitialized. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: initialize device counter variables with -1Aniroop Mathur2014-12-045-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Let's initialize atomic_t variables keeping track of number of various devices created so far with -1 in order to avoid extra subtraction operation. Signed-off-by: Aniroop Mathur <aniroop.mathur@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: initialize input_no to -1 to avoid subtractionAniroop Mathur2014-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Let's initializes input_no to -1 in order to avoid extra subtraction operation performed every time we allocate an input device. Signed-off-by: Aniroop Mathur <aniroop.mathur@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: i8042 - do not try to load on Intel NUC D54250WYKTodor Minchev2014-12-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | The Intel NUC D54250WYK has no PS/2 controller, however the DSDT declares PS/2 devices which trigger the loading of the i8042 driver. Signed-off-by: Todor Minchev <todor.minchev@intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: atkbd - correct MSC_SCAN events for force_release keysStefan Brüns2014-11-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without the change either no scancode would be reported on release of force_release keys, or - if the key is marked as force_release erroneously - the release event and the scancode would be reported in separate reports to the input layer. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: cyapa - switch to using managed resourcesDudley Du2014-11-101-79/+105
| | | | | | | | | | | | | | | | | | | | | | | | Use of managed resources simplifies error handling and device removal code. Signed-off-by: Dudley Du <dudl@cypress.com> [Dmitry: added open/close methods so cyapa_remove is no longer needed.] Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: lifebook - use "static inline" instead of "inline" in lifebook.hChen Gang2014-11-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For functions defined in header files we should use static inline rather than inline, which breaks under the latest upstream gcc (which is really gcc issue, but static inline is better suited regardless). The related error (with allmodconfig under tile): MODPOST 4002 modules ERROR: "lifebook_detect" [drivers/input/mouse/psmouse.ko] undefined! Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: touchscreen - use __maybe_unused instead of ifdef around suspend/resumeJingoo Han2014-11-0219-78/+38Star
| | | | | | | | | | | | | | | | | | | | | | | | Use __maybe_unused instead of ifdef guards around suspend/resume functions, in order to increase build coverage and fix build warnings. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: mouse - use __maybe_unused instead of ifdef around suspend/resumeJingoo Han2014-11-023-12/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | Use __maybe_unused instead of ifdef guards around suspend/resume functions, in order to increase build coverage and fix build warnings. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: misc - use __maybe_unused instead of ifdef around suspend/resumeJingoo Han2014-11-0219-71/+35Star
| | | | | | | | | | | | | | | | | | | | | | | | Use __maybe_unused instead of ifdef guards around suspend/resume functions, in order to increase build coverage and fix build warnings. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: cap11xx - support for irq-active-high optionMatt Ranostay2014-11-022-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some applications need to use the irq-active-high push-pull option. This allows it be enabled in the device tree child node. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: cap11xx - add support for various cap11xx devicesMatt Ranostay2014-11-022-24/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are variants of the cap11xx device with a varying number of capacitance detection channels. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: rename cap1106 driver to cap11xxMatt Ranostay2014-11-025-355/+355
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are several devices in cap11xx family besides cap1106. The driver can be made to support all of them, so let's give it more generic name. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: altera_ps2 - switch to using managed resourcesTobias Klauser2014-10-311-57/+24Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use them devm_ managed resources API to simplify error handling in altera_ps2_probe() and to reduce the size of altera_ps2_remove() and the ps2if struct. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: add driver for the Goodix touchpanelBastien Nocera2014-10-314-0/+415
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a driver for the Goodix touchscreen panel found in Onda v975w tablets. The driver is based off the Android driver gt9xx.c found in some Android code dumps, but now bears no resemblance to the original driver. The driver was tested on the aforementioned tablet. Signed-off-by: Bastien Nocera <hadess@hadess.net> Tested-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: add driver for Elan I2C/SMbus touchpadDuson Lin2014-10-248-0/+2418
| | | | | | | | | | | | | | | | | | | | | | | | | | | This driver supports Elan I2C/SMbus touchpads found in some laptops and also in many Chromebooks. Signed-off-by: Duson Lin <dusonlin@emc.com.tw> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: lpc32xx-keys - switch to using managed resourcesPramod Gurav2014-10-221-72/+20Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change switches to using devm_* managed resources APIs to request the resources in probe to simplify probe error path and module unloading. Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: pxa27x_keypad - switch to using managed resourcesPramod Gurav2014-10-221-64/+20Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change switches ithe driver to use devm_* APIs to allocate resources. This helps to simplify failure path in probe function and module unloading and does away with remove function. Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: mpr121 - switch to using managed resourcesPramod Gurav2014-10-221-30/+12Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change switches the driver to use devm_* managed resources APIs to request the resources in probe to simplify probe error path and module unloading and does away with remove function. Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Merge tag 'for-linus-20141215' of git://git.infradead.org/linux-mtdLinus Torvalds2014-12-1742-472/+2414
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull MTD updates from Brian Norris: "Summary: - Add device tree support for DoC3 - SPI NOR: Refactoring, for better layering between spi-nor.c and its driver users (e.g., m25p80.c) New flash device support Support 6-byte ID strings - NAND: New NAND driver for Allwinner SoC's (sunxi) GPMI NAND: add support for raw (no ECC) access, for testing purposes Add ATO manufacturer ID A few odd driver fixes - MTD tests: Allow testers to compensate for OOB bitflips in oobtest Fix a torturetest regression - nandsim: Support longer ID byte strings And more" * tag 'for-linus-20141215' of git://git.infradead.org/linux-mtd: (63 commits) mtd: tests: abort torturetest on erase errors mtd: physmap_of: fix potential NULL dereference mtd: spi-nor: allow NULL as chip name and try to auto detect it mtd: nand: gpmi: add raw oob access functions mtd: nand: gpmi: add proper raw access support mtd: nand: gpmi: add gpmi_copy_bits function mtd: spi-nor: factor out write_enable() for erase commands mtd: spi-nor: add support for s25fl128s mtd: spi-nor: remove the jedec_id/ext_id mtd: spi-nor: add id/id_len for flash_info{} mtd: nand: correct the comment of function nand_block_isreserved() jffs2: Drop bogus if in comment mtd: atmel_nand: replace memcpy32_toio/memcpy32_fromio with memcpy mtd: cafe_nand: drop duplicate .write_page implementation mtd: m25p80: Add support for serial flash Spansion S25FL132K MTD: m25p80: fix inconsistency in m25p_ids compared to spi_nor_ids mtd: spi-nor: improve wait-till-ready timeout loop mtd: delete unnecessary checks before two function calls mtd: nand: omap: Fix NAND enumeration on 3430 LDP mtd: nand: add ATO manufacturer info ...
| * | | mtd: tests: abort torturetest on erase errorsBrian Norris2014-12-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The torture test should quit once it actually induces an error in the flash. This step was accidentally removed during refactoring. Without this fix, the torturetest just continues infinitely, or until the maximum cycle count is reached. e.g.: ... [ 7619.218171] mtd_test: error -5 while erasing EB 100 [ 7619.297981] mtd_test: error -5 while erasing EB 100 [ 7619.377953] mtd_test: error -5 while erasing EB 100 [ 7619.457998] mtd_test: error -5 while erasing EB 100 [ 7619.537990] mtd_test: error -5 while erasing EB 100 ... Fixes: 6cf78358c94f ("mtd: mtd_torturetest: use mtd_test helpers") Signed-off-by: Brian Norris <computersforpeace@gmail.com> Cc: Akinobu Mita <akinobu.mita@gmail.com> Cc: <stable@vger.kernel.org>
| * | | mtd: physmap_of: fix potential NULL dereferenceArd Biesheuvel2014-12-131-5/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On device remove, when testing the cmtd field of an of_flash struct to decide whether it is a concatenated device or not, we get a false positive on cmtd == NULL, and dereference it subsequently. This may occur if of_flash_remove() is called from the cleanup path of of_flash_probe(). Instead, test for NULL first, and only then perform the test for a concatenated device. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| * | | mtd: spi-nor: allow NULL as chip name and try to auto detect itRafał Miłecki2014-12-011-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow spi-nor users to plainly use JEDEC to detect flash chip. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| * | | mtd: nand: gpmi: add raw oob access functionsBoris BREZILLON2014-12-011-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement raw OOB access functions to retrieve OOB bytes when accessing the NAND in raw mode. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Huang Shijie <shijie8@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| * | | mtd: nand: gpmi: add proper raw access supportBoris BREZILLON2014-12-012-0/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several MTD users (either in user or kernel space) expect a valid raw access support to NAND chip devices. This is particularly true for testing tools which are often touching the data stored in a NAND chip in raw mode to artificially generate errors. The GPMI drivers do not implemenent raw access functions, and thus rely on default HW_ECC scheme implementation. The default implementation consider the data and OOB area as properly separated in their respective NAND section, which is not true for the GPMI controller. In this driver/controller some OOB data are stored at the beginning of the NAND data area (these data are called metadata in the driver), then ECC bytes are interleaved with data chunk (which is similar to the HW_ECC_SYNDROME scheme), and eventually the remaining bytes are used as OOB data. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Huang Shijie <shijie8@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| * | | mtd: nand: gpmi: add gpmi_copy_bits functionBoris BREZILLON2014-12-012-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new function to copy bits (not bytes) from a memory region to another one. This function is similar to memcpy except it acts at bit level. It is needed to implement GPMI raw access functions and adapt to the hardware ECC engine which does not pad ECC bits to the next byte boundary. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Huang Shijie <shijie8@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| * | | mtd: spi-nor: factor out write_enable() for erase commandsBrian Norris2014-12-013-14/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | write_enable() was being duplicated to both m25p80.c and fsl-quadspi.c. But this should be handled within the spi-nor abstraction layer. At the same time, let's add write_disable() after erasing, so we don't leave the flash in a write-enabled state afterward. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Huang Shijie <shijie.huang@intel.com>
| * | | mtd: spi-nor: add support for s25fl128sHuang Shijie2014-12-011-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to store the six bytes ID for s25fl128s, since it shares the same five bytes with s25fl129p1. This patch adds a macro INFO6 which is used for the six bytes ID flash, and adds a new item for the s25fl128s. Signed-off-by: Huang Shijie <shijie.huang@intel.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| * | | mtd: spi-nor: remove the jedec_id/ext_idHuang Shijie2014-12-011-53/+45Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "id" array contains all the information about the JEDEC and the manufacturer ID info. This patch removes the jedec_id/ext_id from flash_info. Signed-off-by: Huang Shijie <shijie.huang@intel.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| * | | mtd: spi-nor: add id/id_len for flash_info{}Huang Shijie2014-12-011-14/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the id/id_len fields for flash_info{}, and rewrite the INFO to fill them. And at last, we read out 6 bytes in the spi_nor_read_id(), and we use these new fields to parse out the correct flash_info. Signed-off-by: Huang Shijie <shijie.huang@intel.com> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| * | | mtd: nand: correct the comment of function nand_block_isreserved()Gu Zheng2014-11-291-2/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| * | | jffs2: Drop bogus if in commentGeert Uytterhoeven2014-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Cc: David Woodhouse <dwmw2@infradead.org> Cc: linux-mtd@lists.infradead.org Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| * | | mtd: atmel_nand: replace memcpy32_toio/memcpy32_fromio with memcpyWu, Josh2014-11-261-29/+10Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to use memcpy32_toio/memcpy32_fromio to transfer data between memory and NFC sram. As the NFC sram is a also a memory space not an I/O space, we can just use memcpy(). We remove the __iomem prefix for NFC sram to avoid sparse warnings. Signed-off-by: Josh Wu <josh.wu@atmel.com> Reviewed-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| * | | mtd: cafe_nand: drop duplicate .write_page implementationBrian Norris2014-11-261-45/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This write_page() function is functionally equivalent to the default in nand_base.c. Its only difference is in subpage programming support, which cafe_nand.c does not advertise, so the difference is negligible. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| * | | mtd: m25p80: Add support for serial flash Spansion S25FL132KKnut Wohlrab2014-11-262-3/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Knut Wohlrab <knut.wohlrab@de.bosch.com> Signed-off-by: Alison Chaiken <alison_chaiken@mentor.com> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| * | | MTD: m25p80: fix inconsistency in m25p_ids compared to spi_nor_idsAlison Chaiken2014-11-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As stated in a5b7616c5, "mtd: m25p80,spi-nor: Fix module aliases for m25p80", m25p_ids[] in m25p80.c needs to be kept in sync with spi_nor_ids[] in spi-nor.c. The change here corrects a misalignment. (We were missing m25px80 and we had a duplicate w25q128.) Signed-off-by: Alison Chaiken <alison_chaiken@mentor.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com> Cc: <stable@vger.kernel.org> # 3.18+
| * | | mtd: spi-nor: improve wait-till-ready timeout loopBrian Norris2014-11-261-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few small issues with the timeout loop in spi_nor_wait_till_ready(): * The first operation should not be a reschedule; we should check the status register at least once to see if we're complete! * We should check the status register one last time after declaring the deadline has passed, to prevent a premature timeout error (this is theoretically possible if we sleep for a long time after the previous status register check). * Add an error message, so it's obvious if we ever hit a timeout. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Huang Shijie <shijie.huang@intel.com> Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
| * | | mtd: delete unnecessary checks before two function callsMarkus Elfring2014-11-262-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The functions kfree() and pci_dev_put() test whether their argument is NULL and then return immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| * | | mtd: nand: omap: Fix NAND enumeration on 3430 LDPRoger Quadros2014-11-261-7/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3430LDP has NAND flash with 32 bytes OOB size which is sufficient to hold BCH8 codes but the small page check introduced in commit b491da7233d5 ("mtd: nand: omap: clean-up ecc layout for BCH ecc schemes") considers anything below 64 bytes unsuitable for BCH4/8/16. There is another bug in that code where it doesn't skip the check for OMAP_ECC_HAM1_CODE_SW. Get rid of that small page check code as it is insufficient and redundant because we are checking for OOB available bytes vs ecc layout before calling nand_scan_tail(). Fixes: b491da7233d5 ("mtd: nand: omap: clean-up ecc layout for BCH ecc schemes") Reported-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| * | | mtd: nand: add ATO manufacturer infoBrian Norris2014-11-262-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Tested with ATO AFND1G08U3, 128MiB NAND. Signed-off-by: Brian Norris <computersforpeace@gmail.com>