]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
linuxkpi: unbreak linux_i2cbb
authorEmmanuel Vadot <manu@FreeBSD.org>
Thu, 18 Aug 2022 15:34:35 +0000 (17:34 +0200)
committerAndriy Gapon <avg@FreeBSD.org>
Wed, 24 Aug 2022 13:23:37 +0000 (16:23 +0300)
commit6364180582b769b8fb8fba83511748af3b2c9efd
tree50ae03be41002856dd9bf4a41b300eb9070dfdae
parent211053f952d8ac91dab239f6c4845dd5badd0d95
linuxkpi: unbreak linux_i2cbb

This is a joint work with manu.

- fixed conditions in do_i2c_transfer and i2c_transfer as linux_i2cbb
  does not set adapter->algo->master_xfer but does set
  adapter->algo_data;
- fixed parent bus specification for linux_i2cbb driver module;
- actually implemented iicbb_transfer method;
- added iicbb_pre_xfer and iicbb_post_xfer methods;
- removed unnecessary and harmful delays (and other extra logic) from
  iicbb methods as iicbb driver already has them;
- added setting of iicbb speed based on algo_data->udelay, so that iicbb
  uses correct delays;

PR: 265920
Fixes: 1961a14a4743 linuxkpi: Add i2c support
MFC after: 2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG (manu's work)
sys/compat/linuxkpi/common/include/linux/i2c.h
sys/compat/linuxkpi/common/src/linux_i2cbb.c