03 Jun, 2010
1 commit
-
I2C drivers can use the clientdata-pointer to point to private data. As I2C
devices are not really unregistered, but merely detached from their driver, it
used to be the drivers obligation to clear this pointer during remove() or a
failed probe(). As a couple of drivers forgot to do this, it was agreed that it
was cleaner if the i2c-core does this clearance when appropriate, as there is
no guarantee for the lifetime of the clientdata-pointer after remove() anyhow.
This feature was added to the core with commit
e4a7b9b04de15f6b63da5ccdd373ffa3057a3681 to fix the faulty drivers.As there is no need anymore to clear the clientdata-pointer, remove all current
occurrences in the drivers to simplify the code and prevent confusion.Signed-off-by: Wolfram Sang
Acked-by: Mark Brown
Acked-by: Greg Kroah-Hartman
Acked-by: Richard Purdie
Acked-by: Dmitry Torokhov
Signed-off-by: Jean Delvare
09 Feb, 2010
1 commit
-
machine is compatible is an OF-specific call. It should have
the of_ prefix to protect the global namespace.Signed-off-by: Grant Likely
Acked-by: Michal Simek
05 Oct, 2009
1 commit
-
If i2c device probing fails, then there is no driver to dereference
after calling i2c_new_device(). Stop assuming that probing will always
succeed, to avoid NULL pointer dereferences. We have an easier access
to the driver anyway.Signed-off-by: Jean Delvare
Tested-by: Tim Shepard
Cc: Colin Leroy
16 Jun, 2009
1 commit
-
The legacy i2c binding model is going away soon, so convert the
macintosh windfarm drivers to the new model or they will break.Signed-off-by: Jean Delvare
Tested-by: Johannes Berg
Tested-by: Paul Mackerras
Cc: Benjamin Herrenschmidt
29 Apr, 2008
1 commit
-
This implements a new driver named windfarm_pm121, which drives the
fans on PowerMac 12,1 machines : iMac G5 iSight (rev C) 17" and
20". It's based on the windfarm_pm81 driver from Benjamin
Herrenschmidt.This includes fixes from David Woodhouse correcting the names of some
of the sensors.Signed-off-by: Étienne Bersac
Signed-off-by: David Woodhouse
Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Paul Mackerras
20 Jul, 2007
1 commit
-
Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).
Here is a short excerpt of the semantic patch performing
this transformation:@@
type T2;
expression x;
identifier f,fld;
expression E;
expression E1,E2;
expression e1,e2,e3,y;
statement S;
@@x =
- kmalloc
+ kzalloc
(E1,E2)
... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
- memset((T2)x,0,E1);@@
expression E1,E2,E3;
@@- kzalloc(E1 * E2,E3)
+ kcalloc(E1,E2,E3)[akpm@linux-foundation.org: get kcalloc args the right way around]
Signed-off-by: Yoann Padioleau
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Acked-by: Russell King
Cc: Bryan Wu
Acked-by: Jiri Slaby
Cc: Dave Airlie
Acked-by: Roland Dreier
Cc: Jiri Kosina
Acked-by: Dmitry Torokhov
Cc: Benjamin Herrenschmidt
Acked-by: Mauro Carvalho Chehab
Acked-by: Pierre Ossman
Cc: Jeff Garzik
Cc: "David S. Miller"
Acked-by: Greg KH
Cc: James Bottomley
Cc: "Antonino A. Daplas"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 May, 2007
1 commit
-
for consistency with other Open Firmware interfaces (and Sparc).
This is just a straight replacement.
This leaves the compatibility define in place.
Signed-off-by: Stephen Rothwell
Signed-off-by: Paul Mackerras
27 Apr, 2007
1 commit
-
This does drivers/machintosh and the hvc code.
Signed-off-by: Stephen Rothwell
Signed-off-by: Paul Mackerras
26 Apr, 2007
1 commit
-
This reverts commit d05c7a80cf39ae7d0f8d0c3e47c93d51fcd393d3,
which included changes which should go via other subsystem
maintainers.
13 Apr, 2007
1 commit
-
Signed-off-by: Stephen Rothwell
Acked-by: Benjamin Herrenschmidt
Signed-off-by: Paul Mackerras
23 Mar, 2006
1 commit
-
Cleanup the use of i2c headers in macintosh drivers.
Signed-off-by: Jean Delvare
Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Paul Mackerras
03 Mar, 2006
1 commit
-
Some of the windfarm sensor modules can initialize on old machines that
don't have full windfarm support like non-dual core desktop G5s.
Unfortunately, by doing so, they would trigger a bug in their matching
algorithm causing them to attach to the wrong bus, thus triggering
issues with the i2c core and breaking the thermal driver.This patch fixes the probing issue (so that they will work when a
windfarm port is done to these machines) and also prevents for now
windfarm to load at all on these machines that still use therm_pm72 to
avoid wasting resources.Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Paul Mackerras
09 Jan, 2006
1 commit
-
This is the continuation of the previous patch. This one removes the old
PowerMac i2c drivers (i2c-keywest and i2c-pmac-smu) and replaces them
both with a single stub driver that uses the new PowerMac low i2c layer.Now that i2c-keywest is gone, the low-i2c code is extended to support
interrupt driver transfers. All i2c busses now appear as platform
devices. Compatibility with existing drivers should be maintained as the
i2c bus names have been kept identical, except for the SMU bus but in
that later case, all users has been fixed.With that patch added, matching a device node to an i2c_adapter becomes
trivial.Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Paul Mackerras
07 Jan, 2006
2 commits
-
therm_pm72.c and windfarm_lm75_sensor.c both store the return from
i2c_add_driver() but do no further processing on the result. Simply return
what i2c_add_driver() did, instead.Signed-off-by: Arthur Othieno
Acked-by: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
06 Jan, 2006
3 commits
-
Now that i2c_add_driver() doesn't need the module owner to be set by
hand, we can delete it from the drivers. This patch catches all of the
drivers that I found in the current tree (if a driver sets the .owner by
hand, it's not a problem, just not needed.)Signed-off-by: Greg Kroah-Hartman
Cc: Jean Delvare -
We should use the i2c_driver.driver's .name and .owner fields
instead of the i2c_driver's ones.This patch updates the drivers for macintosh.
Signed-off-by: Laurent Riffard
Signed-off-by: Jean Delvare
Acked-by: Benjamin Herrenschmidt
Signed-off-by: Greg Kroah-Hartman -
Just about every i2c chip driver sets the I2C_DF_NOTIFY flag, so we
can simply make it the default and drop the flag. If any driver really
doesn't want to be notified when i2c adapters are added, that driver
can simply omit to set .attach_adapter. This approach is also more
robust as it prevents accidental NULL pointer dereferences.Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
08 Nov, 2005
1 commit
-
This adds a new thermal control framework for PowerMac, along with the
implementation for PowerMac8,1, PowerMac8,2 (iMac G5 rev 1 and 2), and
PowerMac9,1 (latest single CPU desktop). In the future, I expect to move
the older G5 thermal control to the new framework as well.Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Paul Mackerras