aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-robotfuzz-osif.c
AgeCommit message (Collapse)AuthorFilesLines
2024-07-11i2c: robotfuzz-osif: reword according to newest specificationWolfram Sang1-2/+2
Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Andi Shyti <[email protected]>
2021-06-24i2c: robotfuzz-osif: fix control-request directionsJohan Hovold1-2/+2
The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Control transfers without a data stage are treated as OUT requests by the USB stack and should be using usb_sndctrlpipe(). Failing to do so will now trigger a warning. Fix the OSIFI2C_SET_BIT_RATE and OSIFI2C_STOP requests which erroneously used the osif_usb_read() helper and set the IN direction bit. Reported-by: [email protected] Fixes: 83e53a8f120f ("i2c: Add bus driver for for OSIF USB i2c device.") Cc: [email protected] # 3.14 Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372Thomas Gleixner1-4/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation version 2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 135 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-05-24i2c: robotfuzz-osif: drop pointless testPeter Rosin1-2/+2
In the for-loop test, ret will be either 0 or 1. So, the comparison is pointless. Drop it, and drop the initializer which is then also pointless. Signed-off-by: Peter Rosin <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2018-05-24i2c: robotfuzz-osif: remove pointless local variablePeter Rosin1-10/+7
Just use the value directly instead of assigning it to a variable first. And then drop the unused variable. Signed-off-by: Peter Rosin <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2017-02-09i2c: busses: constify i2c_algorithm structuresBhumika Goyal1-1/+1
Declare i2c_algorithm structures as const as they are only stored in the algo field of an i2c_adapter structure. This field is of type const, so i2c_algorithm structures having this property can be made const too. Signed-off-by: Bhumika Goyal <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> for Acked-by: Patrice Chotard <[email protected]> Acked-by: Jarkko Nikula <[email protected]> Reviewed-by: Jean Delvare <[email protected]> Acked-by: Ludovic Desroches <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2016-06-13i2c: robotfuzz-osif: Constify osif_tableAxel Lin1-1/+1
osif_table is never modified, so declare it as const. Signed-off-by: Axel Lin <[email protected]> Acked-by: Andrew Lunn <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2014-01-13i2c: Add bus driver for for OSIF USB i2c device.Andrew Lunn1-0/+202
OSIF, Open Source InterFace, is a USB based i2c bus master. The origional design was based on i2c-tiny-usb, but more modern versions of the firmware running on the MegaAVR microcontroller use a different protocol over the USB. This code is based on Barry Carter <[email protected]> driver. Signed-off-by: Andrew Lunn <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>