[Letux-kernel] [PATCH] Letux-root: use the force in si4721

Andreas Kemnade andreas at kemnade.info
Mon Aug 6 07:46:51 CEST 2018


the chip seems to be occupied now by a kernel driver, so
forcefully access the device from userspace, so the tool can still
be used until there is a fully-working driver in kernel (if there
ever will be)

Signed-off-by: Andreas Kemnade <andreas at kemnade.info>
---
 Letux/root/si4721.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Letux/root/si4721.c b/Letux/root/si4721.c
index 80ac30498997..acb863e417a1 100644
--- a/Letux/root/si4721.c
+++ b/Letux/root/si4721.c
@@ -37,7 +37,7 @@ static int send_cmd(unsigned char *cmd_data,int cmd_len,unsigned char *resp_data
 			exit(1);
 		}
 	}
-	if (ioctl(fd, I2C_SLAVE, chipaddr) < 0) {
+	if (ioctl(fd, I2C_SLAVE_FORCE, chipaddr) < 0) {
 		printf("Failed to acquire bus access and/or talk to slave: %s\n", strerror(errno));
 		return -1;
 	}
-- 
2.11.0



More information about the Letux-kernel mailing list