15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

18 Nov, 2014

1 commit

  • Setting the ac97_control field on a CPU DAI tells the ASoC core that this
    DAI in addition to audio data also transports control data to the CODEC.
    This causes the core to suspend the DAI after the CODEC and resume it before
    the CODEC so communication to the CODEC is still possible. This is not
    necessarily something that is specific to AC'97 and can be used by other
    buses with the same requirement. This patch renames the flag from
    ac97_control to bus_control to make this explicit.

    While we are at it also change the type from int to bool.

    The following semantich patch was used for automatic conversion of the
    drivers:
    //
    @@
    identifier drv;
    @@
    struct snd_soc_dai_driver drv = {
    - .ac97_control
    + .bus_control
    =
    - 1
    + true
    };
    //

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     

01 Nov, 2014

1 commit


20 Oct, 2014

1 commit


17 Jul, 2014

1 commit


28 May, 2014

2 commits


13 Mar, 2014

2 commits


18 Feb, 2014

3 commits

  • There are a few known (minor) problems with having the support code for both I2C
    and SPI in the same module:
    * We need to be extra careful to make sure to not build the driver into the
    kernel if one of the subsystems is build as a module (Currently only I2C
    can be build as a module).
    * The module init path error handling is rather ugly. E.g. what should be
    done if either the SPI or the I2C driver fails to register. Most drivers
    that implement SPI and I2C in the same module currently fallback to
    undefined behavior in that case. Splitting the the driver into two
    modules, one for each bus, allows the registration of the other bus drive
    to continue without problems if one of them fails.

    This patch splits the ADAV80X driver into 3 modules. One core module that
    implements the device logic, but is independent of the bus method used. And one
    module for SPI and I2C each that registers the drivers and sets up the regmap
    struct for the bus.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     
  • There are a few known (minor) problems with having the support code for both I2C
    and SPI in the same module:
    * We need to be extra careful to make sure to not build the driver into the
    kernel if one of the subsystems is build as a module (Currently only I2C
    can be build as a module).
    * The module init path error handling is rather ugly. E.g. what should be
    done if either the SPI or the I2C driver fails to register? Most drivers
    that implement SPI and I2C in the same module currently fallback to
    undefined behavior in that case. Splitting the the driver into two
    modules, one for each bus allows the registration of the other bus driver
    to continue without problems if one of them fails.

    This patch splits the ssm2602 driver into 3 modules. One core module that
    implements the device logic, but is independent of the bus method used. And one
    module for SPI and I2C each that registers the drivers and sets up the regmap
    struct for the bus.

    While we are at it also cleanup the include section of the ssm2602 driver and
    remove unneeded includes.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     
  • There are a few known (minor) problems with having the support code for both I2C
    and SPI in the same module:
    * We need to be extra careful to make sure to not build the driver into the
    kernel if one of the subsystems is build as a module (Currently only I2C
    can be build as a module).
    * The module init path error handling is rather ugly. E.g. what should be
    done if either the SPI or the I2C driver fails to register? Most drivers
    that implement SPI and I2C in the same module currently fallback to
    undefined behavior in that case. Splitting the the driver into two
    modules, one for each bus, allows the registration of the other bus driver
    to continue without problems if one of them fails.

    This patch splits the AD193X driver into 3 modules. One core module that
    implements the device logic, but is independent of the bus method used. And one
    module for SPI and I2C each that registers the drivers and sets up the regmap
    struct for the bus.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     

13 Feb, 2014

1 commit


23 Dec, 2013

1 commit

  • The ASoC core assumes that the PCM component of the ASoC card transparently
    moves data around and does not impose any restrictions on the memory layout or
    the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
    the PCM driver that are related to this. Setting these fields in the PCM driver
    might suggest otherwise though, so rather not set them.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     

17 Nov, 2013

1 commit

  • Pull sound fixes from Takashi Iwai:
    "Two peaks in diffstat are for the audio EQ init of IDT codecs and the
    EMU2004 usb mixer addition, both of which are pretty device-specific,
    so safe to apply. The rest are a bunch of small fixes, most of them
    are regression fixes"

    * tag 'sound-fix-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (26 commits)
    ALSA: hda - load EQ params into IDT codec on HP bNB13 systems
    ASoC: cs42l52: Correct MIC CTL mask
    ASoC: wm8962: Turn on regcache_cache_only before disabling regulator
    ALSA: jack: Unregister input device at disconnection
    ALSA: pcsp: Fix the order of input device unregistration
    ASoC: fsl: imx-pcm-fiq: omit fiq counter to avoid harm in unbalanced situations
    ASoC: blackfin: Fix missing break
    ALSA: usb-audio: add front jack channel selector for EMU0204
    ALSA: hda - Don't clear the power state at snd_hda_codec_reset()
    ASoC: arizona: Fix typo in name of EQ coefficient controls
    ALSA: hda - Control EAPD for Master volume on Lenovo N100
    ALSA: hda - Don't turn off EAPD for headphone on Lenovo N100
    ALSA: isa: not allocating enough space
    ALSA: snd-aoa: two copy and paste bugs
    ASoC: wm8997: Correct typo in ISRC mux routes
    ALSA: hda - Check keep_eapd_on before inv_eapd
    ALSA: hda - Fix Line Out automute on Realtek multifunction jacks
    ALSA: msnd: Avoid duplicated driver name
    ALSA: compress_core: don't return -EBADFD from poll if paused
    ALSA: hda - hdmi: Fix wrong baseline length in ATI/AMD generated ELD
    ...

    Linus Torvalds
     

16 Nov, 2013

1 commit


14 Nov, 2013

2 commits

  • Pull DMA mask updates from Russell King:
    "This series cleans up the handling of DMA masks in a lot of drivers,
    fixing some bugs as we go.

    Some of the more serious errors include:
    - drivers which only set their coherent DMA mask if the attempt to
    set the streaming mask fails.
    - drivers which test for a NULL dma mask pointer, and then set the
    dma mask pointer to a location in their module .data section -
    which will cause problems if the module is reloaded.

    To counter these, I have introduced two helper functions:
    - dma_set_mask_and_coherent() takes care of setting both the
    streaming and coherent masks at the same time, with the correct
    error handling as specified by the API.
    - dma_coerce_mask_and_coherent() which resolves the problem of
    drivers forcefully setting DMA masks. This is more a marker for
    future work to further clean these locations up - the code which
    creates the devices really should be initialising these, but to fix
    that in one go along with this change could potentially be very
    disruptive.

    The last thing this series does is prise away some of Linux's addition
    to "DMA addresses are physical addresses and RAM always starts at
    zero". We have ARM LPAE systems where all system memory is above 4GB
    physical, hence having DMA masks interpreted by (eg) the block layers
    as describing physical addresses in the range 0..DMAMASK fails on
    these platforms. Santosh Shilimkar addresses this in this series; the
    patches were copied to the appropriate people multiple times but were
    ignored.

    Fixing this also gets rid of some ARM weirdness in the setup of the
    max*pfn variables, and brings ARM into line with every other Linux
    architecture as far as those go"

    * 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm: (52 commits)
    ARM: 7805/1: mm: change max*pfn to include the physical offset of memory
    ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations
    ARM: 7796/1: scsi: Use dma_max_pfn(dev) helper for bounce_limit calculations
    ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function
    ARM: 7794/1: block: Rename parameter dma_mask to max_addr for blk_queue_bounce_limit()
    ARM: DMA-API: better handing of DMA masks for coherent allocations
    ARM: 7857/1: dma: imx-sdma: setup dma mask
    DMA-API: firmware/google/gsmi.c: avoid direct access to DMA masks
    DMA-API: dcdbas: update DMA mask handing
    DMA-API: dma: edma.c: no need to explicitly initialize DMA masks
    DMA-API: usb: musb: use platform_device_register_full() to avoid directly messing with dma masks
    DMA-API: crypto: remove last references to 'static struct device *dev'
    DMA-API: crypto: fix ixp4xx crypto platform device support
    DMA-API: others: use dma_set_coherent_mask()
    DMA-API: staging: use dma_set_coherent_mask()
    DMA-API: usb: use new dma_coerce_mask_and_coherent()
    DMA-API: usb: use dma_set_coherent_mask()
    DMA-API: parport: parport_pc.c: use dma_coerce_mask_and_coherent()
    DMA-API: net: octeon: use dma_coerce_mask_and_coherent()
    DMA-API: net: nxp/lpc_eth: use dma_coerce_mask_and_coherent()
    ...

    Linus Torvalds
     
  • Fixes: 4b2ffc205cb9 ('ASoC: Blackfin I2S: add 8-bit sample support')
    Reported-by: David Binderman
    Signed-off-by: Takashi Iwai
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Takashi Iwai
     

06 Nov, 2013

1 commit


31 Oct, 2013

1 commit

  • This code sequence is unsafe in modules:

    static u64 mask = DMA_BIT_MASK(something);
    ...
    if (!dev->dma_mask)
    dev->dma_mask = &mask;

    as if a module is reloaded, the mask will be pointing at the original
    module's mask address, and this can lead to oopses. Moreover, they
    all follow this with:

    if (!dev->coherent_dma_mask)
    dev->coherent_dma_mask = mask;

    where 'mask' is the same value as the statically defined mask, and this
    bypasses the architecture's check on whether the DMA mask is possible.

    Fix these issues by using the new dma_coerce_coherent_and_mask()
    function.

    Acked-by: Mark Brown
    Acked-by: Takashi Iwai
    Signed-off-by: Russell King

    Russell King
     

17 Sep, 2013

1 commit


30 Jul, 2013

3 commits


28 Jun, 2013

1 commit


27 Jun, 2013

2 commits

  • Currently we can only have a single platform built in with AC'97 support
    due to the use of a global variable to provide the bus operations. Fix
    this by making that variable a pointer and having the bus drivers set the
    operations prior to registering.

    This is not a particularly good or nice approach but it avoids blocking
    multiplatform and a real fix involves fixing the fairly deep problems
    with AC'97 support - we should be converting it to a real bus.

    Acked-by: Arnd Bergmann
    Reviewed-by: Stephen Warren
    Signed-off-by: Mark Brown

    Mark Brown
     
  • Also clean up the error reporting from failed requests while we're at it.

    Signed-off-by: Mark Brown

    Mark Brown
     

30 May, 2013

9 commits


15 May, 2013

1 commit


27 Mar, 2013

3 commits