30 Oct, 2019

1 commit

  • This converts the TXX9 SPI driver to use GPIO descriptors
    to control the GPIO chip selects.

    As the driver was clearly (ab)using the device tree "reg"
    property to offset into the global GPIO chip we have to
    add a hack to counter the hack: add a 1-to-1 chip select
    to GPIO offset mapping for all 16 lines on the TXX9 GPIO
    chip. The details are described in a largeish comment
    in the patch.

    We do not need to set up the GPIO as output any more since
    the core will take care of this, as well as it will handle
    the polarity inversion semantics.

    Cc: Atsushi Nemoto
    Signed-off-by: Linus Walleij
    Link: https://lore.kernel.org/r/20191030073832.24038-1-linus.walleij@linaro.org
    Signed-off-by: Mark Brown

    Linus Walleij
     

15 Oct, 2019

1 commit

  • For many places in the spi drivers, using the new `spi_transfer_delay`
    helper is straightforward.
    It's just replacing:
    ```
    if (t->delay_usecs)
    udelay(t->delay_usecs);
    ```
    with `spi_transfer_delay(t)` which handles both `delay_usecs` and the new
    `delay` field.

    This change replaces in all places (in the spi drivers) where this change
    is simple.

    Signed-off-by: Alexandru Ardelean
    Link: https://lore.kernel.org/r/20190926105147.7839-10-alexandru.ardelean@analog.com
    Signed-off-by: Mark Brown

    Alexandru Ardelean
     

19 Aug, 2016

1 commit


03 Jul, 2016

1 commit

  • The workqueue "workqueue" has a single work item(&c->work) and hence
    doesn't require ordering. Also, it is not being used on a memory reclaim
    path. Hence, the singlethreaded workqueue has been replaced with the use of
    system_wq.

    System workqueues have been able to handle high level of concurrency
    for a long time now and hence it's not required to have a singlethreaded
    workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
    created with create_singlethread_workqueue(), system_wq allows multiple
    work items to overlap executions even on the same CPU; however, a
    per-cpu workqueue doesn't have any CPU locality or global ordering
    guarantee unless the target CPU is explicitly specified and thus the
    increase of local concurrency shouldn't make any difference.

    Work item has been flushed in txx9spi_remove() to ensure that
    nothing is pending while disconnecting the driver.

    Signed-off-by: Bhaktipriya Shridhar
    Acked-by: Tejun Heo
    Signed-off-by: Mark Brown

    Bhaktipriya Shridhar
     

17 Sep, 2015

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
     

02 Dec, 2014

1 commit


20 Oct, 2014

1 commit


04 Sep, 2014

1 commit


11 Apr, 2014

1 commit


03 Apr, 2014

1 commit


01 Mar, 2014

1 commit


28 Feb, 2014

1 commit

  • Use devm_ioremap_resource() in order to make the code simpler,
    and remove redundant return value check of platform_get_resource()
    because the value is checked by devm_ioremap_resource().

    Signed-off-by: Jingoo Han
    Reviewed-by: Atsushi Nemoto
    Signed-off-by: Mark Brown

    Jingoo Han
     

10 Feb, 2014

1 commit


23 Jan, 2014

1 commit


20 Dec, 2013

1 commit


18 Dec, 2013

1 commit


15 Nov, 2013

1 commit

  • Once a spi_master_get() call succeeds, we need an additional
    spi_master_put() call to free the memory, otherwise we will
    leak a reference to master. Fix by removing the unnecessary
    spi_master_get() call.

    Fixes: 2fe7e4add3e5 ('spi: txx9: use devm_spi_register_master()')
    Signed-off-by: Wei Yongjun
    Signed-off-by: Mark Brown

    Wei Yongjun
     

25 Oct, 2013

2 commits


15 Oct, 2013

1 commit


09 Oct, 2013

1 commit


26 Sep, 2013

1 commit


30 Jul, 2013

1 commit


26 Jun, 2013

1 commit


02 Jun, 2013

1 commit


30 May, 2013

1 commit


05 Feb, 2013

2 commits

  • Some of the spi driver module remove hooks were annotated with __exit
    and referenced with __exit_p(). Presumably these were supposed to be
    __devinit, __devexit and __devexit_p() since __init/__exit for a
    probe/remove hook has never been correct. They also got missed during
    the big __devinit/__devexit purge since they didn't match the pattern.
    Remove then now to be rid of it.

    v2: purge __init also

    Reported-by: Arnd Bergmann
    [Arnd set a patch cleaning up one, and then I found more]
    Signed-off-by: Grant Likely

    Grant Likely
     
  • The spi core make sure that each transfer structure have the proper
    setting for bits_per_word before calling low level transfer APIs.

    Hence it is no more require to check again in low level driver for
    this field whether this is set correct or not. Removing such code
    from low level driver.

    The txx9 change also removes a test for bits_per_word set to 0, and
    forcing it to 8 in that case. This can also be removed now since
    spi_setup() ensures spi->bits_per_word is not zero.

    if (!spi->bits_per_word)
    spi->bits_per_word = 8;

    Signed-off-by: Laxman Dewangan
    Signed-off-by: Grant Likely

    Laxman Dewangan
     

01 Nov, 2011

1 commit


06 Jun, 2011

1 commit

  • Sort the SPI makefile and enforce the naming convention spi_*.c for
    spi drivers.

    This change also rolls the contents of atmel_spi.h into the .c file
    since there is only one user of that particular include file.

    v2: - Use 'spi-' prefix instead of 'spi_' to match what seems to be
    be the predominant pattern for subsystem prefixes.
    - Clean up filenames in Kconfig and header comment blocks

    Signed-off-by: Grant Likely
    Acked-by: Wolfram Sang
    Acked-by: Linus Walleij

    Grant Likely