1. 23 8月, 2013 5 次提交
  2. 04 7月, 2013 1 次提交
    • J
      drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode · d5528773
      Jean-Francois Dagenais 提交于
      Power-up timing
      
      The DS2408 is sensitive to the power-on slew rate and can inadvertently
      power up with a test mode feature enabled.  When this occurs, the P0 port
      does not respond to the Channel Access Write command.  For most reliable
      operation, it is recommended to disable the test mode after every power-on
      reset using the Disable Test Mode sequence shown below.  The 64-bit ROM
      code must be transmitted in the same bit sequence as with the Match ROM
      command, i.e., least significant bit first.  This precaution is
      recommended in parasite power mode (VCC pin connected to GND) as well as
      with VCC power.
      
      Disable Test Mode:
      RST,PD,96h,<64-bit DS2408 ROM Code>,3Ch,RST,PD
      
      [akpm@linux-foundation.org: don't use kerenldoc token to introduce a non-kerneldoc comment, tweak whitespace]
      Signed-off-by: NJean-Francois Dagenais <jeff.dagenais@gmail.com>
      Cc: Evgeniy Polyakov <zbr@ioremap.net>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d5528773
  3. 04 6月, 2013 1 次提交
  4. 01 5月, 2013 4 次提交
  5. 16 3月, 2013 2 次提交
  6. 28 2月, 2013 1 次提交
  7. 19 2月, 2013 1 次提交
  8. 16 1月, 2013 1 次提交
  9. 17 8月, 2012 1 次提交
  10. 14 6月, 2012 3 次提交
    • M
    • N
      W1: split master mutex to avoid deadlocks. · b02f8bed
      NeilBrown 提交于
      The 'mutex' in struct w1_master is use for two very different
      purposes.
      
      Firstly it protects various data structures such as the list of all
      slaves.
      
      Secondly it protects the w1 buss against concurrent accesses.
      
      This can lead to deadlocks when the ->probe code called while adding a
      slave needs to talk on the bus, as is the case for power_supply
      devices.
      ds2780 and ds2781 drivers contain a work around to track which
      process hold the lock simply to avoid this deadlock.  bq27000 doesn't
      have that work around and so deadlocks.
      
      There are other possible deadlocks involving sysfs.
      When removing a device the sysfs s_active lock is held, so the lock
      that protects the slave list must take precedence over s_active.
      However when access power_supply attributes via sysfs, the s_active
      lock must take precedence over the lock that protects accesses to
      the bus.
      
      So to avoid deadlocks between w1 slaves and sysfs, these must be
      two separate locks.  Making them separate means that the work around
      in ds2780 and ds2781 can be removed.
      
      So this patch:
       - adds a new mutex: "bus_mutex" which serialises access to the bus.
       - takes in mutex in w1_search and ds1wm_search while they access
         the bus for searching.  The mutex is dropped before calling the
         callback which adds the slave.
       - changes all slaves to use bus_mutex instead of mutex to
         protect access to the bus
       - removes w1_ds2790_io_nolock and w1_ds2781_io_nolock, and the
         related code from drivers/power/ds278[01]_battery.c which
         calls them.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Acked-by: NEvgeniy Polyakov <zbr@ioremap.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b02f8bed
    • G
      Revert "w1: introduce a slave mutex for serializing IO" · dd0aa67c
      Greg Kroah-Hartman 提交于
      This reverts commit 59d4467b.
      
      Turns out it was the wrong version, will apply the correct version after
      this.
      Reported-by: NNeilBrown <neilb@suse.de>
      Cc: Evgeniy Polyakov <zbr@ioremap.net>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dd0aa67c
  11. 13 6月, 2012 1 次提交
  12. 05 5月, 2012 1 次提交
  13. 30 4月, 2012 1 次提交
  14. 19 4月, 2012 1 次提交
  15. 12 4月, 2012 1 次提交
  16. 09 3月, 2012 1 次提交
  17. 25 2月, 2012 3 次提交
  18. 16 2月, 2012 1 次提交
    • N
      w1: Fix w1_bq27000 · 9f3519d2
      NeilBrown 提交于
      w1_bq27000 adds a bq27000-battery platform device but does not provide
      platform data for it. This causes the bq27x00 driver to dereference a NULL
      pointer.
      So provide the appropriate platform data.  This requires modifying
      w1_bq27000_read so that it find the w1 device as the parent of the bq device.
      
      Also there is no point exporting w1_bq27000_read as nothing else uses it
      or could use it.  So make it static.
      
      Finally, as there is no way to track how many batteries have been found, and
      we will probably only find one, use an id number of '-1' to assert that this
      is a unique instance.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Tested-by: NThomas Weber <weber@corscience.de>
      Acked-by: NEvgeniy Polyakov <zbr@ioremap.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9f3519d2
  19. 18 11月, 2011 1 次提交
    • M
      W1: w1_therm: release the bus during conversion on externally powered devices · 377195c4
      Maciej Szmigiero 提交于
      w1_therm devices can either be bus powered or externally powered.
      
      When device is bus powered during temperature conversion the bus
      have to be left high to provide necessary power. Some masters also allow
      strong power-up to be enabled in this case.
      Naturally, no communication over bus can occur during that time.
      
      However, if device has external power then there is no such restriction,
      and host can talk to other devices during temperature conversion.
      
      There is command which allows us to check how device is powered,
      this patch uses it to release the bus on externally w1_therm powered devices
      during temperature conversion.
      
      Also, this changes uninterruptible sleeps there into interruptible ones to
      avoid long uninterruptible sleep if w1 subsystem happens to grab bus for
      scan during w1_therm_read().
      Signed-off-by: NMaciej Szmigiero <mhej@o2.pl>
      Acked-by: NEvgeniy Polyakov <zbr@ioremap.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      377195c4
  20. 03 11月, 2011 2 次提交
  21. 26 8月, 2011 2 次提交
  22. 27 7月, 2011 1 次提交
  23. 27 5月, 2011 2 次提交
  24. 14 1月, 2011 1 次提交
    • M
      w1: DS2423 counter driver and documentation · 17fecb55
      Mika Laitio 提交于
      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_slave
      
      00 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=5
      
      Patch includes also the documentation.
      
      [randy.dunlap@oracle.com: fix ds2423 build, needs to select CRC16]
      Signed-off-by: NMika Laitio <lamikr@pilppa.org>
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      17fecb55
  25. 22 5月, 2010 1 次提交