1. 15 Oct, 2010 1 commit
    • Arnd Bergmann's avatar
      llseek: automatically add .llseek fop · 6038f373
      Arnd Bergmann authored
      All file_operations should get a .llseek operation so we can make
      nonseekable_open the default for future file operations without a
      .llseek pointer.
      
      The three cases that we can automatically detect are no_llseek, seq_lseek
      and default_llseek. For cases where we can we can automatically prove that
      the file offset is always ignored, we use noop_llseek, which maintains
      the current behavior of not returning an error from a seek.
      
      New drivers should normally not use noop_llseek but instead use no_llseek
      and call nonseekable_open at open time.  Existing drivers can be converted
      to do the same when the maintainer knows for certain that no user code
      relies on calling seek on the device file.
      
      The generated code is often incorrectly indented and right now contains
      comments that clarify for each added line why a specific variant was
      chosen. In the version that gets submitted upstream, the comments will
      be gone and I will manually fix the indentation, because there does not
      see...
      6038f373
  2. 14 Oct, 2009 1 commit
  3. 20 Jun, 2008 2 commits
  4. 29 Sep, 2006 2 commits
  5. 15 Jul, 2006 4 commits
  6. 03 Jul, 2006 1 commit
  7. 30 Jun, 2006 1 commit
  8. 28 Jun, 2006 9 commits
    • Jim Cromie's avatar
      [PATCH] chardev: GPIO for SCx200 & PC-8736x: use dev_dbg in common module · f31000e5
      Jim Cromie authored
      
      Use of dev_dbg() and friends is considered good practice.  dev_dbg() needs a
      struct device *devp, but nsc_gpio is only a helper module, so it doesnt
      have/need its own.  To provide devp to the user-modules (scx200 & pc8736x
      _gpio), we add it to the vtable, and set it during init.
      
      Also squeeze nsc_gpio_dump()'s format a little.
      
      [  199.259879]  pc8736x_gpio.0: io09: 0x0044 TS OD PUE  EDGE LO DEBOUNCE
      Signed-off-by: default avatarJim Cromie <jim.cromie@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      f31000e5
    • Jim Cromie's avatar
      [PATCH] chardev: GPIO for SCx200 & PC-8736x: migrate gpio_dump to common module · 0e41ef3c
      Jim Cromie authored
      
      Since the meaning of config-bits is the same for scx200 and pc8736x _gpios, we
      can share a function to deliver this to user.  Since it is called via the
      vtable, its also completely replaceable.  For now, we keep using printk...
      Signed-off-by: default avatarJim Cromie <jim.cromie@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0e41ef3c
    • Jim Cromie's avatar
      [PATCH] chardev: GPIO for SCx200 & PC-8736x: migrate file-ops to common module · 1a66fdf0
      Jim Cromie authored
      
      Now that the read(), write() file-ops are dispatching gpio-ops via the vtable,
      they are generic, and can be moved 'verbatim' to the nsc_gpio common-support
      module.  After the move, various symbols are renamed to update 'scx200_' to
      'nsc_', and headers are adjusted accordingly.
      Signed-off-by: default avatarJim Cromie <jim.cromie@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      1a66fdf0
    • Jim Cromie's avatar
      [PATCH] chardev: GPIO for SCx200 & PC-8736x: dispatch via vtable · c3dc8071
      Jim Cromie authored
      
      Now actually call the gpio operations thru the vtable.
      Signed-off-by: default avatarJim Cromie <jim.cromie@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      c3dc8071
    • Jim Cromie's avatar
      [PATCH] chardev: GPIO for SCx200 & PC-8736x: add gpio-ops vtable · fe3a168a
      Jim Cromie authored
      
      Abstract the gpio operations into a new nsc_gpio_ops vtable.
      Signed-off-by: default avatarJim Cromie <jim.cromie@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      fe3a168a
    • Jim Cromie's avatar
      [PATCH] chardev: GPIO for SCx200 & PC-8736x: add 'v' command to device-file · 9550a339
      Jim Cromie authored
      
      Add a new driver command: 'v' which calls gpio_dump() on the pin.  The output
      goes to the log, like all other INFO messages in the original driver.  Giving
      the user control over the feedback they 'need' is construed to be a
      user-friendly feature, and allows us (later) to dial down many INFO messages
      to DEBUG log-level.
      Signed-off-by: default avatarJim Cromie <jim.cromie@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      9550a339
    • Jim Cromie's avatar
      [PATCH] chardev: GPIO for SCx200 & PC-8736x: add platforn_device for use w dev_dbg · 979b5ec3
      Jim Cromie authored
      
      Add a platform-device to scx200_gpio, and use its struct device dev member
      (ie: devp) in dev_dbg() once.
      
      There are 2 alternatives here (Im soliciting guidance/commentary):
      
      - use isa_device, if/when its added to the kernel.
      
      - alter scx200.c to EXPORT_GPL its private devp so that both scx200_gpio,
        and the (to be added) nsc_gpio module can use it.  Since the available devp
        is in 'grandparent', this seems like too much 'action at a distance'.
      Signed-off-by: default avatarJim Cromie <jim.cromie@gmail.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      979b5ec3
    • Jim Cromie's avatar
      [PATCH] chardev: GPIO for SCx200 & PC-8736x: modernize driver init to 2.6 api · 7d7f2126
      Jim Cromie authored
      
      Adopt many modern 2.6 coding practices, ala LDD3, chapter 3.  Changes are
      limited to initialization calls from module init, ie: cdev_init, cdev_add,
      *_chrdev_region, mkdev.
      Signed-off-by: default avatarJim Cromie <jim.cromie@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      7d7f2126
    • Jim Cromie's avatar
      [PATCH] chardev: GPIO for SCx200 & PC-8736x: whitespace pre-clean · 62c83cde
      Jim Cromie authored
      
      GPIO SUPPORT FOR SCx200 & PC8736x
      
      The patch-set reworks the 2.4 vintage scx200_gpio driver for modern 2.6, and
      refactors GPIO support to reuse it in a new driver for the GPIO on PC-8736x
      chips.  Its handy for the Soekris.com net-4801, which has both chips.
      
      These patches have been seen recently on Kernel-Mentors, and then
      Kernel-Newbies ML, where Jesper Juhl kindly reviewed it.  His feedback has
      been incorporated.  Thanks Jesper !
      
      Its also gone to soekris-tech@soekris.com for possible testing by linux folks,
      I've gotten 1 promise so far.  Theyre mostly BSD folk over there, but we'll
      see..
      
      Device-file & Sysfs
      
      The driver preserves the existing device-file interface, including the
      write/cmd set, but adds v to 'view' the pin-settings & configs by inducing,
      via gpio_dump(), a dev_info() call.  Its a fairly crappy way to get status,
      but it sticks to the syslog approach, conservatively.
      
      Allowing users to voluntarily trigger logging is good, it gives them a
      familiar way to confirm their app's control & use of the pins, and I've thus
      reduced the pin-mode-updates from dev_info to dev_dbg.
      
      I've recently bolted on a proto sysfs interface for both new drivers.  Im not
      including those patches here; they (the patch + doc-pre-patch) are still quite
      raw (and unreviewed on KNML), and since they 'invent' a convention for GPIO, a
      proper vetting is needed.  Since this patchset is much bigger than my previous
      ones, Id like to keep things simpler, and address it 1st, before bolting on
      more stuff.
      
      The driver-split
      
      The Geode CPU and the PC-87366 Super-IO chip have GPIO units which share a
      common pin-architecture (same pin features, with same bits controlling), but
      with different addressing mechanics and port organizations.
      
      The vintage driver expresses the pin capabilities with pin-mode commands
      [OoPpTt],etc that change the pin configurations, and since the 2 chips share
      pin-arch, we can reuse the read(), write() commands, once the implementation
      is suitably adjusted.
      
      The patchset adds a vtable: struct nsc_gpio_ops, to abstract the existing gpio
      operations, then adjusts fileops.write() code to invoke operations via that
      vtable.  Driver specific open()s set private_data to the vtable so its
      available for use by write().
      
      The vtable gets the gpio_dump() too, since its user-friendly, and (could be
      construed as) part of the current device-file interface.  To support use of
      dev_dbg() in write() & _dump(), the vtable gets a dev ptr too, set by both
      scx200 & pc8736x _gpio drivers.
      
      heres how the pins are presented in syslog:
      
      [ 1890.176223]  scx200_gpio.0: io00: 0x0044 TS OD PUE  EDGE LO DEBOUNCE
      [ 1890.287223]  scx200_gpio.0: io01: 0x0003 OE PP PUD  EDGE LO
      
      nsc_gpio.c: new file is new home of several file-ops methods, which are
      modified to get their vtable from filp->private_data, and use it where needed.
      
      scx200_gpio.c: keeps some of its existing gpio routines, but now wires them up
      via the vtable (they're invoked by nsc_gpio.c:nsc_gpio_write() thru this
      vtable).  A driver-spcific open() initializes filp->private_data with the
      vtable.
      
      Once the split is clean, and the scx200_gpio driver is working, we copy and
      modify the function and variable names, and rework the access-method bodies
      for the different addressing scheme.
      
      Heres a working overview of the patchset:
      
      # series file for GPIO
      
      # Spring Cleaning
      gpio-scx/patch.preclean        # scripts/Lindent fixes, editor-ctrl comments
      
      # API Modernization
      
      gpio-scx/patch.api26        # what I learned from LDD3
      gpio-scx/patch.platform-dev-2    # get pdev, support for dev_dbg()
      gpio-scx/patch.unsigned-minor    # fix to match std practice
      
      # Debuggability
      
      gpio-scx/patch.dump-diet    # shrink gpio_dump()
      gpio-scx/patch.viewpins        # add new 'command' to call dump()
      gpio-scx/patch.init-refactor    # pull shadow-register init to sub
      
      # Access-Abstraction (add vtable)
      
      gpio-scx/patch.access-vtable    # introduce nsg_gpio_ops vtable, w dump
      gpio-scx/patch.vtable-calls    # add & use the vtable in scx200_gpio
      gpio-scx/patch.nscgpio-shell    # add empty driver for common-fops
      
      # move code under abstraction
      gpio-scx/patch.migrate-fops    # move file-ops methods from scx200_gpio
      gpio-scx/patch.common-dump    # mv scx200.c:scx200_gpio_dump() to nsc_gpio.c
      gpio-scx/patch.add-pc8736x-gpio    # add new driver, like old, w chip adapt
      # gpio-scx/patch.add-DEBUG    # enable all dev_dbg()s
      
      # Cleanups
      
      # finish printk -> dev_dbg() etc
      gpio-scx/patch.pdev-pc8736x    # new drvr needs pdev too,
      gpio-scx/patch.devdbg-nscgpio    # add device to 'vtable', use in dev_dbg()
      
      # gpio-scx/patch.pin-config-view    # another 'c' 'command'
      # gpio-scx/quiet-getset        # take out excess dbg stuff (pretty quiet
      now)
      gpio-scx/patch.shadow-current    # imitate scx200_gpio's shadow regs in
      pc87*
      
      # post KMentors-post patches ..
      
      gpio-scx/patch.mutexes        # use mutexes for config-locks
      gpio-scx/patch.viewpins-values    # extend dump to obsolete separate 'c' cmd
      
      gpio-scx/patch.kconfig        # add stuff for kbuild
      
      # TBC
      # combine api26 with pdev, which is just one step.
      # merge c&v commands to single do-all-fn
      # delay viewpins, dump-diet should also un-ifdef it too.
      
      diff.sys-gpio-rollup-1
      
      This patch:
      
      Removed editor format-control comments, and used scripts/Lindent to clean up
      whitespace, then deleted the bogus chunks :-(
      Signed-off-by: default avatarJim Cromie <jim.cromie@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      62c83cde
  9. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4