summaryrefslogtreecommitdiffstats
path: root/drivers/w1
AgeCommit message (Collapse)Author
2009-10-04ds2482: Discard obsolete detect methodJean Delvare
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 <khali@linux-fr.org> Acked-by: Ben Gardner <gardner.ben@gmail.com>
2009-10-02connector: Provide the sender's credentials to the callbackPhilipp Reisner
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Acked-by: Lars Ellenberg <lars.ellenberg@linbit.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: arch/microblaze/include/asm/socket.h
2009-08-07drivers/w1/masters/omap_hdq.c: fix missing mutex unlockStoyan Gaydarov
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 <sgayda2@uiuc.edu> Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-17connector: make callback argument type explicitMike Frysinger
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 <vapier@gentoo.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-24Merge git://git.infradead.org/battery-2.6Linus Torvalds
* 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()
2009-06-18w1-gpio: add external pull-up enable callbackDaniel Mack
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 <daniel@caiaq.de> Acked-by: Ville Syrjala <syrjala@sci.fi> Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-12trivial: Kconfig: .ko is normally not included in module namesPavel Machek
.ko is normally not included in Kconfig help, make it consistent. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-06-08w1: ds2760_battery: add support for sleep mode featureDaniel Mack
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 <daniel@caiaq.de> Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu> Acked-by: Matt Reimer <mreimer@vpop.net> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2009-06-08w1: ds2760: add support for EEPROM read and writeDaniel Mack
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 <daniel@caiaq.de> Acked-by: Matt Reimer <mreimer@vpop.net> Acked-by: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2009-04-05mfd: remove DS1WM clock handlingPhilipp Zabel
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 <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: convert DS1WM to use MFD corePhilipp Zabel
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 <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-02w1: coding style cleanups in w1_io.cDaniel Mack
This fixes a number of coding style issues I stubled over. Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-25Merge branch 'for-next' of ↵Russell King
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into devel
2009-03-19Merge branch 'omap-clks3' into develRussell King
Conflicts: arch/arm/mach-omap2/clock.c
2009-03-13[ARM] MXC: remove _clk suffix from clock namesSascha Hauer
The context makes it clear already that these are clocks, so there's no need for such a suffix. This patch only changes the clocks actually used in the tree. The remaining clocks are renamed in the subsequent architecture specific patches. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-12drivers/w1/masters/w1-gpio.c: fix read_bit()Daniel Mack
W1 master implementations are expected to return 0 or 1 from their read_bit() function. However, not all platforms do return these values from gpio_get_value() - namely PXAs won't. Hence the w1 gpio-master needs to break the result down to 0 or 1 itself. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Ville Syrjala <syrjala@sci.fi> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-27w1: add missing Kconfig/Makefile entries for DS2431 slave driverHerton Ronaldo Krzesinski
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-27w1_ds2433: clear the validcrc flag after a writeBen Gardner
The w1_ds2433 driver does not read from the hardware if the CRC was valid on the last read. The validcrc flag should be cleared after a write so that the new value can be read. Signed-off-by: Ben Gardner <gardner.ben@gmail.com> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-11w1: w1 temp calculation overflow fixIan Dall
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=12646 When the temperature exceeds 32767 milli-degrees the temperature overflows to -32768 millidegrees. These are bothe well within the -55 - +125 degree range for the sensor. Fix overflow in left-shift of a u8. Signed-off-by: Ian Dall <ian@beware.dropbear.id.au> Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-08[ARM] omap: w1: convert omap HDQ clocks to match by devid and conidRussell King
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-08w1: send status messages after command processingEvgeniy Polyakov
Send completion status of the commands to the userspace. Message and protocol are described in the documentation. Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Paul Alfille <paul.alfille@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-08w1: added w1 reset commandEvgeniy Polyakov
Command which allows to reset the bus. Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Paul Alfille <paul.alfille@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-08w1: move w1 commands from defines to enumEvgeniy Polyakov
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Paul Alfille <paul.alfille@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-08w1: allow master IO commandsEvgeniy Polyakov
This small patchset extendes existing commands with reset, master IO and status messages. Reset is used to reset the bus for given master device, master IO command allows to initiate IO against bus itself not selecting slave device first, which can be used to probe the device for example. And status messages carry command completion status back to the userspace (namely very useful to get -ENODEV from when requested device was not found). Great thanks to Paul Alfille of OWFS for testing and commands suggestions. This patch: Allow starting of IO not against already found slave devices, but against the bus itself, which can be used for example to probe devices. [akpm@linux-foundation.org: reindent switch statements] Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Paul Alfille <paul.alfille@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-08w1: list slaves commandsEvgeniy Polyakov
Initiates search (or alarm search) and returns all found devices to userspace. Found devices are not added into the system (i.e. they are not attached to family devices or bus masters), it will be done via (if was not done yet) usual timed searching. Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-08w1: add touch block commandEvgeniy Polyakov
Writes and returns sampled data back to userspace. Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-08w1: add list masters w1 commandEvgeniy Polyakov
This patch series introduces and extends several userspace commands used with netlink protocol. Touch block command allows to write data and return sampled data to the userspace. Extended search and alarm seach commands to return list of slave devices found during given search. List masters command allows to send all registered master IDs to the userspace. Great thanks to Paul Alfille (owfs) who tested this implementation and wrote w1-to-network daemon http://sourceforge.net/projects/w1repeater/ and Frederik Deweerdt and Randy Dunlap for review. This patch: Returns list of registered bus master devices. Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Paul Alfille <paul.alfille@gmail.com> Cc: Frederik Deweerdt <frederik.deweerdt@xprog.eu> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-08w1: add 1-wire master driver for i.MX27 / i.MX31Sascha Hauer
This patch adds support for the 1-wire master interface for i.MX27 and i.MX31. Signed-off-by: Luotao Fu <l.fu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06w1: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
CC: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-12-23w1: fix slave selection on big-endian systemsEvgeniy Polyakov
During test of the w1-gpio driver i found that in "w1.c:679 w1_slave_found()" the device id is converted to little-endian with "cpu_to_le64()", but its not converted back to cpu format in "w1_io.c:293 w1_reset_select_slave()". Based on a patch created by Andreas Hummel. [akpm@linux-foundation.org: remove unneeded cast] Reported-by: Andreas Hummel <andi_hummel@gmx.de> Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-30W1_MASTER_DS1WM should depend on HAVE_CLKAl Viro
Uses clk_...() a lot Acked-by: rmk+kernel@arm.linux.org.uk Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-19W1 OMAP: Fix OMAP LDP boot crashStanley.Miao
OMAP LDP boot crash. This is because w1 subsystem changed the search interface, so update omap_hdq's search interface to follow the change. Signed-off-by: Stanley.Miao <stanley.miao@windriver.com> Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-12hdq: bQ27000 HDQ Slave Interface DriverMadhusudhan Chikkature
Provide the BQ27000 slave interface driver. Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com> Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-12hdq driver for OMAP2430/3430Madhusudhan Chikkature
The HDQ/1-Wire module of TI OMAP2430/3430 platforms implement the hardware protocol of the master functions of the Benchmark HDQ and the Dallas Semiconductor 1-Wire protocols. These protocols use a single wire for communication between the master (HDQ/1-Wire controller) and the slave (HDQ/1-Wire external compliant device). This patch provides the HDQ driver to suppport TI OMAP2430/3430 platforms. Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-12w1: export w1_read_8 functionMadhusudhan Chikkature
Export the w1_read_8 function for use of drivers. The OMAP HDQ driver(drivers/w1/masters/omap_hdq.c) uses this function. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com> Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20x86: sysfs: kill owner field from attributeParag Warudkar
Tejun's commit 7b595756ec1f49e0049a9e01a1298d53a7faaa15 made sysfs attribute->owner unnecessary. But the field was left in the structure to ease the merge. It's been over a year since that change and it is now time to start killing attribute->owner along with its users - one arch at a time! This patch is attempt #1 to get rid of attribute->owner only for CONFIG_X86_64 or CONFIG_X86_32 . We will deal with other arches later on as and when possible - avr32 will be the next since that is something I can test. Compile (make allyesconfig / make allmodconfig / custom config) and boot tested. akpm: the idea is that we put the declaration of sttribute.owner inside `#ifndef CONFIG_X86'. But that proved to be too ambitious for now because new usages kept on turning up in subsystem trees. [akpm: remove the ifdef for now] Signed-off-by: Parag Warudkar <parag.lkml@gmail.com> Cc: Greg KH <greg@kroah.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Tejun Heo <htejun@gmail.com> Cc: Len Brown <lenb@kernel.org> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: David Brownell <david-b@pacbell.net> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16w1: new driver. DS2431 chipBernhard Weirich
[akpm@linux-foundation.org: minor fixlets and cleanups] Signed-off-by: Bernhard Weirich <bernhard.weirich@riedel.net> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: Ben Gardner <bgardner@wabtec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16W1: ds2490.c optimize ds_set_pullupDavid Fries
Optimize the ds_set_pullup function. For a strong pullup to be sent the ds2490 has to have both the strong pullup mode enabled, and the specific write operation has to have the SPU bit enabled. Previously the write always had the SPU bit enabled and both the duration and model was set when a strong pullup was requested. Now the strong pullup mode is enabled at initialization time, the delay is updated only when the value changes, and the write SPU bit is set only when a strong pullup is required. This removes two or three bus transactions per strong pullup request. Signed-off-by: David Fries <david@fries.net> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16W1: ds2490.c ds_write_block remove extra ds_wait_statusDavid Fries
Drop the extra ds_wait_status() in ds_write_block(). Signed-off-by: David Fries <david@fries.net> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16W1: ds2490.c magic number workDavid Fries
This replaces some magic numbers with marcos and corrects one marco. Signed-off-by: David Fries <david@fries.net> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16W1: ds2490.c reset ds2490 in initDavid Fries
Reset the device in init as it can be in a bad state. This is necessary because a block write will wait for data to be placed in the output buffer and block any later commands which will keep accumulating and the device will not be idle. Another case is removing the ds2490 module while a bus search is in progress, somehow a few commands get through, but the input transfers fail leaving data in the input buffer. This will cause the next read to fail see the note in ds_recv_data. Signed-off-by: David Fries <david@fries.net> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16W1: ds2490.c ds_reset remove ds_wait_statusDavid Fries
ds_reset no longer calls ds_wait_status, the result wasn't used and it would only delay the following data operations. Signed-off-by: David Fries <david@fries.net> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16W1: ds2490.c ds_dump_status reworkDavid Fries
- add result register #defines - rename ds_dump_status to ds_print_msg - rename ds_recv_status to ds_dump_status - ds_dump_status prints the requested status and no longer reads the status, this is because the second status read can return different data for example the result register - the result register will be printed, though limited to detecting a new device, detecting other values such as a short would require additional reporting methods - ST_EPOF was moved to ds_wait_status to clear the error condition sooner Signed-off-by: David Fries <david@fries.net> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16W1: ds2490.c simplify and fix ds_touch_bitDavid Fries
Simplify and fix ds_touch_bit. If a device is attached in the middle of a bus search the status register will return more than the default 16 bytes. The additional bytes indicate that it has detected a new device. The way ds_wait_status is coded, if it doesn't read 16 status bytes it returns an error value. ds_touch_bit then will detect that error and return an error. In that case it doesn't read the input buffer and returns uninitialized data. It doesn't stop there. The next transaction will not expect the extra byte in the input buffer and the short read will cause an error and clear out both the old byte and new data in the input buffer. Just ignore the value of ds_wait_status. It is still required to wait until ds2490 is again idle and there is data to read when ds_recv_data is called. This also removes the while loop. None of the other commands wait and verify that the issued command is in the status register. Signed-off-by: David Fries <david@fries.net> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16W1: ds2490.c disable bit read and writeDavid Fries
Don't export read and write bit operations, they didn't work, they weren't used, and they can't be made to work. The one wire low level bit operations expect to set high or low levels, the ds2490 hardware only supports complete read or write time slots, better to just comment them out. Signed-off-by: David Fries <david@fries.net> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16W1: ds2490.c ds_write_bit, grouping error, disable readbackDavid Fries
ds_write_bit doesn't read the input buffer, so add COMM_ICP and a comment that it will no longer generate a read back data byte. If there is an extra data byte later on then it will cause an error and discard what data was there. Corrected operator ordering for ds_send_control. Signed-off-by: David Fries <david@fries.net> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16W1: ds2490.c add support for strong pullupDavid Fries
Add strong pullup support for ds2490 driver, also drop mdelay(750), which busy waits, usage in favour of msleep for long delays. Now with msleep only being called when the strong pullup is active, one wire bus operations are only taking minimal system overhead. The new set_pullup will only enable the strong pullup when requested, which is expected to be the only write operation that will benefit from a strong pullup. Signed-off-by: David Fries <david@fries.net> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16W1: ds2490.c correct print messageDavid Fries
Corrected print message, it was writing not reading, this also prints the endpoint used for the write instead of hardcoding it. Failed to write 1-wire data to ep0x%x: err=%d. Signed-off-by: David Fries <david@fries.net> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16W1: ds1wm.c msleep for resetDavid Fries
Like the previous w1_io.c reset coments and msleep patch, I don't have the hardware to verify the change, but I think it is safe. It also helps to see a comment like this in the code. "We'll wait a bit longer just to be sure." If they are going to calculate delaying 324.9us, but actually delay 500us, why not just give up the CPU and sleep? This is designed for a battery powered ARM system, avoiding busywaiting has to be good for battery life. I sent a request for testers March 7, 2008 to the Linux kernel mailing list and two developers who have patches for ds1wm.c, but I didn't get any respons. Signed-off-by: David Fries <david@fries.net> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>