1. 24 6月, 2009 10 次提交
  2. 23 6月, 2009 13 次提交
  3. 22 6月, 2009 3 次提交
  4. 21 6月, 2009 1 次提交
  5. 20 6月, 2009 4 次提交
  6. 19 6月, 2009 9 次提交
    • A
      rfkill: export persistent attribute in sysfs · 464902e8
      Alan Jenkins 提交于
      This information allows userspace to implement a hybrid policy where
      it can store the rfkill soft-blocked state in platform non-volatile
      storage if available, and if not then file-based storage can be used.
      
      Some users prefer platform non-volatile storage because of the behaviour
      when dual-booting multiple versions of Linux, or if the rfkill setting
      is changed in the BIOS setting screens, or if the BIOS responds to
      wireless-toggle hotkeys itself before the relevant platform driver has
      been loaded.
      Signed-off-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      464902e8
    • A
      rfkill: don't restore software blocked state on persistent devices · 06d5caf4
      Alan Jenkins 提交于
      The setting of the "persistent" flag is also made more explicit using
      a new rfkill_init_sw_state() function, instead of special-casing
      rfkill_set_sw_state() when it is called before registration.
      
      Suspend is a bit of a corner case so we try to get away without adding
      another hack to rfkill-input - it's going to be removed soon.
      If the state does change over suspend, users will simply have to prod
      rfkill-input twice in order to toggle the state.
      
      Userspace policy agents will be able to implement a more consistent user
      experience.  For example, they can avoid the above problem if they
      toggle devices individually.  Then there would be no "global state"
      to get out of sync.
      
      Currently there are only two rfkill drivers with persistent soft-blocked
      state.  thinkpad-acpi already checks the software state on resume.
      eeepc-laptop will require modification.
      Signed-off-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      CC: Marcel Holtmann <marcel@holtmann.org>
      Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      06d5caf4
    • H
      i2c: New macro to initialize i2c address lists on the fly · c7036673
      Hans Verkuil 提交于
      For video4linux we sometimes need to probe for a single i2c address.
      Normally you would do it like this:
      
      static const unsigned short addrs[] = {
      	addr, I2C_CLIENT_END
      };
      
      client = i2c_new_probed_device(adapter, &info, addrs);
      
      This is a bit awkward and I came up with this macro:
      
      #define V4L2_I2C_ADDRS(addr, addrs...) \
      	((const unsigned short []){ addr, ## addrs, I2C_CLIENT_END })
      
      This can construct a list of one or more i2c addresses on the fly. But
      this is something that really belongs in i2c.h, renamed to I2C_ADDRS.
      
      With this macro we can just do:
      
      client = i2c_new_probed_device(adapter, &info, I2C_ADDRS(addr));
      
      Note that this can also be used to initialize an array:
      
      static const unsigned short addrs[] = I2C_ADDRS(0x2a, 0x2c);
      
      Whether you want to is another matter, but it works. This functionality is 
      also available in the oldest supported gcc (3.2).
      Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      c7036673
    • J
      i2c: Don't advertise i2c functions when not available · 23af8400
      Jean Delvare 提交于
      Surround i2c function declarations with ifdefs, so that they aren't
      advertised when i2c-core isn't actually built. That way, drivers using
      these functions unconditionally will result in an immediate build
      failure, rather than a late linking failure which is harder to figure
      out.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      23af8400
    • J
      i2c: Add a sysfs interface to instantiate devices · 99cd8e25
      Jean Delvare 提交于
      Add a sysfs interface to instantiate and delete I2C devices. This is
      primarily a replacement of the force_* module parameters implemented
      by some i2c drivers. These module parameters were implemented
      internally by the I2C_CLIENT_INSMOD* macros, which don't scale well.
      
      This can also be used when developing a driver on a self-soldered
      board which doesn't yet have proper I2C device declaration at the
      platform level, and presumably for various debugging situations.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      99cd8e25
    • J
      i2c: Kill the redundant client list · e549c2b5
      Jean Delvare 提交于
      We used to maintain our own per-adapter list of i2c clients, but this
      is redundant with what the driver core does, and no longer needed.
      Just drop the redundant list.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      e549c2b5
    • J
      i2c: Kill is_newstyle_driver · 1e40ac12
      Jean Delvare 提交于
      Legacy i2c drivers are gone, all drivers are new-style now, so there
      is no point to check.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      1e40ac12
    • J
      i2c: Drop i2c_probe function · 36789b5e
      Jean Delvare 提交于
      The legacy i2c_probe() function has no users left, get rid of it.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      36789b5e
    • J
      i2c: Get rid of the legacy binding model · 729d6dd5
      Jean Delvare 提交于
      We converted all the legacy i2c drivers so we can finally get rid of
      the legacy binding model. Hooray!
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      729d6dd5