summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/muxes/i2c-mux-pca9541.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'i2c/precise-locking-names_immutable' into i2c/for-4.19Wolfram Sang2018-07-131-3/+3
|\
| * i2c: mux: pca9541: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT)Peter Rosin2018-07-131-3/+3
| | | | | | | | | | | | | | | | | | | | Locking the root adapter for __i2c_transfer will deadlock if the device sits behind a mux-locked I2C mux. Switch to the finer-grained i2c_lock_bus with the I2C_LOCK_SEGMENT flag. If the device does not sit behind a mux-locked mux, the two locking variants are equivalent. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* | i2c: mux: pca9541: make use of __i2c_smbus_xferPeter Rosin2018-07-031-58/+11
|/ | | | | | | | This simplifies the code, and you get retries for free if the adapter does not support ->master_xfer. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* i2c: mux: pca954x: move header file out of I2C realmWolfram Sang2017-08-141-1/+1
| | | | | | | | include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Peter Rosin <peda@axentia.se>
* i2c: mux: pca9541: sort include filesWolfram Sang2017-08-141-4/+3
| | | | | | | Make it consistent with the other drivers. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Peter Rosin <peda@axentia.se>
* i2c: mux: pca9541: stop double error reportingPeter Rosin2017-04-031-3/+1
| | | | | | | i2c_mux_add_adapter already logs a message on failure. Reviewed-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Peter Rosin <peda@axentia.se>
* i2c: mux: pca9541: Export OF device ID table as module aliasesJavier Martinez Canillas2017-02-091-0/+1
| | | | | | | | | | | The I2C core always reports a MODALIAS of the form i2c:<foo> even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Peter Rosin <peda@axentia.se> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* i2c: pca9541: add device tree bindingPeter Rosin2016-08-251-0/+8
| | | | | | | | No longer rely on the implicit matching with the i2c device name, use an explicit compatible string instead. Reviewed-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Peter Rosin <peda@axentia.se>
* i2c: mux: inform the i2c mux core about how it is usedPeter Rosin2016-08-251-1/+2
| | | | | | | | | | The i2c mux core can then take appropriate action depending on if it is used for an actual i2c mux, for a gate or for an arbitrator (the last is the case for these drivers). This adds support for the new clearer and more compact devicetree bindings that was added recently. Reviewed-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Peter Rosin <peda@axentia.se>
* i2c: i2c-mux-pca9541: convert to use an explicit i2c mux corePeter Rosin2016-04-221-31/+27
| | | | | | | | | Allocate an explicit i2c mux core to handle parent and child adapters etc. Update the select/deselect ops to be in terms of the i2c mux core instead of the child adapter. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* i2c: Drop owner assignment from i2c_driverKrzysztof Kozlowski2015-08-101-1/+0
| | | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* i2c: mux: pca954x: Use __i2c_transfer because of quirksAlexander Sverdlin2015-06-171-2/+2
| | | | | | | | | | | | | pca9541 and pca954x are calling master_xfer() of the parent adapter directly thus bypassing the quirks checks of the adapter. Use __i2c_transfer() instead. Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com> Tested-by: Łukasz Gemborowski <lukasz.gemborowski@nokia.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jisheng Zhang <jszhang@marvell.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org Fixes: b7f625840267b1 ("i2c: add quirk checks to core")
* i2c: delete non-required instances of include <linux/init.h>Paul Gortmaker2014-01-241-1/+0
| | | | | | | | | | | None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* i2c: use dev_get_platdata()Jingoo Han2013-08-191-1/+1
| | | | | | | | Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* i2c: Fix my e-mail address in drivers and documentationGuenter Roeck2013-03-221-1/+1
| | | | | | | My old e-mail address is no longer working. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* i2c-mux: Add support for device auto-detectionJean Delvare2012-10-051-1/+1
| | | | | | | | | | | | | | | | | Let I2C bus segments behind multiplexers have a class. This allows for device auto-detection on these segments. As long as parent segments don't share the same class, it should be fine. I implemented support in drivers i2c-mux-gpio and i2c-mux-pca954x. I left i2c-mux-pca9541 and i2c-mux-pinctrl alone for the moment as I don't know if this feature makes sense for the use cases of these drivers. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Peter Korsgaard <peter.korsgaard@barco.com> Cc: David Daney <david.daney@cavium.com> Cc: Michael Lawnick <ml.lawnick@gmx.de> Cc: Rodolfo Giometti <giometti@linux.it>
* i2c: Update Guenter Roeck's e-mail addressGuenter Roeck2012-07-241-1/+1
| | | | | | | My old e-mail address won't be valid for much longer. Time to update it. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: muxes: rename first set of drivers to a standard patternWolfram Sang2012-05-121-0/+401
Apply a naming pattern like in the rest of the subsystem to a first set of mux drivers. Those drivers are the low-hanging fruit; we want to pick them to motivate upcoming drivers to follow the new pattern. The missing GPIO driver will be converted in a later patch. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> (pca9541) Acked-by: Jean Delvare <khali@linux-fr.org>
OpenPOWER on IntegriCloud