summaryrefslogtreecommitdiff
path: root/drivers/i2c/i2c-slave-eeprom.c
AgeCommit message (Collapse)Author
2019-09-28i2c: slave-eeprom: Add read only modeBjörn Ardö
Add read-only versions of all EEPROMs. These versions are read-only on the i2c side, but can be written from the sysfs side. Signed-off-by: Björn Ardö <bjorn.ardo@axis.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-09-05i2c: slave-eeprom: Add comment about address handlingBjörn Ardö
The behaviour of the EEPROM in the case where we only send an 8bit address to a 16bit address EEPROM is not defined. Added comment about that the slave-eeprom might behave differently from how an actual device does (only one model measured). Reported-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Björn Ardö <bjorn.ardo@axis.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-09-04i2c-eeprom_slave: Add support for more eeprom modelsBjörn Ardö
Add a 32 and a 64 kbit memory. These needs 16 bit address so added support for that as well. Signed-off-by: Björn Ardö <bjorn.ardo@axis.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441Thomas Gleixner
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation version 2 of the license extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 315 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Armijn Hemel <armijn@tjaldur.nl> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190531190115.503150771@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-10i2c: Drop owner assignment from i2c_driverKrzysztof Kozlowski
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>
2015-07-31i2c: slave eeprom: clean up sysfs bin attribute read()/write()Vladimir Zapolskiy
The change removes redundant sysfs binary file boundary checks, since this task is already done on caller side in fs/sysfs/file.c Note, on file size overflow read() now returns 0, and this is a correct and expected EOF notification according to POSIX. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2015-03-27i2c: slave-eeprom: add more info when to increase the pointerWolfram Sang
It is a bit subtle when to correctly increase the buffer index when reading. Make this clearer by adding some more comments and pointers to the docs. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2015-03-27i2c: slave: rework the slave APIWolfram Sang
After more discussion, brave users, and additional datasheet evaluation, some API updates for the new I2C slave framework became imminent. The slave events now get some easier to understand naming. Also, the event handling has been simplified to only need a single call to the slave callback when an action by the backend is required. Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2015-01-24i2c: slave-eeprom: fix boundary check when using sysfsWolfram Sang
Due to a copy&paste error, the last byte of the shared memory was not accessible via sysfs. Reported-by: Debora Grosse <debora@mds.com> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-12-11i2c: slave-eeprom: add eeprom simulator driverWolfram Sang
The first user of the i2c-slave interface is an eeprom simulator. It is a shared memory which can be accessed by the remote master via I2C and locally via sysfs. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>