History log of /linux-master/drivers/i2c/busses/i2c-ali1535.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>


# 9d633683 25-Jun-2021 Wolfram Sang <wsa@kernel.org>

i2c: ali1535: mention that the device should not be disabled

The comment from the i801 driver is valid here, too, so copy it.

Reported-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>


# f80531c8 11-Jun-2020 Jarkko Nikula <jarkko.nikula@linux.intel.com>

i2c: Use separate MODULE_AUTHOR() statements for multiple authors

Modules with multiple authors should use multiple MODULE_AUTHOR()
statements according to comment in include/linux/module.h.

Split the i2c modules with multiple authors to use multiple
MODULE_AUTHOR() statements.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
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>


# 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>


# 65a2d74b 12-Jan-2012 corentin.labbe <corentin.labbe@geomatys.fr>

i2c-ali1535: enable SPARC support

The i2c-ali1535 driver doesn't work on SPARC, because it assumes that
ioport address are 16-bit wide (address stored in an unsigned short).
But on SPARC arch, ioports are mapped in memory and so must be stored
in an unsigned long.

Use pci_resource_start for getting IOMEM base address, then read the
SMBBA of the i2c bus and use these together for I/O access.

I would like to thank Jean DELVARE for reviewing my patch.

Signed-off-by: LABBE Corentin <corentin.labbe@geomatys.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>


# 7c1f59c9 12-Jan-2012 Jean Delvare <khali@linux-fr.org>

i2c: Fix error value returned by several bus drivers

When adding checks for ACPI resource conflicts to many bus drivers,
not enough attention was paid to the error paths, and for several
drivers this causes 0 to be returned on error in some cases. Fix this
by properly returning a non-zero value on every error.

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


# 3fea5df4 25-Jul-2011 LABBE Corentin <corentin.labbe@geomatys.fr>

i2c-ali1535: Fix style issues

This is a fix-style patch for i2c-ali1535 (issues reported by
checkpatch.pl.)

Signed-off-by: LABBE Corentin <corentin.labbe@geomatys.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>


# 25985edc 30-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi>

Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>


# 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>


# abe38388 06-Dec-2009 Jean Delvare <khali@linux-fr.org>

i2c: Add missing __devinit markers to old i2c adapter drivers

These _setup functions are called from _probe so they can be marked
__devinit.

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>


# 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>


# 2096b956 01-May-2007 David Brownell <david-b@pacbell.net>

i2c: Shrink struct i2c_client

This shrinks the size of "struct i2c_client" by 40 bytes:

- Substantially shrinks the string used to identify the chip type
- The "flags" don't need to be so big
- Removes some internal padding

It also adds kerneldoc for that struct, explaining how "name" is really a
chip type identifier; it's otherwise potentially confusing.

Because the I2C_NAME_SIZE symbol was abused for both i2c_client.name
and for i2c_adapter.name, this needed to affect i2c_adapter too. The
adapters which used that symbol now use the more-obviously-correct
idiom of taking the size of that field.

JD: Shorten i2c_adapter.name from 50 to 48 bytes while we're here, to
avoid wasting space in padding.

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


# 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>


# 0cbcb4d3 27-Feb-2006 Jean Delvare <khali@linux-fr.org>

[PATCH] I2C: i2c-ali1535: Drop redundant mutex

Drop a redundant mutex in driver i2c-ali1535. The struct i2c_adapter
includes a mutex for the same purpose, operated by i2c-core.

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


# 3fb9a655 18-Jan-2006 Jean Delvare <khali@linux-fr.org>

[PATCH] i2c: Semaphore to mutex conversions, part 3

Cleanup after the semaphores to mutexes conversions in the i2c
subsystem.

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


# b3585e4f 11-Jan-2006 Arjan van de Ven <arjan@infradead.org>

[PATCH] I2C: Convert i2c to mutexes

The patch below converts a few i2c semaphores to mutexes

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
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(-)


# 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!