24 Jul, 2020

1 commit


29 Apr, 2020

1 commit

  • Delete unused initialized value, because 'ret' will be assigined
    by the function of_alias_get_id().

    Signed-off-by: Zhang Shengju
    Signed-off-by: Tang Bin
    Link: https://lore.kernel.org/r/20200429093823.1372-1-tangbin@cmss.chinamobile.com
    Signed-off-by: Mark Brown

    Tang Bin
     

27 Apr, 2020

1 commit

  • The function mxs_saif_probe() is only called with an
    openfirmware platform device. Therefore there is no
    need to check that it has an openfirmware node.

    Signed-off-by: Shengju Zhang
    Signed-off-by: Tang Bin
    Link: https://lore.kernel.org/r/20200420142509.9728-1-tangbin@cmss.chinamobile.com
    Signed-off-by: Mark Brown

    Tang Bin
     

27 Mar, 2020

1 commit


02 Aug, 2019

1 commit

  • We don't need dev_err() messages when platform_get_irq() fails now that
    platform_get_irq() prints an error message itself when something goes
    wrong. Let's remove these prints with a simple semantic patch.

    //
    @@
    expression ret;
    struct platform_device *E;
    @@

    ret =
    (
    platform_get_irq(E, ...)
    |
    platform_get_irq_byname(E, ...)
    );

    if ( \( ret < 0 \| ret

    While we're here, remove braces on if statements that only have one
    statement (manually).

    Cc: Liam Girdwood
    Cc: Mark Brown
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: alsa-devel@alsa-project.org
    Cc: Greg Kroah-Hartman
    Signed-off-by: Stephen Boyd
    Link: https://lore.kernel.org/r/20190730181557.90391-50-swboyd@chromium.org
    Signed-off-by: Mark Brown

    Stephen Boyd
     

31 Jul, 2019

1 commit


28 Jun, 2019

1 commit

  • commit 5f92229d184b ("ASoC: mxs: mxs-sgtl5000: don't select unnecessary
    Platform")

    Current ALSA SoC avoid to add duplicate component to rtd,
    and this driver was selecting CPU component as Platform component.
    Thus, above patch removed Platform settings from this driver,
    because it assumed these are same component.

    But, some CPU driver is using generic DMAEngine, in such case, both
    CPU component and Platform component will have same of_node/name.
    In other words, there are some components which are different but
    have same of_node/name.

    In such case, Card driver definitely need to select Platform even
    though it is same as CPU.
    It is depends on CPU driver, but is difficult to know it from Card driver.
    This patch reverts above patch.

    Fixes: commit 5f92229d184b ("ASoC: mxs: mxs-sgtl5000: don't select unnecessary Platform")
    Signed-off-by: Kuninori Morimoto
    Signed-off-by: Mark Brown

    Kuninori Morimoto
     

26 Jun, 2019

1 commit


19 Jun, 2019

1 commit


07 Jun, 2019

1 commit


21 May, 2019

2 commits

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    51 franklin street fifth floor boston ma 02110 1301 usa

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option [no]_[pad]_[ctrl] any later version this program is
    distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details you should have received a copy of the gnu general
    public license along with this program if not write to the free
    software foundation inc 51 franklin street fifth floor boston ma
    02110 1301 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 176 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Jilayne Lovejoy
    Reviewed-by: Steve Winslow
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190519154040.652910950@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Add SPDX license identifiers to all Make/Kconfig files which:

    - Have no license information of any form

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

16 May, 2019

1 commit

  • Now that we've gotten rid of clk_readl() we can remove io.h from the
    clk-provider header and push out the io.h include to any code that isn't
    already including the io.h header but using things like readl/writel,
    etc.

    Found with this grep:

    git grep -l clk-provider.h | grep '.c$' | xargs git grep -L 'linux/io.h' | \
    xargs git grep -l \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\' --or \
    -e '\'

    I also reordered a couple includes when they weren't alphabetical and
    removed clk.h from kona, replacing it with clk-provider.h because
    that driver doesn't use clk consumer APIs.

    Acked-by: Geert Uytterhoeven
    Cc: Chen-Yu Tsai
    Acked-by: Maxime Ripard
    Acked-by: Tero Kristo
    Acked-by: Sekhar Nori
    Cc: Krzysztof Kozlowski
    Acked-by: Mark Brown
    Cc: Chris Zankel
    Acked-by: Max Filippov
    Acked-by: John Crispin
    Acked-by: Heiko Stuebner
    Signed-off-by: Stephen Boyd

    Stephen Boyd
     

18 Jan, 2018

2 commits


13 Jan, 2018

1 commit


02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

01 Sep, 2017

1 commit


22 Aug, 2017

1 commit

  • First of all,the address of pdev->dev is assigned to card->dev,then
    the function platform_set_drvdata copies the value the variable card
    to pdev->dev.driver_data, but when calling snd_soc_register_card,the
    function dev_set_drvdata(card->dev, card) will also do the same copy
    operation,so i think that the former copy operation can be removed.

    Signed-off-by: Peng Donglin
    Signed-off-by: Mark Brown

    Donglin Peng
     

26 Jul, 2017

1 commit


18 Jan, 2017

2 commits

  • The SAIF base oversample rates are either 512*fs or 384*fs. An additional
    divider exists within the SAIF to generate sub-multiples of these two base
    rates if MCLK is required by the codec.

    * The sub-rates for the 512x base rate are: 256x, 128x, 64x, and 32x.
    * The sub-rates for the 384x base rate are: 192x, 96x, and 48x.

    Setting the base rate depending on the modulo operation with 32 and 48
    give wrong results for some mclk.

    If mclk=18.432MHz both modulo operations results in 0. As testing the
    result with 32 is done first, a wrong base rate of 512*fs is set instead
    of the correct 384*fs.

    Fix this by setting the base rate depending on the calculated sub-rate.

    Signed-off-by: Jörg Krause
    Signed-off-by: Mark Brown

    Jörg Krause
     
  • If SAIF0 is used in master and SAIF1 in slave mode setting the SAIF1
    register in mxs_saif_set_dai_fmt() does not have any effect on the
    interface as the clk gate needs to be cleared before the register can be
    written.

    Signed-off-by: Jörg Krause
    Signed-off-by: Mark Brown

    Jörg Krause
     

12 Dec, 2016

1 commit


26 Oct, 2016

1 commit


25 Oct, 2016

1 commit

  • Check for snd_soc_ops structures that are only stored in the ops field of a
    snd_soc_dai_link structure. This field is declared const, so snd_soc_ops
    structures that have this property can be declared as const also.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct snd_soc_ops i@p = { ... };

    @ok1@
    identifier r.i;
    struct snd_soc_dai_link e;
    position p;
    @@
    e.ops = &i@p;

    @ok2@
    identifier r.i, e;
    position p;
    @@
    struct snd_soc_dai_link e[] = { ..., { .ops = &i@p, }, ..., };

    @bad@
    position p != {r.p,ok1.p,ok2.p};
    identifier r.i;
    struct snd_soc_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct snd_soc_ops i = { ... };
    //

    The effect on the layout of the .o files is shown by the following output
    of the size command, first before then after the transformation:

    text data bss dec hex filename
    4500 696 0 5196 144c sound/soc/generic/simple-card.o
    4564 632 0 5196 144c sound/soc/generic/simple-card.o

    text data bss dec hex filename
    3018 608 0 3626 e2a sound/soc/generic/simple-scu-card.o
    3074 544 0 3618 e22 sound/soc/generic/simple-scu-card.o

    text data bss dec hex filename
    4148 2448 768 7364 1cc4 sound/soc/intel/boards/bdw-rt5677.o
    4212 2384 768 7364 1cc4 sound/soc/intel/boards/bdw-rt5677.o

    text data bss dec hex filename
    5403 4628 384 10415 28af sound/soc/intel/boards/bxt_da7219_max98357a.o
    5531 4516 384 10431 28bf sound/soc/intel/boards/bxt_da7219_max98357a.o

    text data bss dec hex filename
    5275 4496 384 10155 27ab sound/soc/intel/boards/bxt_rt298.o
    5403 4368 384 10155 27ab sound/soc/intel/boards/bxt_rt298.o

    text data bss dec hex filename
    10017 2344 48 12409 3079 sound/soc/intel/boards/bytcr_rt5640.o
    10145 2232 48 12425 3089 sound/soc/intel/boards/bytcr_rt5640.o

    text data bss dec hex filename
    3719 2356 0 6075 17bb sound/soc/intel/boards/bytcr_rt5651.o
    3847 2244 0 6091 17cb sound/soc/intel/boards/bytcr_rt5651.o

    text data bss dec hex filename
    3598 2392 0 5990 1766 sound/soc/intel/boards/cht_bsw_max98090_ti.o
    3726 2280 0 6006 1776 sound/soc/intel/boards/cht_bsw_max98090_ti.o

    text data bss dec hex filename
    5343 3624 16 8983 2317 sound/soc/intel/boards/cht_bsw_rt5645.o
    5471 3496 16 8983 2317 sound/soc/intel/boards/cht_bsw_rt5645.o

    text data bss dec hex filename
    4662 2592 384 7638 1dd6 sound/soc/intel/boards/cht_bsw_rt5672.o
    4790 2464 384 7638 1dd6 sound/soc/intel/boards/cht_bsw_rt5672.o

    text data bss dec hex filename
    1595 2528 0 4123 101b sound/soc/intel/boards/haswell.o
    1659 2472 0 4131 1023 sound/soc/intel/boards/haswell.o

    text data bss dec hex filename
    6272 4760 416 11448 2cb8 sound/soc/intel/boards/skl_nau88l25_max98357a.o
    6464 4568 416 11448 2cb8 sound/soc/intel/boards/skl_nau88l25_max98357a.o

    text data bss dec hex filename
    7075 4888 416 12379 305b sound/soc/intel/boards/skl_nau88l25_ssm4567.o
    7267 4696 416 12379 305b sound/soc/intel/boards/skl_nau88l25_ssm4567.o

    text data bss dec hex filename
    5659 4496 384 10539 292b sound/soc/intel/boards/skl_rt286.o
    5787 4368 384 10539 292b sound/soc/intel/boards/skl_rt286.o

    text data bss dec hex filename
    1721 2048 0 3769 eb9 sound/soc/kirkwood/armada-370-db.o
    1769 1976 0 3745 ea1 sound/soc/kirkwood/armada-370-db.o

    text data bss dec hex filename
    1363 1792 0 3155 c53 sound/soc/mxs/mxs-sgtl5000.o
    1427 1728 0 3155 c53 sound/soc/mxs/mxs-sgtl5000.o

    Signed-off-by: Julia Lawall
    Signed-off-by: Mark Brown

    Julia Lawall
     

13 Mar, 2016

1 commit


05 Feb, 2016

1 commit


27 Jan, 2016

1 commit

  • The clk_prepare() call in hw_params() has no matching clk_unprepare(),
    leaving the clk with an ever-increasing prepare count. Moreover,
    hw_params() can be called multiple times which would again leave us
    with a runaway prepare count. Fix this by moving the clk_prepare()
    call to the startup() function and adding a shutdown() function with
    a matching clk_unprepare() as these operations are already correctly
    bracketed by soc-core.

    Signed-off-by: Mans Rullgard
    Signed-off-by: Mark Brown

    Mans Rullgard
     

15 Sep, 2015

1 commit


05 Feb, 2015

1 commit


07 Jan, 2015

1 commit


31 Dec, 2014

1 commit


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
     

08 Dec, 2014

1 commit


28 Nov, 2014

1 commit

  • According to the sgtl5000 datasheet the MCLK frequency range restriction of
    8 to 27 MHz only applies when the PLL is used - synchronous SYS_MCLK input mode.

    mxs-sgtl5000 machine sets the codec as slave, and mx28 generates MCLK in the
    range of 256*fs, 384*fs or 512*fs, which is called asynchronous SYS_MCLK
    input.

    In asynchronous SYS_MCLK we cannot have the 8 to 27 MHz check because if we
    want to play a 8KHz sample rate track, with a MCLK of 8k * 512 = 4.096MHz the
    current check would return -EINVAL, which is not correct.

    Remove the 8 to 27MHz frequency check, since this only applies to the
    synchronous SYS_MCLK input case.

    Signed-off-by: Fabio Estevam
    Signed-off-by: Mark Brown

    Fabio Estevam
     

11 Nov, 2014

1 commit

  • Instead of registering the irq name with the driver name, it's better to pass
    the device name so that we have a more explicit indication as to what saif
    instance the irq is related:

    $ cat /proc/interrupts
    CPU0
    ...
    214: 4 - 59 80042000.saif
    215: 0 - 58 80046000.saif

    Signed-off-by: Fabio Estevam
    Signed-off-by: Mark Brown

    Fabio Estevam
     

20 Oct, 2014

1 commit


16 Jan, 2014

1 commit


07 Jan, 2014

2 commits

  • Since commit 7b11304 ("dma: mxs-dma: Report correct residue for cyclic DMA")
    the mxs dmaengine driver has support for residue reporting. So there is no need
    to specify the SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag anymore. This allows a
    finer grained resolution for the PCM pointer as well as avoids the race
    condition that can occur with the period counting that is used when the
    dmaengine driver does not support residue reporting.

    Signed-off-by: Lars-Peter Clausen
    Tested-by: Shawn Guo
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     
  • 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
    Tested-by: Shawn Guo
    Signed-off-by: Mark Brown

    Lars-Peter Clausen