26 May, 2011

1 commit


12 May, 2011

1 commit


01 Dec, 2010

1 commit


25 Oct, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (75 commits)
    Input: wacom - specify Cinitq supported tools
    Input: ab8500-ponkey - fix IRQ freeing in error path
    Input: adp5588-keys - use more obvious i2c_device_id name string
    Input: ad7877 - switch to using threaded IRQ
    Input: ad7877 - use attribute group to control visibility of attributes
    Input: serio - add support for PS2Mult multiplexer protocol
    Input: wacom - properly enable runtime PM
    Input: ad7877 - filter events where pressure is beyond the maximum
    Input: ad7877 - implement EV_KEY:BTN_TOUCH reporting
    Input: ad7877 - implement specified chip select behavior
    Input: hp680_ts_input - use cancel_delayed_work_sync()
    Input: mousedev - correct lockdep annotation
    Input: ads7846 - switch to using threaded IRQ
    Input: serio - support multiple child devices per single parent
    Input: synaptics - simplify pass-through port handling
    Input: add ROHM BU21013 touch panel controller support
    Input: omap4-keypad - wake-up on events & long presses
    Input: omap4-keypad - fix interrupt line configuration
    Input: omap4-keypad - SYSCONFIG register configuration
    Input: omap4-keypad - use platform device helpers
    ...

    Linus Torvalds
     

18 Oct, 2010

1 commit


15 Oct, 2010

1 commit

  • 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
    seem to be a way to do that using coccinelle.

    Some amount of new code is currently sitting in linux-next that should get
    the same modifications, which I will do at the end of the merge window.

    Many thanks to Julia Lawall for helping me learn to write a semantic
    patch that does all this.

    ===== begin semantic patch =====
    // This adds an llseek= method to all file operations,
    // as a preparation for making no_llseek the default.
    //
    // The rules are
    // - use no_llseek explicitly if we do nonseekable_open
    // - use seq_lseek for sequential files
    // - use default_llseek if we know we access f_pos
    // - use noop_llseek if we know we don't access f_pos,
    // but we still want to allow users to call lseek
    //
    @ open1 exists @
    identifier nested_open;
    @@
    nested_open(...)
    {

    }

    @ open exists@
    identifier open_f;
    identifier i, f;
    identifier open1.nested_open;
    @@
    int open_f(struct inode *i, struct file *f)
    {

    }

    @ read disable optional_qualifier exists @
    identifier read_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    expression E;
    identifier func;
    @@
    ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
    {

    }

    @ read_no_fpos disable optional_qualifier exists @
    identifier read_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    @@
    ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
    {
    ... when != off
    }

    @ write @
    identifier write_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    expression E;
    identifier func;
    @@
    ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
    {

    }

    @ write_no_fpos @
    identifier write_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    @@
    ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
    {
    ... when != off
    }

    @ fops0 @
    identifier fops;
    @@
    struct file_operations fops = {
    ...
    };

    @ has_llseek depends on fops0 @
    identifier fops0.fops;
    identifier llseek_f;
    @@
    struct file_operations fops = {
    ...
    .llseek = llseek_f,
    ...
    };

    @ has_read depends on fops0 @
    identifier fops0.fops;
    identifier read_f;
    @@
    struct file_operations fops = {
    ...
    .read = read_f,
    ...
    };

    @ has_write depends on fops0 @
    identifier fops0.fops;
    identifier write_f;
    @@
    struct file_operations fops = {
    ...
    .write = write_f,
    ...
    };

    @ has_open depends on fops0 @
    identifier fops0.fops;
    identifier open_f;
    @@
    struct file_operations fops = {
    ...
    .open = open_f,
    ...
    };

    // use no_llseek if we call nonseekable_open
    ////////////////////////////////////////////
    @ nonseekable1 depends on !has_llseek && has_open @
    identifier fops0.fops;
    identifier nso ~= "nonseekable_open";
    @@
    struct file_operations fops = {
    ... .open = nso, ...
    +.llseek = no_llseek, /* nonseekable */
    };

    @ nonseekable2 depends on !has_llseek @
    identifier fops0.fops;
    identifier open.open_f;
    @@
    struct file_operations fops = {
    ... .open = open_f, ...
    +.llseek = no_llseek, /* open uses nonseekable */
    };

    // use seq_lseek for sequential files
    /////////////////////////////////////
    @ seq depends on !has_llseek @
    identifier fops0.fops;
    identifier sr ~= "seq_read";
    @@
    struct file_operations fops = {
    ... .read = sr, ...
    +.llseek = seq_lseek, /* we have seq_read */
    };

    // use default_llseek if there is a readdir
    ///////////////////////////////////////////
    @ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier readdir_e;
    @@
    // any other fop is used that changes pos
    struct file_operations fops = {
    ... .readdir = readdir_e, ...
    +.llseek = default_llseek, /* readdir is present */
    };

    // use default_llseek if at least one of read/write touches f_pos
    /////////////////////////////////////////////////////////////////
    @ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read.read_f;
    @@
    // read fops use offset
    struct file_operations fops = {
    ... .read = read_f, ...
    +.llseek = default_llseek, /* read accesses f_pos */
    };

    @ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier write.write_f;
    @@
    // write fops use offset
    struct file_operations fops = {
    ... .write = write_f, ...
    + .llseek = default_llseek, /* write accesses f_pos */
    };

    // Use noop_llseek if neither read nor write accesses f_pos
    ///////////////////////////////////////////////////////////

    @ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read_no_fpos.read_f;
    identifier write_no_fpos.write_f;
    @@
    // write fops use offset
    struct file_operations fops = {
    ...
    .write = write_f,
    .read = read_f,
    ...
    +.llseek = noop_llseek, /* read and write both use no f_pos */
    };

    @ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier write_no_fpos.write_f;
    @@
    struct file_operations fops = {
    ... .write = write_f, ...
    +.llseek = noop_llseek, /* write uses no f_pos */
    };

    @ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read_no_fpos.read_f;
    @@
    struct file_operations fops = {
    ... .read = read_f, ...
    +.llseek = noop_llseek, /* read uses no f_pos */
    };

    @ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    @@
    struct file_operations fops = {
    ...
    +.llseek = noop_llseek, /* no read or write fn */
    };
    ===== End semantic patch =====

    Signed-off-by: Arnd Bergmann
    Cc: Julia Lawall
    Cc: Christoph Hellwig

    Arnd Bergmann
     

25 Aug, 2010

1 commit


03 Aug, 2010

1 commit

  • Change all call sites in drivers/input to not access the ABS axis
    information directly anymore. Make them use the access helpers instead.

    Also use input_set_abs_params() when possible.
    Did some code refactoring as I was on it.

    Signed-off-by: Daniel Mack
    Cc: Dmitry Torokhov
    Signed-off-by: Dmitry Torokhov

    Daniel Mack
     

16 Jul, 2010

2 commits


10 Mar, 2010

1 commit


05 Oct, 2009

1 commit


11 May, 2009

1 commit


16 Mar, 2009

1 commit

  • Most fasync implementations do something like:

    return fasync_helper(...);

    But fasync_helper() will return a positive value at times - a feature used
    in at least one place. Thus, a number of other drivers do:

    err = fasync_helper(...);
    if (err < 0)
    return err;
    return 0;

    In the interests of consistency and more concise code, it makes sense to
    map positive return values onto zero where ->fasync() is called.

    Cc: Al Viro
    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     

20 Dec, 2008

1 commit


02 Nov, 2008

1 commit

  • As it is, all instances of ->release() for files that have ->fasync()
    need to remember to evict file from fasync lists; forgetting that
    creates a hole and we actually have a bunch that *does* forget.

    So let's keep our lives simple - let __fput() check FASYNC in
    file->f_flags and call ->fasync() there if it's been set. And lose that
    crap in ->release() instances - leaving it there is still valid, but we
    don't have to bother anymore.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

30 Oct, 2008

1 commit


03 Jul, 2008

1 commit


01 Apr, 2008

1 commit


31 Jan, 2008

1 commit


21 Jan, 2008

1 commit


18 Jan, 2008

1 commit

  • Devices like the HP Integrated Remote Console Virtual Mouse, which are
    standard equipment on all Proliant and Integrity servers, produce
    absolute coordinates instead of relative coordinates. This is done to
    synchronize the position of the mouse cursor on the client desktop
    with the mouse cursor position on the server. Mousedev is not
    designed to pass those absolute events directly to X, but it can
    translate them into relative movements. It currently does this for
    tablet like devices and touchpads. This patch merely tells it to also
    include a device with ABS_X, ABS_Y, and mouse buttons in its list of
    devices to process input for.

    This patch enables the mouse pointer to move when using the remote
    console.

    Signed-off-by: Micah Parrish
    Signed-off-by: Dmitry Torokhov

    Micah Parrish
     

20 Oct, 2007

1 commit

  • get rid of input BIT* duplicate defines

    use newly global defined macros for input layer. Also remove includes of
    input.h from non-input sources only for BIT macro definiton. Define the
    macro temporarily in local manner, all those local definitons will be
    removed further in this patchset (to not break bisecting).
    BIT macro will be globally defined (1<
    Cc:
    Acked-by: Jiri Kosina
    Cc:
    Acked-by: Marcel Holtmann
    Cc:
    Acked-by: Mauro Carvalho Chehab
    Cc:
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

14 Oct, 2007

1 commit

  • RT guys alerted me to the fact that in their tree spinlocks
    are preemptible and it is better to use full RCU API
    (rcu_read_lock()/rcu_read_unlock()) to be safe.

    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

13 Oct, 2007

1 commit


30 Aug, 2007

1 commit


10 Jul, 2007

1 commit


05 Jun, 2007

1 commit


04 Jun, 2007

1 commit

  • There is a race between input handler's release() and disconnect()
    methods: when input handler disconnects it wakes up all regular
    users and then process to walk user list to wake up async. users.
    While disconnect() walks the list release() removes elements of
    the same list causing oopses.

    While this is not a substibute for proper locking we can reduce
    odds of getting an oops if we wake up normal readers after walking
    the list.

    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

09 May, 2007

1 commit


05 May, 2007

1 commit

  • * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input: (65 commits)
    Input: gpio_keys - add support for switches (EV_SW)
    Input: cobalt_btns - convert to use polldev library
    Input: add skeleton for simple polled devices
    Input: update some documentation
    Input: wistron - fix typo in keymap for Acer TM610
    Input: add input_set_capability() helper
    Input: i8042 - add Fujitsu touchscreen/touchpad PNP IDs
    Input: i8042 - add Panasonic CF-29 to nomux list
    Input: lifebook - split into 2 devices
    Input: lifebook - add signature of Panasonic CF-29
    Input: lifebook - activate 6-byte protocol on select models
    Input: lifebook - work properly on Panasonic CF-18
    Input: cobalt buttons - separate device and driver registration
    Input: ati_remote - make button repeat sensitivity configurable
    Input: pxa27x - do not use deprecated SA_INTERRUPT flag
    Input: ucb1400 - make delays configurable
    Input: misc devices - switch to using input_dev->dev.parent
    Input: joysticks - switch to using input_dev->dev.parent
    Input: touchscreens - switch to using input_dev->dev.parent
    Input: mice - switch to using input_dev->dev.parent
    ...

    Fixed up conflicts with core device model removal of "struct subsystem" manually.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

03 May, 2007

1 commit


12 Apr, 2007

4 commits


17 Nov, 2006

1 commit

  • In mousedev the BTN_LEFT and BTN_FORWARD were mapped to mouse button 0,
    causing that the user space program cannot distinguish between them through
    /dev/input/mice. All mice have BTN_LEFT, but not all have BTN_MIDDLE (e.g.
    Clevo D410J laptop). Mapping BTN_FORWARD to mouse button 2 makes the
    BTN_FORWARD button useful on this laptop.

    Signed-off-by: Marton Nemeth
    Signed-off-by: Dmitry Torokhov

    Marton Nemeth
     

14 Sep, 2006

2 commits


01 Jul, 2006

1 commit