i2c: i801: add helper i801_set_hstadd()
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 19 Dec 2022 18:16:08 +0000 (19:16 +0100)
committerWolfram Sang <wsa@kernel.org>
Sun, 12 Feb 2023 21:10:53 +0000 (22:10 +0100)
commiteb4d8bac03bc20c5f2975da325e2d669882ef03e
treebb9412073eb92941575453a916bf5bcf9f0d038f
parente98a3bc0403bc60e949b565f3b36c6aed399a976
i2c: i801: add helper i801_set_hstadd()

Factor out setting SMBHSTADD to a helper. The current code makes the
assumption that constant I2C_SMBUS_READ has bit 0 set, that's not ideal.
Therefore let the new helper explicitly check for I2C_SMBUS_READ.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-i801.c