History log of /linux-master/drivers/i2c/busses/i2c-amd756.c
Revision Date Author Comments
# 9fd12f38 24-Nov-2023 Heiner Kallweit <hkallweit1@gmail.com>

i2c: 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.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Andi Shyti <andi.shyti@kernel.org>
Acked-by: Jim Cromie <jim.cromie@gmail.com> # for SCX
Signed-off-by: Wolfram Sang <wsa@kernel.org>


# c942fddf 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157

Based on 3 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 either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details

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 either version 2 of the license or at
your option any later version [author] [kishon] [vijay] [abraham]
[i] [kishon]@[ti] [com] this program is distributed in the hope that
it will be useful but without any warranty without even the implied
warranty of merchantability or fitness for a particular purpose see
the gnu general public license for more details

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 either version 2 of the license or at
your option any later version [author] [graeme] [gregory]
[gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
[kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
[hk] [hemahk]@[ti] [com] this program is distributed in the hope
that it will be useful but without any warranty without even the
implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1105 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ea734404 09-Aug-2016 Wolfram Sang <wsa-dev@sang-engineering.com>

i2c: don't print error when adding adapter fails

The core will do this for us now.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Peter Korsgaard <peter@korsgaard.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>


# ca1f8da9 04-Nov-2014 Wolfram Sang <wsa+renesas@sang-engineering.com>

i2c: remove FSF address

We have a central copy of the GPL for that. Some addresses were already
outdated.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


# 392debf1 02-Dec-2013 Jingoo Han <jg1.han@samsung.com>

i2c: remove DEFINE_PCI_DEVICE_TABLE macro

Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>


# 21d0b7c0 21-Jan-2014 Paul Gortmaker <paul.gortmaker@windriver.com>

i2c: delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>


# 0b255e92 27-Nov-2012 Bill Pemberton <wfp5p@virginia.edu>

i2c: remove __dev* attributes from subsystem

CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.

Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Peter Korsgaard <peter.korsgaard@barco.com> (for ocores and mux-gpio)
Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com> (for i2c-gpio)
Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> (for puf3)
Acked-by: Barry Song <baohua.song@csr.com> (for sirf)
Reviewed-by: Jean Delvare <khali@linux-fr.org>
[wsa: Fixed "foo* bar" flaws while we are here]
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>


# 56f21788 24-Jul-2012 Axel Lin <axel.lin@gmail.com>

i2c/busses: Use module_pci_driver

Convert the drivers in drivers/i2c/busses/* to usemodule_pci_driver()
macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Rudolf Marek <r.marek@assembler.cz>
Cc: Olof Johansson <olof@lixom.net>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Tomoya MORINAGA <tomoya.rohm@gmail.com>


# 3527bd50 12-Jan-2012 Axel Lin <axel.lin@gmail.com>

i2c: Convert to DEFINE_PCI_DEVICE_TABLE

Convert static struct pci_device_id *[] to static DEFINE_PCI_DEVICE_TABLE
tables.

Use DEFINE_PCI_DEVICE_TABLE ensures we make the pci_device_id table const
and marked as __devinitconst.

This also fixes some warnings from checkpatch:
e.g.
WARNING: Use DEFINE_PCI_DEVICE_TABLE for struct pci_device_id
#1096: FILE: i2c/busses/i2c-intel-mid.c:1096:
+static struct pci_device_id intel_mid_i2c_ids[] = {

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Rudolf Marek <r.marek@assembler.cz>
Cc: Ben Dooks <ben-linux@fluff.org>
Acked-by: Olof Johansson <olof@lixom.net>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Acked-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Cc: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Feng Tang <feng.tang@intel.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>


# 21782180 21-May-2010 H Hartley Sweeten <hartleys@visionengravers.com>

i2c: Use <linux/io.h> instead of <asm/io.h>

As warned by checkpatch.pl, <linux/io.h> should be used instead of
<asm/io.h>.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>


# 4111ecd2 01-Mar-2010 Márton Németh <nm127@freemail.hu>

i2c: Make PCI device ids constant

The id_table field of the struct pci_driver is constant in <linux/pci.h>
so it is worth to make initialization data also constant.

The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
struct I1 {
...
const struct I2 *x;
...
};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
struct I1 y = {
.x = E,
};
@c@
identifier r.I2;
identifier s.E;
@@
const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+ const
struct I2 E[] = ...;
// </smpl>

Signed-off-by: Márton Németh <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>


# 18669eab 04-Oct-2009 Jean Delvare <khali@linux-fr.org>

i2c: Hide probe errors caused by ACPI resource conflicts

When an ACPI resource conflict is detected, error messages are already
printed by ACPI. There's no point in causing the driver core to print
more error messages, so return one of the error codes for which no
message is printed.

This fixes bug #14293:
http://bugzilla.kernel.org/show_bug.cgi?id=14293

Signed-off-by: Jean Delvare <khali@linux-fr.org>


# 4ccc28f7 05-May-2009 Roel Kluin <roel.kluin@gmail.com>

i2c: Timeouts off by 1

with while (timeout++ < MAX_TIMEOUT); timeout reaches MAX_TIMEOUT + 1
after the loop, so the tests below are off by one.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>


# 1745522c 26-Jan-2009 Jean Delvare <khali@linux-fr.org>

i2c: Delete many unused adapter IDs

Signed-off-by: Jean Delvare <khali@linux-fr.org>


# 66c7acf6 07-Jan-2009 Jean Delvare <khali@linux-fr.org>

i2c: Use snprintf to set adapter names

Use snprintf instead of sprintf to set adapter names, it's safer.

Signed-off-by: Jean Delvare <khali@linux-fr.org>


# b41d6cf3 17-Aug-2008 Jean Delvare <khali@linux-fr.org>

PCI: Check dynids driver_data value for validity

Only accept dynids whose driver_data value matches one of the driver's
pci_driver_id entries. This prevents the user from accidentally passing
values the drivers do not expect.

Cc: Milton Miller <miltonm@bga.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>


# edbc25ca 10-Jul-2008 Milton Miller <miltonm@bga.com>

PCI: remove dynids.use_driver_data

The driver flag dynids.use_driver_data is almost consistently not set,
and causes more problems than it solves. It was initially intended as a
flag to indicate whether a driver's usage of driver_data had been
carefully inspected and was ready for values from userspace. That audit
was never done, so most drivers just get a 0 for driver_data when new
IDs are added from userspace via sysfs. So remove the flag, allowing
drivers to see the data directly (a followon patch validates the passed
driver_data value against what the drivers expect).

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>


# 954a9930 14-Jul-2008 Jean Delvare <khali@linux-fr.org>

i2c: Drop stray references to lm_sensors

Signed-off-by: Jean Delvare <khali@linux-fr.org>


# 54fb4a05 14-Jul-2008 Jean Delvare <jdelvare@suse.de>

i2c: Check for ACPI resource conflicts

Check for ACPI resource conflicts in i2c bus drivers. I've included
all recent SMBus master drivers for PC hardware.

I've voluntarily left out:
* Drivers that don't run on PCs: they can't conflict with ACPI.
* Bit-banged bus device drivers: it's very unlikely that ACPI would
deal with such buses.

Signed-off-by: Jean Delvare <jdelvare@suse.de>


# 3401b2ff 14-Jul-2008 Jean Delvare <khali@linux-fr.org>

i2c: Let bus drivers add SPD to their class

Let general purpose I2C/SMBus bus drivers add SPD to their class. Once
this is done, we will be able to tell the eeprom driver to only probe
for SPD EEPROMs and similar on these buses.

Note that I took a conservative approach here, adding I2C_CLASS_SPD to
many drivers that have no idea whether they can host SPD EEPROMs or not.
This is to make sure that the eeprom driver doesn't stop probing buses
where SPD EEPROMs or equivalent live.

So, bus driver maintainers and users should feel free to remove the SPD
class from drivers those buses never have SPD EEPROMs or they don't
want the eeprom driver to bind to them. Likewise, feel free to add the
SPD class to any bus driver I might have missed.

Signed-off-by: Jean Delvare <khali@linux-fr.org>


# ac7fc4fb 14-Jul-2008 Jean Delvare <khali@linux-fr.org>

i2c: Consistently reject unsupported transactions

Many PC SMBus host controller drivers don't properly handle the case
where they are requested to achieve a transaction they do not support.
Update them so that the consistently print a warning message and
return a single error value in this case.

Signed-off-by: Jean Delvare <khali@linux-fr.org>


# 97140342 14-Jul-2008 David Brownell <david-b@pacbell.net>

i2c: Bus drivers return -Errno not -1

Tighten error paths used by various i2c adapters (mostly x86) so
they return real fault/errno codes instead of a "-1" (which is
most often interpreted as "-EPERM"). Build tested, with eyeball
review.

One minor initial goal is to have adapters consistently return
the code "-ENXIO" when addressing a device doesn't get an ACK
response, at least in the probe paths where they are already
good at stifling related logspam.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>


# 875b0a47 18-May-2008 Jean Delvare <khali@linux-fr.org>

i2c-amd756: Fix functionality flags

The i2c-amd756 driver pretends to support SMBus process call
transactions but actually does not. Fix it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>


# 5edc68b8 12-Mar-2008 Adrian Bunk <bunk@kernel.org>

i2c-amd756: Fix off-by-one

This patch fixes an off-by-one error spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>


# 0f07a24b 27-Jan-2008 Jean Delvare <khali@linux-fr.org>

i2c: Let the user specify PCI driver data through new_id

The i2c-amd756 and i2c-viapro drivers make use of the driver_data
field of the PCI device ID. When adding device IDs dynamically (by
writing to the new_id sysfs file) you cannot set the value of this
field by default. It has to be allowed explicitly. Do that, and
check the value so that the user can't crash the kernel accidentally.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>


# 405ae7d3 17-Feb-2007 Robert P. J. Day <rpjday@mindspring.com>

Replace remaining references to "driverfs" with "sysfs".

Globally, s/driverfs/sysfs/g.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>


# cd354f1a 14-Feb-2007 Tim Schmielau <tim@physik3.uni-rostock.de>

[PATCH] remove many unneeded #includes of sched.h

After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there. Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.

To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.

Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm. I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 9ace555d 13-Feb-2007 Stephen Hemminger <shemminger@osdl.org>

i2c: Add IDs to adapters

IDs have been defined but not used by most of the I2C adapters.
By having a unique ID, clients can check for correct connection
during probe.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>


# 8f9082c5 03-Sep-2006 Jean Delvare <khali@linux-fr.org>

i2c: Constify i2c_algorithm declarations, part 2

i2c: Constify i2c_algorithm declarations, part 2

Make struct i2c_algorithm declarations const in all i2c bus drivers
where it is possible.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 249bb070 04-Nov-2005 Greg Kroah-Hartman <gregkh@suse.de>

[PATCH] PCI: removed unneeded .owner field from struct pci_driver

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# ccd7aa0c 17-Oct-2005 Laurent Riffard <laurent.riffard@free.fr>

[PATCH] Owner field additions to many i2c drivers, 1 of 5

This patch updates .owner field for various struct pci_driver variables.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# d6072f84 25-Sep-2005 Jean Delvare <khali@linux-fr.org>

[PATCH] i2c: Reuse name strings in i2c bus drivers

Clean up name string usage in 12 i2c bus drivers:
* Use the i2c_adapter name for requesting the I/O region rather than
redefining a new string.
* Do not initialize the i2c_adapter name to "unset".
This should save a few data bytes here and there.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

drivers/i2c/busses/i2c-ali1535.c | 6 +++---
drivers/i2c/busses/i2c-ali1563.c | 6 ++++--
drivers/i2c/busses/i2c-ali15x3.c | 5 +++--
drivers/i2c/busses/i2c-amd756.c | 5 ++---
drivers/i2c/busses/i2c-amd8111.c | 4 +++-
drivers/i2c/busses/i2c-i801.c | 4 ++--
drivers/i2c/busses/i2c-nforce2.c | 4 ++--
drivers/i2c/busses/i2c-piix4.c | 4 ++--
drivers/i2c/busses/i2c-sis5595.c | 5 +++--
drivers/i2c/busses/i2c-sis630.c | 6 ++++--
drivers/i2c/busses/i2c-sis96x.c | 5 +++--
drivers/i2c/busses/i2c-via.c | 4 ++--
12 files changed, 33 insertions(+), 25 deletions(-)


# 60507095 25-Sep-2005 Jean Delvare <khali@linux-fr.org>

[PATCH] i2c: Discard explicit static initializations to 0

Kill explicit static initializations to 0 in 10 i2c drivers.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

drivers/i2c/algos/i2c-algo-pca.c | 2 +-
drivers/i2c/algos/i2c-algo-sibyte.c | 2 +-
drivers/i2c/busses/i2c-ali15x3.c | 4 ++--
drivers/i2c/busses/i2c-amd756.c | 2 +-
drivers/i2c/busses/i2c-iop3xx.c | 2 +-
drivers/i2c/busses/i2c-piix4.c | 8 ++++----
drivers/i2c/busses/i2c-sis5595.c | 4 ++--
drivers/i2c/busses/i2c-sis630.c | 2 +-
drivers/i2c/busses/i2c-sis96x.c | 2 +-
drivers/i2c/busses/i2c-via.c | 2 +-
10 files changed, 15 insertions(+), 15 deletions(-)


# 1d8b9e1b 11-Aug-2005 Jean Delvare <khali@linux-fr.org>

[PATCH] I2C: Kill i2c_algorithm.id (4/7)

There are no more users of i2c_algorithm.id, so we can finally drop
this structure member.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 97518588 11-Aug-2005 Jean Delvare <khali@linux-fr.org>

[PATCH] I2C: Kill i2c_algorithm.name (1/7)

The name member of the i2c_algorithm is never used, although all
drivers conscientiously fill it. We can drop it completely, this
structure doesn't need to have a name.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# f0bb60e7 16-Apr-2005 Alexey Dobriyan <adobriyan@mail.ru>

[PATCH] I2C: drivers/i2c/*: #include <linux/config.h> cleanup

Files that don't use CONFIG_* stuff shouldn't include config.h
Files that use CONFIG_* stuff should include config.h

It's that simple. ;-)

Signed-off-by: Alexey Dobriyan <adobriyan@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 1da177e4 16-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org>

Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!