summaryrefslogtreecommitdiffstats
path: root/drivers/nfc
Commit message (Collapse)AuthorAgeFilesLines
...
* | NFC: st21nfca: Add few code style fixesChristophe Ricard2015-10-273-3/+2
| | | | | | | | | | | | | | Add a minor code style fixes Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: Add few code style fixesChristophe Ricard2015-10-272-2/+2
| | | | | | | | | | | | | | Add some few code style fixes. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: netlink: Add mode parameter to deactivate_target functionsChristophe Ricard2015-10-272-2/+2
| | | | | | | | | | | | | | | | | | | | In order to manage in a better way the nci poll mode state machine, add mode parameter to deactivate_target functions. This way we can manage different target state. mode parameter make sense only in nci core. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st21nfca: Fix host_list verification after SEactivationChristophe Ricard2015-10-271-2/+5
| | | | | | | | | | | | | | | | | | | | A secure element can be activated in different order. The host_list is updated keeping a fixed order: <terminal_host_id><uicc_id><ese_id>. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: Fix host_list verification after SE activationChristophe Ricard2015-10-271-2/+5
| | | | | | | | | | | | | | | | | | | | A secure element can be activated in different order. The host_list is updated keeping a fixed order: <terminal_host_id><uicc_id><ese_id>. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: Increase delay between 2 secure element activationsChristophe Ricard2015-10-271-1/+1
| | | | | | | | | | | | | | | | After internal discussion, it appears this timing should be increased to 20 ms for interoperability reason. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: Add ese-present/uicc-present dts propertiesChristophe Ricard2015-10-277-45/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to align with st21nfca, dts configuration properties ese_present and uicc_present are made available in st-nci driver. So far, in early development firmware, because nci_nfcee_mode_set(DISABLE) was not supported we had to try to enable it during the secure element discovery phase. After several trials on commercial and qualified firmware it appears that nci_nfcee_mode_set(ENABLE) and nci_nfcee_mode_set(DISABLE) are properly supported. Such feature also help us to eventually save some time (~5ms) when only one secure element is connected. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: Add error messages when an unexpected HCI event occursChristophe Ricard2015-10-271-0/+6
| | | | | | | | | | | | | | | | | | Potentially an unexpected HCI event may occur because of a firmware bug. It could be transparent for the user but we need to at least log it. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: Add support for proprietary commandsChristophe Ricard2015-10-275-10/+618
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for proprietary commands useful mainly for factory testings. Here is a list: - FACTORY_MODE: Allow to set the driver into a mode where no secure element are activated. It does not consider any NFC_ATTR_VENDOR_DATA. - HCI_CLEAR_ALL_PIPES: Allow to execute a HCI clear all pipes command. It does not consider any NFC_ATTR_VENDOR_DATA. - HCI_DM_PUT_DATA: Allow to configure specific CLF registry like for example RF trimmings or low level drivers configurations (I2C, SPI, SWP). - HCI_DM_UPDATE_AID: Allow to configure an AID routing into the CLF routing table following RF technology, CLF mode or protocol. - HCI_DM_GET_INFO: Allow to retrieve CLF information. - HCI_DM_GET_DATA: Allow to retrieve CLF configurable data such as low level drivers configurations or RF trimmings. - HCI_DM_DIRECT_LOAD: Allow to load a firmware into the CLF. A complete packet can be more than 8KB. - HCI_DM_RESET: Allow to run a CLF reset in order to "commit" CLF configuration changes without CLF power off. - HCI_GET_PARAM: Allow to retrieve an HCI CLF parameter (for example the white list). - HCI_DM_FIELD_GENERATOR: Allow to generate different kind of RF technology. When using this command to anti-collision is done. - HCI_LOOPBACK: Allow to echo a command and test the Dh to CLF connectivity. - HCI_DM_VDC_MEASUREMENT_VALUE: Allow to measure the field applied on the CLF antenna. A value between 0 and 0x0f is returned. 0 is maximum. - HCI_DM_FWUPD_START: Allow to put CLF into firmware update mode. It is a specific CLF command as there is no GPIO for this. - HCI_DM_FWUPD_END: Allow to complete firmware update. - HCI_DM_VDC_VALUE_COMPARISON: Allow to compare the field applied on the CLF antenna to a reference value. - MANUFACTURER_SPECIFIC: Allow to retrieve manufacturer specific data received during a NCI_CORE_INIT_CMD. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st21nfca: Fix st21nfca_gates offsetChristophe Ricard2015-10-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | It is useless to start from index 0 when looking for a gate because only dynamic pipes are retrieved with ST21NFCA_DM_GETINFO(ST21NFCA_DM_GETINFO_PIPE_LIST). The first dynamic pipe is present at index 3. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: Fix st_nci_gates offsetChristophe Ricard2015-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | It is useless to start from index 0 when looking for a gate because only dynamic pipes are retrieved with ST_NCI_DM_GETINFO(ST_NCI_DM_GETINFO_PIPE_LIST). The first dynamic pipe is present at index 3. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: Add support for NCI_HCI_IDENTITY_MGMT_GATEChristophe Ricard2015-10-261-0/+3
| | | | | | | | | | | | | | | | NCI_HCI_IDENTITY_MGMT_GATE might be useful to get information about hardware or firmware version. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: initialize gate_count in st_nci_hci_network_initChristophe Ricard2015-10-261-0/+1
| | | | | | | | | | | | | | | | | | When initializing ndev->hci_dev->init_data, only gates field was set. gate_count needs to be initialized as well. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st21nfca: Keep st21nfca_gates unchanged in load_sessionChristophe Ricard2015-10-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | We need to keep initial st_nci_gates values in order for nfc_hci_dev_connect_gates to create and open pipe when necessary. For example after a firmware update CLF pipes are cleared. Changing pipe values in st21nfca_gates was causing nfc_hci_dev_connect_gates not using accurate pipes value. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: Keep st_nci_gates unchanged in load_sessionChristophe Ricard2015-10-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | We need to keep initial st_nci_gates values in order for nci_hci_dev_connect_gates to create and open pipe when necessary. For example after a firmware update CLF pipes are cleared. Changing pipe values in st_nci_gates was causing nci_hci_dev_connect_gates not using accurate pipes value. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st21nfca: Open NFC_HCI_LINK_MGMT_PIPEChristophe Ricard2015-10-261-14/+5
| | | | | | | | | | | | | | | | NFC_HCI_LINK_MGMT_PIPE was never opened in nfc_hci_load_session. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: Open NCI_HCI_LINK_MGMT_PIPEChristophe Ricard2015-10-261-0/+8
| | | | | | | | | | | | | | NCI_HCI_LINK_MGMT_PIPE was never opened in st_nci_hci_load_session. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st21nfca: Remove HCI gates initialization in load_sessionChristophe Ricard2015-10-261-1/+0
| | | | | | | | | | | | | | | | hdev->init_data.gates is already initialized in st21nfca_hci_probe. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: Remove HCI init_data.gates initialization in load_sessionChristophe Ricard2015-10-261-3/+0
| | | | | | | | | | | | | | | | | | ndev->hci_dev->init_data.gates is already initialized in st_nci_hci_network. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: Fix incorrect spi buffer sizeChristophe Ricard2015-10-261-1/+3
| | | | | | | | | | | | | | | | | | | | When sending data over SPI, the maximum expected length is the maximum nci packet payload + data header size + the frame head room (1 for the ndlc header) + the frame trail room (0). Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st21nfca: Align st21nfca driver with other nfc driverChristophe Ricard2015-10-267-130/+80
| | | | | | | | | | | | | | | | | | Align st21nfca driver with or nfc driver: - Remove st21nfca_ prefix - Merge st21nfca_se.h, st21nfca_dep.h in st21nfca.h Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: include st-nci.h instead of ndlc.hChristophe Ricard2015-10-263-3/+2
| | | | | | | | | | | | | | st-nci.h already include ndlc.h. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: Align st-nci driver with other nfc driverChristophe Ricard2015-10-264-64/+39
| | | | | | | | | | | | | | | | | | Align st-nci driver with other NFC drivers: - Remove st-nci_ prefix - Merge se.h in st-nci.h Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: Add Intel Fields Peak NFC solution driverRobert Dolca2015-10-257-0/+1277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fields Peak complies with the ISO/IEC 14443A/B, 15693, 18092, and JIS X 6319-4. It is an NCI based controller. RF Protocols supported: - NFC Forum Type 1 Tags (Jewel, Topaz) - NFC Forum Type 2 Tags (Mifare UL) - NFC Forum Type 3 Tags (FeliCa) - NFC Forum Type 4A (ISO/IEC 14443 A-4 106kbps to 848kbps) - NFC Forum Type 4B (ISO/IEC 14443 B-4 106kbps to 848kbps) - NFCIP in passive and active modes (ISO/IEC 18092 106kbps to 424kbps) - B’ (based on ISO/IEC 14443 B-2) - iCLASS (based on ISO/IEC 15693-2) - Vicinity cards (ISO/IEC 15693-3) - Kovio tags (NFC Forum Type 2) The device can be enumerated using ACPI using the id INT339A. The 1st GPIO is the IRQ and the 2nd is the RESET pin. Signed-off-by: Robert Dolca <robert.dolca@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: nci: rename nci_prop_ops to nci_driver_opsRobert Dolca2015-10-253-4/+4
| | | | | | | | | | | | | | | | | | Initially it was used to create hooks in the driver for proprietary operations. Currently it is being used for hooks for both proprietary and generic operations. Signed-off-by: Robert Dolca <robert.dolca@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: st-nci: Rename st-nci_se.cSamuel Ortiz2015-10-255-4/+4
| | | | | | | | | | | | Rename it to se.c to keep the driver files namespace consistent. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: nfcwilink: Drop a useless static qualifierChristophe JAILLET2015-10-191-1/+1
| | | | | | | | | | | | | | | | | | There is no need to have the 'struct nfcwilink *drv' variable static in the probe function. It only wastes a few bytes of memory. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: nxp-nci: constify nxp_nci_phy_ops structureJulia Lawall2015-10-193-4/+6
| | | | | | | | | | | | | | | | | | | | | | The only instance of a nxp_nci_phy_ops structure is never modified. Thus the declaration of the structure and all references to the structure type can be made const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: nfcmrvl: Auto-select core moduleJean Delvare2015-10-191-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As I understand it, the core nfcmrvl module is useless without either the USB or the UART access module. So hide NFC_MRVL and select it automatically if either NFC_MRVL_USB or NFC_MRVL_UART is selected. This avoids presenting NFC_MRVL when neither NFC_MRVL_USB nor NFC_MRVL_UART can be selected. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org> Cc: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: microread: Auto-select core moduleJean Delvare2015-10-191-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As I understand it, the core nfc_microread module is useless without either the I2C or the MEI access module. So hide NFC_MICROREAD and select it automatically if either NFC_MICROREAD_I2C or NFC_MICROREAD_MEI is selected. This avoids presenting NFC_MICROREAD when neither NFC_MICROREAD_I2C nor NFC_MICROREAD_MEI can be selected. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org> Cc: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: pn544: Auto-select core moduleJean Delvare2015-10-191-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As I understand it, the core nfc_pn544 module is useless without either the I2C or the MEI access module. So hide NFC_PN544 and select it automatically if either NFC_PN544_I2C or NFC_PN544_MEI is selected. This avoids presenting NFC_PN544 when neither NFC_PN544_I2C nor NFC_PN544_MEI can be selected. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org> Cc: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: trf7970a: Add OF match tableJavier Martinez Canillas2015-10-191-0/+7
| | | | | | | | | | | | | | | | | | | | The Documentation/devicetree/bindings/net/nfc/trf7970a.txt DT binding doc lists "ti,trf7970a" as a compatible string but the corresponding driver does not have an OF match table. Add the table to the driver so the SPI core can do an OF style match. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | nfc: s3fwrn5: i2c: Use devm_request_threaded_irq to avoid irq leakAxel Lin2015-10-071-1/+1
| | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | nfc: s3fwrn5: Make NFC_S3FWRN5 select CRYPTOAxel Lin2015-10-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Make NFC_S3FWRN5 select CRYPTO to fix below build errors: ERROR: "crypto_destroy_tfm" [drivers/nfc/s3fwrn5/s3fwrn5.ko] undefined! ERROR: "crypto_alloc_base" [drivers/nfc/s3fwrn5/s3fwrn5.ko] undefined! scripts/Makefile.modpost:91: recipe for target '__modpost' failed make[1]: *** [__modpost] Error 1 Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: s3fwrn5: Remove superfluous cflagsValentin Rothberg2015-10-071-2/+0
|/ | | | | | | | | NFC_DEBUG is not defined in Kconfig and since DEBUG is not used anywhere in this directory, we can safely remove this line. Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> Acked-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* Merge tag 'gpio-v4.3-1' of ↵Linus Torvalds2015-09-041-7/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v4.3 kernel cycle. There is quite a lot going on in the GPIO subsystem this merge window, so the main matter is decribed below. The hits in other subsystems when making the GPIO flags optional are all ACKed by their respective subsystem maintainers. Core changes: - Root out the wrapper devm_gpiod_get() and gpiod_get() etc versions of the descriptor calls that did not use the flags argument on the end. This was around for too long and eventually Uwe Kleine-König took the time to clean it out and the last users are removed along with the macros in this tag. In several cases the use of flags simplifies the code. For this reason we have (ACKed) patches hitting in DRM, IIO, media, NFC, USB+PHY up until we hammer in the nail with removing the macros. - Add a fat document describing how much ready-made GPIO stuff we have i the kernel to discourage people from reinventing a square wheel in userspace, as so often happens. - Create a separate lockdep class for each instance of a GPIO IRQ chip instead of using one class for all chips, as the current code will not work with systems with several GPIO chips doing lockdep debugging. - Protect against driver unloading also when a GPIO line is only used as IRQ for the GPIOLIB_IRQCHIP helpers. - If the GPIO chip has no designated owner, assign the parent device driver owner as owner. - Consolidation of chained IRQ handler install/remove replacing all call sites where irq_set_handler_data() and irq_set_chained_handler() were done in succession with a combined call to irq_set_chained_handler_and_data(). This series was created by Thomas Gleixner after the problem was observed by Russell King. - Tglx also made another series of patches switching __irq_set_handler_locked() for irq_set_handler_locked() which is way cleaner. - Tglx and Jiang Liu wrote a good bunch of patches to make use of irq_desc_get_xxx() accessors and avoid looking up irq_descs from IRQ numbers. The goal is to get rid of the irq number from the handlers in the IRQ flow which is nice. - Rob Herring killed off the set_irq_flags() for all GPIO drivers. This was an ARM specific function that is replaced with the generic irq_modify_status() where special flags are actually needed. - When an OF node has a pin range for its GPIOs, return -EPROBE_DEFER if the pin controller isn't available. Pretty logical, yet needed to be fixed. - If a driver using GPIOLIB_IRQCHIP has its own irq_*_resources call back, then call these instead of the defaults provided by the GPIOLIB. - Fix an undocumented ABI hole: named GPIOs were not properly documented. Driver improvements: - Add get_direction() support to the generic GPIO driver, it's strange that we didn't have that before. - Make it possible to have input-only GPIO chips using the generic GPIO driver. - Clean out platform data support from the Emma Mobile (EM) driver - Finegrained runtime PM support for the RCAR driver. - Support r8a7795 (R-car H3) in the RCAR driver. - Support interrupts on GPIOs 16 thru 31 in the DaVinci driver. - Some consolidation and new support in the MPC8xxx driver, we now support MPC5125. - Preempt-RT-friendly patches: the OMAP, MPC8xxx, drivers uses raw spinlocks making it work better with the realime patches. - Interrupt support for the EXTRAXFS GPIO driver. - Make the ETRAXFS GPIO driver support also ARTPEC-3. - Interrupt and wakeup support for the BRCMSTB driver, also for wakeup from S5 cold boot. - Mask MXC IRQs during suspend. - Improve OMAP2 GPIO set_debounce() to work according to spec. - The VF610 driver handles IRQs properly. New drivers: - ZTE ZX GPIO driver" * tag 'gpio-v4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (87 commits) Revert "gpio: extraxfs: fix returnvar.cocci warnings" gpio: tc3589x: use static container helper gpio: xlp: fix error return code gpio: vf610: handle level IRQ's properly gpio: max732x: Fix error handling in probe() gpio: omap: fix clk_prepare/unprepare usage gpio: omap: protect regs access in omap_gpio_irq_handler gpio: omap: fix omap2_set_gpio_debounce gpio: omap: switch to use platform_get_irq gpio: omap: remove wrong irq_domain_remove usage in probe gpiolib: add description for gpio irqchip fields in struct gpio_chip gpio: extraxfs: fix returnvar.cocci warnings gpiolib: irqchip: use different lockdep class for each gpio irqchip gpio/grgpio: fix deadlock in grgpio_irq_unmap() Documentation: gpio: consumer: describe active low property gpio: mxc: fix section mismatch warning gpio/mxc: mask gpio interrupts in suspend gpio: omap: Fix missing raw locks conversion gpio: brcmstb: support wakeup from S5 cold boot gpio: brcmstb: Add interrupt and wakeup source support ...
| * NFC: nxp-nci_i2c: use flags argument of devm_gpiod_get_indexUwe Kleine-König2015-07-061-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Simplify driver accordingly which even makes error checking more correct because gpiod_direction_{in,out}put might fail. Furthermore this is one caller less that stops us making the flags argument to gpiod_get*() mandatory. Acked-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds2015-09-0319-27/+1966
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull networking updates from David Miller: "Another merge window, another set of networking changes. I've heard rumblings that the lightweight tunnels infrastructure has been voted networking change of the year. But what do I know? 1) Add conntrack support to openvswitch, from Joe Stringer. 2) Initial support for VRF (Virtual Routing and Forwarding), which allows the segmentation of routing paths without using multiple devices. There are some semantic kinks to work out still, but this is a reasonably strong foundation. From David Ahern. 3) Remove spinlock fro act_bpf fast path, from Alexei Starovoitov. 4) Ignore route nexthops with a link down state in ipv6, just like ipv4. From Andy Gospodarek. 5) Remove spinlock from fast path of act_gact and act_mirred, from Eric Dumazet. 6) Document the DSA layer, from Florian Fainelli. 7) Add netconsole support to bcmgenet, systemport, and DSA. Also from Florian Fainelli. 8) Add Mellanox Switch Driver and core infrastructure, from Jiri Pirko. 9) Add support for "light weight tunnels", which allow for encapsulation and decapsulation without bearing the overhead of a full blown netdevice. From Thomas Graf, Jiri Benc, and a cast of others. 10) Add Identifier Locator Addressing support for ipv6, from Tom Herbert. 11) Support fragmented SKBs in iwlwifi, from Johannes Berg. 12) Allow perf PMUs to be accessed from eBPF programs, from Kaixu Xia. 13) Add BQL support to 3c59x driver, from Loganaden Velvindron. 14) Stop using a zero TX queue length to mean that a device shouldn't have a qdisc attached, use an explicit flag instead. From Phil Sutter. 15) Use generic geneve netdevice infrastructure in openvswitch, from Pravin B Shelar. 16) Add infrastructure to avoid re-forwarding a packet in software that was already forwarded by a hardware switch. From Scott Feldman. 17) Allow AF_PACKET fanout function to be implemented in a bpf program, from Willem de Bruijn" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1458 commits) netfilter: nf_conntrack: make nf_ct_zone_dflt built-in netfilter: nf_dup{4, 6}: fix build error when nf_conntrack disabled net: fec: clear receive interrupts before processing a packet ipv6: fix exthdrs offload registration in out_rt path xen-netback: add support for multicast control bgmac: Update fixed_phy_register() sock, diag: fix panic in sock_diag_put_filterinfo flow_dissector: Use 'const' where possible. flow_dissector: Fix function argument ordering dependency ixgbe: Resolve "initialized field overwritten" warnings ixgbe: Remove bimodal SR-IOV disabling ixgbe: Add support for reporting 2.5G link speed ixgbe: fix bounds checking in ixgbe_setup_tc for 82598 ixgbe: support for ethtool set_rxfh ixgbe: Avoid needless PHY access on copper phys ixgbe: cleanup to use cached mask value ixgbe: Remove second instance of lan_id variable ixgbe: use kzalloc for allocating one thing flow: Move __get_hash_from_flowi{4,6} into flow_dissector.c ixgbe: Remove unused PCI bus types ...
| * | nfc: s3fwrn5: Add driver for Samsung S3FWRN5 NFC ChipRobert Baldyga2015-08-2011-0/+1532
| | | | | | | | | | | | | | | | | | | | | | | | Add driver for Samsung S3FWRN5 NFC controller. S3FWRN5 is using NCI protocol and I2C communication interface. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: trf7970a: Add NULL check to clear up smatch warningMark Greer2015-08-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Although it should be unnecessary, add a NULL pointer check to trf7970a_send_upstream() to eliminate a smatch warning. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: trf7970a: SDD_EN is bit 5 not bit 3Mark Greer2015-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SDD_EN bit in the NFC Target Detection Level Register is bit 5 not bit 3 so change the TRF7970A_NFC_TARGET_LEVEL_SDD_EN macro accordingly. Reported-by: Raymond Lei <Raymond.Lei@ecolab.com> Signed-off-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | nfc: st-nci: Remove pr_err in rcv_queue when ndlc header is unknownChristophe Ricard2015-08-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | spi phy needs to use ndlc_recv at every spi transaction causing "unknown packet control byte" error message each time the header is 00. Make this silent. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | nfc: st-nci: Add spi phy support for st21nfcbChristophe Ricard2015-08-173-0/+406
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | st21nfcb does support another phy than i2c: spi. st21nfcc does not support spi as the spi ios are used by the AMS RF booster. st21nfcb is not following NCI NFC Forum recommendations for spi but rely on ST prioritary protocol ndlc as for i2c. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | nfc: st-nci: Free data with irrelevant NDLC PCB_SYNC valueChristophe Ricard2015-08-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PCB_SYNC different than PCB_TYPE_SUPERVISOR or PCB_TYPE_DATAFRAME should be discarded. Irrelevant data may be forwarded up to the ndlc state machine by phys like spi to prevent missing potential data during "write" transactions. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | nfc: st-nci: Remove data from ack_pending_q when receiving a SYNC_ACKChristophe Ricard2015-08-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | When receiving a NDLC PCB_SYNC_ACK the pending data was never removed from ack_pending_q and cleared. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: st-nci: fix use of uninitialized variables in error pathChristophe Ricard2015-08-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | st_nci_hci_load_session() calls kfree_skb() on unitialized variables skb_pipe_info and skb_pipe_list if the call to nci_hci_connect_gate() failed. Reword the error path to not use these variables when they are not initialized. While at it, there seemed to be a memory leak because skb_pipe_info was only freed once, after the for-loop, even though several ones were created by nci_hci_send_cmd. Cc: stable@vger.kernel.org Acked-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: st21nfca: fix use of uninitialized variables in error pathChristophe Ricard2015-08-171-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | st21nfca_hci_load_session() calls kfree_skb() on unitialized variables skb_pipe_info and skb_pipe_list if the call to nfc_hci_connect_gate() failed. Reword the error path to not use these variables when they are not initialized. While at it, there seemed to be a memory leak because skb_pipe_info was only freed once, after the for-loop, even though several ones were created by nfc_hci_send_cmd. Fixes: ec03ff1a8f9a ("NFC: st21nfca: Remove skb_pipe_list and skb_pipe_info useless allocation") Cc: stable@vger.kernel.org Acked-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | nfc: st-nci: Fix non accurate comment for st_nci_i2c_readChristophe Ricard2015-08-171-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Due to a copy and paste error st_nci_i2c_read still contains st21nfca header comment. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | nfc: st-nci: Fix typo when changing from st21nfcb to st-nciChristophe Ricard2015-08-171-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace ST21NFCB with ST_NCI or st21nfcb with st_nci as it was forgotten in commit "nfc: st-nci: Rename st21nfcb to st-nci" ed06aeefdac348cfb91a3db5fe1067e3202afd70 Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | nfc: st-nci: Remove duplicate file platform_data/st_nci.hChristophe Ricard2015-08-171-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | commit "nfc: st-nci: Rename st21nfcb to st-nci" adds include/linux/platform_data/st_nci.h duplicated with include/linux/platform_data/st-nci.h. Only drivers/nfc/st-nci/i2c.c uses platform_data/st_nci.h. Cc: stable@vger.kernel.org Reported-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
OpenPOWER on IntegriCloud