Skip to content

Commit 91ed534

Browse files
author
Wolfram Sang
committed
i2c: rename core source file to allow refactorization
The I2C core became quite huge and its monolithic structure makes maintenance hard. So, prepare to break out some functionality into separate files by renaming the source file. Note that we keep the resulting object name constant to avoid regressions. Reviewed-by: Mika Westerberg <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 5ed02db commit 91ed534

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

Documentation/driver-api/i2c.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ i2c_adapter devices which don't support those I2C operations.
4242
.. kernel-doc:: drivers/i2c/i2c-boardinfo.c
4343
:functions: i2c_register_board_info
4444

45-
.. kernel-doc:: drivers/i2c/i2c-core.c
45+
.. kernel-doc:: drivers/i2c/i2c-core-base.c
4646
:export:

drivers/i2c/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
obj-$(CONFIG_I2C_BOARDINFO) += i2c-boardinfo.o
66
obj-$(CONFIG_I2C) += i2c-core.o
7+
i2c-core-objs := i2c-core-base.o
8+
79
obj-$(CONFIG_I2C_SMBUS) += i2c-smbus.o
810
obj-$(CONFIG_I2C_CHARDEV) += i2c-dev.o
911
obj-$(CONFIG_I2C_MUX) += i2c-mux.o
@@ -12,4 +14,4 @@ obj-$(CONFIG_I2C_STUB) += i2c-stub.o
1214
obj-$(CONFIG_I2C_SLAVE_EEPROM) += i2c-slave-eeprom.o
1315

1416
ccflags-$(CONFIG_I2C_DEBUG_CORE) := -DDEBUG
15-
CFLAGS_i2c-core.o := -Wno-deprecated-declarations
17+
CFLAGS_i2c-core-base.o := -Wno-deprecated-declarations

drivers/i2c/busses/i2c-designware-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev)
583583
*/
584584

585585
/*
586-
* i2c-core.c always sets the buffer length of
586+
* i2c-core always sets the buffer length of
587587
* I2C_FUNC_SMBUS_BLOCK_DATA to 1. The length will
588588
* be adjusted when receiving the first byte.
589589
* Thus we can't stop the transaction here.
File renamed without changes.

0 commit comments

Comments
 (0)