27 May, 2011
6 commits
-
Add support for the Maxim/Dallas DS2780 Stand-Alone Fuel Gauge IC.
It was suggested to combine this functionality with the current ds2782
driver. Unfortunately, I'm unable to commit the time to refactoring this
driver to that extent and I don't have a platform with the ds2782 part to
validate that there are no regression issues by adding this functionality.[akpm@linux-foundation.org: use min_t()]
Signed-off-by: Clifton Barnes
Tested-by: Haojian Zhuang
Cc: Evgeniy Polyakov
Cc: Ryan Mallon
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Reorganize so the netlink connector one wire search command will update
the kernel list of detected slave devices. Otherwise, a newly detected
device is unusable because unless it's in the kernel list of known devices
any commands will result in ENODEV status.Signed-off-by: David Fries
Cc: Evgeniy Polyakov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This adds multi-slave support of the w1 bus for the ds1wm Synthesizable
1-Wire Bus Master. Also many fixes and tweaks based on the rev3 of the
datasheet http://datasheets.maxim-ic.com/en/ds/DS1WM.pdfSigned-off-by: Jean-François Dagenais
Cc: Evgeniy Polyakov
Cc: Szabolcs Gyurko
Cc: Matt Reimer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This DS2408 w1 slave driver is not complete for all the features of the
chip, but its sufficient if you use it as a simple IO expander.[randy.dunlap@oracle.com: fix w1_ds2408.c printk formats]
Signed-off-by: Jean-François Dagenais
Cc: Evgeniy Polyakov
Cc: Szabolcs Gyurko
Cc: Matt Reimer
Signed-off-by: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The first patch adds generic functionnality to w1_io for Resume Command
[A5h] lots of slaves support. I found it useful for multi-commands/reset
workflows with the same slave on a multi-slave bus.This DS2408 w1 slave driver is not complete for all the features of the
chip, but its sufficient if you use it as a simple IO expander. Enjoy!The ds1wm had Kconfig dependencies towards ARM && HAVE_CLK. I took them
out since I was using the ds1wm on an x86_64 platform (ds1wm in a FPGA
through pcie) and found them irrelevant.The clock freq/divisors at the top of ds1wm.c did not have the MSB set to
1. This bit is CLK_EN which turns the whole prescaler and dividers on.
The driver never mentionned this bit either, so I just included this bit
right in the table entries. I also took the liberty to add a couple of
entries to the table. The spec doesn't explicitely mentions these
possibilities but the description and examination of the core shows the
prescalers & dividers can be used for more than the table explicitely
shows. The table I enlarged still doesn't cover all possibilities, but
it's a good start.I also made a few tweaks to a couple of the read and write algorithms
which made sense while I had my head very deep in the ds1wm documentation.
We stressed it a lot with 10+ slaves on the bus, many ds2408, ds2431 and
ds2433 at the same time doing extensive interaction. It proved quite
stable in our production environment.This patch:
Add generic functionnality to w1_io for Resume Command [A5h] lots of
slaves support.Signed-off-by: Jean-François Dagenais
Cc: Evgeniy Polyakov
Cc: Szabolcs Gyurko
Cc: Matt Reimer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
With the addition of the platform device mfd_cell pointer, we can now
cleanly pass the sub device drivers platform data pointers through the
regular device platform_data one, and get rid of mfd_get_data().Cc: Matt Reimer
Cc: Philipp Zabel
Signed-off-by: Samuel Ortiz
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
29 Mar, 2011
1 commit
-
Scripted with coccinelle.
Signed-off-by: Thomas Gleixner
23 Mar, 2011
3 commits
-
mfd_get_cell returns a const, so change the ds1wm client to store
a const mfd cell. This silences type mismatch warnings.Since we're guaranteed to have the mfd_cell, we can also simplify
the code a bit to get rid of a temporary variable and NULL check.Signed-off-by: Andres Salomon
Signed-off-by: Samuel Ortiz -
Use mfd_data for passing information from mfd drivers to mfd
clients. The mfd_cell's driver_data field is being phased out.Clients that were using driver_data now access .mfd_data
via mfd_get_data(). This changes ds1wm only; mfd drivers with
other cells are not modified, with the exception of led_cell.The led_cell.driver_data line is dropped from htc-pasic3.c in this
patch as well. It's not used in mainline (there's no leds-pasic3
platform driver), so it should be safe to take care of that here.Signed-off-by: Andres Salomon
Signed-off-by: Samuel Ortiz -
No need to explicitly set the cell's platform_data/data_size.
Modify clients to use mfd_get_cell helper function instead of
accessing platform_data directly.Signed-off-by: Andres Salomon
Signed-off-by: Samuel Ortiz
17 Feb, 2011
1 commit
-
…16x' into omap-for-linus
12 Feb, 2011
1 commit
-
This code makes two calls to clk_get, then test both return values and
fails if either failed.The problem is that in the first inner if, where the first call to
clk_get has failed, it don't know if the second call has failed as well.
So it don't know whether clk_get should be called on the result of the
second call. Of course, it would be possible to test that value again.
A simpler solution is just to test the result of calling clk_get
directly after each call.The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)//
@r@
position p1,p2;
expression e;
statement S;
@@e = clk_get@p1(...)
...
if@p2 (IS_ERR(e)) S@@
expression e;
statement S;
identifier l;
position r.p1, p2 != r.p2;
@@*e = clk_get@p1(...)
... when != clk_put(e)
*if@p2 (...)
{
... when != clk_put(e)
* return ...;
}//Signed-off-by: Julia Lawall
Cc: Evgeniy Polyakov
Acked-by: Tony Lindgren
Acked-by: Amit Kucheria
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
28 Jan, 2011
1 commit
-
We want to have just CONFIG_ARCH_OMAP2, 3 and 4. The rest
are nowadays just subcategories of these.Search and replace the following:
ARCH_OMAP2420 SOC_OMAP2420
ARCH_OMAP2430 SOC_OMAP2430
ARCH_OMAP3430 SOC_OMAP3430No functional changes.
Signed-off-by: Tony Lindgren
Signed-off-by: Thomas Weber
Acked-by: Sourav Poddar
14 Jan, 2011
1 commit
-
This is a 1-wire/w1 DS2423 slave driver for reading the values from all 4
counters available DS2423 devices by using standard w1_slave file. In
ds2423 the counters are tied to ram pages 12-15 in and each of those
ram-pages. Each of these counter values (and asoociated ram page values)
are represented as a own line in w1_slave file. Driver has been tested on
mips and x86.usage example:
cat /sys/bus/w1/devices/1d-00000009b964/w1_slave00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff
ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
00 02 00 00 00 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff
ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
00 5a 0e 5f 18 00 00 00 00 0b 28 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff
ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=408882778
00 05 00 00 00 00 00 00 00 8d 39 ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff crc=YES c=5Patch includes also the documentation.
[randy.dunlap@oracle.com: fix ds2423 build, needs to select CRC16]
Signed-off-by: Mika Laitio
Signed-off-by: Randy Dunlap
Cc: Evgeniy Polyakov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
28 Oct, 2010
1 commit
-
The search/pullup/add/remove device attributes were 0666 which would allow
arbitrary users to affect the 1 wire bus. Change to 0664 to prevent that.I found this patch in the Android tree, apparently this has never been
sent upstream so doing it now.Signed-off-by: Brian Swetland
Signed-off-by: Linus Walleij
Cc: Evgeniy Polyakov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 May, 2010
1 commit
-
This allows bin_attr->read,write,mmap callbacks to check file specific data
(such as inode owner) as part of any privilege validation.Signed-off-by: Chris Wright
Signed-off-by: Greg Kroah-Hartman
25 Apr, 2010
2 commits
-
Fixes the following error:
drivers/w1/masters/omap_hdq.c: In function 'hdq_wait_for_flag':
drivers/w1/masters/omap_hdq.c:137: error: implicit declaration of function 'schedule_timeout_uninterruptible'
drivers/w1/masters/omap_hdq.c: In function 'hdq_write_byte':
drivers/w1/masters/omap_hdq.c:177: error: 'TASK_UNINTERRUPTIBLE' undeclared (first use in this function)
drivers/w1/masters/omap_hdq.c:177: error: (Each undeclared identifier is reported only once
drivers/w1/masters/omap_hdq.c:177: error: for each function it appears in.)
drivers/w1/masters/omap_hdq.c:177: error: implicit declaration of function 'schedule_timeout'
drivers/w1/masters/omap_hdq.c: In function 'hdq_isr':
drivers/w1/masters/omap_hdq.c:221: error: 'TASK_NORMAL' undeclared (first use in this function)
drivers/w1/masters/omap_hdq.c: In function 'omap_hdq_break':
drivers/w1/masters/omap_hdq.c:316: error: 'TASK_UNINTERRUPTIBLE' undeclared (first use in this function)Signed-off-by: Amit Kucheria
Acked-by: Tony Lindgren
Cc: Evgeniy Polyakov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix regression caused by commit 507e2fbaaacb6f164b4125b87c5002f95143174b
("w1: w1 temp calculation overflow fix") whereby negative temperatures for
the DS18B20 are not converted properly.When the temperature exceeds 32767 milli-degrees the temperature overflows
to -32768 millidegrees. These are both well within the -55 - +125 degree
range for the sensor.Addresses https://bugzilla.kernel.org/show_bug.cgi?id=12646
Signed-of-by: Ian Dall
Cc: Evgeniy Polyakov
Tested-by: Karsten Elfenbein
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Mar, 2010
1 commit
-
…it slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
13 Mar, 2010
3 commits
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (56 commits)
doc: fix typo in comment explaining rb_tree usage
Remove fs/ntfs/ChangeLog
doc: fix console doc typo
doc: cpuset: Update the cpuset flag file
Fix of spelling in arch/sparc/kernel/leon_kernel.c no longer needed
Remove drivers/parport/ChangeLog
Remove drivers/char/ChangeLog
doc: typo - Table 1-2 should refer to "status", not "statm"
tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in comments
No need to patch AMD-provided drivers/gpu/drm/radeon/atombios.h
devres/irq: Fix devm_irq_match comment
Remove reference to kthread_create_on_cpu
tree-wide: Assorted spelling fixes
tree-wide: fix 'lenght' typo in comments and code
drm/kms: fix spelling in error message
doc: capitalization and other minor fixes in pnp doc
devres: typo fix s/dev/devm/
Remove redundant trailing semicolons from macros
fix typo "definetly" -> "definitely" in comment
tree-wide: s/widht/width/g typo in comments
...Fix trivial conflict in Documentation/laptops/00-INDEX
-
This fixes the section mismatch warning for mxc_w1_probe()
Cc: Evgeniy Polyakov
Cc: Sascha Hauer
Acked-by: Uwe Kleine-König
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
With `while (++retries < DS2482_WAIT_IDLE_TIMEOUT)' retries reaches
DS2482_WAIT_IDLE_TIMEOUT after the loopSigned-off-by: Roel Kluin
Cc: Evgeniy Polyakov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Mar, 2010
2 commits
-
Conflicts:
Documentation/filesystems/proc.txt
arch/arm/mach-u300/include/mach/debug-macro.S
drivers/net/qlge/qlge_ethtool.c
drivers/net/qlge/qlge_main.c
drivers/net/typhoon.c -
A pointer to omap_hdq_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.Signed-off-by: Uwe Kleine-König
Cc: Stanley.Miao
Acked-by: Evgeniy Polyakov
Cc: Andrew Morton
Cc: Madhusudhan Chikkature
Cc: Felipe Balbi
Signed-off-by: Greg Kroah-Hartman
16 Feb, 2010
1 commit
-
Replace ARCH_OMAP34XX with ARCH_OMAP3
Signed-off-by: Tony Lindgren
05 Feb, 2010
1 commit
-
Trivial patch which adds the __init/__exit macros to the module_init/
module_exit functions ofdrivers/w1/w1.c
Signed-off-by: Peter Huewe
Signed-off-by: Jiri Kosina
05 Oct, 2009
1 commit
-
There is no point in implementing a detect callback for the DS2482, as
this device can't be detected. It was there solely to handle "force"
module parameters to instantiate devices, but now we have a better sysfs
interface that can do the same.So we can get rid of the ugly module parameters and the detect callback.
This shrinks the binary module size by 21%.Signed-off-by: Jean Delvare
Acked-by: Ben Gardner
03 Oct, 2009
1 commit
-
Signed-off-by: Philipp Reisner
Acked-by: Lars Ellenberg
Acked-by: Evgeniy Polyakov
Signed-off-by: David S. Miller
13 Aug, 2009
1 commit
-
Conflicts:
arch/microblaze/include/asm/socket.h
08 Aug, 2009
1 commit
-
This was found using a semantic patch, more info can be found at:
http://www.emn.fr/x-info/coccinelle/Signed-off-by: Stoyan Gaydarov
Acked-by: Evgeniy Polyakov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
18 Jul, 2009
1 commit
-
The connector documentation states that the argument to the callback
function is always a pointer to a struct cn_msg, but rather than encode it
in the API itself, it uses a void pointer everywhere. This doesn't make
much sense to encode the pointer in documentation as it prevents proper C
type checking from occurring and can easily allow people to use the wrong
pointer type. So convert the argument type to an explicit struct cn_msg
pointer.Signed-off-by: Mike Frysinger
Signed-off-by: David S. Miller
25 Jun, 2009
1 commit
-
* git://git.infradead.org/battery-2.6:
da9030_battery: Fix race between event handler and monitor
Add MAX17040 Fuel Gauge driver
w1: ds2760_battery: add support for sleep mode feature
w1: ds2760: add support for EEPROM read and write
ds2760_battery: cleanups in ds2760_battery_probe()
19 Jun, 2009
1 commit
-
On embedded devices, sleep mode conditions can be tricky to handle,
Especially when processors tend to pull-down the w1 bus during sleep. Bus
slaves (such as the ds2760) may interpret this as a reason for power-down
conditions and entirely switch off the device.This patch adds a callback function pointer to let users switch on and off
the external pull-up resistor. This lets the outside world know whether
the processor is currently actively driving the bus or not.When this callback is not provided, the code behaviour won't change.
Signed-off-by: Daniel Mack
Acked-by: Ville Syrjala
Acked-by: Evgeniy Polyakov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Jun, 2009
1 commit
-
.ko is normally not included in Kconfig help, make it consistent.
Signed-off-by: Pavel Machek
Signed-off-by: Jiri Kosina
09 Jun, 2009
2 commits
-
This adds support for ds2760's sleep mode feature. With this feature
enabled, the chip enters a deep sleep mode and disconnects from the
battery when the w1 line is held down for more than 2 seconds.This new behaviour can be switched on and off using a new module
parameter.Signed-off-by: Daniel Mack
Cc: Szabolcs Gyurko
Acked-by: Matt Reimer
Acked-by: Evgeniy Polyakov
Signed-off-by: Anton Vorontsov -
In order to modify the DS2762's status registers and to add support for
sleep mode, there is need for functions to write the internal EEPROM.Signed-off-by: Daniel Mack
Acked-by: Matt Reimer
Acked-by: Szabolcs Gyurko
Acked-by: Evgeniy Polyakov
Signed-off-by: Anton Vorontsov
05 Apr, 2009
2 commits
-
This driver requests a clock that usually is supplied by the MFD in which
the DS1WM is contained. Currently, it is impossible for a MFD to register
their clocks with the generic clock API due to different implementations
across architectures.
For now, this patch removes the clock handling from DS1WM altogether,
trusting that the MFD enable/disable functions will switch the clock if
needed. The clock rate is obtained from a new parameter in driver_data.Signed-off-by: Philipp Zabel
Signed-off-by: Samuel Ortiz -
This patch converts the DS1WM driver into an MFD cell. It also
calculates the bus_shift parameter from the memory resource size.Signed-off-by: Philipp Zabel
Signed-off-by: Samuel Ortiz
03 Apr, 2009
1 commit
-
This fixes a number of coding style issues I stubled over.
Acked-by: Evgeniy Polyakov
Signed-off-by: Daniel Mack
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds