Skip to contentSkip to conversation

drivers: ddcci: upstream DDCCI driver

PATCH Superseded Yusuf Khan 2 participants 5 messages Mar 10, 2022

Subsystems (4)

v3 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

Yusuf Khan

author
#0 lore raw

PATCH v3 1/1 drivers: ddcci: upstream DDCCI driver

This patch upstreams the DDCCI driver by Christoph Grenz into the kernel. The original gitlab page is loacted at https://gitlab
.com/ddcci-driver-linux/ddcci-driver-linux/-/tree/master.

---
v2: Fix typos.

v3:Add documentation, move files around, replace semaphores with mutexes, and replaced <asm-generic/fcntl.h> with <linux/fcntl.h>. "imirkin"(which due to his involvement in the dri-devel irc channel I cant help but assume to be a DRM developer) said that the DDC/CI bus does not intefere with the buses that DRM is involved with.

---
 Documentation/ABI/testing/sysfs-driver-ddcci |   37 +
 Documentation/misc-devices/ddcci.rst         |  107 +
 drivers/char/Kconfig                         |    9 +
 drivers/char/Makefile                        |    1 +
 drivers/char/ddcci.c                         | 1887 ++++++++++++++++++
 drivers/video/backlight/Kconfig              |    9 +
 drivers/video/backlight/Makefile             |    1 +
 drivers/video/backlight/ddcci-backlight.c    |  412 ++++
 include/linux/ddcci.h                        |  164 ++
 9 files changed, 2627 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-ddcci
 create mode 100644 Documentation/misc-devices/ddcci.rst
 create mode 100644 drivers/char/ddcci.c
 create mode 100644 drivers/video/backlight/ddcci-backlight.c
 create mode 100644 include/linux/ddcci.h
Documentation/ABI/testing/sysfs-driver-ddcci new file +37 -0
new file mode 100644
index 000000000000..6c0f5786ebdb
@@ -0,0 +1,37 @@
+What:		/sys/bus/ddcci/ddcci<I²C bus number>i<hex address>
+Date:		February 2022
+KernelVersion:	5.17
+Contact:	Yusuf Khan <[email protected]>
+Description:	This file is a internal dependent device on the I2C bus, 
+		it exports the same data that the main device exports.
+
+What:		/sys/bus/ddcci/ddcci<I²C bus number>e<hex address>
+Date:		February 2022
+KernelVersion:	5.17
+Contact:	Yusuf Khan <[email protected]>
+Description:	This file is a external dependent device on the I2C bus, 
+		it exports the same data that the main device exports.
+
+What:		/sys/bus/ddcci/ddcci<I²C bus number>
+Date:		February 2022
+KernelVersion:	5.17
+Contact:	Yusuf Khan <[email protected]>
+Description:	This file is the main device on the I2C bus, it exports
+		the following peices of information about the device, capabilities
+		which is a full ACCESS.bus capabilities string(see the ACCESS.bus
+		specification for more info), idProt, which is a full ACCESS.bus 
+		protocol supported by the device(Usually "monitor"), idType,
+		a ACCESS.buss device subtype(Usually "LCD" or "CRT"), idModel, a
+		ACCESS.bus device model identifier(Usually a shortened form of the
+		device model name), idVendor, a ACCESS.bus device vendor identifier 
+		(Empty if the Identification command is not supported), idModule,
+		a ACCESS.bus device module identifier(Empty if the Identification
+		command is not supported), idSerial, a 32 bit device number
+		a fixed serial number if it's positive, a temporary serial number 
+		if negative and zero if the Identification command is not supported,
+		and modalias, a combined identifier for driver selection, 
+		it has the form ddcci:<idProt>-<idType>-<idModel>-<idVendor>-<idModule>,
+		All non-alphanumeric characters (including whitespace) in the model, 
+		vendor or module parts are replaced by underscores to prevent issues 
+		with software like systemd-udevd. See Documentation/misc-devices/ddcci.rst
+		for more information on DDC/CI.
Documentation/misc-devices/ddcci.rst new file +107 -0

108 lines not on this page · raw message

drivers/char/Kconfig +9 -0
index 740811893c57..c7aa439d23e7 100644
@@ -451,4 +451,13 @@ config RANDOM_TRUST_BOOTLOADER
 	pool. Otherwise, say N here so it will be regarded as device input that
 	only mixes the entropy pool.
 
+config DDCCI
+	tristate "DDCCI display protocol support"
+	help
+	  Display Data Channel Command Interface is a 
+	  interface that allows the kernel to "talk"
+	  to most displays made after 2005. Check your
+	  display's specification to see if it has
+	  support for this.
+
 endmenu
drivers/char/Makefile +1 -0
index 264eb398fdd4..eaa2d58d50df 100644
@@ -3,6 +3,7 @@
 # Makefile for the kernel character device drivers.
 #
 
+obj-$(CONFIG_DDCCI)				+= ddcci.o
 obj-y				+= mem.o random.o
 obj-$(CONFIG_TTY_PRINTK)	+= ttyprintk.o
 obj-y				+= misc.o
drivers/char/ddcci.c new file +1887 -0

1,887 lines not on this page · raw message

drivers/video/backlight/Kconfig +9 -0
index e32694c13da5..a99d1467c15c 100644
@@ -289,6 +289,15 @@ config BACKLIGHT_QCOM_WLED
 	  If you have the Qualcomm PMIC, say Y to enable a driver for the
 	  WLED block. Currently it supports PM8941 and PMI8998.
 
+config BACKLIGHT_DDCCI
+	tristate "DDCCI Backlight Driver"
+	help
+	  If you have a DDC/CI supporing monitor, say Y to enable a driver
+	  to control its backlight using DDC/CI. This could be useful if
+	  your monitor does not include a backlight driver. For this to be
+	  useful you need to enable DDCCI support which can be found in 
+	  Device Drivers -> Character devices.
+
 config BACKLIGHT_RT4831
 	tristate "Richtek RT4831 Backlight Driver"
 	depends on MFD_RT4831
drivers/video/backlight/Makefile +1 -0
index cae2c83422ae..7bfb6e506b35 100644
@@ -58,3 +58,4 @@ obj-$(CONFIG_BACKLIGHT_WM831X)		+= wm831x_bl.o
 obj-$(CONFIG_BACKLIGHT_ARCXCNN) 	+= arcxcnn_bl.o
 obj-$(CONFIG_BACKLIGHT_RAVE_SP)		+= rave-sp-backlight.o
 obj-$(CONFIG_BACKLIGHT_LED)		+= led_bl.o
+obj-$(CONFIG_BACKLIGHT_DDCCI)		+= ddcci-backlight.o
drivers/video/backlight/ddcci-backlight.c new file +412 -0

412 lines not on this page · raw message

include/linux/ddcci.h new file +164 -0

164 lines not on this page · raw message

Signature · 1 line
2.25.1
reviewer
#1 lore raw

Hi--

drivers/char/Kconfig config RANDOM_TRUST_BOOTLOADER · line 457

Quoted 12 lines · Yusuf Khan
drivers/char/Kconfig +4 -0
index 740811893c57..c7aa439d23e7 100644
@@ -451,4 +451,13 @@ config RANDOM_TRUST_BOOTLOADER
 	pool. Otherwise, say N here so it will be regarded as device input that
 	only mixes the entropy pool.
 
+config DDCCI
+	tristate "DDCCI display protocol support"
+	help
+	  Display Data Channel Command Interface is a 

is an

Also, the line above ends with a space. Please check the entire patch for lines that end with SPACE and remove the trailing spaces.

drivers/char/Kconfig config RANDOM_TRUST_BOOTLOADER · line 463

Quoted 6 lines
drivers/char/Kconfig +5 -0
+	  interface that allows the kernel to "talk"
+	  to most displays made after 2005. Check your
+	  display's specification to see if it has
+	  support for this.
+
 endmenu

(2) ddcci appears to be a char driver, not a misc driver,
so its documentation probably should not be in Documentation/misc-devices/.

(3) The documentation file ends with:

+options ddcci dyndbg
+options ddcci-backlight dyndbg
\ No newline at end of file

so please add a newline at the end of the last line.

(4) What is the modalias stuff about?
Does the kernel have other drivers that play modalias games like this?

(5) This standalone comment might need some more text. Doesn't make much sense by itself.

+ /* Special case: sender to 0x6E is always 0x51 */

Does that mean something like "reply to 0x6E is always 0x51" ?

(6) Be a bit more generous with spaces around operators (kernel style). And be consistent. This first line is OK, second line not so much.

+ xor ^= ((p_flag << 7) | len);
+ *(ptr++) = (p_flag << 7)|len;

This line could also be improved with some spaces:

+ ret = payload_len+3+((quirks & DDCCI_QUIRK_SKIP_FIRST_BYTE)?1:0);

(e.g. -- I expect that there are others.)

(7) Too much use of likely() and unlikely().

(8) I don't see anything in the Kconfig entries such as depends on I2C

so do these 2 drivers work without I2C being enabled in a kernel?

Oh, if I build ddcci without CONFIG_I2C:

../drivers/char/ddcci.c: In function ‘__ddcci_write_bytewise’:
../drivers/char/ddcci.c:104:8: error: implicit declaration of function ‘i2c_smbus_write_byte’ [-Werror=implicit-function-declaration]

  ret = i2c_smbus_write_byte(client, addr);
        ^~~~~~~~~~~~~~~~~~~~
  CC      kernel/delayacct.o
../drivers/char/ddcci.c: In function ‘__ddcci_write_block’:
../drivers/char/ddcci.c:165:9: error: implicit declaration of function ‘i2c_master_send’; did you mean ‘i2c_match_id’? [-Werror=implicit-function-declaration]
  return i2c_master_send(client, sendbuf, ptr - sendbuf + 1);
         ^~~~~~~~~~~~~~~
         i2c_match_id
../drivers/char/ddcci.c: In function ‘__ddcci_read’:
../drivers/char/ddcci.c:216:8: error: implicit declaration of function ‘i2c_master_recv’; did you mean ‘i2c_match_id’? [-Werror=implicit-function-declaration]
  ret = i2c_master_recv(client, buf, len);
        ^~~~~~~~~~~~~~~
        i2c_match_id
../drivers/char/ddcci.c: In function ‘ddcci_identify_device’:
../drivers/char/ddcci.c:413:10: error: implicit declaration of function ‘i2c_check_functionality’; did you mean ‘in_lock_functions’? [-Werror=implicit-function-declaration]
       && i2c_check_functionality(client->adapter,
          ^~~~~~~~~~~~~~~~~~~~~~~
          in_lock_functions
../drivers/char/ddcci.c: In function ‘ddcci_module_init’:
../drivers/char/ddcci.c:1835:8: error: implicit declaration of function ‘i2c_add_driver’; did you mean ‘ddcci_add_driver’? [-Werror=implicit-function-declaration]
  ret = i2c_add_driver(&ddcci_driver);
        ^~~~~~~~~~~~~~
        ddcci_add_driver

../drivers/char/ddcci.c: In function ‘ddcci_module_exit’:
../drivers/char/ddcci.c:1868:2: error: implicit declaration of function ‘i2c_del_driver’; did you mean ‘ddcci_del_driver’? [-Werror=implicit-function-declaration]
i2c_del_driver(&ddcci_driver);
^~~~~~~~~~~~~~
ddcci_del_driver

Signature · 1 line
~Randy
author
#2 lore raw

Thanks for the feedback!

(2) Where would I place that documentation then,
documentation/devicetree/bindings/?

(4) A quick look at bootlin shows a symbol called
"modalias referenced 176 times.

Quoted 110 lines · Randy Dunlap

Hi--

drivers/char/Kconfig config RANDOM_TRUST_BOOTLOADER · line 457

Quoted 12 lines · Yusuf Khan
drivers/char/Kconfig +4 -0
index 740811893c57..c7aa439d23e7 100644
@@ -451,4 +451,13 @@ config RANDOM_TRUST_BOOTLOADER
      pool. Otherwise, say N here so it will be regarded as device input that
      only mixes the entropy pool.
 
+config DDCCI
+     tristate "DDCCI display protocol support"
+     help
+       Display Data Channel Command Interface is a

is an

Also, the line above ends with a space. Please check the entire patch for lines that end with SPACE and remove the trailing spaces.

drivers/char/Kconfig config RANDOM_TRUST_BOOTLOADER · line 463

Quoted 6 lines
drivers/char/Kconfig +5 -0
+       interface that allows the kernel to "talk"
+       to most displays made after 2005. Check your
+       display's specification to see if it has
+       support for this.
+
 endmenu

(2) ddcci appears to be a char driver, not a misc driver,
so its documentation probably should not be in Documentation/misc-devices/.

(3) The documentation file ends with:

Documentation/misc-devices/ddcci.rst new file +2 -0
+options ddcci dyndbg
+options ddcci-backlight dyndbg
\ No newline at end of file

so please add a newline at the end of the last line.

(4) What is the modalias stuff about?
Does the kernel have other drivers that play modalias games like this?

(5) This standalone comment might need some more text. Doesn't make much sense by itself.

+ /* Special case: sender to 0x6E is always 0x51 */

Does that mean something like "reply to 0x6E is always 0x51" ?

(6) Be a bit more generous with spaces around operators (kernel style). And be consistent. This first line is OK, second line not so much.

(quoted diff) +2 -0
+       xor ^= ((p_flag << 7) | len);
+       *(ptr++) = (p_flag << 7)|len;

This line could also be improved with some spaces:

+ ret = payload_len+3+((quirks & DDCCI_QUIRK_SKIP_FIRST_BYTE)?1:0);

(e.g. -- I expect that there are others.)

(7) Too much use of likely() and unlikely().

(8) I don't see anything in the Kconfig entries such as depends on I2C

so do these 2 drivers work without I2C being enabled in a kernel?

Oh, if I build ddcci without CONFIG_I2C:

../drivers/char/ddcci.c: In function ‘__ddcci_write_bytewise’:
../drivers/char/ddcci.c:104:8: error: implicit declaration of function ‘i2c_smbus_write_byte’ [-Werror=implicit-function-declaration]

  ret = i2c_smbus_write_byte(client, addr);
        ^~~~~~~~~~~~~~~~~~~~
  CC      kernel/delayacct.o
../drivers/char/ddcci.c: In function ‘__ddcci_write_block’:
../drivers/char/ddcci.c:165:9: error: implicit declaration of function ‘i2c_master_send’; did you mean ‘i2c_match_id’? [-Werror=implicit-function-declaration]
  return i2c_master_send(client, sendbuf, ptr - sendbuf + 1);
         ^~~~~~~~~~~~~~~
         i2c_match_id
../drivers/char/ddcci.c: In function ‘__ddcci_read’:
../drivers/char/ddcci.c:216:8: error: implicit declaration of function ‘i2c_master_recv’; did you mean ‘i2c_match_id’? [-Werror=implicit-function-declaration]
  ret = i2c_master_recv(client, buf, len);
        ^~~~~~~~~~~~~~~
        i2c_match_id
../drivers/char/ddcci.c: In function ‘ddcci_identify_device’:
../drivers/char/ddcci.c:413:10: error: implicit declaration of function ‘i2c_check_functionality’; did you mean ‘in_lock_functions’? [-Werror=implicit-function-declaration]
       && i2c_check_functionality(client->adapter,
          ^~~~~~~~~~~~~~~~~~~~~~~
          in_lock_functions
../drivers/char/ddcci.c: In function ‘ddcci_module_init’:
../drivers/char/ddcci.c:1835:8: error: implicit declaration of function ‘i2c_add_driver’; did you mean ‘ddcci_add_driver’? [-Werror=implicit-function-declaration]
  ret = i2c_add_driver(&ddcci_driver);
        ^~~~~~~~~~~~~~
        ddcci_add_driver

../drivers/char/ddcci.c: In function ‘ddcci_module_exit’:
../drivers/char/ddcci.c:1868:2: error: implicit declaration of function ‘i2c_del_driver’; did you mean ‘ddcci_del_driver’? [-Werror=implicit-function-declaration]
i2c_del_driver(&ddcci_driver);
^~~~~~~~~~~~~~
ddcci_del_driver

--
~Randy

reviewer
#3 lore raw
Quoted 4 lines · Yusuf Khan

Thanks for the feedback!

(2) Where would I place that documentation then,
documentation/devicetree/bindings/?

I like the way that you have all the info in one place, but the current way Documentation is organized has /sysfs interfaces in Documentation/ABI/. Then I would put the rest of the doc info in Documentation/driver-api/ddcci.rst.

Quoted 3 lines

(4) A quick look at bootlin shows a symbol called
"modalias referenced 176 times.

Well, bootlin is not a kernel driver.
I see places in generic ACPI or generic (other) firmware code or SPI bus working with modalias strings. Maybe it's OK -- just seems odd to me.

Quoted 112 lines · Randy Dunlap
Quoted 110 lines

Hi--

drivers/char/Kconfig config RANDOM_TRUST_BOOTLOADER · line 457

Quoted 12 lines · Yusuf Khan
drivers/char/Kconfig +4 -0
index 740811893c57..c7aa439d23e7 100644
@@ -451,4 +451,13 @@ config RANDOM_TRUST_BOOTLOADER
      pool. Otherwise, say N here so it will be regarded as device input that
      only mixes the entropy pool.
 
+config DDCCI
+     tristate "DDCCI display protocol support"
+     help
+       Display Data Channel Command Interface is a

is an

Also, the line above ends with a space. Please check the entire patch for lines that end with SPACE and remove the trailing spaces.

drivers/char/Kconfig config RANDOM_TRUST_BOOTLOADER · line 463

Quoted 6 lines
drivers/char/Kconfig +5 -0
+       interface that allows the kernel to "talk"
+       to most displays made after 2005. Check your
+       display's specification to see if it has
+       support for this.
+
 endmenu

(2) ddcci appears to be a char driver, not a misc driver,
so its documentation probably should not be in Documentation/misc-devices/.

(3) The documentation file ends with:

Documentation/misc-devices/ddcci.rst new file +2 -0
+options ddcci dyndbg
+options ddcci-backlight dyndbg
\ No newline at end of file

so please add a newline at the end of the last line.

(4) What is the modalias stuff about?
Does the kernel have other drivers that play modalias games like this?

(5) This standalone comment might need some more text. Doesn't make much sense by itself.

+ /* Special case: sender to 0x6E is always 0x51 */

Does that mean something like "reply to 0x6E is always 0x51" ?

(6) Be a bit more generous with spaces around operators (kernel style). And be consistent. This first line is OK, second line not so much.

(quoted diff) +2 -0
+       xor ^= ((p_flag << 7) | len);
+       *(ptr++) = (p_flag << 7)|len;

This line could also be improved with some spaces:

+ ret = payload_len+3+((quirks & DDCCI_QUIRK_SKIP_FIRST_BYTE)?1:0);

(e.g. -- I expect that there are others.)

(7) Too much use of likely() and unlikely().

(8) I don't see anything in the Kconfig entries such as depends on I2C

so do these 2 drivers work without I2C being enabled in a kernel?

Oh, if I build ddcci without CONFIG_I2C:

../drivers/char/ddcci.c: In function ‘__ddcci_write_bytewise’:
../drivers/char/ddcci.c:104:8: error: implicit declaration of function ‘i2c_smbus_write_byte’ [-Werror=implicit-function-declaration]

  ret = i2c_smbus_write_byte(client, addr);
        ^~~~~~~~~~~~~~~~~~~~
  CC      kernel/delayacct.o
../drivers/char/ddcci.c: In function ‘__ddcci_write_block’:
../drivers/char/ddcci.c:165:9: error: implicit declaration of function ‘i2c_master_send’; did you mean ‘i2c_match_id’? [-Werror=implicit-function-declaration]
  return i2c_master_send(client, sendbuf, ptr - sendbuf + 1);
         ^~~~~~~~~~~~~~~
         i2c_match_id
../drivers/char/ddcci.c: In function ‘__ddcci_read’:
../drivers/char/ddcci.c:216:8: error: implicit declaration of function ‘i2c_master_recv’; did you mean ‘i2c_match_id’? [-Werror=implicit-function-declaration]
  ret = i2c_master_recv(client, buf, len);
        ^~~~~~~~~~~~~~~
        i2c_match_id
../drivers/char/ddcci.c: In function ‘ddcci_identify_device’:
../drivers/char/ddcci.c:413:10: error: implicit declaration of function ‘i2c_check_functionality’; did you mean ‘in_lock_functions’? [-Werror=implicit-function-declaration]
       && i2c_check_functionality(client->adapter,
          ^~~~~~~~~~~~~~~~~~~~~~~
          in_lock_functions
../drivers/char/ddcci.c: In function ‘ddcci_module_init’:
../drivers/char/ddcci.c:1835:8: error: implicit declaration of function ‘i2c_add_driver’; did you mean ‘ddcci_add_driver’? [-Werror=implicit-function-declaration]
  ret = i2c_add_driver(&ddcci_driver);
        ^~~~~~~~~~~~~~
        ddcci_add_driver

../drivers/char/ddcci.c: In function ‘ddcci_module_exit’:
../drivers/char/ddcci.c:1868:2: error: implicit declaration of function ‘i2c_del_driver’; did you mean ‘ddcci_del_driver’? [-Werror=implicit-function-declaration]
i2c_del_driver(&ddcci_driver);
^~~~~~~~~~~~~~
ddcci_del_driver

--
~Randy

Signature · 1 line
~Randy
author
#4 lore raw

(2) I agree, it seems fitting.

(4) bootlin a really great source code browser see
this link: https://elixir.bootlin.com/linux/v5.17-rc7/A/ident/modalias,
someone in kindergarten can realistically debug kernel issues and fix them with it.

Quoted 138 lines · Randy Dunlap
Quoted 4 lines · Yusuf Khan

Thanks for the feedback!

(2) Where would I place that documentation then,
documentation/devicetree/bindings/?

I like the way that you have all the info in one place, but the current way Documentation is organized has /sysfs interfaces in Documentation/ABI/. Then I would put the rest of the doc info in Documentation/driver-api/ddcci.rst.

Quoted 3 lines

(4) A quick look at bootlin shows a symbol called
"modalias referenced 176 times.

Well, bootlin is not a kernel driver.
I see places in generic ACPI or generic (other) firmware code or SPI bus working with modalias strings. Maybe it's OK -- just seems odd to me.

Quoted 110 lines · Randy Dunlap
Quoted 108 lines

Hi--

drivers/char/Kconfig config RANDOM_TRUST_BOOTLOADER · line 457

Quoted 12 lines · Yusuf Khan
drivers/char/Kconfig +4 -0
index 740811893c57..c7aa439d23e7 100644
@@ -451,4 +451,13 @@ config RANDOM_TRUST_BOOTLOADER
      pool. Otherwise, say N here so it will be regarded as device input that
      only mixes the entropy pool.
 
+config DDCCI
+     tristate "DDCCI display protocol support"
+     help
+       Display Data Channel Command Interface is a

is an

Also, the line above ends with a space. Please check the entire patch for lines that end with SPACE and remove the trailing spaces.

drivers/char/Kconfig config RANDOM_TRUST_BOOTLOADER · line 463

Quoted 6 lines
drivers/char/Kconfig +5 -0
+       interface that allows the kernel to "talk"
+       to most displays made after 2005. Check your
+       display's specification to see if it has
+       support for this.
+
 endmenu

(2) ddcci appears to be a char driver, not a misc driver,
so its documentation probably should not be in Documentation/misc-devices/.

(3) The documentation file ends with:

Documentation/misc-devices/ddcci.rst new file +2 -0
+options ddcci dyndbg
+options ddcci-backlight dyndbg
\ No newline at end of file

so please add a newline at the end of the last line.

(4) What is the modalias stuff about?
Does the kernel have other drivers that play modalias games like this?

(5) This standalone comment might need some more text. Doesn't make much sense by itself.

+ /* Special case: sender to 0x6E is always 0x51 */

Does that mean something like "reply to 0x6E is always 0x51" ?

(6) Be a bit more generous with spaces around operators (kernel style). And be consistent. This first line is OK, second line not so much.

(quoted diff) +2 -0
+       xor ^= ((p_flag << 7) | len);
+       *(ptr++) = (p_flag << 7)|len;

This line could also be improved with some spaces:

+ ret = payload_len+3+((quirks & DDCCI_QUIRK_SKIP_FIRST_BYTE)?1:0);

(e.g. -- I expect that there are others.)

(7) Too much use of likely() and unlikely().

(8) I don't see anything in the Kconfig entries such as depends on I2C

so do these 2 drivers work without I2C being enabled in a kernel?

Oh, if I build ddcci without CONFIG_I2C:

../drivers/char/ddcci.c: In function ‘__ddcci_write_bytewise’:
../drivers/char/ddcci.c:104:8: error: implicit declaration of function ‘i2c_smbus_write_byte’ [-Werror=implicit-function-declaration]

  ret = i2c_smbus_write_byte(client, addr);
        ^~~~~~~~~~~~~~~~~~~~
  CC      kernel/delayacct.o
../drivers/char/ddcci.c: In function ‘__ddcci_write_block’:
../drivers/char/ddcci.c:165:9: error: implicit declaration of function ‘i2c_master_send’; did you mean ‘i2c_match_id’? [-Werror=implicit-function-declaration]
  return i2c_master_send(client, sendbuf, ptr - sendbuf + 1);
         ^~~~~~~~~~~~~~~
         i2c_match_id
../drivers/char/ddcci.c: In function ‘__ddcci_read’:
../drivers/char/ddcci.c:216:8: error: implicit declaration of function ‘i2c_master_recv’; did you mean ‘i2c_match_id’? [-Werror=implicit-function-declaration]
  ret = i2c_master_recv(client, buf, len);
        ^~~~~~~~~~~~~~~
        i2c_match_id
../drivers/char/ddcci.c: In function ‘ddcci_identify_device’:
../drivers/char/ddcci.c:413:10: error: implicit declaration of function ‘i2c_check_functionality’; did you mean ‘in_lock_functions’? [-Werror=implicit-function-declaration]
       && i2c_check_functionality(client->adapter,
          ^~~~~~~~~~~~~~~~~~~~~~~
          in_lock_functions
../drivers/char/ddcci.c: In function ‘ddcci_module_init’:
../drivers/char/ddcci.c:1835:8: error: implicit declaration of function ‘i2c_add_driver’; did you mean ‘ddcci_add_driver’? [-Werror=implicit-function-declaration]
  ret = i2c_add_driver(&ddcci_driver);
        ^~~~~~~~~~~~~~
        ddcci_add_driver

../drivers/char/ddcci.c: In function ‘ddcci_module_exit’:
../drivers/char/ddcci.c:1868:2: error: implicit declaration of function ‘i2c_del_driver’; did you mean ‘ddcci_del_driver’? [-Werror=implicit-function-declaration]
i2c_del_driver(&ddcci_driver);
^~~~~~~~~~~~~~
ddcci_del_driver

Quoted 2 lines
Quoted 2 lines

--
~Randy

--
~Randy