1. 03 11月, 2011 2 次提交
  2. 26 8月, 2011 2 次提交
  3. 27 7月, 2011 1 次提交
  4. 27 5月, 2011 2 次提交
  5. 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
  6. 22 5月, 2010 1 次提交
  7. 25 4月, 2010 1 次提交
  8. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit 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 allmodconfig
      
      8. 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: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  9. 09 6月, 2009 2 次提交
  10. 28 2月, 2009 2 次提交
  11. 12 2月, 2009 1 次提交
  12. 13 11月, 2008 1 次提交
  13. 20 10月, 2008 1 次提交
    • P
      x86: sysfs: kill owner field from attribute · 01e8ef11
      Parag Warudkar 提交于
      Tejun's commit 7b595756 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: NParag 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: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      01e8ef11
  14. 17 10月, 2008 4 次提交
  15. 07 2月, 2008 1 次提交
    • D
      W1: w1_therm.c standardize units to millidegrees C · 7129b126
      David Fries 提交于
      Standardize the temperature units to millidegrees C for the two sensor
      conversion routines.  Previously the routines were,
      
      w1_DS18B20_convert_temp degrees C
      w1_DS18S20_convert_temp millidegrees C
      
      Unfortunately this will break any program using the ds18b20 value as it
      will now be 1000 times bigger.  Fortunately there can't be that many users
      out there, or some of these bugs will have been fixed by now, such as the
      negative C error (see previous patch) that makes me think the ds18b20 is
      the better choice to change because of the current bugs.
      Signed-off-by: NDavid Fries <david@fries.net>
      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>
      7129b126
  16. 23 1月, 2008 2 次提交
    • D
      W1: w1_therm.c is flagging 0C etc as invalid · 80c002dd
      David Fries 提交于
      The extra rom[0] check is flagging valid temperatures as invalid when
      there is already a CRC data transmission check.
      
      w1_therm_read_bin()
      	if (rom[8] == crc && rom[0])
      		verdict = 1;
      
      Requiring rom[0] to be non-zero will flag as invalid temperature
      conversions when the low byte is zero, specifically the temperatures 0C,
      16C, 32C, 48C, -16C, -32C, and -48C.
      
      The CRC check is produced on the device for the previous 8 bytes and is
      required to ensure the data integrity in transmission.  I don't see why the
      extra check for rom[0] being non-zero is in there.  Evgeniy Polyakov didn't
      know either.  Just for a check I unplugged the sensor, executed a
      temperature conversion, and read the results.  The read was all ff's, which
      also failed the CRC, so it doesn't need to protect against a disconnected
      sensor.
      
      I have more extensive patches in the work, but these two trivial ones will
      do for today.  I would like to hear from people who use the ds2490 USB to
      one wire dongle.  1 if you would be willing to test the patches as I
      currently only have the one sensor on a short parisite powered wire, 2 if
      there is any cheap sources for the ds2490.
      Signed-off-by: NDavid Fries <david@fries.net>
      Acked-by: NEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      80c002dd
    • D
      W1: w1_therm.c ds18b20 decode freezing temperatures correctly · 941ed3b5
      David Fries 提交于
      Correct the decoding of negative C temperatures.  The code did a binary OR
      of two bytes to make a 16 bit value, but assignd it to an integer.  This
      caused the value to not be sign extended and to loose that it was a
      negative number in the assignment.
      
      Before the patch (in my freezer),
      	w1_slave
      	ed fe 4b 46 7f ff 03 10 e4 : crc=e4 YES
      	ed fe 4b 46 7f ff 03 10 e4 t=4078
      With the patch,
      	e3 fe 4b 46 7f ff 0d 10 81 : crc=81 YES
      	e3 fe 4b 46 7f ff 0d 10 81 t=-17
      Signed-off-by: NDavid Fries <david@fries.net>
      Acked-by: NEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      941ed3b5
  17. 20 7月, 2007 1 次提交
  18. 17 7月, 2007 1 次提交
  19. 16 7月, 2007 3 次提交
  20. 12 7月, 2007 2 次提交
    • Z
      sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes · 91a69029
      Zhang Rui 提交于
      Well, first of all, I don't want to change so many files either.
      
      What I do:
      Adding a new parameter "struct bin_attribute *" in the
      .read/.write methods for the sysfs binary attributes.
      
      In fact, only the four lines change in fs/sysfs/bin.c and
      include/linux/sysfs.h do the real work.
      But I have to update all the files that use binary attributes
      to make them compatible with the new .read and .write methods.
      I'm not sure if I missed any. :(
      
      Why I do this:
      For a sysfs attribute, we can get a pointer pointing to the
      struct attribute in the .show/.store method,
      while we can't do this for the binary attributes.
      I don't know why this is different, but this does make it not
      so handy to use the binary attributes as the regular ones.
      So I think this patch is reasonable. :)
      
      Who benefits from it:
      The patch that exposes ACPI tables in sysfs
      requires such an improvement.
      All the table binary attributes share the same .read method.
      Parameter "struct bin_attribute *" is used to get
      the table signature and instance number which are used to
      distinguish different ACPI table binary attributes.
      
      Without this parameter, we need to offer different .read methods
      for different ACPI table binary attributes.
      This is impossible as there are various ACPI tables on different
      platforms, and we don't know what they are until they are loaded.
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      91a69029
    • T
      sysfs: kill unnecessary attribute->owner · 7b595756
      Tejun Heo 提交于
      sysfs is now completely out of driver/module lifetime game.  After
      deletion, a sysfs node doesn't access anything outside sysfs proper,
      so there's no reason to hold onto the attribute owners.  Note that
      often the wrong modules were accounted for as owners leading to
      accessing removed modules.
      
      This patch kills now unnecessary attribute->owner.  Note that with
      this change, userland holding a sysfs node does not prevent the
      backing module from being unloaded.
      
      For more info regarding lifetime rule cleanup, please read the
      following message.
      
        http://article.gmane.org/gmane.linux.kernel/510293
      
      (tweaked by Greg to not delete the field just yet, to make it easier to
      merge things properly.)
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7b595756
  21. 10 7月, 2007 1 次提交
  22. 29 6月, 2007 1 次提交
  23. 13 2月, 2007 1 次提交
  24. 14 12月, 2006 1 次提交
  25. 08 12月, 2006 1 次提交
  26. 04 12月, 2006 1 次提交
  27. 23 6月, 2006 2 次提交