History log of /linux-master/drivers/staging/greybus/i2c.c
Revision Date Author Comments
# f79ad78a 24-Nov-2023 Heiner Kallweit <hkallweit1@gmail.com>

staging: greybus: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON

After removal of the legacy eeprom driver the only remaining I2C
client device driver supporting I2C_CLASS_SPD is jc42. Because this
driver also supports I2C_CLASS_HWMON, adapters don't have to
declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON.
It's one step towards getting rid of I2C_CLASS_SPD mid-term.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>


# 2587768a 12-Mar-2020 Lourdes Pedrajas <lu@pplo.net>

staging: greybus: i2c: remove unused pointers

Remove unused pointers in gb_i2c_algorithm structure and gb_i2c_probe()
function, as they are not touched since 2014.

Suggested-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://lore.kernel.org/r/20200312190349.7892-1-lu@pplo.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# add1a2fa 09-Mar-2020 Lourdes Pedrajas <lu@pplo.net>

staging: greybus: i2c.c: remove commented out function

Remove function gb_i2c_smbus_xfer() which is unused.

Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Link: https://lore.kernel.org/r/20200309170643.4947-1-lu@pplo.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ec0ad868 24-Aug-2019 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: greybus: move core include files to include/linux/greybus/

With the goal of moving the core of the greybus code out of staging, the
include files need to be moved to include/linux/greybus.h and
include/linux/greybus/

Cc: Vaibhav Hiremath <hvaibhav.linux@gmail.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Cc: Rui Miguel Silva <rmfrfs@gmail.com>
Cc: David Lin <dtwlin@gmail.com>
Cc: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Cc: greybus-dev@lists.linaro.org
Cc: devel@driverdev.osuosl.org
Acked-by: Mark Greer <mgreer@animalcreek.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Alex Elder <elder@kernel.org>
Link: https://lore.kernel.org/r/20190825055429.18547-8-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# baacd53a 05-Jul-2019 Nishka Dasgupta <nishkadg.linux@gmail.com>

staging: greybus: Replace function gb_i2c_device_setup()

Remove function gb_i2c_device_setup as all it does is call
gb_i2c_functionality_operation.
Rename gb_i2c_functionality_operation to gb_i2c_device_setup to maintain
compatibility with call sites.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190705131131.27354-1-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8478c35a 25-Nov-2018 Cristian Sicilia <sicilia.cristian@gmail.com>

staging: greybus: Parenthesis alignment

Some parameters are aligned with parentheses.
Some parentheses was opened at end of line.

Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 863dbc52 07-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: greybus: Remove redundant license text

Now that the SPDX tag is in all greybus files, that identifies the
license in a specific and legally-defined manner. So the extra GPL text
wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text. And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Vaibhav Hiremath <hvaibhav.linux@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Acked-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Acked-by: David Lin <dtwlin@gmail.com>
Acked-by: Johan Hovold <johan@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Mark Greer <mgreer@animalcreek.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Acked-by: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# eb50fd3a 07-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: greybus: add SPDX identifiers to all greybus driver files

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the drivers/staging/greybus files files with the correct SPDX
license identifier based on the license text in the file itself. The
SPDX identifier is a legally binding shorthand, which can be used
instead of the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Vaibhav Hiremath <hvaibhav.linux@gmail.com>
Cc: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Acked-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Acked-by: David Lin <dtwlin@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Acked-by: Johan Hovold <johan@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Mark Greer <mgreer@animalcreek.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c0e72f6a 14-Jul-2016 David Lin <dtwlin@google.com>

greybus: i2c: add runtime pm support

Add runtime pm support to camera i2c bridged phy device class driver

Testing Done:
- Passed #gb_test.sh -v -t i2c

Signed-off-by: David Lin <dtwlin@google.com>
Signed-off-by: Axel Haslam <haslam_axel@projectara.com>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Alex Elder <elder@linaro.org>


# 64060fe9 30-May-2016 Viresh Kumar <viresh.kumar@linaro.org>

greybus: gbphy: Remove protocol specific version handling

We should be using the generic version handling at bundle level, instead
of at protocol level for bridged PHY devices as well.

The bundle version handling is already in place, though it is *not* used
today as we haven't bumped the version of control protocol yet.

Remove protocol specific handling for bridged PHY devices.

Tested on EVT 1.5 with gpbridge-test module. No nuttx changes are
required with this.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# e54b106d 19-May-2016 Sandeep Patil <patil_sandeep@projectara.com>

greybus: gpbridge: rename 'gpbridge' to 'gbphy' everywhere

The 'gpbridge' name didn't relaly reflect what the bus is; which
is a bus for bridged-phy devices. So, rename all instances
of 'gpbridge' to more appropriate 'gbphy'

Testing Done:
Build and boot tested. 'lsgb' will stop displaying 'GPBridge' devices
until I change the library to reflect this change.

Signed-off-by: Sandeep Patil <patil_sandeep@projectara.com>
Suggested-by: Greg Kroah-Hartman <gregkh@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# d6046b44 09-May-2016 Viresh Kumar <viresh.kumar@linaro.org>

greybus: i2c : Create separate module

Create separate module for i2c gpbridge driver.

Tested on EVT 1.5 by inserting GP test module, all the devices were
enumerated correctly.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# cf1d8bee 05-May-2016 Greg Kroah-Hartman <gregkh@google.com>

greybus: I2C: convert to a gpbridge driver

This converts the I2C driver to be a gpbridge driver, moving it away
from the "legacy" interface.

Testing Done: Tested on gbsim.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
[vaibhav.hiremath@linaro.org: 1.Changed code to retain init/exit fns of
drivers. 2.Exit path fix. 3. Fixed review comments]
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Tested-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# 0ec30632 22-Mar-2016 Greg Kroah-Hartman <gregkh@google.com>

greybus: convert drivers to use connection->private set/get

This converts all drivers to use the gb_connection_get_data() and
gb_connection_set_data() functions to make it a bit more explicit as to
what is going on.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# c7b07265 28-Feb-2016 Greg Kroah-Hartman <gregkh@google.com>

greybus: gpbridge.h: move protocol init/exit prototypes

Create gpbridge.h for the gpbridge-specific function prototypes, the
rest of the greybus drivers don't care about them.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>


# 3522a09f 03-Mar-2016 Michael Mogenson <michael.mogenson@leaflabs.com>

greybus: remove gb_i2c_retries_operation

Set retries operation was removed from the Greybus specification. Remove
gb_i2c_retries_operation and all other no longer necessary code bits from the
Greybus kernel code.

Signed-off-by: Michael Mogenson <michael.mogenson@leaflabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# e494b580 03-Mar-2016 Michael Mogenson <michael.mogenson@leaflabs.com>

greybus: remove gb_i2c_timeout_operation

Set timeout operation was removed from the Greybus specification. Remove
gb_i2c_timeout_operation and all other no longer necessary code bits from the
Greybus kernel code.

Signed-off-by: Michael Mogenson <michael.mogenson@leaflabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# 6d6fb254 11-Feb-2016 Johan Hovold <johan@kernel.org>

greybus: i2c: add bundle-device prefix to error messages

Replace all pr_err with dev_err so we can tell what device (and driver)
a message was for.

Testing Done: Compiled

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# c01e16e3 14-Oct-2015 Greg Kroah-Hartman <gregkh@google.com>

greybus: i2c: use the bundle struct device instead of the connector

We are removing struct device from the gb_connection structure in the
near future. The gb_bundle structure's struct device should be used as
a replacement.

This patch moves the i2c driver to use the bundle pointer instead of the
connection pointer.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Alex Elder <elder@linaro.org>


# 6ab1ce4d 26-Sep-2015 Johan Hovold <johan@kernel.org>

greybus: operation: remove gb_operation_destroy

Remove legacy interface to "destroy" operations, which is now just a
wrapper for gb_operation_put.

The old interface name hides the fact that all operations are refcounted
and may live on even after having "destroyed" them.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# d8886f4a 10-Aug-2015 Viresh Kumar <viresh.kumar@linaro.org>

greybus: i2c: Drop get_version support

This is done from a common place now, no need to replicate it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# bbd80cc1 07-Aug-2015 Viresh Kumar <viresh.kumar@linaro.org>

greybus: i2c: Use (already defined) major/minor macros

We already have macros for these, use them instead of writing fixed
values.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# e420721b 30-Jun-2015 Johan Hovold <johan@kernel.org>

greybus: operation: allow atomic operation allocations

Add gfp mask argument to gb_operation_create to allow operations to be
allocated in atomic context.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# e18822e3 30-Jun-2015 Viresh Kumar <viresh.kumar@linaro.org>

greybus: Rename gb_gpbridge_protocol_driver() as gb_builtin_protocol_driver()

This macro is also required by core protocols like control and svc, and
hence the 'gpbridge' name doesn't fit anymore.

Lets call this macro gb_builtin_protocol_driver().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# e9385e5d 21-May-2015 Alex Elder <elder@linaro.org>

greybus: include "gpbridge.h" from "greybus.h"

Avoid the need for all the source files to include "gpbridge.h"
by just having "greybus.h" include it.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# bdac599c 20-May-2015 Viresh Kumar <viresh.kumar@linaro.org>

greybus: Use gb_gpbridge_protocol_init()

Start using gb_gpbridge_protocol_init() in gpbridge drivers.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# 453bbea8 09-Apr-2015 John Stultz <john.stultz@linaro.org>

greybus: Move briged phy structure definitions into gpbridge.h

In order to facilitate re-use of the gpio, i2c, pwm and i2s
structures, split them out of independent files and add
them into a shared gpbridge.h

This will be a prereq to sharing these headers w/ gbsim.

Cc: Alex Elder <alex.elder@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@google.com>
CC: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# 25eb7329 19-Mar-2015 Johan Hovold <johan@kernel.org>

greybus: connection: replace custom error function with dev_err

Remove custom connection error function and replace it with dev_err.

The standard error function provides more information in the message
prefix (e.g. includes the interface id), has a well-known semantics
(e.g. does does not add newlines to messages), and is even somewhat
shorter to type.

Note that some uses of the custom function were already adding double
newlines due to the non-standard semantics.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


# 62aadeea 21-Jan-2015 Viresh Kumar <viresh.kumar@linaro.org>

greybus: i2c: fix name conflict between function and struct: gb_i2c_transfer_request

'gb_i2c_transfer_request' is the name given to a function and a struct. Though
we don't get any compilation errors/warnings about it, but the names should be
unique.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


# f281f2de 21-Jan-2015 Viresh Kumar <viresh.kumar@linaro.org>

greybus: i2c: fix name conflict between function and struct: gb_i2c_transfer_response

'gb_i2c_transfer_response' is the name given to a function and a struct. Though
we don't get any compilation errors/warnings about it, but the names should be
unique.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


# 89210f64 21-Jan-2015 Viresh Kumar <viresh.kumar@linaro.org>

greybus: remove unused version-response structs

These aren't used anymore and so can be removed.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


# 36e79dec 21-Jan-2015 Viresh Kumar <viresh.kumar@linaro.org>

greybus: create get_version() routines with the help of a macro

This gets rid of lots of duplication of code.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


# 5357cf32 21-Jan-2015 Viresh Kumar <viresh.kumar@linaro.org>

greybus: Remove "-gb" suffix from .c files

Some files are prefixed with "gb-" and some are suffixed with "-gb". The
rationale behind the first one is that the modules would be named so, i.e.
gb-*.ko. But there is no reason to keep the "-gb" suffix in the second case.

Remove the unnecessary suffix.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>