23 May, 2012

1 commit

  • Pull HID subsystem updates from Jiri Kosina:
    "Apart from various driver updates and added support for a number of
    new devices (mostly multitouch ones, but not limited to), there is one
    change that is worth pointing out explicitly: creation of HID device
    groups and proper autoloading of hid-multitouch, implemented by Henrik
    Rydberg."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (50 commits)
    HID: wacom: fix build breakage without CONFIG_LEDS_CLASS
    HID: waltop: Extend barrel button fix
    HID: hyperv: Set the hid drvdata correctly
    HID: wacom: Unify speed setting
    HID: wacom: Add speed setting for Intuos4 WL
    HID: wacom: Move Graphire raport header check.
    HID: uclogic: Add support for UC-Logic TWHL850
    HID: explain the signed/unsigned handling in hid_add_field()
    HID: handle logical min/max signedness properly in parser
    HID: logitech: read all 32 bits of report type bitfield
    HID: wacom: Add LED selector control for Wacom Intuos4 WL
    HID: hid-multitouch: fix wrong protocol detection
    HID: wiimote: Fix IR data parser
    HID: wacom: Add tilt reporting for Intuos4 WL
    HID: multitouch: MT interface matching for Baanto
    HID: hid-multitouch: Only match MT interfaces
    HID: Create a common generic driver
    HID: hid-multitouch: Switch to device groups
    HID: Create a generic device group
    HID: Allow bus wildcard matching
    ...

    Linus Torvalds
     

01 May, 2012

2 commits

  • Most HID drivers do not need to know what bus driver is in use.
    A generic group driver can drive any hid device, and the device
    list should not need to be duplicated for each new bus.

    This patch adds wildcard matching to the HID bus, simplifying device
    list handling for group drivers.

    Signed-off-by: Henrik Rydberg
    Acked-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Henrik Rydberg
     
  • HID devices are only partially presented to userland. Hotplugged
    devices emit events containing a modalias based on the basic bus,
    vendor and product entities. However, in practise a hid device can
    depend on details such as a single usb interface or a particular item
    in a report descriptor.

    This patch adds a device group to the hid device id, and broadcasts it
    using uevent and the device modalias. The module alias generation is
    modified to match. As a consequence, a device with a non-zero group
    will be processed by the corresponding group driver instead of by the
    generic hid driver.

    Signed-off-by: Henrik Rydberg
    Acked-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Henrik Rydberg
     

19 Apr, 2012

1 commit

  • The symbol table on x86-64 starts to have entries that have names
    like:

    _GLOBAL__sub_I_65535_0___mod_x86cpu_device_table

    They are of type STT_FUNCTION and this one had a length of 18. This
    matched the device ID validation logic and it barfed because the
    length did not meet the device type's criteria.

    --------------------
    FATAL: arch/x86/crypto/aesni-intel: sizeof(struct x86cpu_device_id)=16 is not a modulo of the size of section __mod_x86cpu_device_table=18.
    Fix definition of struct x86cpu_device_id in mod_devicetable.h
    --------------------

    These are some kind of compiler tool internal stuff being emitted and
    not something we want to inspect in modpost's device ID table
    validation code.

    So skip the symbol if it is not of type STT_OBJECT.

    Signed-off-by: David S. Miller
    Acked-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    David Miller
     

10 Mar, 2012

1 commit


27 Feb, 2012

1 commit

  • commit e49ce14150c64b29a8dd211df785576fa19a9858 breaks cross compiling
    the linux kernel on darwin hosts.
    This fix introduce some minimal glue to adopt linker section handling
    for darwin hosts.

    Signed-off-by: Andreas Bießmann
    CC: Rusty Russell
    CC: Greg Kroah-Hartman
    CC: Jochen Friedrich
    CC: Samuel Ortiz
    CC: "K. Y. Srinivasan"
    Signed-off-by: Rusty Russell
    Tested-by: Bernhard Walle

    Andreas Bießmann
     

14 Feb, 2012

2 commits

  • Handling of isapnp module aliases was broken by commit
    626596e295d477c0fefa08cd5daa7dd011b1bb2c by changing "isapnp" string to "isa".
    The code was then modified by commit
    e49ce14150c64b29a8dd211df785576fa19a9858 but this bug remained.

    Change the string back to "isapnp".

    Signed-off-by: Ondrej Zary
    Signed-off-by: Rusty Russell

    Ondrej Zary
     
  • We currently include commas on both sides of the feature ID in a
    modalias, but this prevents the lowest numbered feature of a CPU from
    being matched. Since all feature IDs have the same length, we do not
    need to worry about substring matches, so omit commas from the
    modalias entirely.

    Avoid generating multiple adjacent wildcards when there is no
    feature ID to match.

    Signed-off-by: Ben Hutchings
    Acked-by: Thomas Renninger
    Acked-by: H. Peter Anvin
    Signed-off-by: Greg Kroah-Hartman

    Ben Hutchings
     

03 Feb, 2012

1 commit


27 Jan, 2012

1 commit

  • There's a growing number of drivers that support a specific x86 feature
    or CPU. Currently loading these drivers currently on a generic
    distribution requires various driver specific hacks and it often
    doesn't work.

    This patch adds auto probing for drivers based on the x86 cpuid
    information, in particular based on vendor/family/model number
    and also based on CPUID feature bits.

    For example a common issue is not loading the SSE 4.2 accelerated
    CRC module: this can significantly lower the performance of BTRFS
    which relies on fast CRC.

    Another issue is loading the right CPUFREQ driver for the current CPU.
    Currently distributions often try all all possible driver until
    one sticks, which is not really a good way to do this.

    It works with existing udev without any changes. The code
    exports the x86 information as a generic string in sysfs
    that can be matched by udev's pattern matching.

    This scheme does not support numeric ranges, so if you want to
    handle e.g. ranges of model numbers they have to be encoded
    in ASCII or simply all models or families listed. Fixing
    that would require changing udev.

    Another issue is that udev will happily load all drivers that match,
    there is currently no nice way to stop a specific driver from
    being loaded if it's not needed (e.g. if you don't need fast CRC)
    But there are not that many cpu specific drivers around and they're
    all not that bloated, so this isn't a particularly serious issue.

    Originally this patch added the modalias to the normal cpu
    sysdevs. However sysdevs don't have all the infrastructure
    needed for udev, so it couldn't really autoload drivers.
    This patch instead adds the CPU modaliases to the cpuid devices,
    which are real devices with full support for udev. This implies
    that the cpuid driver has to be loaded to use this.

    This patch just adds infrastructure, some driver conversions
    in followups.

    Thanks to Kay for helping with some sysfs magic.

    v2: Constifcation, some updates
    v4: (trenn@suse.de):
    - Use kzalloc instead of kmalloc to terminate modalias buffer
    - Use uppercase hex values to match correctly against hex values containing
    letters

    Cc: Dave Jones
    Cc: Kay Sievers
    Cc: Jen Axboe
    Cc: Herbert Xu
    Cc: Huang Ying
    Cc: Len Brown
    Signed-off-by: Andi Kleen
    Signed-off-by: Thomas Renninger
    Acked-by: H. Peter Anvin
    Signed-off-by: Greg Kroah-Hartman

    Andi Kleen
     

21 Jan, 2012

1 commit

  • This reverts commit 5dd7bf59e0e8563265b3e5b33276099ef628fcc7.

    Conflicts:

    scripts/mod/file2alias.c

    This change is wrong on many levels. First and foremost, it causes a
    regression. On boot on Assabet, which this patch gives a codec id of
    'ucb1x00', it gives:

    ucb1x00 ID not found: 1005

    0x1005 is a valid ID for the UCB1300 device.

    Secondly, this patch is way over the top in terms of complexity. The
    only device which has been seen to be connected with this MCP code is
    the UCB1x00 (UCB1200, UCB1300 etc) devices, and they all use the same
    driver. Adding a match table, requiring the codec string to match the
    hardware ID read out of the ID register, etc is completely over the top
    when we can just read the hardware ID register.

    Russell King
     

15 Jan, 2012

1 commit

  • Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1

    * tag 'for-linus' of git://github.com/rustyrussell/linux:
    module_param: check that bool parameters really are bool.
    intelfbdrv.c: bailearly is an int module_param
    paride/pcd: fix bool verbose module parameter.
    module_param: make bool parameters really bool (drivers & misc)
    module_param: make bool parameters really bool (arch)
    module_param: make bool parameters really bool (core code)
    kernel/async: remove redundant declaration.
    printk: fix unnecessary module_param_name.
    lirc_parallel: fix module parameter description.
    module_param: avoid bool abuse, add bint for special cases.
    module_param: check type correctness for module_param_array
    modpost: use linker section to generate table.
    modpost: use a table rather than a giant if/else statement.
    modules: sysfs - export: taint, coresize, initsize
    kernel/params: replace DEBUGP with pr_debug
    module: replace DEBUGP with pr_debug
    module: struct module_ref should contains long fields
    module: Fix performance regression on modules with large symbol tables
    module: Add comments describing how the "strmap" logic works

    Fix up conflicts in scripts/mod/file2alias.c due to the new linker-
    generated table approach to adding __mod_*_device_table entries. The
    ARM sa11x0 mcp bus needed to be converted to that too.

    Linus Torvalds
     

14 Jan, 2012

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (59 commits)
    rtc: max8925: Add function to work as wakeup source
    mfd: Add pm ops to max8925
    mfd: Convert aat2870 to dev_pm_ops
    mfd: Still check other interrupts if we get a wm831x touchscreen IRQ
    mfd: Introduce missing kfree in 88pm860x probe routine
    mfd: Add S5M series configuration
    mfd: Add s5m series irq driver
    mfd: Add S5M core driver
    mfd: Improve mc13xxx dt binding document
    mfd: Fix stmpe section mismatch
    mfd: Fix stmpe build warning
    mfd: Fix STMPE I2c build failure
    mfd: Constify aat2870-core i2c_device_id table
    gpio: Add support for stmpe variant 801
    mfd: Add support for stmpe variant 801
    mfd: Add support for stmpe variant 610
    mfd: Add support for STMPE SPI interface
    mfd: Separate out STMPE controller and interface specific code
    misc: Remove max8997-muic sysfs attributes
    mfd: Remove unused wm831x_irq_data_to_mask_reg()
    ...

    Fix up trivial conflict in drivers/leds/Kconfig due to addition of
    LEDS_MAX8997 and LEDS_TCA6507 next to each other.

    Linus Torvalds
     

13 Jan, 2012

2 commits


09 Jan, 2012

1 commit


22 Nov, 2011

1 commit

  • This patch adds the necessary support in file2alias.c to define
    suitable aliases based on the amba_id table in AMBA driver modules.

    This should be sufficient to allow such modules to be auto-loaded
    via udev. The AMBA bus driver's uevent hotplug code is also
    modified to pass an approriate MODALIAS string in the event.

    For simplicity, the AMBA ID is treated an an opaque 32-bit numeber.
    Module alises use patterns as appropriate to describe the value-
    mask pairs described in the driver's amba_id list.

    The proposed alias format is (extended regex):

    ^amba:d(HEX){8}$

    Where HEX is a single upper-case HEX digit or a pattern (? or []
    expression) matching a single upper-case HEX digit, as expected by
    udev.

    "d" is short for "device", following existing alias naming
    conventions for other device types. This adds some flexibility for
    unambiguously extending the alias format in the future by adding
    additional leading and trailing fields, if this turns out to be
    necessary.

    Signed-off-by: Dave Martin
    Acked-by: Pawel Moll

    Dave Martin
     

26 Aug, 2011

2 commits


11 May, 2011

1 commit

  • Broadcom has released cards based on a new AMBA-based bus type. From a
    programming point of view, this new bus type differs from AMBA and does
    not use AMBA common registers. It also differs enough from SSB. We
    decided that a new bus driver is needed to keep the code clean.

    In its current form, the driver detects devices present on the bus and
    registers them in the system. It allows registering BCMA drivers for
    specified bus devices and provides them basic operations. The bus driver
    itself includes two important bus managing drivers: ChipCommon core
    driver and PCI(c) core driver. They are early used to allow correct
    initialization.

    Currently code is limited to supporting buses on PCI(e) devices, however
    the driver is designed to be used also on other hosts. The host
    abstraction layer is implemented and already used for PCI(e).

    Support for PCI(e) hosts is working and seems to be stable (access to
    80211 core was tested successfully on a few devices). We can still
    optimize it by using some fixed windows, but this can be done later
    without affecting any external code. Windows are just ranges in MMIO
    used for accessing cores on the bus.

    Cc: Greg KH
    Cc: Michael Büsch
    Cc: Larry Finger
    Cc: George Kashperko
    Cc: Arend van Spriel
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Russell King
    Cc: Arnd Bergmann
    Cc: Andy Botting
    Cc: linuxdriverproject
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Rafał Miłecki
    Signed-off-by: John W. Linville

    Rafał Miłecki
     

04 Aug, 2010

1 commit


03 Aug, 2010

1 commit

  • This patch makes modpost able to process object files with more than
    64k sections. Needed for huge kernel builds (allyesconfig, for example)
    with -ffunction-sections. 64k sections handling is covered, for example,
    by this document:

    "IA-64 gABI Proposal 74: Section Indexes"
    http://www.codesourcery.com/public/cxx-abi/abi/prop-74-sindex.html

    Signed-off-by: Denys Vlasenko
    Signed-off-by: Anders Kaseorg
    Acked-by: Sam Ravnborg
    Cc: Rusty Russell
    Cc: Andi Kleen
    Signed-off-by: Michal Marek

    Denys Vlasenko
     

22 May, 2010

1 commit


19 May, 2010

2 commits

  • On Monday 23 November 2009 04:29:53 Rusty Russell wrote:
    > On Mon, 23 Nov 2009 07:31:57 am Ondrej Zary wrote:
    > > The problem is that
    > > scripts/mod/file2alias.c simply ignores isapnp.
    >
    > AFAICT it always has, and noone has complained until now. Perhaps
    > something was still reading /lib/modules/`uname -r`/modules.isapnpmap?

    The patch below works fine (at least with Debian). It needs your first
    patch that moves the definitions to mod_devicetable.h. Verified that
    aliases for these modules are generated correctly:

    drivers/media/radio/radio-sf16fmi.c
    drivers/net/ne.c
    drivers/net/3c515.c
    drivers/net/smc-ultra.c
    drivers/pcmcia/i82365.c
    drivers/scsi/aha1542.c
    drivers/scsi/aha152x.c
    drivers/scsi/sym53c416.c
    drivers/scsi/g_NCR5380.c

    Tested with RTL8019AS (ne), AVA-1505AE (aha152x) and dtc436e (g_NCR5380)
    cards - they now work automatically.

    Generate pnp:d aliases for isapnp_device_tables. This allows udev to load
    these modules automatically.

    Signed-off-by: Ondrej Zary
    Signed-off-by: Rusty Russell

    Ondrej Zary
     
  • Conflicts:
    include/linux/mod_devicetable.h
    scripts/mod/file2alias.c

    David S. Miller
     

18 May, 2010

1 commit


03 Apr, 2010

1 commit

  • We don't use the normal hotplug mechanism because it doesn't work. It will
    load the module some time after the device appears, but that's not good
    enough for us -- we need the driver loaded _immediately_ because otherwise
    the NIC driver may just abort and then the phy 'device' goes away.

    [bwh: s/phy/mdio/ in module alias, kerneldoc for struct mdio_device_id]

    Signed-off-by: David Woodhouse
    Signed-off-by: Ben Hutchings
    Acked-by: Andy Fleming
    Signed-off-by: David S. Miller

    David Woodhouse
     

18 Jan, 2010

1 commit

  • The sym_is() compares a symbol in an attempt to automatically skip symbol
    prefixes. It does this first by searching the real symbol with the normal
    unprefixed symbol. But then it uses the length of the original symbol to
    check the end of the substring instead of the length of the symbol it is
    looking for. On non-prefixed arches, this is effectively the same thing,
    so there is no problem. On prefixed-arches, since this is exceeds by just
    one byte, a crash is rare and it is usually a NUL byte anyways. But every
    once in a blue moon, you get the right page alignment and it segfaults.

    For example, on the Blackfin arch, sym_is() will be called with the real
    symbol "___mod_usb_device_table" as "symbol" when looking for the normal
    symbol "__mod_usb_device_table" as "name". The substring will thus return
    one byte into "symbol" and store it into "match". But then "match" will
    be indexed with the length of "symbol" instead of "name" and so we will
    exceed the storage. i.e. the code ends up doing:
    char foo[] = "abc"; return foo[strlen(foo)+1] == '\0';

    Signed-off-by: Mike Frysinger
    Signed-off-by: Rusty Russell
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     

12 Dec, 2009

2 commits

  • This patch fixes a bug when incrementing/decrementing on a BCD formatted
    integer (i.e. 0x09++ should be 0x10 not 0x0A). It just adds a function
    for incrementing/decrementing BCD integers by converting to decimal,
    doing the increment/decrement and then converting back to BCD.

    Signed-off-by: Nathaniel McCallum
    Signed-off-by: Greg Kroah-Hartman

    Nathaniel McCallum
     
  • The current code to generate usb modaliases from usb_device_id assumes
    that the device's bcdDevice descriptor will actually be in BCD format.
    While this should be a sane assumption, some devices don't follow spec
    and just use plain old hex. This causes drivers for these devices to
    generate invalid modalias lines which will never actually match for the
    hardware.

    The following patch adds hex support for bcdDevice in file2alias.c by
    detecting when a driver uses a hex formatted bcdDevice_(lo|hi) and
    adjusts the output to hex format accordingly.

    Drivers for devices which have bcdDevice conforming to BCD will have no
    change in modalias output. Drivers for devices which don't conform
    (i.e. ibmcam) should now generate valid modaliases.

    EXAMPLE OUTPUT (ibmcam; space added to highlight change)
    Old: usb:v0545p800D d030[10-9] dc*dsc*dp*ic*isc*ip*
    New: usb:v0545p800D d030a dc*dsc*dp*ic*isc*ip*

    Signed-off-by: Nathaniel McCallum
    Signed-off-by: Greg Kroah-Hartman

    Nathaniel McCallum
     

23 Sep, 2009

2 commits

  • This makes it consistent with other buses (platform, i2c, vio, ...). I'm
    not sure why we use the prefixes, but there must be a reason.

    This was easy enough to do it, and I did it.

    Signed-off-by: Anton Vorontsov
    Cc: David Brownell
    Cc: David Woodhouse
    Cc: Grant Likely
    Cc: Jean Delvare
    Cc: Ben Dooks
    Cc: Benjamin Herrenschmidt
    Cc: Dmitry Torokhov
    Cc: Samuel Ortiz
    Cc: "John W. Linville"
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • With this patch spi drivers can use standard spi_driver.id_table and
    MODULE_DEVICE_TABLE() mechanisms to bind against the devices. Just like
    we do with I2C drivers.

    This is useful when a single driver supports several variants of devices
    but it is not possible to detect them in run-time (like non-JEDEC chips
    probing in drivers/mtd/devices/m25p80.c), and when platform_data usage is
    overkill.

    This patch also makes life a lot easier on OpenFirmware platforms, since
    with OF we extensively use proper device IDs in modaliases.

    Signed-off-by: Anton Vorontsov
    Cc: David Brownell
    Cc: David Woodhouse
    Cc: Grant Likely
    Cc: Jean Delvare
    Cc: Ben Dooks
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     

12 Jun, 2009

1 commit


25 Mar, 2009

1 commit

  • Now platform_device is being widely used on SoC processors where the
    peripherals are attached to the system bus, which is simple enough.

    However, silicon IPs for these SoCs are usually shared heavily across
    a family of processors, even products from different companies. This
    makes the original simple driver name based matching insufficient, or
    simply not straight-forward.

    Introduce a module id table for platform devices, and makes it clear
    that a platform driver is able to support some shared IP and handle
    slight differences across different platforms (by 'driver_data').
    Module alias is handled automatically when a MODULE_DEVICE_TABLE()
    is defined.

    To not disturb the current platform drivers too much, the matched id
    entry is recorded and can be retrieved by platform_get_device_id().

    Signed-off-by: Eric Miao
    Cc: Kay Sievers
    Cc: Ben Dooks
    Signed-off-by: Greg Kroah-Hartman

    Eric Miao
     

17 Feb, 2009

1 commit


21 Jan, 2009

1 commit


15 Oct, 2008

1 commit


13 Oct, 2008

1 commit

  • This makes modpost handle MODULE_DEVICE_TABLE(dmi, xxxx).

    I had to change the string pointers in the match table to char arrays,
    and picked a size of 79 bytes almost at random -- do we need to make it
    bigger than that? I was a bit concerned about the 'bloat' this
    introduces into the match tables, but they should all be __initdata so
    it shouldn't matter too much.

    (Actually, modpost does go through the relocations and look at most of
    them; it wouldn't be impossible to make it handle string pointers -- but
    doesn't seem to be worth the effort, since they're __initdata).

    Signed-off-by: David Woodhouse

    David Woodhouse
     

22 Aug, 2008

1 commit


25 Jul, 2008

1 commit

  • Trying to compile the v850 port brings many compile errors, one of them exists
    since at least kernel 2.6.19.

    There also seems to be noone willing to bring this port back into a usable
    state.

    This patch therefore removes the v850 port.

    If anyone ever decides to revive the v850 port the code will still be
    available from older kernels, and it wouldn't be impossible for the port to
    reenter the kernel if it would become actively maintained again.

    Signed-off-by: Adrian Bunk
    Acked-by: Greg Ungerer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk