summaryrefslogtreecommitdiffstats
path: root/drivers/i3c/master
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'i3c/for-5.3' of ↵Linus Torvalds2019-07-092-15/+2Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull ic3 updates from Boris Brezillon: - Drop support for 10-bit I2C addresses - Add support for limited bus mode - Fix the Cadence DT binding doc - Use struct_size() to allocate a DEFSLVS packet * tag 'i3c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: Use struct_size() helper dt-bindings: i3c: cdns: Use correct cells for I2C device i3c: dw: add limited bus mode support i3c: add mixed limited bus mode i3c: fix i2c and i3c scl rate by bus mode dt-bindings: i3c: Document dropped support for I2C 10 bit devices i3c: Drop support for I2C 10 bit addresing
| * i3c: dw: add limited bus mode supportVitor Soares2019-06-201-0/+1
| | | | | | | | | | | | | | | | | | This patch add limited bus mode support for DesignWare i3c master Signed-off-by: Vitor Soares <vitor.soares@synopsys.com> Cc: Boris Brezillon <bbrezillon@kernel.org> Cc: <linux-kernel@vger.kernel.org> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
| * i3c: Drop support for I2C 10 bit addresingPrzemyslaw Gaj2019-05-282-15/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch drops support for I2C devices with 10 bit addressing. When I2C device with 10 bit address is defined in DT, I3C master registration fails. Address space for I2C devices has been reduced and ->i2c_funcs() hook has been removed. Because this patch series dropped support for 10 bit I2C devices, support is also dropped in Cadence I3C master driver and Synopsys DesignWare I3C master driver. Signed-off-by: Przemyslaw Gaj <pgaj@cadence.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
* | treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner2019-05-212-0/+2
|/ | | | | | | | | | | | | | Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'i3c/for-5.2' of ↵Linus Torvalds2019-05-071-10/+0Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c update from Boris Brezillon: - Fix a shift wrap bug in the core - Remove dead code in the DW driver * tag 'i3c/for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: Fix a shift wrap bug in i3c_bus_set_addr_slot_status() i3c: master: dw: remove dead code from dw_i3c_master_*_xfers()
| * i3c: master: dw: remove dead code from dw_i3c_master_*_xfers()Vitor Soares2019-03-301-10/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | Detected by CoverityScan (Event result_independent_of_operands): "(i3c_xfers + i).len > 65536" is always false regardless of the values of its operands. This occurs as the logical operand of "if" "(i2c_xfers + i).len > 65536" is always false regardless of the values of its operands. This occurs as the logical operand of "if" Signed-off-by: Vitor Soares <vitor.soares@synopsys.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
* | i3c: dw: Fix dw_i3c_master_disable controller by using correct maskVitor Soares2019-04-101-1/+1
|/ | | | | | | | | | | | | The controller was being disabled incorrectly. The correct way is to clear the DEV_CTRL_ENABLE bit. Fix this by clearing this bit. Cc: Boris Brezillon <bbrezillon@kernel.org> Cc: <stable@vger.kernel.org> Fixes: 1dd728f5d4d4 ("i3c: master: Add driver for Synopsys DesignWare IP") Signed-off-by: Vitor Soares <vitor.soares@synopsys.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
* Merge tag 'i3c/for-5.1' of ↵Linus Torvalds2019-03-051-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Boris Brezillon: - Add a /* fall-through */ comment in the dw-i3c-master driver - Update the I3C entries in MAINTAINERS to add an IRC chan * tag 'i3c/for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: dw-i3c-master: mark expected switch fall-through MAINTAINERS: Add an IRC channel for the I3C subsystem
| * i3c: master: dw-i3c-master: mark expected switch fall-throughGustavo A. R. Silva2019-02-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/i3c/master/dw-i3c-master.c: In function ‘dw_i3c_master_bus_init’: drivers/i3c/master/dw-i3c-master.c:603:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (ret) ^ drivers/i3c/master/dw-i3c-master.c:605:2: note: here case I3C_BUS_MODE_PURE: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: Vitor Soares <vitor.soares@synopsys.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
* | i3c: master: dw: fix deadlockJisheng Zhang2019-01-261-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In dw_i3c_master_irq_handler(), we already have gotten &master->xferqueue.lock, if we try to get the same lock again in dw_i3c_master_dequeue_xfer(), deadlock happens. We fix this issue by introduing dw_i3c_master_dequeue_xfer_locked() which does all what dw_i3c_master_dequeue_xfer() does without trying to lock &master->xferqueue.lock. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Acked-by: Vitor Soares <vitor.soares@synopsys.com> Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
* | i3c: master: dw-i3c-master: fix i3c_attach/reattachVitor Soares2019-01-151-5/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fix i3c_attach/reattach functions. During the i3c_attach the driver ignores the static address used for SETDASA CCC command. During the i3c_reattach the driver doesn't update master->addrs[data->index] with new address if old_dyn_addr = 0. Fixes: 1dd728f5d4d4 ("i3c: master: Add driver for Synopsys DesignWare IP") Signed-off-by: Vitor Soares <vitor.soares@synopsys.com> Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
* | i3c: master: Fix an error checking typo in 'cdns_i3c_master_probe()'Christophe JAILLET2019-01-071-2/+2
|/ | | | | | | | | Fix a cut'n'paste typo. Checking 'master->sysclk' is expected here. Fixes: 603f2bee2c54 ("i3c: master: Add driver for Cadence IP") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
* i3c: master: cdns: fix I2C transfers in Cadence I3C master driverPrzemyslaw Gaj2018-12-121-1/+1
| | | | | | | | | This patch fixes I2C transfers in Cadence I3C master driver. There was no way to queue more than one I2C transfer before. Fixes: 603f2bee2c54 ("i3c: master: Add driver for Cadence IP") Signed-off-by: Przemyslaw Gaj <pgaj@cadence.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
* i3c: master: dw: fix mask operation by using the correct operatorColin Ian King2018-12-051-1/+1
| | | | | | | | | | | | | | The masking operation on status is using a bitwise 'or' rather than a bitwise 'and' operator, and hence the result is always non-zero which is probably not what is intended. Fix this by using the correct operator. Detected by CoverityScan, CID#1475523 ("Wrong operator used") Fixes: 88acc98a712a ("i3c: master: Add driver for Synopsys DesignWare IP") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Vitor Soares <vitor.soares@synopsys.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
* i3c: master: Add driver for Synopsys DesignWare IPVitor Soares2018-12-053-0/+1232
| | | | | | | Add driver for Synopsys DesignWare I3C master IP Signed-off-by: Vitor Soares <vitor.soares@synopsys.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
* i3c: master: Remove set but not used variable 'old_i3c_scl_lim'YueHaibing2018-12-051-4/+0Star
| | | | | | | | | | | | | | Fixes gcc '-Wunused-but-set-variable' warning: drivers/i3c/master/i3c-master-cdns.c: In function 'cdns_i3c_master_do_daa': drivers/i3c/master/i3c-master-cdns.c:1137:16: warning: variable 'old_i3c_scl_lim' set but not used [-Wunused-but-set-variable] It never used since introdution in commit acfab7d324b2 ("i3c: master: Add driver for Cadence IP") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
* i3c: master: Add driver for Cadence IPBoris Brezillon2018-12-053-0/+1678
| | | | | | | | Add a driver for Cadence I3C master IP. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* i3c: Add core I3C infrastructureBoris Brezillon2018-11-122-0/+0
Add core infrastructure to support I3C in Linux and document it. This infrastructure adds basic I3C support. Advanced features will be added afterwards. There are a few design choices that are worth mentioning because they impact the way I3C device drivers can interact with their devices: - all functions used to send I3C/I2C frames must be called in non-atomic context. Mainly done this way to ease implementation, but this is not set in stone, and if anyone needs async support, new functions can be added later on. - the bus element is a separate object, but it's tightly coupled with the master object. We thus have a 1:1 relationship between i3c_bus and i3c_master_controller objects, and if 2 master controllers are connected to the same bus and both exposed to the same Linux instance they will appear as two distinct busses, and devices on this bus will be exposed twice. - I2C backward compatibility has been designed to be transparent to I2C drivers and the I2C subsystem. The I3C master just registers an I2C adapter which creates a new I2C bus. I'd say that, from a representation PoV it's not ideal because what should appear as a single I3C bus exposing I3C and I2C devices here appears as 2 different buses connected to each other through the parenting (the I3C master is the parent of the I2C and I3C busses). On the other hand, I don't see a better solution if we want something that is not invasive. Missing features: - I3C HDR modes are not supported - no support for multi-master and the associated concepts (mastership handover, support for secondary masters, ...) - I2C devices can only be described using DT because this is the only use case I have. However, the framework can easily be extended with ACPI and board info support - I3C slave framework. This has been completely omitted, but shouldn't have a huge impact on the I3C framework because I3C slaves don't see the whole bus, it's only about handling master requests and generating IBIs. Some of the struct, constant and enum definitions could be shared, but most of the I3C slave framework logic will be different Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>