01 Jul, 2013
1 commit
-
A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit or error. This is obsolete meanwhile, the core will do it.Signed-off-by: Wolfram Sang
Signed-off-by: Benjamin Herrenschmidt
15 Nov, 2012
1 commit
-
Use the module_i2c_driver() macro to make the code smaller
and a bit simpler.dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)Signed-off-by: Wei Yongjun
Signed-off-by: Benjamin Herrenschmidt
09 May, 2012
1 commit
-
We no longer get the device node in platform_data but instead
where it belongs in struct device, so get it from there instead
of blowing up.Signed-off-by: Benjamin Herrenschmidt
03 May, 2012
1 commit
-
Fixes these build warnings:
drivers/macintosh/windfarm_smu_sat.c: In function 'wf_sat_probe':
drivers/macintosh/windfarm_smu_sat.c:290:3: warning: passing argument 1 of 'snprintf' discards qualifiers from pointer target type
include/linux/kernel.h:323:5: note: expected 'char *' but argument is of type 'const char *'
drivers/macintosh/windfarm_smu_sat.c:317:3: warning: passing argument 1 of 'snprintf' discards qualifiers from pointer target type
include/linux/kernel.h:323:5: note: expected 'char *' but argument is of type 'const char *'Introduced by commit e074d08e2b98 ("powerpc/windfarm: const'ify and add
"priv" field to controls & sensors").Signed-off-by: Stephen Rothwell
Signed-off-by: Benjamin Herrenschmidt
30 Apr, 2012
1 commit
-
This simplifies the driver to stop using the deprecated attach interface.
While at it we also implement teardown properly and fix the refcounting
by using a kref.Signed-off-by: Benjamin Herrenschmidt
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
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
03 Dec, 2008
1 commit
-
i2c_smbus_read_word_data() returns a s32, which may be negative
but unsigned len cannot be negative.Signed-off-by: Roel Kluin
Signed-off-by: Paul Mackerras
05 May, 2008
1 commit
-
Signed-off-by: Daniel Walker
Signed-off-by: Andrew Morton
Acked-by: Benjamin Herrenschmidt
Signed-off-by: Paul Mackerras
19 Apr, 2008
1 commit
-
Signed-off-by: Matthew Wilcox
17 Aug, 2007
1 commit
-
Signed-off-by: Stephen Rothwell
Signed-off-by: Paul Mackerras
12 Jul, 2007
1 commit
-
Let the drivers specify how many bytes they want to read with
i2c_smbus_read_i2c_block_data(). So far, the block count was
hard-coded to I2C_SMBUS_BLOCK_MAX (32), which did not make much sense.
Many driver authors complained about this before, and I believe it's
about time to fix it. Right now, authors have to do technically stupid
things, such as individual byte reads or full-fledged I2C messaging,
to work around the problem. We do not want to encourage that.I even found that some bus drivers (e.g. i2c-amd8111) already
implemented I2C block read the "right" way, that is, they didn't
follow the old, broken standard. The fact that it was never noticed
before just shows how little i2c_smbus_read_i2c_block_data() was used,
which isn't that surprising given how broken its prototype was so far.There are some obvious compatiblity considerations:
* This changes the i2c_smbus_read_i2c_block_data() prototype. Users
outside the kernel tree will notice at compilation time, and will
have to update their code.
* User-space has access to i2c_smbus_xfer() directly using i2c-dev, so
the changed expectations would affect tools such as i2cdump. In order
to preserve binary compatibility, we give I2C_SMBUS_I2C_BLOCK_DATA
a new numeric value, and define I2C_SMBUS_I2C_BLOCK_BROKEN with the
old numeric value. When i2c-dev receives a transaction with the
old value, it can convert it to the new format on the fly.Signed-off-by: Jean Delvare
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
30 Sep, 2006
1 commit
-
Signed-off-by: Alexey Dobriyan
Acked-by: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
31 Jul, 2006
1 commit
-
Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.powermac platform & macintosh driver changes.
Built for pmac32_defconfig, g5_defconfig
Signed-off-by: Jeremy Kerr
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
18 Feb, 2006
1 commit
-
The windfarm_pm112 module relies on smu_sat_get_sdb_partition which is in
windfarm_smu_sat.c but is not exported to modules, so despite Kconfig
having the option to build the pm112 as modules, this can never be loaded.This patch fixes that by exporting smu_sat_get_sdb_partition with
EXPORT_SYMBOL_GPLSigned-off-by: Johannes Berg
Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Feb, 2006
1 commit
-
This patch adds a windfarm module, windfarm_pm112, for the dual core G5s
(both 2 and 4 core models), keeping the machine from getting into
vacuum-cleaner mode ;) For proper credits, the patch was initially
written by Paul Mackerras, and slightly reworked by me to add overtemp
handling among others. The patch also removes the sysfs attributes from
windfarm_pm81 and windfarm_pm91 and instead adds code to the windfarm
core to automagically expose attributes for sensor & controls.Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Linus Torvalds