Age | Commit message (Collapse) | Author | Files | Lines |
|
Now that .probe() was changed not to get the id parameter, drivers can
be converted back to that with the eventual goal to drop .probe_new().
Implement that for the i2c drivers that are part of the i2c core.
Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
The value returned by an i2c driver's remove function is mostly ignored.
(Only an error message is printed if the value is non-zero that the
error is ignored.)
So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour, all callbacks were prepared to
return 0 before.
Reviewed-by: Peter Senna Tschudin <[email protected]>
Reviewed-by: Jeremy Kerr <[email protected]>
Reviewed-by: Benjamin Mugnier <[email protected]>
Reviewed-by: Javier Martinez Canillas <[email protected]>
Reviewed-by: Crt Mori <[email protected]>
Reviewed-by: Heikki Krogerus <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Marek Behún <[email protected]> # for leds-turris-omnia
Acked-by: Andy Shevchenko <[email protected]>
Reviewed-by: Petr Machata <[email protected]> # for mlxsw
Reviewed-by: Maximilian Luz <[email protected]> # for surface3_power
Acked-by: Srinivas Pandruvada <[email protected]> # for bmc150-accel-i2c + kxcjk-1013
Reviewed-by: Hans Verkuil <[email protected]> # for media/* + staging/media/*
Acked-by: Miguel Ojeda <[email protected]> # for auxdisplay/ht16k33 + auxdisplay/lcd2s
Reviewed-by: Luca Ceresoli <[email protected]> # for versaclock5
Reviewed-by: Ajay Gupta <[email protected]> # for ucsi_ccg
Acked-by: Jonathan Cameron <[email protected]> # for iio
Acked-by: Peter Rosin <[email protected]> # for i2c-mux-*, max9860
Acked-by: Adrien Grassein <[email protected]> # for lontium-lt8912b
Reviewed-by: Jean Delvare <[email protected]> # for hwmon, i2c-core and i2c/muxes
Acked-by: Corey Minyard <[email protected]> # for IPMI
Reviewed-by: Vladimir Oltean <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
Acked-by: Sebastian Reichel <[email protected]> # for drivers/power
Acked-by: Krzysztof Hałasa <[email protected]>
Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].
[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Acked-by: Baruch Siach <[email protected]>
Reviewed-by: Jean Delvare <[email protected]>
Reviewed-by: Brendan Higgins <[email protected]>
Reviewed-by: Gregory CLEMENT <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
Support for 16-bit addresses has been added, so remove it from the todo
list. Also, in the introductory sentence, may clear we talk about "slave
IP cores" to make reading easier.
Fixes: 82d514815441 ("i2c-eeprom_slave: Add support for more eeprom models")
Signed-off-by: Wolfram Sang <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
We have a kzalloced struct, no need to init to 0.
Signed-off-by: Wolfram Sang <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
I don't plan to support every EEPROM type, but the 24c512 ones need a
tiny code update, so let's have that upstream.
Reported-by: Patrick Williams <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Reviewed-by: Patrick Williams <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
If the slave eeprom has a "firmware-name" in devicetree, then pre-load
the data in the eeprom with this file. Otherwise we init the eeprom with
0xFF.
Signed-off-by: Patrick Williams <[email protected]>
Signed-off-by: Björn Ardö <[email protected]>
[wsa: some cosmetic changes]
Signed-off-by: Wolfram Sang <[email protected]>
|
|
Use kobj_to_dev() API instead of container_of().
Signed-off-by: chenqiwu <[email protected]>
Reviewed-by: Luca Ceresoli <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
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ö <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Björn Ardö <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
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ö <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
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 <[email protected]>
Reviewed-by: Allison Randal <[email protected]>
Reviewed-by: Armijn Hemel <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
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 <[email protected]>
Acked-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Acked-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
Due to a copy&paste error, the last byte of the shared memory was not
accessible via sysfs.
Reported-by: Debora Grosse <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Acked-by: Laurent Pinchart <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
|